[arch-commits] Commit in bubblewrap/trunk (PKGBUILD)

Bartłomiej Piotrowski bpiotrowski at archlinux.org
Wed Jul 31 09:45:59 UTC 2019


    Date: Wednesday, July 31, 2019 @ 09:45:58
  Author: bpiotrowski
Revision: 358818

0.3.3-3: introduce suid variant for linux-hardened users

Modified:
  bubblewrap/trunk/PKGBUILD

----------+
 PKGBUILD |   41 +++++++++++++++++++++++++++++++----------
 1 file changed, 31 insertions(+), 10 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2019-07-31 09:29:22 UTC (rev 358817)
+++ PKGBUILD	2019-07-31 09:45:58 UTC (rev 358818)
@@ -1,8 +1,8 @@
 # Maintainer: Bartłomiej Piotrowski <bpiotrowski at archlinux.org>
 
-pkgname=bubblewrap
+pkgname=(bubblewrap bubblewrap-suid)
 pkgver=0.3.3
-pkgrel=2
+pkgrel=3
 pkgdesc='Unprivileged sandboxing tool'
 url='https://github.com/projectatomic/bubblewrap'
 arch=(x86_64)
@@ -14,23 +14,44 @@
 sha256sums=('SKIP')
 
 pkgver() {
-  cd $pkgname
+  cd $pkgbase
   git describe | sed 's/^v//'
 }
 
 prepare() {
-  cd $pkgname
+  cd $pkgbase
   NOCONFIGURE=1 ./autogen.sh
+
+  cd "$srcdir"
+  cp -r ${pkgbase}{,-none}
+  cp -r ${pkgbase}{,-setuid}
 }
 
-build() {
-  cd $pkgname
+_build() {
+  pushd ${pkgbase}-$1
   ./configure --prefix=/usr \
-    --with-priv-mode=none
+    --with-priv-mode=$1
   make
+  popd
 }
 
-package() {
-  cd $pkgname
-  make DESTDIR="$pkgdir" install
+_install() {
+  make -C "$srcdir/${pkgbase}-$1" DESTDIR="$pkgdir" install
 }
+
+build() {
+  _build none
+  _build setuid
+}
+
+package_bubblewrap() {
+  _install none
+}
+
+package_bubblewrap-suid() {
+  pkgdesc+=" (setuid variant)"
+  provides=(bubblewrap)
+  conflicts=(bubblewrap)
+
+  _install setuid
+}


More information about the arch-commits mailing list