1
0
forked from ports/contrib

lxc: 4.0.12 -> 5.0.1

This commit is contained in:
Tim Biermann 2022-08-25 21:37:47 +02:00
parent 2217834bb4
commit ab6bff22d1
5 changed files with 114 additions and 74 deletions

View File

@ -6,13 +6,13 @@ drwxr-xr-x root/root etc/lxc/
-rw-r--r-- root/root etc/lxc/default.conf
-rw-r--r-- root/root etc/lxc/lxc-usernet
drwxr-xr-x root/root etc/rc.d/
-rwxr-xr-x root/root etc/rc.d/lxc
-rwxr-xr-x root/root etc/rc.d/lxc-cgroups
-rwxr-xr-x root/root etc/rc.d/lxc-net
-rw-r--r-- root/root etc/rc.d/lxc-containers
-rw-r--r-- root/root etc/rc.d/lxc-net
-rwxr-xr-x root/root etc/rc.d/lxc-users
drwxr-xr-x root/root lib/
drwxr-xr-x root/root lib/security/
-rwxr-xr-x root/root lib/security/pam_cgfs.so
-rw-r--r-- root/root lib/security/pam_cgfs.so
drwxr-xr-x root/root usr/
drwxr-xr-x root/root usr/bin/
-rwxr-xr-x root/root usr/bin/lxc-attach
@ -46,11 +46,10 @@ drwxr-xr-x root/root usr/include/lxc/
-rw-r--r-- root/root usr/include/lxc/lxccontainer.h
-rw-r--r-- root/root usr/include/lxc/version.h
drwxr-xr-x root/root usr/lib/
-rw-r--r-- root/root usr/lib/liblxc.a
-rwxr-xr-x root/root usr/lib/liblxc.la
lrwxrwxrwx root/root usr/lib/liblxc.so -> liblxc.so.1
lrwxrwxrwx root/root usr/lib/liblxc.so.1 -> liblxc.so.1.7.0
-rwxr-xr-x root/root usr/lib/liblxc.so.1.7.0
-rw-r--r-- root/root usr/lib/liblxc_static.a
drwxr-xr-x root/root usr/lib/lxc/
drwxr-xr-x root/root usr/lib/lxc/hooks/
-rwxr-xr-x root/root usr/lib/lxc/hooks/unmount-namespace
@ -84,49 +83,11 @@ drwxr-xr-x root/root usr/share/lxc/hooks/
-rwxr-xr-x root/root usr/share/lxc/hooks/ubuntu-cloud-prep
-rw-r--r-- root/root usr/share/lxc/lxc-patch.py
-rw-r--r-- root/root usr/share/lxc/lxc.functions
drwxr-xr-x root/root usr/share/lxc/selinux/
-rw-r--r-- root/root usr/share/lxc/selinux/lxc.if
-rw-r--r-- root/root usr/share/lxc/selinux/lxc.te
drwxr-xr-x root/root usr/share/lxc/templates/
-rwxr-xr-x root/root usr/share/lxc/templates/lxc-busybox
-rwxr-xr-x root/root usr/share/lxc/templates/lxc-download
-rwxr-xr-x root/root usr/share/lxc/templates/lxc-local
-rwxr-xr-x root/root usr/share/lxc/templates/lxc-oci
drwxr-xr-x root/root usr/share/man/
drwxr-xr-x root/root usr/share/man/man1/
-rw-r--r-- root/root usr/share/man/man1/lxc-attach.1.gz
-rw-r--r-- root/root usr/share/man/man1/lxc-autostart.1.gz
-rw-r--r-- root/root usr/share/man/man1/lxc-cgroup.1.gz
-rw-r--r-- root/root usr/share/man/man1/lxc-checkconfig.1.gz
-rw-r--r-- root/root usr/share/man/man1/lxc-checkpoint.1.gz
-rw-r--r-- root/root usr/share/man/man1/lxc-config.1.gz
-rw-r--r-- root/root usr/share/man/man1/lxc-console.1.gz
-rw-r--r-- root/root usr/share/man/man1/lxc-copy.1.gz
-rw-r--r-- root/root usr/share/man/man1/lxc-create.1.gz
-rw-r--r-- root/root usr/share/man/man1/lxc-destroy.1.gz
-rw-r--r-- root/root usr/share/man/man1/lxc-device.1.gz
-rw-r--r-- root/root usr/share/man/man1/lxc-execute.1.gz
-rw-r--r-- root/root usr/share/man/man1/lxc-freeze.1.gz
-rw-r--r-- root/root usr/share/man/man1/lxc-info.1.gz
-rw-r--r-- root/root usr/share/man/man1/lxc-ls.1.gz
-rw-r--r-- root/root usr/share/man/man1/lxc-monitor.1.gz
-rw-r--r-- root/root usr/share/man/man1/lxc-snapshot.1.gz
-rw-r--r-- root/root usr/share/man/man1/lxc-start.1.gz
-rw-r--r-- root/root usr/share/man/man1/lxc-stop.1.gz
-rw-r--r-- root/root usr/share/man/man1/lxc-top.1.gz
-rw-r--r-- root/root usr/share/man/man1/lxc-unfreeze.1.gz
-rw-r--r-- root/root usr/share/man/man1/lxc-unshare.1.gz
-rw-r--r-- root/root usr/share/man/man1/lxc-update-config.1.gz
-rw-r--r-- root/root usr/share/man/man1/lxc-user-nic.1.gz
-rw-r--r-- root/root usr/share/man/man1/lxc-usernsexec.1.gz
-rw-r--r-- root/root usr/share/man/man1/lxc-wait.1.gz
drwxr-xr-x root/root usr/share/man/man5/
-rw-r--r-- root/root usr/share/man/man5/lxc-usernet.5.gz
-rw-r--r-- root/root usr/share/man/man5/lxc.conf.5.gz
-rw-r--r-- root/root usr/share/man/man5/lxc.container.conf.5.gz
-rw-r--r-- root/root usr/share/man/man5/lxc.system.conf.5.gz
drwxr-xr-x root/root usr/share/man/man7/
-rw-r--r-- root/root usr/share/man/man7/lxc.7.gz
drwxr-xr-x root/root var/
drwxr-xr-x root/root var/cache/
drwxr-xr-x root/root var/cache/lxc/

View File

@ -1,12 +1,12 @@
untrusted comment: verify with /etc/ports/contrib.pub
RWSagIOpLGJF3zo17H+6aPnPIbkJ5jNLGe2x+WrmwAUS6o2j+oM856Wi3YvQswOVDAujz4/puooMebLws2vagrV/iXIC94bq3Q8=
SHA256 (Pkgfile) = 4f45db94182d1d66373a70814c474247c39148f9b4a2888d4cf16704b35eb7ed
SHA256 (.footprint) = 9fe6acac2fae505a8d46a745ee9b6c7ce5bd51e92d747392e86443553695d19c
SHA256 (lxc-4.0.12.tar.gz) = db242f8366fc63e8c7588bb2017b354173cf3c4b20abc18780debdc48b14d3ef
SHA256 (man-pages.tar.xz) = 28e6602414149ca4cc1afbabb203afe12b2e694436b23d7a2501a2b6a868e473
RWSagIOpLGJF33eTZyOE+gOloyzmgN2loJX7jRCISYECo1GNcwWuT6TmjVW7CpeduEbGDqmjzQcCUPIqdIBiBsaro1NFIdgjmwQ=
SHA256 (Pkgfile) = 986dc202bed69cddbc80cf07031626b005b70265987569b4cc1cd8047d2b0a1a
SHA256 (.footprint) = c5c5ea11f58282ae02e7c37ce978aa60ca0c2450ce7e04f7f066b8b0b5a17a5c
SHA256 (lxc-5.0.1.tar.gz) = d8195423bb1e206f8521d24b6cde4789f043960c7cf065990a9cf741dcfd4222
SHA256 (default.conf) = 6739fe54ffe7924a63fd47d8ff4b453e08b78bbd1b08e4426504b8f740e8b55f
SHA256 (lxc-usernet) = 83c30e9489fffd7bf815e312860e2c9b3022a0f422570d35a19eb021b433fe0f
SHA256 (lxc-users-setup) = 995f72d2284334ab84790951cfbf91d9b7016f4a93a3c51d774dea0e04e8000b
SHA256 (lxc-users) = 7b58fae4b1551c63d7839560875e4f8461aade852f33611a8a8319957f23b0eb
SHA256 (lxc-cgroups) = 6cdc6b76c438dfbcacf7ccd20ae9190ca5d12bad9fba60c5d77052c0e3f9258b
SHA256 (lxc-net) = 4e597a3ebb896ff852d54d4add562945bcf91e1005f3963ee7cbfc82606fcf2c
SHA256 (02-distrosysconfdir.patch) = 43aab13e0c9f1e2b640d5da4b112c0f965bf62e9afc9d0c20ed4a6ed4e6b61c6

View File

@ -0,0 +1,63 @@
From 16ebb29dccb35bf74e8a19e8c45d2513f927476f Mon Sep 17 00:00:00 2001
Message-Id: <16ebb29dccb35bf74e8a19e8c45d2513f927476f.1660130248.git.congdanhqx@gmail.com>
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
<congdanhqx@gmail.com>
Date: Tue, 9 Aug 2022 22:24:09 +0700
Subject: [PATCH] meson.build: allow explicit distrosysconfdir
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Allows either:
- Build inside minimal-and-clean chroot with neither
/etc/sysconfig nor /etc/default available.
- Cross Compile lxc from foreign distro,
let's say host distro uses /etc/sysconfig and build distro
uses /etc/default and vice versus.
Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>
---
meson.build | 8 ++++++--
meson_options.txt | 3 +++
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/meson.build b/meson.build
index a145faf0..b27cc8ed 100644
--- a/meson.build
+++ b/meson.build
@@ -117,14 +117,18 @@ conf.set('SYSCONFDIR', sysconfdir)
# Set sysconfdir
fs = import('fs')
-if fs.is_dir('/etc/sysconfig')
+distrosysconfdir = get_option('distrosysconfdir')
+if distrosysconfdir != ''
+ distrosysconfdir = join_paths(sysconfdir, distrosysconfdir)
+ conf.set('LXC_DISTRO_SYSCONF', distrosysconfdir)
+elif fs.is_dir('/etc/sysconfig')
distrosysconfdir = join_paths(sysconfdir, 'sysconfig')
conf.set('LXC_DISTRO_SYSCONF', distrosysconfdir)
elif fs.is_dir('/etc/default')
distrosysconfdir = join_paths(sysconfdir, 'default')
conf.set('LXC_DISTRO_SYSCONF', distrosysconfdir)
else
- distrosysconfdir = ''
+ error('"distrosysconfdir" is not set')
endif
# Cross-compile on Android.
diff --git a/meson_options.txt b/meson_options.txt
index c14dacf2..de583a08 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -115,3 +115,6 @@ option('thread-safety', type : 'boolean', value : 'true',
# was --{disable,enable}-memfd-rexec in autotools
option('memfd-rexec', type : 'boolean', value : 'true',
description : 'whether to rexec the lxc-attach binary when attaching to a container')
+
+option('distrosysconfdir', type : 'string', value: '',
+ description: 'relative path to sysconfdir for distro default configuration')
--
2.37.1.561.ga4036fcf2c

View File

@ -2,48 +2,64 @@
# URL: https://linuxcontainers.org/lxc
# Maintainer: Tim Biermann, tbier at posteo dot de
# Packager: ryuo, James Buren
# Packager: Thomas Penteker, tek at serverop dot de
# Depends: libseccomp
# Optional: gnupg dnsmasq
# Depends: libseccomp meson ninja
# Optional: dnsmasq gnupg lua
name=lxc
version=4.0.12
version=5.0.1
release=1
source=(https://linuxcontainers.org/downloads/$name/$name-$version.tar.gz
man-pages.tar.xz default.conf lxc-usernet lxc-users-setup
lxc-users lxc-cgroups lxc-net)
default.conf lxc-usernet lxc-users-setup lxc-users lxc-cgroups lxc-net
02-distrosysconfdir.patch)
build() {
cd $name-$version
./configure --prefix=/usr \
--mandir=/usr/share/man \
--libexecdir=/usr/lib \
--localstatedir=/var \
patch -Np1 -d $name-$version -i $SRC/02-distrosysconfdir.patch
# fix pam_libdir
sed "/pam_security/s/libdir/'\/', 'lib'/" -i $name-$version/meson.build
prt-get isinst docbook2x && PKGMK_LXC+=' -D man=true' || PKGMK_LXC+=' -D man=false'
meson setup $name-$version build $PKGMK_LXC \
--prefix=/usr \
--sysconfdir=/etc \
--enable-pam \
--with-pamdir=/lib/security \
--disable-apparmor \
--with-init-script=sysvinit
--libexecdir=lib \
--localstatedir=/var \
-D distrosysconfdir=/etc/default \
-D data-path=/var/lib/lxc \
-D log-path=/var/log/lxc \
-D rootfs-mount-path=/usr/lib/lxc/rootfs \
-D runtime-path=/run \
--buildtype=plain \
--wrap-mode nodownload \
-D b_lto=true \
-D b_pie=true \
-D init-script=sysvinit \
-D pam-cgroup=true \
-D apparmor=false
make
make DESTDIR=$PKG install
meson compile -C build
DESTDIR=$PKG meson install -C build
install -d $PKG/usr/share/man
install -d $PKG/etc/{default,rc.d}
install -d $PKG/var/lib/misc
install -m 0755 $SRC/lxc-users-setup $PKG/usr/sbin/
mv $SRC/man* $PKG/usr/share/man
rm -rf $PKG/usr/lib/lxc/rootfs/README $PKG/usr/share/doc
rm -rf $PKG/usr/share/lxc/config/common.conf.d/README
mv $PKG/etc/rc.d/init.d/* $PKG/etc/rc.d/
rm -rf $PKG/usr/lib/lxc/rootfs/README \
$PKG/usr/lib/lxc/lxc-apparmor-load \
$PKG/usr/share/doc \
$PKG/usr/share/lxc/config/common.conf.d/README
mv $PKG/etc/init.d/* $PKG/etc/rc.d/
install -m755 $SRC/lxc-cgroups $PKG/etc/rc.d/
install -m755 $SRC/lxc-users $PKG/etc/rc.d/
rmdir $PKG/etc/rc.d/init.d/
rmdir $PKG/etc/init.d/
install -m644 $SRC/lxc-net $PKG/etc/default/
rm $PKG/etc/lxc/default.conf
install -m644 $SRC/default.conf $PKG/etc/lxc/
install -m644 $SRC/lxc-usernet $PKG/etc/lxc/
if [ "$(prt-get isinst bash-completion)" = 'package bash-completion is not installed' ]; then
rm -fr $PKG/etc/bash_completion.d;
fi
prt-get isinst bash-completion || rm -fr $PKG/etc/bash_completion.d \
$PKG/usr/share/bash-completion
}

Binary file not shown.