From de562facf22ec724abfdd16e820c67a0e4813f10e95dde97d5f543e3aef4bf9d Mon Sep 17 00:00:00 2001 From: Franck Bui Date: Fri, 24 Sep 2021 07:42:46 +0000 Subject: [PATCH] - Drop systemd-logger This sub package was introduced in order to configure persistent journal and also to make sure that another syslog provider (such as rsyslog) couldn't be installed at the same time: each syslog provider conflicts with each others. However this mechanism didn't work since uninstalling systemd-logger wasn't magically turning off persistent logging because /var/log/journal is likely to be populated hence not removed. Moreover using a subpackage to configure the mode of journald was overkill and the usual ways (main conf file or drop-ins) should be preferred. OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=1190 --- systemd-mini-rpmlintrc | 2 -- systemd-mini.changes | 18 ++++++++++++++++++ systemd-mini.spec | 42 +++++++++++------------------------------- systemd-rpmlintrc | 2 -- systemd.changes | 18 ++++++++++++++++++ systemd.spec | 42 +++++++++++------------------------------- 6 files changed, 58 insertions(+), 66 deletions(-) diff --git a/systemd-mini-rpmlintrc b/systemd-mini-rpmlintrc index 9bc3777f..c3b202a1 100644 --- a/systemd-mini-rpmlintrc +++ b/systemd-mini-rpmlintrc @@ -20,10 +20,8 @@ addFilter("nss-systemd.*shlib-policy-name-error.*") addFilter("nss-myhostname.*shlib-policy-name-error.*") addFilter("nss-mymachines.*shlib-policy-name-error.*") addFilter("nss-resolve.*shlib-policy-name-error.*") -addFilter("systemd-logger.*useless-provides sysvinit(syslog).*") addFilter("devel-file-in-non-devel-package.*/usr/share/pkgconfig/(udev|systemd)\.pc.*") addFilter(".*script-without-shebang.*/usr/lib/udev/rule_generator.functions.*") -addFilter(".*files-duplicate.*/systemd-logger.*") addFilter(".*missing-call-to-setgroups-before-setuid.*") addFilter(".*missing-call-to-chdir-with-chroot.*") addFilter(".*systemd-service-without-service.*") diff --git a/systemd-mini.changes b/systemd-mini.changes index 0c7c9ea7..994e5ae4 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,21 @@ +------------------------------------------------------------------- +Fri Sep 24 07:27:58 UTC 2021 - Franck Bui + +- Drop systemd-logger + + This sub package was introduced in order to configure persistent + journal and also to make sure that another syslog provider (such as + rsyslog) couldn't be installed at the same time: each syslog + provider conflicts with each others. + + However this mechanism didn't work since uninstalling systemd-logger + wasn't magically turning off persistent logging because + /var/log/journal is likely to be populated hence not removed. + + Moreover using a subpackage to configure the mode of journald was + overkill and the usual ways (main conf file or drop-ins) should be + preferred. + ------------------------------------------------------------------- Wed Sep 22 13:41:34 UTC 2021 - Franck Bui diff --git a/systemd-mini.spec b/systemd-mini.spec index 00f8accd..64066d1a 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -154,10 +154,12 @@ Conflicts: kiwi Conflicts: sysvinit Conflicts: filesystem < 11.5 Conflicts: mkinitrd < 2.7.0 -Obsoletes: systemd-analyze < 201 +Provides: systemd-logger = %{version}-%{release} +Obsoletes: systemd-logger < %{version}-%{release} Provides: systemd-analyze = %{version}-%{release} Obsoletes: pm-utils <= 1.4.1 Obsoletes: suspend <= 1.0 +Obsoletes: systemd-analyze < 201 Source0: systemd-v%{version}%{suse_version}.tar.xz Source1: %{name}-rpmlintrc Source2: systemd-user @@ -398,21 +400,9 @@ More information can be found online: http://0pointer.net/blog/walkthrough-for-portable-services.html https://systemd.io/PORTABLE_SERVICES - %endif %if ! 0%{?bootstrap} -%package logger -Summary: Journal only logging -License: LGPL-2.1-or-later -Provides: syslog -Provides: sysvinit(syslog) -Requires(post): /usr/bin/systemctl -Conflicts: otherproviders(syslog) - -%description logger -This package marks the installation to not use syslog but only the journal. - %package -n nss-systemd Summary: Plugin for local virtual host name resolution License: LGPL-2.1-or-later @@ -782,10 +772,6 @@ rm -f %{buildroot}%{_sysusersdir}/basic.conf # in this directory... oh well. rm -f %{buildroot}/etc/init.d/README -# Create the /var/log/journal directory to change the volatile journal -# to a persistent one -mkdir -p %{buildroot}%{_localstatedir}/log/journal/ - # This dir must be owned (and thus created) by systemd otherwise the # build system will complain. This is odd since we simply own a ghost # file in it... @@ -960,6 +946,11 @@ systemctl daemon-reexec || : # # systemctl kill --kill-who=main --signal=SIGRTMIN+25 "user@*.service" || : +if [ "$1" -eq 1 ]; then + # Persistent journal is the default + mkdir -p %{_localstatedir}/log/journal +fi + %journal_catalog_update %tmpfiles_create @@ -1103,13 +1094,6 @@ fi %endif %if ! 0%{?bootstrap} -%post logger -%tmpfiles_create -- --prefix=%{_localstatedir}/log/journal/ -if [ "$1" -eq 1 ]; then - # tell journal to start logging on disk if directory didn't exist before - systemctl --no-block restart systemd-journal-flush.service >/dev/null || : -fi - %post -n nss-myhostname -p /sbin/ldconfig %postun -n nss-myhostname -p /sbin/ldconfig @@ -1382,6 +1366,9 @@ fi %{_pam_moduledir}/pam_systemd.so +%ghost %dir %attr(2755, root, systemd-journal) %{_localstatedir}/log/journal/ +%doc %{_localstatedir}/log/README + %if %{with gnuefi} %dir %{_prefix}/lib/systemd/boot %dir %{_prefix}/lib/systemd/boot/efi @@ -1559,7 +1546,6 @@ fi %defattr(-,root,root,-) %dir %{_docdir}/systemd %{_docdir}/systemd/html - # /bootstrap %endif @@ -1735,12 +1721,6 @@ fi %if ! 0%{?bootstrap} %files lang -f systemd.lang -%files logger -%defattr(-,root,root) -# package without explicit setgid bit / attrs (see bsc#1172550) -%dir %{_localstatedir}/log/journal/ -%doc %{_localstatedir}/log/README - %files -n nss-myhostname %defattr(-, root, root) %{_libdir}/*nss_myhostname* diff --git a/systemd-rpmlintrc b/systemd-rpmlintrc index 9bc3777f..c3b202a1 100644 --- a/systemd-rpmlintrc +++ b/systemd-rpmlintrc @@ -20,10 +20,8 @@ addFilter("nss-systemd.*shlib-policy-name-error.*") addFilter("nss-myhostname.*shlib-policy-name-error.*") addFilter("nss-mymachines.*shlib-policy-name-error.*") addFilter("nss-resolve.*shlib-policy-name-error.*") -addFilter("systemd-logger.*useless-provides sysvinit(syslog).*") addFilter("devel-file-in-non-devel-package.*/usr/share/pkgconfig/(udev|systemd)\.pc.*") addFilter(".*script-without-shebang.*/usr/lib/udev/rule_generator.functions.*") -addFilter(".*files-duplicate.*/systemd-logger.*") addFilter(".*missing-call-to-setgroups-before-setuid.*") addFilter(".*missing-call-to-chdir-with-chroot.*") addFilter(".*systemd-service-without-service.*") diff --git a/systemd.changes b/systemd.changes index 0c7c9ea7..994e5ae4 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,21 @@ +------------------------------------------------------------------- +Fri Sep 24 07:27:58 UTC 2021 - Franck Bui + +- Drop systemd-logger + + This sub package was introduced in order to configure persistent + journal and also to make sure that another syslog provider (such as + rsyslog) couldn't be installed at the same time: each syslog + provider conflicts with each others. + + However this mechanism didn't work since uninstalling systemd-logger + wasn't magically turning off persistent logging because + /var/log/journal is likely to be populated hence not removed. + + Moreover using a subpackage to configure the mode of journald was + overkill and the usual ways (main conf file or drop-ins) should be + preferred. + ------------------------------------------------------------------- Wed Sep 22 13:41:34 UTC 2021 - Franck Bui diff --git a/systemd.spec b/systemd.spec index 397ef813..5c0967de 100644 --- a/systemd.spec +++ b/systemd.spec @@ -152,10 +152,12 @@ Conflicts: kiwi Conflicts: sysvinit Conflicts: filesystem < 11.5 Conflicts: mkinitrd < 2.7.0 -Obsoletes: systemd-analyze < 201 +Provides: systemd-logger = %{version}-%{release} +Obsoletes: systemd-logger < %{version}-%{release} Provides: systemd-analyze = %{version}-%{release} Obsoletes: pm-utils <= 1.4.1 Obsoletes: suspend <= 1.0 +Obsoletes: systemd-analyze < 201 Source0: systemd-v%{version}%{suse_version}.tar.xz Source1: %{name}-rpmlintrc Source2: systemd-user @@ -396,21 +398,9 @@ More information can be found online: http://0pointer.net/blog/walkthrough-for-portable-services.html https://systemd.io/PORTABLE_SERVICES - %endif %if ! 0%{?bootstrap} -%package logger -Summary: Journal only logging -License: LGPL-2.1-or-later -Provides: syslog -Provides: sysvinit(syslog) -Requires(post): /usr/bin/systemctl -Conflicts: otherproviders(syslog) - -%description logger -This package marks the installation to not use syslog but only the journal. - %package -n nss-systemd Summary: Plugin for local virtual host name resolution License: LGPL-2.1-or-later @@ -780,10 +770,6 @@ rm -f %{buildroot}%{_sysusersdir}/basic.conf # in this directory... oh well. rm -f %{buildroot}/etc/init.d/README -# Create the /var/log/journal directory to change the volatile journal -# to a persistent one -mkdir -p %{buildroot}%{_localstatedir}/log/journal/ - # This dir must be owned (and thus created) by systemd otherwise the # build system will complain. This is odd since we simply own a ghost # file in it... @@ -958,6 +944,11 @@ systemctl daemon-reexec || : # # systemctl kill --kill-who=main --signal=SIGRTMIN+25 "user@*.service" || : +if [ "$1" -eq 1 ]; then + # Persistent journal is the default + mkdir -p %{_localstatedir}/log/journal +fi + %journal_catalog_update %tmpfiles_create @@ -1101,13 +1092,6 @@ fi %endif %if ! 0%{?bootstrap} -%post logger -%tmpfiles_create -- --prefix=%{_localstatedir}/log/journal/ -if [ "$1" -eq 1 ]; then - # tell journal to start logging on disk if directory didn't exist before - systemctl --no-block restart systemd-journal-flush.service >/dev/null || : -fi - %post -n nss-myhostname -p /sbin/ldconfig %postun -n nss-myhostname -p /sbin/ldconfig @@ -1380,6 +1364,9 @@ fi %{_pam_moduledir}/pam_systemd.so +%ghost %dir %attr(2755, root, systemd-journal) %{_localstatedir}/log/journal/ +%doc %{_localstatedir}/log/README + %if %{with gnuefi} %dir %{_prefix}/lib/systemd/boot %dir %{_prefix}/lib/systemd/boot/efi @@ -1557,7 +1544,6 @@ fi %defattr(-,root,root,-) %dir %{_docdir}/systemd %{_docdir}/systemd/html - # /bootstrap %endif @@ -1733,12 +1719,6 @@ fi %if ! 0%{?bootstrap} %files lang -f systemd.lang -%files logger -%defattr(-,root,root) -# package without explicit setgid bit / attrs (see bsc#1172550) -%dir %{_localstatedir}/log/journal/ -%doc %{_localstatedir}/log/README - %files -n nss-myhostname %defattr(-, root, root) %{_libdir}/*nss_myhostname*