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