mirror of
https://github.com/systemd/systemd.git
synced 2026-11-06 05:17:24 +00:00
meson: add config switch for systemd-report
This prog is still labelled as experimental and we didn't have a way to disable its build. With the addition of this option, all experimental components can be disabled.
This commit is contained in:
1 parent
b9d52d9ded
commit
e008bd7781
17 files changed
+106
-38
No files matched your search
@@ -1212,28 +1212,28 @@ manpages = [
|
||||
['systemd-report-diskspace@.service',
|
||||
'8',
|
||||
['systemd-report-diskspace', 'systemd-report-diskspace.socket'],
|
||||
'HAVE_LIBMOUNT'],
|
||||
'ENABLE_REPORT HAVE_LIBMOUNT'],
|
||||
['systemd-report-files@.service',
|
||||
'8',
|
||||
['systemd-report-files', 'systemd-report-files.socket'],
|
||||
''],
|
||||
'ENABLE_REPORT'],
|
||||
['systemd-report-hwmon@.service',
|
||||
'8',
|
||||
['systemd-report-hwmon', 'systemd-report-hwmon.socket'],
|
||||
''],
|
||||
'ENABLE_REPORT'],
|
||||
['systemd-report-sign-plain@.service',
|
||||
'8',
|
||||
['systemd-report-sign-plain', 'systemd-report-sign-plain.socket'],
|
||||
'HAVE_OPENSSL'],
|
||||
'ENABLE_REPORT HAVE_OPENSSL'],
|
||||
['systemd-report-sign-tpm2@.service',
|
||||
'8',
|
||||
['systemd-report-sign-tpm2', 'systemd-report-sign-tpm2.socket'],
|
||||
'HAVE_OPENSSL HAVE_TPM2'],
|
||||
'ENABLE_REPORT HAVE_OPENSSL HAVE_TPM2'],
|
||||
['systemd-report-sign-tsm@.service',
|
||||
'8',
|
||||
['systemd-report-sign-tsm', 'systemd-report-sign-tsm.socket'],
|
||||
''],
|
||||
['systemd-report', '1', [], ''],
|
||||
'ENABLE_REPORT'],
|
||||
['systemd-report', '1', [], 'ENABLE_REPORT'],
|
||||
['systemd-resolved.service', '8', ['systemd-resolved'], 'ENABLE_RESOLVE'],
|
||||
['systemd-rfkill.service',
|
||||
'8',
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
|
||||
|
||||
<refentry id="systemd-report-diskspace_.service" xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||
conditional='HAVE_LIBMOUNT'>
|
||||
conditional='ENABLE_REPORT HAVE_LIBMOUNT'>
|
||||
|
||||
<refentryinfo>
|
||||
<title>systemd-report-diskspace@.service</title>
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
|
||||
<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
|
||||
|
||||
<refentry id="systemd-report-files_.service" xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||
<refentry id="systemd-report-files_.service" xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||
conditional='ENABLE_REPORT'>
|
||||
|
||||
<refentryinfo>
|
||||
<title>systemd-report-files@.service</title>
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
|
||||
<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
|
||||
|
||||
<refentry id="systemd-report-hwmon_.service" xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||
<refentry id="systemd-report-hwmon_.service" xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||
conditional='ENABLE_REPORT'>
|
||||
|
||||
<refentryinfo>
|
||||
<title>systemd-report-hwmon@.service</title>
|
||||
|
||||
@@ -3,8 +3,9 @@
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
|
||||
<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
|
||||
|
||||
<refentry id="systemd-report-sign-plain_.service" conditional='HAVE_OPENSSL'
|
||||
xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||
<refentry id="systemd-report-sign-plain_.service"
|
||||
xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||
conditional='ENABLE_REPORT HAVE_OPENSSL'>
|
||||
|
||||
<refentryinfo>
|
||||
<title>systemd-report-sign-plain@.service</title>
|
||||
|
||||
@@ -3,8 +3,9 @@
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
|
||||
<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
|
||||
|
||||
<refentry id="systemd-report-sign-tpm2_.service" conditional='HAVE_OPENSSL HAVE_TPM2'
|
||||
xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||
<refentry id="systemd-report-sign-tpm2_.service"
|
||||
xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||
conditional='ENABLE_REPORT HAVE_OPENSSL HAVE_TPM2'>
|
||||
|
||||
<refentryinfo>
|
||||
<title>systemd-report-sign-tpm2@.service</title>
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
|
||||
|
||||
<refentry id="systemd-report-sign-tsm_.service"
|
||||
xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||
xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||
conditional='ENABLE_REPORT'>
|
||||
|
||||
<refentryinfo>
|
||||
<title>systemd-report-sign-tsm@.service</title>
|
||||
|
||||
@@ -7,7 +7,8 @@
|
||||
<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
|
||||
|
||||
<refentry id="systemd-report"
|
||||
xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||
xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||
conditional='ENABLE_REPORT'>
|
||||
|
||||
<refentryinfo>
|
||||
<title>systemd-report</title>
|
||||
|
||||
@@ -1565,6 +1565,8 @@ have = get_option('repart').require(
|
||||
error_message : 'fdisk required').allowed()
|
||||
conf.set10('ENABLE_REPART', have)
|
||||
|
||||
conf.set10('ENABLE_REPORT', get_option('report').allowed())
|
||||
|
||||
default_dnssec = get_option('default-dnssec')
|
||||
if default_dnssec != 'no' and conf.get('HAVE_OPENSSL') == 0
|
||||
message('default-dnssec cannot be set to yes or allow-downgrade when openssl is disabled. Setting default-dnssec to no.')
|
||||
@@ -3224,6 +3226,7 @@ foreach tuple : [
|
||||
['quotacheck'],
|
||||
['randomseed'],
|
||||
['repart'],
|
||||
['report'],
|
||||
['resolve'],
|
||||
['rfkill'],
|
||||
['sysext'],
|
||||
|
||||
@@ -231,6 +231,8 @@ option('remote', type : 'feature', deprecated : { 'true' : 'enabled', 'false' :
|
||||
description : 'support for "journal over the network"')
|
||||
option('repart', type : 'feature', deprecated : { 'true' : 'enabled', 'false' : 'disabled' },
|
||||
description : 'install the systemd-repart tool')
|
||||
option('report', type : 'feature',
|
||||
description : 'install the systemd-report stack')
|
||||
option('resolve', type : 'boolean',
|
||||
description : 'systemd-resolved stack')
|
||||
option('rfkill', type : 'boolean',
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
if conf.get('ENABLE_REPORT') != 1
|
||||
subdir_done()
|
||||
endif
|
||||
|
||||
executables += [
|
||||
libexec_template + {
|
||||
'name' : 'systemd-report',
|
||||
|
||||
@@ -212,7 +212,6 @@ shared_sources = files(
|
||||
'tomoyo-util.c',
|
||||
'tpm2-util.c',
|
||||
'tpm2-event-log.c',
|
||||
'tsm-report.c',
|
||||
'udev-util.c',
|
||||
'unit-file.c',
|
||||
'user-record-nss.c',
|
||||
@@ -307,8 +306,12 @@ if conf.get('HAVE_LIBBPF') == 1
|
||||
shared_sources += files('bpf-link.c')
|
||||
endif
|
||||
|
||||
if conf.get('HAVE_TPM2') == 1
|
||||
shared_sources += files('tpm2-report.c')
|
||||
if conf.get('ENABLE_REPORT') == 1
|
||||
shared_sources += files('tsm-report.c')
|
||||
|
||||
if conf.get('HAVE_TPM2') == 1
|
||||
shared_sources += files('tpm2-report.c')
|
||||
endif
|
||||
endif
|
||||
|
||||
generate_ip_protocol_list = files('generate-ip-protocol-list.sh')
|
||||
|
||||
@@ -3,6 +3,11 @@
|
||||
set -eux
|
||||
set -o pipefail
|
||||
|
||||
REPORT=/usr/lib/systemd/systemd-report
|
||||
|
||||
# systemd-report is optional
|
||||
[ -x "$REPORT" ] || exit 77
|
||||
|
||||
# Verify that the manager exposes a ReloadCount property that increments on
|
||||
# every daemon-reload, resets to zero across daemon-reexec (since the count
|
||||
# is not serialized), and is reachable over D-Bus, Varlink Describe, and the
|
||||
@@ -28,7 +33,7 @@ read_count_varlink() {
|
||||
read_count_report() {
|
||||
local out
|
||||
# Strip the RS separator that jq --seq re-emits on output.
|
||||
out=$(/usr/lib/systemd/systemd-report metrics --json=short \
|
||||
out=$("$REPORT" metrics --json=short \
|
||||
io.systemd.Manager.ReloadCount \
|
||||
| jq --seq -r 'select(.name == "io.systemd.Manager.ReloadCount") | .value' \
|
||||
| tr -d '\036')
|
||||
|
||||
@@ -9,6 +9,9 @@ export PAGER=
|
||||
|
||||
REPORT=/usr/lib/systemd/systemd-report
|
||||
|
||||
# systemd-report is optional
|
||||
[ -x "$REPORT" ] || exit 77
|
||||
|
||||
"$REPORT" --help
|
||||
"$REPORT" help
|
||||
"$REPORT" --version
|
||||
|
||||
@@ -14,6 +14,10 @@ if [[ "${COCO_TYPE:?}" != "sev-snp" ]]; then
|
||||
exit 77
|
||||
fi
|
||||
|
||||
# systemd-report is optional, and a large part of the tests below will fail
|
||||
# without it. Skip the whole test for simplicity.
|
||||
[ -x /usr/lib/systemd/systemd-report ] || exit 77
|
||||
|
||||
MACHINE="coco-snp-direct-$$"
|
||||
WORKDIR="$(mktemp -d)"
|
||||
mkdir -p "$WORKDIR/honest" "$WORKDIR/hostile"
|
||||
|
||||
@@ -19,7 +19,9 @@ d$ /run/systemd/users 0755 root root -
|
||||
d /run/systemd/machines 0755 root root -
|
||||
d$ /run/systemd/shutdown 0755 root root -
|
||||
d /run/systemd/dissect-root 0000 root root -
|
||||
{% if ENABLE_REPORT %}
|
||||
d /run/systemd/report.sign 0700 root root -
|
||||
{% endif %}
|
||||
|
||||
d /run/log 0755 root root -
|
||||
|
||||
|
||||
+54
-18
@@ -686,10 +686,22 @@ units = [
|
||||
'conditions' : ['ENABLE_BOOTLOADER', 'HAVE_OPENSSL', 'HAVE_TPM2'],
|
||||
'symlinks' : ['sysinit.target.wants/'],
|
||||
},
|
||||
{ 'file' : 'systemd-report.socket' },
|
||||
{ 'file' : 'systemd-report@.service.in' },
|
||||
{ 'file' : 'systemd-report-basic.socket' },
|
||||
{ 'file' : 'systemd-report-basic@.service.in' },
|
||||
{
|
||||
'file' : 'systemd-report.socket',
|
||||
'conditions' : ['ENABLE_REPORT'],
|
||||
},
|
||||
{
|
||||
'file' : 'systemd-report@.service.in',
|
||||
'conditions' : ['ENABLE_REPORT'],
|
||||
},
|
||||
{
|
||||
'file' : 'systemd-report-basic.socket',
|
||||
'conditions' : ['ENABLE_REPORT'],
|
||||
},
|
||||
{
|
||||
'file' : 'systemd-report-basic@.service.in',
|
||||
'conditions' : ['ENABLE_REPORT'],
|
||||
},
|
||||
{
|
||||
'file' : 'systemd-tpm2-clear.service.in',
|
||||
'conditions' : ['ENABLE_BOOTLOADER', 'HAVE_OPENSSL', 'HAVE_TPM2'],
|
||||
@@ -792,38 +804,62 @@ units = [
|
||||
'file' : 'systemd-repart@.service',
|
||||
'conditions' : ['ENABLE_REPART'],
|
||||
},
|
||||
{ 'file' : 'systemd-report-cgroup.socket' },
|
||||
{ 'file' : 'systemd-report-cgroup@.service.in' },
|
||||
{
|
||||
'file' : 'systemd-report-cgroup.socket',
|
||||
'conditions' : ['ENABLE_REPORT'],
|
||||
},
|
||||
{
|
||||
'file' : 'systemd-report-cgroup@.service.in',
|
||||
'conditions' : ['ENABLE_REPORT'],
|
||||
},
|
||||
{
|
||||
'file' : 'systemd-report-diskspace.socket',
|
||||
'conditions' : ['HAVE_LIBMOUNT'],
|
||||
'conditions' : ['ENABLE_REPORT', 'HAVE_LIBMOUNT'],
|
||||
},
|
||||
{
|
||||
'file' : 'systemd-report-diskspace@.service.in',
|
||||
'conditions' : ['HAVE_LIBMOUNT'],
|
||||
'conditions' : ['ENABLE_REPORT', 'HAVE_LIBMOUNT'],
|
||||
},
|
||||
{
|
||||
'file' : 'systemd-report-files.socket',
|
||||
'conditions' : ['ENABLE_REPORT'],
|
||||
},
|
||||
{
|
||||
'file' : 'systemd-report-files@.service.in',
|
||||
'conditions' : ['ENABLE_REPORT'],
|
||||
},
|
||||
{
|
||||
'file' : 'systemd-report-hwmon.socket',
|
||||
'conditions' : ['ENABLE_REPORT'],
|
||||
},
|
||||
{
|
||||
'file' : 'systemd-report-hwmon@.service.in',
|
||||
'conditions' : ['ENABLE_REPORT'],
|
||||
},
|
||||
{ 'file' : 'systemd-report-files.socket' },
|
||||
{ 'file' : 'systemd-report-files@.service.in' },
|
||||
{ 'file' : 'systemd-report-hwmon.socket' },
|
||||
{ 'file' : 'systemd-report-hwmon@.service.in' },
|
||||
{
|
||||
'file' : 'systemd-report-sign-plain.socket',
|
||||
'conditions' : ['HAVE_OPENSSL'],
|
||||
'conditions' : ['ENABLE_REPORT', 'HAVE_OPENSSL'],
|
||||
},
|
||||
{
|
||||
'file' : 'systemd-report-sign-plain@.service.in',
|
||||
'conditions' : ['HAVE_OPENSSL'],
|
||||
'conditions' : ['ENABLE_REPORT', 'HAVE_OPENSSL'],
|
||||
},
|
||||
{
|
||||
'file' : 'systemd-report-sign-tpm2.socket',
|
||||
'conditions' : ['HAVE_OPENSSL','HAVE_TPM2'],
|
||||
'conditions' : ['ENABLE_REPORT', 'HAVE_OPENSSL', 'HAVE_TPM2'],
|
||||
},
|
||||
{
|
||||
'file' : 'systemd-report-sign-tpm2@.service.in',
|
||||
'conditions' : ['HAVE_OPENSSL', 'HAVE_TPM2'],
|
||||
'conditions' : ['ENABLE_REPORT', 'HAVE_OPENSSL', 'HAVE_TPM2'],
|
||||
},
|
||||
{
|
||||
'file' : 'systemd-report-sign-tsm.socket',
|
||||
'conditions' : ['ENABLE_REPORT'],
|
||||
},
|
||||
{
|
||||
'file' : 'systemd-report-sign-tsm@.service.in',
|
||||
'conditions' : ['ENABLE_REPORT'],
|
||||
},
|
||||
{ 'file' : 'systemd-report-sign-tsm.socket' },
|
||||
{ 'file' : 'systemd-report-sign-tsm@.service.in' },
|
||||
{
|
||||
'file' : 'systemd-resolved.service.in',
|
||||
'conditions' : ['ENABLE_RESOLVE'],
|
||||
|
||||
Reference in new issue
Block a user