aboutsummaryrefslogtreecommitdiffstats
path: root/main/lxc/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'main/lxc/APKBUILD')
-rw-r--r--main/lxc/APKBUILD111
1 files changed, 55 insertions, 56 deletions
diff --git a/main/lxc/APKBUILD b/main/lxc/APKBUILD
index 265c269614a..378798961aa 100644
--- a/main/lxc/APKBUILD
+++ b/main/lxc/APKBUILD
@@ -2,51 +2,49 @@
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=lxc
-pkgver=4.0.10
+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"
-# temp allow textrels on riscv64
-[ "$CARCH" = "riscv64" ] && options="$options textrels"
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:
@@ -55,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
@@ -82,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() {
@@ -91,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 gnupg 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() {
@@ -158,17 +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="
-ec3ccf344a91b50b30985562c54ad93d2db2d29c24d31da8e3a69e801c8bd23c1560274c1850c39eb7e984940ba86d3ebae75db136320d6bbc5eb03bda4c5318 lxc-4.0.10.tar.gz
-b74ffe7c3e8f193265a90ffeb6e5743b1212bc1416b898e5a7e59ddd7f06fc77dc34e2dcbb3614038ac6222a95e2b9beb9f03ab734c991837203ab626b1b091f lxc.initd
+acff2fc70cf2c65af37b70a21239482c3d845c408f7132558b54980e4400c23670c63178a3a3dfb239f047f529004df93cd829d728852a8c8647ce6babf7857f lxc-6.0.0.tar.gz
+db71783366277a68a5c8116604cf845da4780fe4aebdb5820ae2c4fe028cfe52a9c94246db362476f2f195be6a9c2b835edbe521423f116fc66eb50023d6daab lxc.initd
91de43db5369a9e10102933514d674e9c875218a1ff2910dd882e5b9c308f9e430deacb13d1d7e0b2ed1ef682d0bb035aa6f8a6738f54fa2ca3a05acce04e467 lxc.confd
"