mirror of
https://github.com/systemd/systemd.git
synced 2024-11-26 19:53:45 +08:00
meson: add separate option for sysupdated, disable in release builds
This commit introduces a build-time option to enable/disable sysupdated separately from sysupdate. 'auto' translated to enabled by default in developer builds.
This commit is contained in:
parent
89696521d2
commit
243b63d8a6
@ -3,7 +3,7 @@
|
|||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" >
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" >
|
||||||
<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
|
<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
|
||||||
|
|
||||||
<refentry id="org.freedesktop.sysupdate1" conditional='ENABLE_SYSUPDATE'
|
<refentry id="org.freedesktop.sysupdate1" conditional='ENABLE_SYSUPDATED'
|
||||||
xmlns:xi="http://www.w3.org/2001/XInclude">
|
xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>org.freedesktop.sysupdate1</title>
|
<title>org.freedesktop.sysupdate1</title>
|
||||||
|
@ -65,7 +65,7 @@ manpages = [
|
|||||||
['org.freedesktop.portable1', '5', [], 'ENABLE_PORTABLED'],
|
['org.freedesktop.portable1', '5', [], 'ENABLE_PORTABLED'],
|
||||||
['org.freedesktop.resolve1', '5', [], 'ENABLE_RESOLVE'],
|
['org.freedesktop.resolve1', '5', [], 'ENABLE_RESOLVE'],
|
||||||
['org.freedesktop.systemd1', '5', [], ''],
|
['org.freedesktop.systemd1', '5', [], ''],
|
||||||
['org.freedesktop.sysupdate1', '5', [], 'ENABLE_SYSUPDATE'],
|
['org.freedesktop.sysupdate1', '5', [], 'ENABLE_SYSUPDATED'],
|
||||||
['org.freedesktop.timedate1', '5', [], 'ENABLE_TIMEDATED'],
|
['org.freedesktop.timedate1', '5', [], 'ENABLE_TIMEDATED'],
|
||||||
['org.freedesktop.timesync1', '5', [], 'ENABLE_TIMESYNCD'],
|
['org.freedesktop.timesync1', '5', [], 'ENABLE_TIMESYNCD'],
|
||||||
['os-release', '5', ['extension-release', 'initrd-release'], ''],
|
['os-release', '5', ['extension-release', 'initrd-release'], ''],
|
||||||
@ -1107,7 +1107,7 @@ manpages = [
|
|||||||
['systemd-sysupdated.service',
|
['systemd-sysupdated.service',
|
||||||
'8',
|
'8',
|
||||||
['systemd-sysupdated'],
|
['systemd-sysupdated'],
|
||||||
'ENABLE_SYSUPDATE'],
|
'ENABLE_SYSUPDATED'],
|
||||||
['systemd-sysusers', '8', ['systemd-sysusers.service'], ''],
|
['systemd-sysusers', '8', ['systemd-sysusers.service'], ''],
|
||||||
['systemd-sysv-generator', '8', [], 'HAVE_SYSV_COMPAT'],
|
['systemd-sysv-generator', '8', [], 'HAVE_SYSV_COMPAT'],
|
||||||
['systemd-time-wait-sync.service',
|
['systemd-time-wait-sync.service',
|
||||||
@ -1286,7 +1286,7 @@ manpages = [
|
|||||||
['udev_new', '3', ['udev_ref', 'udev_unref'], ''],
|
['udev_new', '3', ['udev_ref', 'udev_unref'], ''],
|
||||||
['udevadm', '8', [], ''],
|
['udevadm', '8', [], ''],
|
||||||
['ukify', '1', [], 'ENABLE_UKIFY'],
|
['ukify', '1', [], 'ENABLE_UKIFY'],
|
||||||
['updatectl', '1', [], 'ENABLE_SYSUPDATE'],
|
['updatectl', '1', [], 'ENABLE_SYSUPDATED'],
|
||||||
['user@.service',
|
['user@.service',
|
||||||
'5',
|
'5',
|
||||||
['systemd-user-runtime-dir', 'user-runtime-dir@.service'],
|
['systemd-user-runtime-dir', 'user-runtime-dir@.service'],
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
|
<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
|
||||||
|
|
||||||
<refentry id="systemd-sysupdated.service" conditional='ENABLE_SYSUPDATE'>
|
<refentry id="systemd-sysupdated.service" conditional='ENABLE_SYSUPDATED'>
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>systemd-sysupdated.service</title>
|
<title>systemd-sysupdated.service</title>
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
|
<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
|
||||||
|
|
||||||
<refentry id="updatectl" conditional='ENABLE_SYSUPDATE'
|
<refentry id="updatectl" conditional='ENABLE_SYSUPDATED'
|
||||||
xmlns:xi="http://www.w3.org/2001/XInclude">
|
xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
|
15
meson.build
15
meson.build
@ -1609,6 +1609,20 @@ have = get_option('sysupdate').require(
|
|||||||
error_message : 'fdisk and openssl required').allowed()
|
error_message : 'fdisk and openssl required').allowed()
|
||||||
conf.set10('ENABLE_SYSUPDATE', have)
|
conf.set10('ENABLE_SYSUPDATE', have)
|
||||||
|
|
||||||
|
have2 = get_option('sysupdated')
|
||||||
|
if have2 == 'enabled'
|
||||||
|
if have
|
||||||
|
have2 = true
|
||||||
|
else
|
||||||
|
error('sysupdated requires sysupdate to be enabled')
|
||||||
|
endif
|
||||||
|
elif have2 == 'auto'
|
||||||
|
have2 = have and conf.get('BUILD_MODE_DEVELOPER') == 1
|
||||||
|
else
|
||||||
|
have2 = false
|
||||||
|
endif
|
||||||
|
conf.set10('ENABLE_SYSUPDATED', have2)
|
||||||
|
|
||||||
conf.set10('ENABLE_STORAGETM', get_option('storagetm'))
|
conf.set10('ENABLE_STORAGETM', get_option('storagetm'))
|
||||||
|
|
||||||
have = get_option('importd').require(
|
have = get_option('importd').require(
|
||||||
@ -3071,6 +3085,7 @@ foreach tuple : [
|
|||||||
['sysext'],
|
['sysext'],
|
||||||
['systemd-analyze', conf.get('ENABLE_ANALYZE') == 1],
|
['systemd-analyze', conf.get('ENABLE_ANALYZE') == 1],
|
||||||
['sysupdate'],
|
['sysupdate'],
|
||||||
|
['sysupdated'],
|
||||||
['sysusers'],
|
['sysusers'],
|
||||||
['storagetm'],
|
['storagetm'],
|
||||||
['timedated'],
|
['timedated'],
|
||||||
|
@ -108,6 +108,10 @@ option('repart', type : 'feature', deprecated : { 'true' : 'enabled', 'false' :
|
|||||||
description : 'install the systemd-repart tool')
|
description : 'install the systemd-repart tool')
|
||||||
option('sysupdate', type : 'feature', deprecated : { 'true' : 'enabled', 'false' : 'disabled' },
|
option('sysupdate', type : 'feature', deprecated : { 'true' : 'enabled', 'false' : 'disabled' },
|
||||||
description : 'install the systemd-sysupdate tool')
|
description : 'install the systemd-sysupdate tool')
|
||||||
|
option('sysupdated', type: 'combo', value : 'auto',
|
||||||
|
choices : ['auto', 'enabled', 'disabled'],
|
||||||
|
description : 'install the systemd-sysupdated service')
|
||||||
|
|
||||||
option('coredump', type : 'boolean',
|
option('coredump', type : 'boolean',
|
||||||
description : 'install the coredump handler')
|
description : 'install the coredump handler')
|
||||||
option('pstore', type : 'boolean',
|
option('pstore', type : 'boolean',
|
||||||
|
@ -40,7 +40,7 @@ executables += [
|
|||||||
libexec_template + {
|
libexec_template + {
|
||||||
'name' : 'systemd-sysupdated',
|
'name' : 'systemd-sysupdated',
|
||||||
'dbus' : true,
|
'dbus' : true,
|
||||||
'conditions' : ['ENABLE_SYSUPDATE'],
|
'conditions' : ['ENABLE_SYSUPDATED'],
|
||||||
'sources' : files('sysupdated.c'),
|
'sources' : files('sysupdated.c'),
|
||||||
'dependencies' : threads,
|
'dependencies' : threads,
|
||||||
},
|
},
|
||||||
@ -48,11 +48,11 @@ executables += [
|
|||||||
'name' : 'updatectl',
|
'name' : 'updatectl',
|
||||||
'public' : true,
|
'public' : true,
|
||||||
'sources' : systemd_updatectl_sources,
|
'sources' : systemd_updatectl_sources,
|
||||||
'conditions' : ['ENABLE_SYSUPDATE'],
|
'conditions' : ['ENABLE_SYSUPDATED'],
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
if conf.get('ENABLE_SYSUPDATE') == 1
|
if conf.get('ENABLE_SYSUPDATED') == 1
|
||||||
install_data('org.freedesktop.sysupdate1.conf',
|
install_data('org.freedesktop.sysupdate1.conf',
|
||||||
install_dir : dbuspolicydir)
|
install_dir : dbuspolicydir)
|
||||||
install_data('org.freedesktop.sysupdate1.service',
|
install_data('org.freedesktop.sysupdate1.service',
|
||||||
|
@ -640,15 +640,15 @@ units = [
|
|||||||
'file' : 'systemd-sysupdate.service.in',
|
'file' : 'systemd-sysupdate.service.in',
|
||||||
'conditions' : ['ENABLE_SYSUPDATE'],
|
'conditions' : ['ENABLE_SYSUPDATE'],
|
||||||
},
|
},
|
||||||
{
|
|
||||||
'file' : 'systemd-sysupdated.service.in',
|
|
||||||
'conditions' : ['ENABLE_SYSUPDATE'],
|
|
||||||
'symlinks' : ['dbus-org.freedesktop.sysupdate1.service'],
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
'file' : 'systemd-sysupdate.timer',
|
'file' : 'systemd-sysupdate.timer',
|
||||||
'conditions' : ['ENABLE_SYSUPDATE'],
|
'conditions' : ['ENABLE_SYSUPDATE'],
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
'file' : 'systemd-sysupdated.service.in',
|
||||||
|
'conditions' : ['ENABLE_SYSUPDATED'],
|
||||||
|
'symlinks' : ['dbus-org.freedesktop.sysupdate1.service'],
|
||||||
|
},
|
||||||
{
|
{
|
||||||
'file' : 'systemd-sysusers.service',
|
'file' : 'systemd-sysusers.service',
|
||||||
'conditions' : ['ENABLE_SYSUSERS'],
|
'conditions' : ['ENABLE_SYSUSERS'],
|
||||||
|
Loading…
Reference in New Issue
Block a user