diff --git a/man/rules/meson.build b/man/rules/meson.build index fdf7aa6ce9e..b44ff758b35 100644 --- a/man/rules/meson.build +++ b/man/rules/meson.build @@ -1161,7 +1161,7 @@ manpages = [ 'systemd-growfs@.service', 'systemd-makefs', 'systemd-mkswap@.service'], - ''], + 'ENABLE_GROWFS'], ['systemd-measure', '1', [], 'ENABLE_MEASURE'], ['systemd-modules-load.service', '8', ['systemd-modules-load'], 'HAVE_KMOD'], ['systemd-mount', '1', ['systemd-umount'], ''], diff --git a/man/systemd-makefs@.service.xml b/man/systemd-makefs@.service.xml index ca5a99d8063..2ad6219b271 100644 --- a/man/systemd-makefs@.service.xml +++ b/man/systemd-makefs@.service.xml @@ -3,7 +3,7 @@ - + systemd-makefs@.service diff --git a/meson.build b/meson.build index d7a2ce9fa32..5d54b3c46b3 100644 --- a/meson.build +++ b/meson.build @@ -1795,6 +1795,7 @@ conf.set10('DEFAULT_MOUNTFSD_TRUSTED_DIRECTORIES', get_option('default-mountfsd- conf.set10('ENABLE_BATTERY_CHECK', get_option('battery-check').allowed()) conf.set10('ENABLE_CLONESETUP', get_option('clonesetup').allowed()) +conf.set10('ENABLE_GROWFS', get_option('growfs').allowed()) foreach tuple : [ ['analyze'], @@ -3446,6 +3447,7 @@ foreach tuple : [ ['efi'], ['environment.d'], ['firstboot'], + ['growfs'], ['hibernate'], ['homed'], ['hostnamed'], diff --git a/meson_options.txt b/meson_options.txt index 6b6a122fa2c..96aa5140c28 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -181,6 +181,8 @@ option('environment-d', type : 'boolean', description : 'support for environment.d') option('firstboot', type : 'boolean', description : 'install systemd-firstboot') +option('growfs', type : 'feature', + description : 'install systemd-growfs, systemd-makefs, and associated files') option('hibernate', type : 'boolean', description : 'support for hibernation') option('homed', type : 'feature', deprecated : { 'true' : 'enabled', 'false' : 'disabled' }, diff --git a/src/growfs/meson.build b/src/growfs/meson.build index 7bdc329c36d..f60e8153d50 100644 --- a/src/growfs/meson.build +++ b/src/growfs/meson.build @@ -1,5 +1,9 @@ # SPDX-License-Identifier: LGPL-2.1-or-later +if conf.get('ENABLE_GROWFS') != 1 + subdir_done() +endif + executables += [ libexec_template + { 'name' : 'systemd-growfs', diff --git a/test/units/TEST-65-ANALYZE.sh b/test/units/TEST-65-ANALYZE.sh index b02dc293d03..c159a7668fc 100755 --- a/test/units/TEST-65-ANALYZE.sh +++ b/test/units/TEST-65-ANALYZE.sh @@ -1143,9 +1143,9 @@ if test -f /sys/class/dmi/id/board_vendor && ! systemd-detect-virt --container ; systemd-analyze chid --json=pretty fi -systemd-analyze condition --instance=tmp --unit=systemd-growfs@.service -systemd-analyze verify --instance=tmp --man=no systemd-growfs@.service -systemd-analyze security --instance=tmp systemd-growfs@.service +systemd-analyze condition --instance=tmp --unit=user@.service +systemd-analyze verify --instance=tmp --man=no user@.service +systemd-analyze security --instance=tmp user@.service systemd-analyze has-tpm2 ||: if systemd-analyze has-tpm2 -q ; then diff --git a/units/meson.build b/units/meson.build index 685a2a06ac7..cd583f133e1 100644 --- a/units/meson.build +++ b/units/meson.build @@ -389,8 +389,14 @@ units = [ }, { 'file' : 'systemd-fsck-root.service.in' }, { 'file' : 'systemd-fsck@.service.in' }, - { 'file' : 'systemd-growfs-root.service.in' }, - { 'file' : 'systemd-growfs@.service.in' }, + { + 'file' : 'systemd-growfs-root.service.in', + 'conditions' : ['ENABLE_GROWFS'], + }, + { + 'file' : 'systemd-growfs@.service.in', + 'conditions' : ['ENABLE_GROWFS'], + }, { 'file' : 'systemd-halt.service' }, { 'file' : 'systemd-hibernate-clear.service.in',