From 3fa0dea84aae831c13649fc16cb33d740652ca6d06ea2ea3d77fd22a04925a6f Mon Sep 17 00:00:00 2001 From: Franck Bui Date: Tue, 18 Jun 2024 10:13:54 +0000 Subject: [PATCH 1/7] - Don't pull the devel packages in when installing the testsuite package. OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=1529 --- systemd.changes | 5 +++++ systemd.spec | 15 +++++---------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/systemd.changes b/systemd.changes index df927936..7ce9ed37 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Jun 18 10:12:01 UTC 2024 - Franck Bui + +- Don't pull the devel packages in when installing the testsuite package. + ------------------------------------------------------------------- Thu Jun 6 13:18:29 UTC 2024 - Franck Bui diff --git a/systemd.spec b/systemd.spec index 984db19b..a5aba640 100644 --- a/systemd.spec +++ b/systemd.spec @@ -545,6 +545,7 @@ BuildRequires: pkgconfig(libqrencode) BuildRequires: pkgconfig(openssl) BuildRequires: pkgconfig(pwquality) # These Recommends because some symbols of these libs are dlopen()ed by homed +Recommends: libcryptsetup12 Recommends: libfido2 Recommends: libpwquality1 Recommends: libqrencode4 @@ -639,12 +640,6 @@ Requires: user(nobody) Requires: libidn2 Requires: pkgconfig(libidn2) %endif -%if %{with experimental} -Requires: libpwquality1 -Requires: libqrencode4 -Requires: pkgconfig(libqrencode) -Requires: pkgconfig(pwquality) -%endif Requires: %{name} = %{version}-%{release} Requires: attr Requires: binutils @@ -656,6 +651,10 @@ Requires: iproute2 Requires: jq Requires: libcap-progs Requires: libfido2 +%if %{with experimental} +Requires: libpwquality1 +Requires: libqrencode4 +%endif Requires: libtss2-esys0 Requires: libtss2-mu0 Requires: libtss2-rc0 @@ -669,10 +668,6 @@ Requires: quota Requires: socat Requires: squashfs Requires: systemd-container -Requires: pkgconfig(libfido2) -Requires: pkgconfig(tss2-esys) -Requires: pkgconfig(tss2-mu) -Requires: pkgconfig(tss2-rc) %if %{with sd_boot} Requires: systemd-boot %endif From b7944f5b14eb94106ce2079d139189c6e2d57feec113db9c7f706d3ba967e9dd Mon Sep 17 00:00:00 2001 From: Franck Bui Date: Tue, 18 Jun 2024 10:20:35 +0000 Subject: [PATCH 2/7] - Merge systemd-coredump back into the main package (bsc#1091684) OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=1530 --- files.coredump | 23 ----------------------- files.systemd | 32 ++++++++++++++++++++++++++++++++ systemd.changes | 5 +++++ systemd.spec | 39 ++++----------------------------------- 4 files changed, 41 insertions(+), 58 deletions(-) delete mode 100644 files.coredump diff --git a/files.coredump b/files.coredump deleted file mode 100644 index f78f2f1b..00000000 --- a/files.coredump +++ /dev/null @@ -1,23 +0,0 @@ -# -# Please keep the list sorted (with `LC_ALL=C sort`). -# -%dir %{_localstatedir}/lib/systemd/coredump -%dir %{_sysconfdir}/systemd/coredump.conf.d -%{_bindir}/coredumpctl -%if %{without bootstrap} -%{_datadir}/bash-completion/completions/coredumpctl -%{_datadir}/zsh/site-functions/_coredumpctl -%{_mandir}/man1/coredumpctl.1.gz -%{_mandir}/man5/coredump.conf.5.gz -%{_mandir}/man5/coredump.conf.d.5.gz -%{_mandir}/man8/systemd-coredump.8.gz -%{_mandir}/man8/systemd-coredump.socket.8.gz -%{_mandir}/man8/systemd-coredump@.service.8.gz -%endif -%{_sysctldir}/50-coredump.conf -%{_systemd_util_dir}/coredump.conf -%{_systemd_util_dir}/systemd-coredump -%{_sysusersdir}/systemd-coredump.conf -%{_unitdir}/sockets.target.wants/systemd-coredump.socket -%{_unitdir}/systemd-coredump.socket -%{_unitdir}/systemd-coredump@.service diff --git a/files.systemd b/files.systemd index 5b76c98e..45a34a3a 100644 --- a/files.systemd +++ b/files.systemd @@ -25,12 +25,14 @@ %dir %{_libdir}/systemd %dir %{_localstatedir}/lib/systemd %dir %{_localstatedir}/lib/systemd/catalog +%dir %{_localstatedir}/lib/systemd/coredump %dir %{_localstatedir}/lib/systemd/rpm %dir %{_modprobedir} %dir %{_sysconfdir}/X11/xorg.conf.d %dir %{_sysconfdir}/binfmt.d %dir %{_sysconfdir}/sysctl.d %dir %{_sysconfdir}/systemd +%dir %{_sysconfdir}/systemd/coredump.conf.d %dir %{_sysconfdir}/systemd/journald.conf.d %dir %{_sysconfdir}/systemd/logind.conf.d %dir %{_sysconfdir}/systemd/system @@ -92,6 +94,9 @@ %license LICENSE.GPL2 %license LICENSE.LGPL2.1 %{_bindir}/busctl +%if %{without bootstrap} +%{_bindir}/coredumpctl +%endif %{_bindir}/hostnamectl %{_bindir}/journalctl %{_bindir}/localectl @@ -128,6 +133,7 @@ %if %{without bootstrap} %{_bindir}/userdbctl %{_datadir}/bash-completion/completions/busctl +%{_datadir}/bash-completion/completions/coredumpctl %{_datadir}/bash-completion/completions/hostnamectl %{_datadir}/bash-completion/completions/journalctl %{_datadir}/bash-completion/completions/localectl @@ -192,6 +198,7 @@ %{_datadir}/systemd/language-fallback-map %if %{without bootstrap} %{_datadir}/zsh/site-functions/_busctl +%{_datadir}/zsh/site-functions/_coredumpctl %{_datadir}/zsh/site-functions/_hostnamectl %{_datadir}/zsh/site-functions/_journalctl %{_datadir}/zsh/site-functions/_localectl @@ -216,6 +223,7 @@ %{_libdir}/systemd/libsystemd-shared-%{systemd_major}.so %if %{without bootstrap} %{_mandir}/man1/busctl.1.gz +%{_mandir}/man1/coredumpctl.1.gz %{_mandir}/man1/hostnamectl.1.gz %{_mandir}/man1/init.1.gz %{_mandir}/man1/journalctl.1.gz @@ -251,6 +259,8 @@ %{_mandir}/man1/timedatectl.1.gz %{_mandir}/man1/userdbctl.1.gz %{_mandir}/man5/binfmt.d.5.gz +%{_mandir}/man5/coredump.conf.5.gz +%{_mandir}/man5/coredump.conf.d.5.gz %{_mandir}/man5/dnssec-trust-anchors.d.5.gz %{_mandir}/man5/environment.d.5.gz %{_mandir}/man5/extension-release.5.gz @@ -340,6 +350,9 @@ %{_mandir}/man8/systemd-boot-check-no-failures.service.8.gz %{_mandir}/man8/systemd-confext.8.gz %{_mandir}/man8/systemd-confext.service.8.gz +%{_mandir}/man8/systemd-coredump.8.gz +%{_mandir}/man8/systemd-coredump.socket.8.gz +%{_mandir}/man8/systemd-coredump@.service.8.gz %{_mandir}/man8/systemd-debug-generator.8.gz %{_mandir}/man8/systemd-environment-d-generator.8.gz %{_mandir}/man8/systemd-getty-generator.8.gz @@ -405,8 +418,14 @@ %{_sbindir}/reboot %{_sbindir}/shutdown %{_sysconfdir}/xdg/systemd/user +%if %{without bootstrap} +%{_sysctldir}/50-coredump.conf +%endif %{_sysctldir}/99-sysctl.conf %{_systemd_user_env_generator_dir}/30-systemd-environment-d-generator +%if %{without bootstrap} +%{_systemd_util_dir}/coredump.conf +%endif %{_systemd_util_dir}/journald.conf %{_systemd_util_dir}/logind.conf %{_systemd_util_dir}/rpm/fixlet-systemd-post.sh @@ -416,6 +435,9 @@ %{_systemd_util_dir}/systemd-binfmt %{_systemd_util_dir}/systemd-boot-check-no-failures %{_systemd_util_dir}/systemd-cgroups-agent +%if %{without bootstrap} +%{_systemd_util_dir}/systemd-coredump +%endif %{_systemd_util_dir}/systemd-executor %{_systemd_util_dir}/systemd-hostnamed %{_systemd_util_dir}/systemd-journald @@ -469,6 +491,9 @@ %{_systemdgeneratordir}/systemd-run-generator %{_systemdgeneratordir}/systemd-system-update-generator %{_systemdusergeneratordir}/systemd-xdg-autostart-generator +%if %{without bootstrap} +%{_sysusersdir}/systemd-coredump.conf +%endif %{_sysusersdir}/systemd-journal.conf %{_tmpfilesdir}/credstore.conf %{_tmpfilesdir}/journal-nocow.conf @@ -558,6 +583,9 @@ %{_unitdir}/slices.target %{_unitdir}/smartcard.target %{_unitdir}/sockets.target +%if %{without bootstrap} +%{_unitdir}/sockets.target.wants/systemd-coredump.socket +%endif %{_unitdir}/sockets.target.wants/systemd-journald-dev-log.socket %{_unitdir}/sockets.target.wants/systemd-journald.socket %{_unitdir}/sockets.target.wants/systemd-sysext.socket @@ -601,6 +629,10 @@ %{_unitdir}/systemd-binfmt.service %{_unitdir}/systemd-boot-check-no-failures.service %{_unitdir}/systemd-confext.service +%if %{without bootstrap} +%{_unitdir}/systemd-coredump.socket +%{_unitdir}/systemd-coredump@.service +%endif %{_unitdir}/systemd-exit.service %{_unitdir}/systemd-halt.service %{_unitdir}/systemd-hostnamed.service diff --git a/systemd.changes b/systemd.changes index 7ce9ed37..f0da168a 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Jun 18 10:19:19 UTC 2024 - Franck Bui + +- Merge systemd-coredump back into the main package (bsc#1091684) + ------------------------------------------------------------------- Tue Jun 18 10:12:01 UTC 2024 - Franck Bui diff --git a/systemd.spec b/systemd.spec index a5aba640..efa4850e 100644 --- a/systemd.spec +++ b/systemd.spec @@ -56,7 +56,6 @@ %else %global mini %nil %bcond_without apparmor -%bcond_without coredump %bcond_without homed %bcond_without importd %bcond_without journal_remote @@ -185,6 +184,8 @@ Obsoletes: nss-systemd < %{version}-%{release} Provides: nss-systemd = %{version}-%{release} Obsoletes: nss-myhostname < %{version}-%{release} Provides: nss-myhostname = %{version}-%{release} +Provides: systemd-coredump = %{version}-%{release} +Obsoletes: systemd-coredump < %{version}-%{release} Provides: systemd-logger = %{version}-%{release} Obsoletes: systemd-logger < %{version}-%{release} Provides: systemd-sysvinit = %{version}-%{release} @@ -216,7 +217,6 @@ Source204: files.devel Source205: files.sysvcompat Source206: files.uefi-boot Source207: files.experimental -Source208: files.coredump Source209: files.homed Source210: files.lang Source211: files.journal-remote @@ -422,20 +422,6 @@ Requires: this-is-only-for-build-envs This package contains the dynamic library libudev, which provides access to udev device information -%if %{with coredump} -%package coredump -Summary: Systemd tools for coredump management -License: LGPL-2.1-or-later -Requires: %{name} = %{version}-%{release} -%systemd_requires -Provides: systemd:%{_bindir}/coredumpctl - -%description coredump -Systemd tools to store and manage coredumps. - -Visit https://systemd.io/COREDUMP for more details. -%endif - %if %{with sd_boot} %package boot Summary: A simple UEFI boot manager @@ -671,9 +657,6 @@ Requires: systemd-container %if %{with sd_boot} Requires: systemd-boot %endif -%if %{with coredump} -Requires: systemd-coredump -%endif %if %{with experimental} Requires: systemd-experimental %endif @@ -843,7 +826,7 @@ for the C APIs. -Dzstd=%{disabled_with bootstrap} \ \ -Dapparmor=%{enabled_with apparmor} \ - -Dcoredump=%{when coredump} \ + -Dcoredump=%{when_not bootstrap} \ -Dhomed=%{enabled_with homed} \ -Dimportd=%{enabled_with importd} \ -Dmachined=%{when machined} \ @@ -1150,6 +1133,7 @@ journalctl --update-catalog || : %systemd_postun_with_restart systemd-userdbd.service %posttrans +%restore_rpmsave systemd/coredump.conf %restore_rpmsave systemd/journald.conf %restore_rpmsave systemd/logind.conf %restore_rpmsave systemd/system.conf @@ -1239,16 +1223,6 @@ fi %{_systemd_util_dir}/rpm/fixlet-container-post.sh $1 || : %endif -%if %{with coredump} -%post coredump -%if %{without filetriggers} -%sysusers_create systemd-coredump.conf - -%posttrans coredump -%restore_rpmsave systemd/coredump.conf -%endif -%endif - %if %{with journal_remote} %pre journal-remote %systemd_pre systemd-journal-gatewayd.service @@ -1435,11 +1409,6 @@ fi %{_libdir}/libudev.so.1 %{_libdir}/libudev.so.1.7.* -%if %{with coredump} -%files coredump -%include %{SOURCE208} -%endif - %if %{without bootstrap} %files lang -f systemd.lang %include %{SOURCE210} From ca8e7f54ce720f6f8f614da8314ee9a05f91f3e4e733e11b1f9a5ba0d2e7ab04 Mon Sep 17 00:00:00 2001 From: Franck Bui Date: Tue, 18 Jun 2024 13:21:13 +0000 Subject: [PATCH 3/7] - systemd.spec: move a misplaced %endif in the testsuite sub-package. OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=1531 --- systemd.changes | 5 +++++ systemd.spec | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/systemd.changes b/systemd.changes index f0da168a..08a2647d 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Jun 18 13:20:26 UTC 2024 - Franck Bui + +- systemd.spec: move a misplaced %endif in the testsuite sub-package. + ------------------------------------------------------------------- Tue Jun 18 10:19:19 UTC 2024 - Franck Bui diff --git a/systemd.spec b/systemd.spec index efa4850e..9579ac23 100644 --- a/systemd.spec +++ b/systemd.spec @@ -606,6 +606,7 @@ Recommends: tpm2.0-tools %if %{with resolved} # Optional dep for knot needed by TEST-75-RESOLVED Recommends: knot +%endif %if %{with selinux} # Optional deps needed by TEST-06-SELINUX (otherwise skipped) Recommends: selinux-policy-devel @@ -624,8 +625,6 @@ Requires: user(nobody) # are used by test-funtions to find the libs on the host and install them in the # image, see install_missing_libraries() for details. Requires: libidn2 -Requires: pkgconfig(libidn2) -%endif Requires: %{name} = %{version}-%{release} Requires: attr Requires: binutils @@ -637,6 +636,7 @@ Requires: iproute2 Requires: jq Requires: libcap-progs Requires: libfido2 +Requires: pkgconfig(libidn2) %if %{with experimental} Requires: libpwquality1 Requires: libqrencode4 From 12c1190a79019ad69fab8abde7adc69c3a8ae10acb338ef5e90509a7384af1a7 Mon Sep 17 00:00:00 2001 From: Franck Bui Date: Tue, 18 Jun 2024 13:52:17 +0000 Subject: [PATCH 4/7] fix rev 1529: the devel packages are really needed by the testsuite script to install the dlopened libs into the image OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=1532 --- systemd.changes | 5 +++-- systemd.spec | 21 ++++++++++----------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/systemd.changes b/systemd.changes index 08a2647d..5bf7a5d6 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,7 +1,7 @@ ------------------------------------------------------------------- Tue Jun 18 13:20:26 UTC 2024 - Franck Bui -- systemd.spec: move a misplaced %endif in the testsuite sub-package. +- testsuite: move a misplaced %endif ------------------------------------------------------------------- Tue Jun 18 10:19:19 UTC 2024 - Franck Bui @@ -11,7 +11,8 @@ Tue Jun 18 10:19:19 UTC 2024 - Franck Bui ------------------------------------------------------------------- Tue Jun 18 10:12:01 UTC 2024 - Franck Bui -- Don't pull the devel packages in when installing the testsuite package. +- testsuite: only require the devel packages when pulling the dlopen'd + dependencies (the libraries are dependencies of the devel packages). ------------------------------------------------------------------- Thu Jun 6 13:18:29 UTC 2024 - Franck Bui diff --git a/systemd.spec b/systemd.spec index 9579ac23..d30876c8 100644 --- a/systemd.spec +++ b/systemd.spec @@ -612,6 +612,7 @@ Recommends: knot Recommends: selinux-policy-devel Recommends: selinux-policy-targeted %endif +Requires: %{name} = %{version}-%{release} # System users/groups that some tests rely on. Requires: group(bin) Requires: group(daemon) @@ -624,8 +625,12 @@ Requires: user(nobody) # The following deps on libs are for test-dlopen-so whereas the pkgconfig ones # are used by test-funtions to find the libs on the host and install them in the # image, see install_missing_libraries() for details. -Requires: libidn2 -Requires: %{name} = %{version}-%{release} +Requires: pkgconfig(libfido2) +Requires: pkgconfig(libidn2) +%if %{with experimental} +Requires: pkgconfig(libqrencode) +Requires: pkgconfig(pwquality) +%endif Requires: attr Requires: binutils Requires: busybox-static @@ -635,15 +640,6 @@ Requires: dosfstools Requires: iproute2 Requires: jq Requires: libcap-progs -Requires: libfido2 -Requires: pkgconfig(libidn2) -%if %{with experimental} -Requires: libpwquality1 -Requires: libqrencode4 -%endif -Requires: libtss2-esys0 -Requires: libtss2-mu0 -Requires: libtss2-rc0 Requires: lz4 Requires: make Requires: mtools @@ -654,6 +650,9 @@ Requires: quota Requires: socat Requires: squashfs Requires: systemd-container +Requires: pkgconfig(tss2-esys) +Requires: pkgconfig(tss2-mu) +Requires: pkgconfig(tss2-rc) %if %{with sd_boot} Requires: systemd-boot %endif From ffa9f0ac808f0dcb7044ecc67d1f14f275e1f2fb4cca642dc8ffac78da273454 Mon Sep 17 00:00:00 2001 From: Franck Bui Date: Tue, 18 Jun 2024 13:55:55 +0000 Subject: [PATCH 5/7] reorder the runtime deps of the testsuite package so the format_spec_file thingy stop screwing up the spec file... OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=1533 --- systemd.spec | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/systemd.spec b/systemd.spec index d30876c8..2444a3ce 100644 --- a/systemd.spec +++ b/systemd.spec @@ -615,22 +615,6 @@ Recommends: selinux-policy-targeted Requires: %{name} = %{version}-%{release} # System users/groups that some tests rely on. Requires: group(bin) -Requires: group(daemon) -Requires: group(games) -Requires: group(nobody) -Requires: user(bin) -Requires: user(daemon) -Requires: user(games) -Requires: user(nobody) -# The following deps on libs are for test-dlopen-so whereas the pkgconfig ones -# are used by test-funtions to find the libs on the host and install them in the -# image, see install_missing_libraries() for details. -Requires: pkgconfig(libfido2) -Requires: pkgconfig(libidn2) -%if %{with experimental} -Requires: pkgconfig(libqrencode) -Requires: pkgconfig(pwquality) -%endif Requires: attr Requires: binutils Requires: busybox-static @@ -650,6 +634,22 @@ Requires: quota Requires: socat Requires: squashfs Requires: systemd-container +Requires: group(daemon) +Requires: group(games) +Requires: group(nobody) +Requires: user(bin) +Requires: user(daemon) +Requires: user(games) +Requires: user(nobody) +# The following deps on libs are for test-dlopen-so whereas the pkgconfig ones +# are used by test-funtions to find the libs on the host and install them in the +# image, see install_missing_libraries() for details. +Requires: pkgconfig(libfido2) +Requires: pkgconfig(libidn2) +%if %{with experimental} +Requires: pkgconfig(libqrencode) +Requires: pkgconfig(pwquality) +%endif Requires: pkgconfig(tss2-esys) Requires: pkgconfig(tss2-mu) Requires: pkgconfig(tss2-rc) From 369c023c24dfda81494908e51b2d31265eef77af9204f214309f29564c90205c Mon Sep 17 00:00:00 2001 From: Franck Bui Date: Tue, 18 Jun 2024 14:08:50 +0000 Subject: [PATCH 6/7] reorder one more time... OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=1534 --- systemd.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/systemd.spec b/systemd.spec index 2444a3ce..bd584826 100644 --- a/systemd.spec +++ b/systemd.spec @@ -613,8 +613,6 @@ Recommends: selinux-policy-devel Recommends: selinux-policy-targeted %endif Requires: %{name} = %{version}-%{release} -# System users/groups that some tests rely on. -Requires: group(bin) Requires: attr Requires: binutils Requires: busybox-static @@ -634,6 +632,8 @@ Requires: quota Requires: socat Requires: squashfs Requires: systemd-container +# System users/groups that some tests rely on. +Requires: group(bin) Requires: group(daemon) Requires: group(games) Requires: group(nobody) From 638de11012ce19f257d7aef318aae9eec311ce498ec49174ccac5fa9e47bdd06 Mon Sep 17 00:00:00 2001 From: Franck Bui Date: Mon, 24 Jun 2024 14:45:08 +0000 Subject: [PATCH 7/7] - Don't automatically clean unmodified config files up (bsc#1226415) OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=1535 --- files.experimental | 2 ++ files.journal-remote | 3 +++ files.network | 2 ++ files.systemd | 5 +++++ files.udev | 5 +++++ fixlet-systemd-post.sh | 25 +++++++++++++++++++++++++ systemd.changes | 10 ++++++++++ systemd.spec | 36 ------------------------------------ 8 files changed, 52 insertions(+), 36 deletions(-) diff --git a/files.experimental b/files.experimental index f9116e29..ee0675ca 100644 --- a/files.experimental +++ b/files.experimental @@ -9,6 +9,8 @@ %if %{with sd_boot} %dir %{_unitdir}/initrd.target.wants %endif +# Main config files have been replaced in favor of drop-ins. +%ghost %{_sysconfdir}/systemd/oomd.conf %{_bindir}/oomctl %{_bindir}/systemd-vmspawn %if %{with sd_boot} diff --git a/files.journal-remote b/files.journal-remote index 1acfe411..27597c7b 100644 --- a/files.journal-remote +++ b/files.journal-remote @@ -4,6 +4,9 @@ %dir %{_sysconfdir}/systemd/journal-remote.conf.d %dir %{_sysconfdir}/systemd/journal-upload.conf.d %ghost %dir %{_localstatedir}/log/journal/remote +# Main config files have been replaced in favor of drop-ins. +%ghost %{_sysconfdir}/systemd/journal-remote.conf +%ghost %{_sysconfdir}/systemd/journal-upload.conf %{_datadir}/systemd/gatewayd %{_datadir}/systemd/gatewayd/browse.html %{_mandir}/man5/journal-remote.conf.5.gz diff --git a/files.network b/files.network index c1b17155..2dd59e9a 100644 --- a/files.network +++ b/files.network @@ -5,6 +5,8 @@ %dir %{_sysconfdir}/systemd/network %dir %{_sysconfdir}/systemd/networkd.conf.d %dir %{_systemd_util_dir}/network +# Main config files have been replaced in favor of drop-ins. +%ghost %{_sysconfdir}/systemd/networkd.conf %{_bindir}/networkctl %{_datadir}/bash-completion/completions/networkctl %{_datadir}/dbus-1/interfaces/org.freedesktop.network1.DHCPServer.xml diff --git a/files.systemd b/files.systemd index 45a34a3a..477251f6 100644 --- a/files.systemd +++ b/files.systemd @@ -91,6 +91,11 @@ %ghost %config(noreplace) %{_sysconfdir}/machine-info %ghost %dir %attr(2755, root, systemd-journal) %{_localstatedir}/log/journal %ghost %{_localstatedir}/lib/systemd/catalog/database +# Main config files have been replaced in favor of drop-ins. +%ghost %{_sysconfdir}/systemd/journald.conf +%ghost %{_sysconfdir}/systemd/logind.conf +%ghost %{_sysconfdir}/systemd/system.conf +%ghost %{_sysconfdir}/systemd/user.conf %license LICENSE.GPL2 %license LICENSE.LGPL2.1 %{_bindir}/busctl diff --git a/files.udev b/files.udev index 401584d2..09ba6c98 100644 --- a/files.udev +++ b/files.udev @@ -40,6 +40,11 @@ %ghost %attr(644, root, root) %{_prefix}/lib/udev/compat-symlink-generation %ghost %config(noreplace) %{_sysconfdir}/vconsole.conf %ghost %{_localstatedir}/lib/systemd/backlight +# Main config files have been replaced in favor of drop-ins. +%ghost %{_sysconfdir}/systemd/pstore.conf +%ghost %{_sysconfdir}/systemd/sleep.conf +%ghost %{_sysconfdir}/systemd/timesyncd.conf +%ghost %{_sysconfdir}/udev/iocost.conf %{_bindir}/bootctl %if %{without bootstrap} %{_bindir}/kernel-install diff --git a/fixlet-systemd-post.sh b/fixlet-systemd-post.sh index 1ddb654d..e32bf8fe 100644 --- a/fixlet-systemd-post.sh +++ b/fixlet-systemd-post.sh @@ -276,6 +276,31 @@ drop_after_local_support() { fi } +# +# We have stopped shipping the main config files in /etc but we don't try to +# clean them up automatically as it can have unexepected side effects +# (bsc#1226415). Instead we simply suggest users to convert them (if they exist) +# into drop-ins. +# +# Note: run at each package update +# +check_config_files () { + config_files=(systemd/journald.conf systemd/logind.conf systemd/system.conf systemd/user.conf + systemd/pstore.conf systemd/sleep.conf systemd/timesyncd.conf systemd/coredump.conf + systemd/journal-remote.conf systemd/journal-upload.conf systemd/networkd.conf + systemd/resolved.conf systemd/oomd.conf udev/iocost.conf) + + for f in ${config_files[*]}; do + [ -e /etc/$f ] || continue + + cat >&2 < + +- Don't automatically clean unmodified config files up (bsc#1226415) + + Relying on the presence of .rpmsave for detecting unmodified main config files + couldn't work as it created a time window in which some of the systemd + services were restarted with no config file. That had the bad side effect to + restart them with the upstream defaults, ignoring any user's customization. + ------------------------------------------------------------------- Tue Jun 18 13:20:26 UTC 2024 - Franck Bui diff --git a/systemd.spec b/systemd.spec index bd584826..3cbda4ac 100644 --- a/systemd.spec +++ b/systemd.spec @@ -80,20 +80,6 @@ # value is independent of the build flavor. %bcond_without filetriggers -# We stopped shipping main config files in /etc but we have to restore any -# config files that might have been backed up by rpm during the migration of the -# main config files from /etc to /usr. This needs to be done in %%posttrans -# because the .rpmsave files are created when the *old* package version is -# removed. This is not needed by ALP and will be dropped from Factory near the -# end of 2024. -%define restore_rpmsave() \ -if [ -e %{_sysconfdir}/%{1}.rpmsave ] && [ ! -e %{_sysconfdir}/%{1} ]; then \ - echo >&2 "Restoring %{_sysconfdir}/%1. Please consider moving your customizations in a drop-in instead." \ - echo >&2 "For more details, visit https://en.opensuse.org/Systemd#Configuration." \ - mv -v %{_sysconfdir}/%{1}.rpmsave %{_sysconfdir}/%{1} || : \ -fi \ -%{nil} - Name: systemd%{?mini} URL: http://www.freedesktop.org/wiki/Software/systemd Version: %systemd_version @@ -1131,13 +1117,6 @@ journalctl --update-catalog || : %systemd_postun_with_restart systemd-timedated.service %systemd_postun_with_restart systemd-userdbd.service -%posttrans -%restore_rpmsave systemd/coredump.conf -%restore_rpmsave systemd/journald.conf -%restore_rpmsave systemd/logind.conf -%restore_rpmsave systemd/system.conf -%restore_rpmsave systemd/user.conf - %pre -n udev%{?mini} # Units listed below can be enabled at installation accoding to their preset # setting. @@ -1192,10 +1171,6 @@ fi %posttrans -n udev%{?mini} %regenerate_initrd_posttrans -%restore_rpmsave systemd/pstore.conf -%restore_rpmsave systemd/sleep.conf -%restore_rpmsave systemd/timesyncd.conf -%restore_rpmsave udev/iocost.conf %ldconfig_scriptlets -n libsystemd0%{?mini} %ldconfig_scriptlets -n libudev%{?mini}1 @@ -1246,10 +1221,6 @@ fi %systemd_postun_with_restart systemd-journal-gatewayd.service %systemd_postun_with_restart systemd-journal-remote.service %systemd_postun_with_restart systemd-journal-upload.service - -%posttrans journal-remote -%restore_rpmsave systemd/journal-remote.conf -%restore_rpmsave systemd/journal-upload.conf %endif %if %{with networkd} || %{with resolved} @@ -1298,10 +1269,6 @@ fi %ldconfig %systemd_postun systemd-resolved.service %endif - -%posttrans network -%restore_rpmsave systemd/networkd.conf -%restore_rpmsave systemd/resolved.conf %endif %if %{with homed} @@ -1360,9 +1327,6 @@ fi %postun experimental %systemd_postun systemd-homed.service %systemd_postun systemd-oomd.service systemd-oomd.socket - -%posttrans experimental -%restore_rpmsave systemd/oomd.conf %endif # File trigger definitions