From e813d08fb7c17ab36a5f49b488753d47b6c0086f Mon Sep 17 00:00:00 2001 From: Cameron Nemo Date: Fri, 5 Aug 2022 14:30:08 -0700 Subject: [PATCH] lxc: update to 5.0.1 --- srcpkgs/lxc/files/lxc-void | 6 +-- srcpkgs/lxc/patches/01-meson-docbook2x.patch | 49 ++++++++++++++++++++ srcpkgs/lxc/template | 26 +++++------ 3 files changed, 63 insertions(+), 18 deletions(-) create mode 100644 srcpkgs/lxc/patches/01-meson-docbook2x.patch diff --git a/srcpkgs/lxc/files/lxc-void b/srcpkgs/lxc/files/lxc-void index d4a97ee25987..948a5be9336a 100755 --- a/srcpkgs/lxc/files/lxc-void +++ b/srcpkgs/lxc/files/lxc-void @@ -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 diff --git a/srcpkgs/lxc/patches/01-meson-docbook2x.patch b/srcpkgs/lxc/patches/01-meson-docbook2x.patch new file mode 100644 index 000000000000..f21d8ba34b2b --- /dev/null +++ b/srcpkgs/lxc/patches/01-meson-docbook2x.patch @@ -0,0 +1,49 @@ +commit d91b4a300017bdcfbea8d013f05369ebba9a3d1e +Author: Cameron Nemo +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 + +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') diff --git a/srcpkgs/lxc/template b/srcpkgs/lxc/template index 1c10303f00d7..0905827da429 100644 --- a/srcpkgs/lxc/template +++ b/srcpkgs/lxc/template @@ -1,13 +1,13 @@ # 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 + -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 +15,7 @@ maintainer="Cameron Nemo " 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=" @@ -24,15 +24,11 @@ make_dirs=" /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 + # workaround https://github.com/lxc/lxc/issues/4178 + mkdir -p /etc/default } 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 +43,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