From b63082744427cee5123c19c257a4696a622b2240dffd596504ffc41faf7107b9 Mon Sep 17 00:00:00 2001 From: Franck Bui Date: Thu, 26 Jan 2023 14:06:46 +0000 Subject: [PATCH] - machines.target belongs to systemd-container, do its init/cleanup steps from the scriptlets of this sub-package. OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=1342 --- systemd.changes | 6 ++++++ systemd.spec | 10 ++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/systemd.changes b/systemd.changes index 7940f4e3..b2f7f6a2 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Jan 26 14:02:11 UTC 2023 - Franck Bui + +- machines.target belongs to systemd-container, do its init/cleanup steps from + the scriptlets of this sub-package. + ------------------------------------------------------------------- Tue Jan 24 13:19:01 UTC 2023 - Franck Bui diff --git a/systemd.spec b/systemd.spec index cdcc6532..a4f334c9 100644 --- a/systemd.spec +++ b/systemd.spec @@ -962,7 +962,6 @@ find %{buildroot}%{_testsuitedir}/ -name .git\* -exec rm -fr {} \; %pre # Units listed below can be enabled at installation according to their preset # setting. -%systemd_pre machines.target %systemd_pre remote-fs.target %systemd_pre getty@.service %systemd_pre systemd-timesyncd.service @@ -1022,7 +1021,6 @@ fi # Units listed below can be enabled at installation accoding to their preset # setting. -%systemd_post machines.target %systemd_post remote-fs.target %systemd_post getty@.service %systemd_post systemd-timesyncd.service @@ -1136,7 +1134,11 @@ rm -f /etc/udev/rules.d/{20,55,65}-cdrom.rules %postun -n libudev%{?mini}1 -p %ldconfig %postun -n libsystemd0%{?mini} -p %ldconfig +%pre container +%systemd_pre machines.target + %post container +%systemd_post machines.target %tmpfiles_create systemd-nspawn.conf %if %{with machined} %ldconfig @@ -1157,7 +1159,11 @@ if [ $1 -gt 1 ]; then %{_prefix}/lib/systemd/scripts/fix-machines-btrfs-subvol.sh || : fi +%preun container +%systemd_preun machines.target + %postun container +%systemd_postun machines.target %ldconfig %endif