From ee2dff42d615ceb09ad0930cbd7ba87fb069abe1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Fri, 3 Jul 2026 14:19:00 +0200 Subject: [PATCH] Add systemd-report-standalone This adds the packaging required for https://github.com/systemd/systemd/pull/42874. The build will work with the changes here even before that the upstream changes are merged and is in fact required for upstream CI to pass, so the plan is to merge it early. [skip changelog] --- split-files.py | 15 +++++++++++---- systemd.spec | 23 ++++++++++++++++++++++- 2 files changed, 33 insertions(+), 5 deletions(-) diff --git a/split-files.py b/split-files.py index f7f9989..03f7822 100644 --- a/split-files.py +++ b/split-files.py @@ -1,7 +1,11 @@ import re, sys, os, collections buildroot = sys.argv[1] -no_bootloader = '--no-bootloader' in sys.argv + +potentially_empty_outputs = [ + 'standalone-report', + *(['boot'] if '--no-bootloader' in sys.argv else []), +] known_files = ''' %ghost %config(noreplace) /etc/crypttab @@ -73,6 +77,7 @@ outputs = {suffix: open(f'.file-list-{suffix}', 'w') 'resolve', 'tests', 'standalone-repart', + 'standalone-report', 'standalone-tmpfiles', 'standalone-sysusers', 'standalone-shutdown', @@ -106,6 +111,8 @@ for file in files(buildroot): if n.endswith('.standalone'): if 'repart' in n: o = outputs['standalone-repart'] + elif 'report' in n: + o = outputs['standalone-report'] elif 'tmpfiles' in n: o = outputs['standalone-tmpfiles'] elif 'sysusers' in n: @@ -294,9 +301,9 @@ for file in files(buildroot): for file in o: print(f'{prefix}{n}{suffix}', file=file) + + if [print(f'ERROR: no file names were written to {o.name}') for name, o in outputs.items() - if (o.tell() == 0 and - not (no_bootloader and name == 'boot')) - ]: + if o.tell() == 0 and name not in potentially_empty_outputs]: sys.exit(1) diff --git a/systemd.spec b/systemd.spec index 882fe63..66d43c1 100644 --- a/systemd.spec +++ b/systemd.spec @@ -323,11 +323,14 @@ Conflicts: dracut < 060-2 Conflicts: dracut < 059-16 %endif +Conflicts: systemd-standalone-report +Provides: systemd-report = %{version}-%{release} Conflicts: systemd-standalone-tmpfiles Provides: systemd-tmpfiles = %{version}-%{release} Conflicts: systemd-standalone-shutdown Provides: systemd-shutdown = %{version}-%{release} + %if "%{_sbindir}" == "%{_bindir}" # Compat symlinks for Requires in other packages. # We rely on filesystem to create the symlinks for us. @@ -691,7 +694,21 @@ RemovePathPostfixes: .standalone %description standalone-repart Standalone systemd-repart binary with no dependencies on the systemd-shared library or other libraries from systemd-libs. This package conflicts with the -main systemd package and is meant for use on systems without systemd. +systemd-udev package and is meant for use on systems without systemd-udev. + +%if %{with upstream} +%package standalone-report +Summary: Standalone systemd-report binaries for use on systems without systemd +Provides: systemd-report = %{version}-%{release} +Conflicts: systemd +RemovePathPostfixes: .standalone + +%description standalone-report +Standalone systemd-report, systemd-report-basic, systemd-report-sign-plain, … +binaries with no dependencies on the systemd-shared library or other libraries +from systemd-libs. This package conflicts with the main systemd package and +is meant for use on systems without systemd or with older version of it. +%endif %package standalone-tmpfiles Summary: Standalone systemd-tmpfiles binary for use on systems without systemd @@ -1497,6 +1514,10 @@ fi %files standalone-repart -f .file-list-standalone-repart +%if %{with upstream} +%files standalone-report -f .file-list-standalone-report +%endif + %files standalone-tmpfiles -f .file-list-standalone-tmpfiles %files standalone-sysusers -f .file-list-standalone-sysusers