diff options
Diffstat (limited to 'main/lxc/APKBUILD')
-rw-r--r-- | main/lxc/APKBUILD | 114 |
1 files changed, 59 insertions, 55 deletions
diff --git a/main/lxc/APKBUILD b/main/lxc/APKBUILD index e5969e4b9f8..378798961aa 100644 --- a/main/lxc/APKBUILD +++ b/main/lxc/APKBUILD @@ -2,48 +2,49 @@ # Contributor: Jakub Jirutka <jakub@jirutka.cz> # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=lxc -pkgver=4.0.2 +pkgver=6.0.0 _pkgver=${pkgver/_rc/.rc} -pkgrel=0 +pkgrel=1 pkgdesc="Userspace interface for the Linux kernel containment features" url="https://linuxcontainers.org/lxc/" arch="all" -license="GPL-2.0-only" +license="LGPL-2.1-or-later" makedepends=" + dbus-dev + docbook2x + libapparmor-dev libcap-dev libcap-static libseccomp-dev - linux-pam-dev linux-headers - bsd-compat-headers - docbook2x - - automake - autoconf - libtool + linux-pam-dev + meson " - -options="suid" subpackages=" + $pkgname-dbg $pkgname-dev $pkgname-doc $pkgname-openrc $pkgname-lvm::noarch + $pkgname-test-utils:_test_utils $pkgname-libs $pkgname-bridge::noarch - $pkgname-bash-completion:bashcomp:noarch + $pkgname-bash-completion $pkgname-pam $pkgname-download:_download:noarch $pkgname-templates-oci:templates_oci:noarch $pkgname-templates::noarch " - source="https://linuxcontainers.org/downloads/lxc/lxc-$_pkgver.tar.gz lxc.initd lxc.confd " +# no buildtime tests +options="!check suid" # secfixes: +# 5.0.1-r2: +# - CVE-2022-47952 # 3.1.0-r1: # - CVE-2019-5736 # 2.1.1-r9: @@ -52,26 +53,27 @@ source="https://linuxcontainers.org/downloads/lxc/lxc-$_pkgver.tar.gz _tmpldir="usr/share/lxc/templates" build() { - ./configure \ - --build=$CBUILD \ - --host=$CHOST \ - --prefix=/usr \ - --sysconfdir=/etc \ - --localstatedir=/var \ - --disable-apparmor \ - --enable-pam \ - --with-distro=alpine \ - --disable-werror \ - --enable-doc - make -} - -check() { - make check + case "$CARCH" in + riscv64) + local lto=false + ;; + *) + local lto=true + ;; + esac + abuild-meson \ + -Db_lto=$lto \ + -Ddistrosysconfdir=/etc/default \ + -Dpam-cgroup=true \ + -Dtests=true \ + -Dinit-script="[]" \ + . output + + meson compile -C output } package() { - make DESTDIR="$pkgdir" install + DESTDIR="$pkgdir" meson install --no-rebuild -C output install -Dm755 "$srcdir"/lxc.initd "$pkgdir"/etc/init.d/lxc install -Dm644 "$srcdir"/lxc.confd "$pkgdir"/etc/conf.d/lxc @@ -79,6 +81,11 @@ package() { # Remove useless config for SysVinit. rm -r "$pkgdir"/etc/default + + # they install this to libdir, but the other things are in /usr/lib + # so we can't change it + mkdir -p "$pkgdir"/lib + mv "$pkgdir"/usr/lib/security "$pkgdir"/lib } lvm() { @@ -88,40 +95,44 @@ lvm() { mkdir "$subpkgdir" } +_test_utils() { + pkgdesc="Runtime testing utilities for LXC" + + amove usr/bin/lxc-test-* +} + _py3() { pkgdesc="Python3 module for LXC" depends="python3" - mkdir -p "$subpkgdir"/usr/lib - mv "$pkgdir"/usr/lib/python3.* "$subpkgdir"/usr/lib + + amove usr/lib/python3* } _download() { pkgdesc="LXC container image downloader template" - depends="$pkgname gnupg1 tar wget" + depends="$pkgname gpg gnupg-dirmngr tar wget" - mkdir -p "$subpkgdir"/$_tmpldir - mv "$pkgdir"/$_tmpldir/lxc-download "$subpkgdir"/$_tmpldir/ + amove $_tmpldir/lxc-download } templates() { pkgdesc="Templates for LXC (except alpine and download)" depends="tar" - mkdir -p "$subpkgdir"/$_tmpldir - mv "$pkgdir"/$_tmpldir/* "$subpkgdir"/$_tmpldir/ + + amove $_tmpldir/* } templates_oci() { pkgdesc="OCI Template for LXC" depends="bash jq" - mkdir -p "$subpkgdir"/usr/share/lxc/templates - mv "$pkgdir"/usr/share/lxc/templates/lxc-oci \ - "$subpkgdir"/usr/share/lxc/templates/ + + amove $_tmpldir/lxc-oci } pam() { pkgdesc="PAM module for LXC" - mkdir -p "$subpkgdir"/lib/security - mv "$pkgdir"/lib/security/pam_cgfs.so "$subpkgdir"/lib/security/ + + amove lib/security } dev() { @@ -155,15 +166,8 @@ bridge() { EOF } -bashcomp() { - depends="" - pkgdesc="Bash completions for $pkgname" - install_if="$pkgname=$pkgver-r$pkgrel bash-completion" - mkdir -p "$subpkgdir"/usr/share/bash-completion/completions - mv "$pkgdir"/etc/bash_completion.d/$pkgname "$subpkgdir"/usr/share/bash-completion/completions - rmdir "$pkgdir"/etc/bash_completion.d -} - -sha512sums="0de6c1f9649d161579b45fc28a735f703c4498eff9c588462b838220aeab73f91921db628f77bc461eff38c7583cac10a38951263181956e2d33412a406f3ef3 lxc-4.0.2.tar.gz -b74ffe7c3e8f193265a90ffeb6e5743b1212bc1416b898e5a7e59ddd7f06fc77dc34e2dcbb3614038ac6222a95e2b9beb9f03ab734c991837203ab626b1b091f lxc.initd -91de43db5369a9e10102933514d674e9c875218a1ff2910dd882e5b9c308f9e430deacb13d1d7e0b2ed1ef682d0bb035aa6f8a6738f54fa2ca3a05acce04e467 lxc.confd" +sha512sums=" +acff2fc70cf2c65af37b70a21239482c3d845c408f7132558b54980e4400c23670c63178a3a3dfb239f047f529004df93cd829d728852a8c8647ce6babf7857f lxc-6.0.0.tar.gz +db71783366277a68a5c8116604cf845da4780fe4aebdb5820ae2c4fe028cfe52a9c94246db362476f2f195be6a9c2b835edbe521423f116fc66eb50023d6daab lxc.initd +91de43db5369a9e10102933514d674e9c875218a1ff2910dd882e5b9c308f9e430deacb13d1d7e0b2ed1ef682d0bb035aa6f8a6738f54fa2ca3a05acce04e467 lxc.confd +" |