lxc: set lxc-user-nic suid bit, docbook2x patch

Switch to meson had a small casualty.
Rebuild with patched meson.

Also simplify the docbook2x patch based on recommendations from Eli
Schwartz.

Closes #38682
This commit is contained in:
Cameron Nemo 2022-08-16 13:22:50 -07:00 committed by Michal Vasilek
parent 7d5f675e8a
commit 46cf275143
2 changed files with 33 additions and 37 deletions

View File

@ -1,49 +1,45 @@
commit d91b4a300017bdcfbea8d013f05369ebba9a3d1e commit 06f99c2599db8140bd839532caa8f6ee0d1c3ff6
Author: Cameron Nemo <cam@nohom.org> Author: Cameron Nemo <cam@nohom.org>
Date: Sun Aug 7 11:10:31 2022 -0700 Date: Tue Aug 16 20:30:39 2022 -0700
meson: add option to force docbook2x format meson: fix docbook2x detection
Some distros ship docbook2x as docbook2man, which perplexes the logic in docbook2man can sometimes be docbook2x and other times be docbook-utils.
the meson.build that chooses the "docdtd" value. Rather than compare paths, use version constraints to detect version.
Add a build option to always use the newer docbook2x docdtd value.
Signed-off-by: Cameron Nemo <cam@nohom.org> Signed-off-by: Cameron Nemo <cam@nohom.org>
diff --git a/meson.build b/meson.build diff --git a/meson.build b/meson.build
index a145faf06..9c0e6e488 100644 index 666824c5a..2b160d4ac 100644
--- a/meson.build --- a/meson.build
+++ b/meson.build +++ b/meson.build
@@ -135,6 +135,7 @@ cgrouppattern = get_option('cgroup-pattern') @@ -324,9 +324,6 @@ endif
coverity = get_option('coverity-build') generate_date = run_command(date, '--utc', '--date=@' + time_epoch, '+%Y-%m-%d', check: true).stdout().strip()
init_script = get_option('init-script')
sanitize = get_option('b_sanitize') ## Manpages.
+docbook2x_only = get_option('docbook2x-only') -sgml2man = find_program('docbook2X2man', 'docbook2x-man', 'db2x_docbook2man', 'docbook2man', 'docbook-to-man', required: want_mans)
want_examples = get_option('examples') -docbook2man = find_program('docbook2man', required: false)
want_io_uring = get_option('io-uring-event-loop') -
want_pam_cgroup = get_option('pam-cgroup') docconf = configuration_data()
@@ -337,7 +338,7 @@ docconf.set('LXCTEMPLATEDIR', lxctemplatedir) docconf.set('builddir', '.')
docconf.set('BINDIR', bindir)
@@ -341,10 +338,15 @@ docconf.set('LXCTEMPLATEDIR', lxctemplatedir)
docconf.set('LXC_USERNIC_CONF', lxc_user_network_conf) docconf.set('LXC_USERNIC_CONF', lxc_user_network_conf)
docconf.set('LXC_USERNIC_DB', lxc_user_network_db) docconf.set('LXC_USERNIC_DB', lxc_user_network_db)
docconf.set('PACKAGE_VERSION', version_data.get('LXC_VERSION')) 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()
+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"')
docconf.set('docdtd', '"-//Davenport//DTD DocBook V3.0//EN"') -else
else - docconf.set('docdtd', '"-//OASIS//DTD DocBook XML" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"')
docconf.set('docdtd', '"-//OASIS//DTD DocBook XML" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"') +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 +sgml2man = find_program('docbook2X2man', 'docbook2x-man', 'db2x_docbook2man', 'docbook2man', 'docbook-to-man', required: false, version: '>=0.8')
index c14dacf27..ccc4dde5d 100644 +if not sgml2man.found()
--- a/meson_options.txt + sgml2man = find_program('docbook2man', required: false, version: '<0.8')
+++ b/meson_options.txt + if sgml2man.found()
@@ -9,6 +9,10 @@ option('cgroup-pattern', type: 'string', value: '', + docconf.set('docdtd', '"-//Davenport//DTD DocBook V3.0//EN"')
option('coverity-build', type: 'boolean', value: 'true', + elif want_mans
description: 'build for coverity') + error('missing required docbook2x or docbook-utils dependency')
+ endif
endif
+# no configure equivalent ## Threads.
+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

@ -1,11 +1,11 @@
# Template file for 'lxc' # Template file for 'lxc'
pkgname=lxc pkgname=lxc
version=5.0.1 version=5.0.1
revision=1 revision=2
build_style=meson build_style=meson
configure_args="-Dpam-cgroup=true -Drootfs-mount-path=/var/lxc/containers configure_args="-Dpam-cgroup=true -Drootfs-mount-path=/var/lxc/containers
-Ddistrosysconfdir=default -Ddistrosysconfdir=default
-Dlog-path=/var/lxc/log -Dinit-script=[] -Ddocbook2x-only=true" -Dlog-path=/var/lxc/log -Dinit-script=[]"
hostmakedepends="pkg-config docbook2x" hostmakedepends="pkg-config docbook2x"
makedepends="libcap-devel libseccomp-devel openssl-devel libapparmor-devel makedepends="libcap-devel libseccomp-devel openssl-devel libapparmor-devel
pam-devel" pam-devel"