mirror of
https://github.com/systemd/systemd.git
synced 2026-11-06 05:17:24 +00:00
meson: add feature flag for clonesetup
clonesetup builds and installs binaries, docs, units, etc. Add a feature flag to make it easier to avoid shipping it.
This commit is contained in:
1 parent
0bc7a465e7
commit
c5018d9dbf
9 files changed
+27
-7
No files matched your search
+2
-1
@@ -5,7 +5,8 @@
|
||||
<!--
|
||||
SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
-->
|
||||
<refentry id="clonetab" xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||
<refentry id="clonetab" conditional="ENABLE_CLONESETUP"
|
||||
xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||
|
||||
<refentryinfo>
|
||||
<title>clonetab</title>
|
||||
|
||||
@@ -15,7 +15,7 @@ manpages = [
|
||||
['bootup', '7', [], ''],
|
||||
['busctl', '1', [], ''],
|
||||
['capsule@.service', '5', [], ''],
|
||||
['clonetab', '5', [], ''],
|
||||
['clonetab', '5', [], 'ENABLE_CLONESETUP'],
|
||||
['coredump.conf', '5', ['coredump.conf.d'], 'ENABLE_COREDUMP'],
|
||||
['coredumpctl', '1', [], 'ENABLE_COREDUMP'],
|
||||
['crypttab', '5', [], 'HAVE_LIBCRYPTSETUP'],
|
||||
@@ -1051,8 +1051,11 @@ manpages = [
|
||||
['systemd-cat', '1', [], ''],
|
||||
['systemd-cgls', '1', [], ''],
|
||||
['systemd-cgtop', '1', [], ''],
|
||||
['systemd-clonesetup-generator', '8', [], ''],
|
||||
['systemd-clonesetup', '8', ['systemd-clonesetup@.service'], ''],
|
||||
['systemd-clonesetup-generator', '8', [], 'ENABLE_CLONESETUP'],
|
||||
['systemd-clonesetup',
|
||||
'8',
|
||||
['systemd-clonesetup@.service'],
|
||||
'ENABLE_CLONESETUP'],
|
||||
['systemd-coredump',
|
||||
'8',
|
||||
['systemd-coredump-register.service',
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
|
||||
<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
|
||||
<refentry id="systemd-clonesetup-generator" xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||
<refentry id="systemd-clonesetup-generator" conditional="ENABLE_CLONESETUP"
|
||||
xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||
|
||||
<refentryinfo>
|
||||
<title>systemd-clonesetup-generator</title>
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
|
||||
<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
|
||||
<refentry id="systemd-clonesetup" xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||
<refentry id="systemd-clonesetup" conditional="ENABLE_CLONESETUP"
|
||||
xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||
|
||||
<refentryinfo>
|
||||
<title>systemd-clonesetup</title>
|
||||
|
||||
@@ -1794,6 +1794,7 @@ conf.set10('ENABLE_NSPAWN', feature.allowed())
|
||||
conf.set10('DEFAULT_MOUNTFSD_TRUSTED_DIRECTORIES', get_option('default-mountfsd-trusted-directories'))
|
||||
|
||||
conf.set10('ENABLE_BATTERY_CHECK', get_option('battery-check').allowed())
|
||||
conf.set10('ENABLE_CLONESETUP', get_option('clonesetup').allowed())
|
||||
|
||||
foreach tuple : [
|
||||
['analyze'],
|
||||
@@ -3440,6 +3441,7 @@ foreach tuple : [
|
||||
['binfmt'],
|
||||
['bootloader'],
|
||||
['bpf-framework', conf.get('BPF_FRAMEWORK') == 1],
|
||||
['clonesetup'],
|
||||
['coredump'],
|
||||
['efi'],
|
||||
['environment.d'],
|
||||
|
||||
@@ -167,6 +167,8 @@ option('battery-check', type : 'feature',
|
||||
description : 'install systemd-battery-check and associated files')
|
||||
option('binfmt', type : 'boolean',
|
||||
description : 'support for custom binary formats')
|
||||
option('clonesetup', type : 'feature',
|
||||
description : 'install systemd-clonesetup and associated files')
|
||||
option('coredump', type : 'boolean',
|
||||
description : 'install the coredump handler')
|
||||
option('create-log-dirs', type : 'boolean',
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
if conf.get('ENABLE_CLONESETUP') != 1
|
||||
subdir_done()
|
||||
endif
|
||||
|
||||
systemd_clonesetup_sources = files(
|
||||
'clonesetup-ioctl.c',
|
||||
'clonesetup.c',
|
||||
|
||||
@@ -4,10 +4,15 @@ set -eux
|
||||
set -o pipefail
|
||||
set -E
|
||||
|
||||
CLONESETUP_BIN=/usr/lib/systemd/systemd-clonesetup
|
||||
if [[ ! -x "$CLONESETUP_BIN" ]]; then
|
||||
echo "systemd-clonesetup is not installed, skipping test." >/skipped
|
||||
exit 77
|
||||
fi
|
||||
|
||||
# shellcheck source=test/units/test-control.sh
|
||||
. "$(dirname "$0")"/test-control.sh
|
||||
|
||||
CLONESETUP_BIN=/usr/lib/systemd/systemd-clonesetup
|
||||
# Test clonesetup generator and systemd-clonesetup
|
||||
# Disable pager usage so interactive/manual runs do not block in `less`.
|
||||
export SYSTEMD_PAGER=cat
|
||||
|
||||
@@ -15,6 +15,7 @@ units = [
|
||||
{ 'file' : 'capsule.slice' },
|
||||
{
|
||||
'file' : 'clonesetup.target',
|
||||
'conditions' : ['ENABLE_CLONESETUP'],
|
||||
'symlinks' : ['sysinit.target.wants/'],
|
||||
},
|
||||
{ 'file' : 'console-getty.service.in' },
|
||||
|
||||
Reference in new issue
Block a user