lxc: update to 5.0.1

Close: #38493
This commit is contained in:
Cameron Nemo 2022-08-05 14:30:08 -07:00 committed by Đoàn Trần Công Danh
parent 7838d215d7
commit 8db76d6102
4 changed files with 125 additions and 21 deletions

View file

@ -42,8 +42,8 @@ arch=$(uname -m)
default_path="/var/lib/lxc"
LXC_TEMPLATE_CONFIG="/usr/share/lxc/config"
# Install 'base-voidstrap' by default
base_packages=('base-voidstrap')
# Install 'base-minimal' by default
base_packages=('base-minimal' 'dhcpcd' 'openssh' 'iproute2')
declare -a additional_packages
# split comma-separated string into an array
@ -282,6 +282,6 @@ fi
cat << EOF
Void container ${name} is successfully created! The configuration is
stored in ${config_path}/config. Please refer to http://www.voidlinux.eu
stored in ${config_path}/config. Please refer to https://docs.voidlinux.org
for information about configuring your Void installation.
EOF

View file

@ -0,0 +1,49 @@
commit d91b4a300017bdcfbea8d013f05369ebba9a3d1e
Author: Cameron Nemo <cam@nohom.org>
Date: Sun Aug 7 11:10:31 2022 -0700
meson: add option to force docbook2x format
Some distros ship docbook2x as docbook2man, which perplexes the logic in
the meson.build that chooses the "docdtd" value.
Add a build option to always use the newer docbook2x docdtd value.
Signed-off-by: Cameron Nemo <cam@nohom.org>
diff --git a/meson.build b/meson.build
index a145faf06..9c0e6e488 100644
--- a/meson.build
+++ b/meson.build
@@ -135,6 +135,7 @@ cgrouppattern = get_option('cgroup-pattern')
coverity = get_option('coverity-build')
init_script = get_option('init-script')
sanitize = get_option('b_sanitize')
+docbook2x_only = get_option('docbook2x-only')
want_examples = get_option('examples')
want_io_uring = get_option('io-uring-event-loop')
want_pam_cgroup = get_option('pam-cgroup')
@@ -337,7 +338,7 @@ docconf.set('LXCTEMPLATEDIR', lxctemplatedir)
docconf.set('LXC_USERNIC_CONF', lxc_user_network_conf)
docconf.set('LXC_USERNIC_DB', lxc_user_network_db)
docconf.set('PACKAGE_VERSION', version_data.get('LXC_VERSION'))
-if sgml2man.found() and docbook2man.found() and sgml2man.full_path() == docbook2man.full_path()
+if sgml2man.found() and docbook2man.found() and sgml2man.full_path() == docbook2man.full_path() and not docbook2x_only
docconf.set('docdtd', '"-//Davenport//DTD DocBook V3.0//EN"')
else
docconf.set('docdtd', '"-//OASIS//DTD DocBook XML" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"')
diff --git a/meson_options.txt b/meson_options.txt
index c14dacf27..ccc4dde5d 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -9,6 +9,10 @@ option('cgroup-pattern', type: 'string', value: '',
option('coverity-build', type: 'boolean', value: 'true',
description: 'build for coverity')
+# no configure equivalent
+option('docbook2x-only', type: 'boolean', value: 'false',
+ description: 'always use DocBook 2x format')
+
# was --{disable,enable}-examples in autotools
option('examples', type: 'boolean', value: 'true',
description: 'build and install examples')

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

@ -1,13 +1,14 @@
# Template file for 'lxc'
pkgname=lxc
version=4.0.12
version=5.0.1
revision=1
build_style=gnu-configure
configure_args="--enable-doc --enable-seccomp
--enable-capabilities --enable-apparmor --with-distro=none
--with-rootfs-path=/var/lxc/containers --with-log-path=/var/lxc/log"
hostmakedepends="automake libtool pkg-config docbook2x"
makedepends="libcap-devel libseccomp-devel gnutls-devel libapparmor-devel"
build_style=meson
configure_args="-Dpam-cgroup=true -Drootfs-mount-path=/var/lxc/containers
-Ddistrosysconfdir=default
-Dlog-path=/var/lxc/log -Dinit-script=[] -Ddocbook2x-only=true"
hostmakedepends="pkg-config docbook2x"
makedepends="libcap-devel libseccomp-devel openssl-devel libapparmor-devel
pam-devel"
depends="xz wget"
_desc="Linux Containers"
short_desc="${_desc} - utilities"
@ -15,7 +16,7 @@ maintainer="Cameron Nemo <cnemo@tutanota.com>"
license="LGPL-2.1-or-later"
homepage="https://linuxcontainers.org"
distfiles="https://linuxcontainers.org/downloads/lxc/lxc-${version}.tar.gz"
checksum=db242f8366fc63e8c7588bb2017b354173cf3c4b20abc18780debdc48b14d3ef
checksum=d8195423bb1e206f8521d24b6cde4789f043960c7cf065990a9cf741dcfd4222
conf_files="/etc/lxc/default.conf"
make_dirs="
@ -23,16 +24,7 @@ make_dirs="
/var/lxc/containers 0755 root root
/var/lxc/log 0755 root root"
pre_configure() {
# make sure the build uses the new docbook2x format,
# even though the command has the old "docbook2man" name
sed -e 's,xdocbook2man,xforcedocbook2x,g' -i configure.ac
./autogen.sh
}
post_install() {
vmkdir usr/share/bash-completion/completions
mv ${DESTDIR}/etc/bash_completion.d/* ${DESTDIR}/usr/share/bash-completion/completions/
# Install void lxc config/template.
vinstall ${FILESDIR}/void.common.conf 644 usr/share/lxc/config
vinstall ${FILESDIR}/lxc-void 755 usr/share/lxc/templates
@ -47,7 +39,7 @@ liblxc_package() {
}
lxc-devel_package() {
depends="libcap-devel liblxc>=${version}_${revision}"
depends="${makedepends} liblxc>=${version}_${revision}"
short_desc="${_desc} - development files"
pkg_install() {
vmove usr/include