From aec6635e71144b3dfb2af25f9a178ed25cde55e296159863310d134654968222 Mon Sep 17 00:00:00 2001 From: Franck Bui Date: Fri, 24 Sep 2021 09:29:34 +0000 Subject: [PATCH] - systemd.spec: fix a bunch of rpmlint errors/warnings OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=1191 --- systemd-mini-rpmlintrc | 28 ++++------------------------ systemd-mini.changes | 5 +++++ systemd-mini.spec | 21 ++++++++++++++++----- systemd-rpmlintrc | 28 ++++------------------------ systemd.changes | 5 +++++ systemd.spec | 21 ++++++++++++++++----- 6 files changed, 50 insertions(+), 58 deletions(-) diff --git a/systemd-mini-rpmlintrc b/systemd-mini-rpmlintrc index c3b202a1..6526f3d7 100644 --- a/systemd-mini-rpmlintrc +++ b/systemd-mini-rpmlintrc @@ -1,30 +1,10 @@ -addFilter("invalid-pkgconfig-file") -addFilter(".*dangling-symlink /sbin/(halt|init|poweroff|telinit|shutdown|runlevel|reboot).*") -addFilter(".*dangling-symlink .* /dev/null.*") -addFilter(".*files-duplicate .*/reboot\.8.*") -addFilter(".*files-duplicate .*/sd_is_socket\.3.*") -addFilter("non-conffile-in-etc /etc/bash_completion.d/systemd-bash-completion\.sh") -addFilter("non-conffile-in-etc /etc/rpm/macros\.systemd") +addFilter(".*filelist-forbidden-systemd-userdirs /etc/systemd/.*\.conf") addFilter(".*dbus-policy-allow-receive") -addFilter(".*dangling-symlink /lib/udev/devices/std(in|out|err).*") -addFilter(".*dangling-symlink /lib/udev/devices/core.*") -addFilter(".*dangling-symlink /lib/udev/devices/fd.*") -addFilter(".*incoherent-init-script-name boot\.udev.*") -addFilter(".init-script-without-%stop_on_removal-preun /etc/init\.d/boot\.udev") -addFilter(".init-script-without-%restart_on_update-postun /etc/init\.d/boot\.udev") addFilter(".*devel-file-in-non-devel-package.*udev.pc.*") -addFilter(".*libgudev-.*shlib-fixed-dependency.*") -addFilter(".*suse-filelist-forbidden-systemd-userdirs.*") -addFilter("libudev-mini.*shlib-policy-name-error.*") -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("devel-file-in-non-devel-package.*/usr/share/pkgconfig/(udev|systemd)\.pc.*") -addFilter(".*script-without-shebang.*/usr/lib/udev/rule_generator.functions.*") addFilter(".*missing-call-to-setgroups-before-setuid.*") -addFilter(".*missing-call-to-chdir-with-chroot.*") addFilter(".*systemd-service-without-service.*") -addFilter(".*shlib-policy-missing-suffix.*") -addFilter(".*suse-missing-rclink.*") addFilter("env-script-interpreter") +addFilter(".*files-duplicate /usr/lib/systemd/.*") +addFilter(".*files-duplicated-waste.*") +addFilter(".*explicit-lib-dependency .*") diff --git a/systemd-mini.changes b/systemd-mini.changes index 994e5ae4..b78f9545 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Sep 24 09:28:38 UTC 2021 - Franck Bui + +- systemd.spec: fix a bunch of rpmlint errors/warnings + ------------------------------------------------------------------- Fri Sep 24 07:27:58 UTC 2021 - Franck Bui diff --git a/systemd-mini.spec b/systemd-mini.spec index 64066d1a..17a8f3f7 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -238,7 +238,7 @@ Summary: System V init tools License: LGPL-2.1-or-later Requires: %{name} = %{version}-%{release} Provides: sbin_init -Conflicts: otherproviders(sbin_init) +Conflicts: sbin_init Provides: systemd-sysvinit = %{version}-%{release} Provides: sysvinit:/sbin/init @@ -892,7 +892,7 @@ find %{buildroot}%{_testsuitedir}/ -name .git\* -exec rm -fr {} \; %endif # Build of installation images uses a hard coded list of packages with -# a %pre that needs to be run during the build. systemd is one of them +# a %%pre that needs to be run during the build. systemd is one of them # so keep the section even if it's empty. %pre : @@ -921,7 +921,7 @@ pam-config --add --systemd || : %endif # systemd-sysusers is not available in %pre so this needs to be done -# in %post. However this shouldn't be an issue since all files the +# in %%post. However this shouldn't be an issue since all files the # main package ships are owned by root. %sysusers_create systemd.conf @@ -1211,8 +1211,6 @@ fi %service_del_postun systemd-homed.service %endif -%clean - %files %defattr(-,root,root) %license LICENSE* @@ -1437,6 +1435,14 @@ fi %{_modprobedir}/systemd.conf # Some files created at runtime. +%ghost %{_rundir}/log +%ghost %{_rundir}/systemd +%ghost %{_rundir}/systemd/ask-password +%ghost %{_rundir}/systemd/seats +%ghost %{_rundir}/systemd/sessions +%ghost %{_rundir}/systemd/users +%ghost %{_rundir}/systemd/machines +%ghost %{_rundir}/systemd/shutdown %ghost %config(noreplace) %{_sysconfdir}/X11/xorg.conf.d/00-keyboard.conf %ghost %config(noreplace) %{_sysconfdir}/vconsole.conf %ghost %config(noreplace) %{_sysconfdir}/locale.conf @@ -1789,6 +1795,11 @@ fi %{_unitdir}/systemd-networkd.service %{_unitdir}/systemd-networkd.socket %{_unitdir}/systemd-networkd-wait-online.service +# Some files created at runtime +%ghost %{_rundir}/systemd/netif +%ghost %{_rundir}/systemd/netif/links +%ghost %{_rundir}/systemd/netif/leases +%ghost %{_rundir}/systemd/netif/lldp %endif %if %{with resolved} %{_bindir}/resolvectl diff --git a/systemd-rpmlintrc b/systemd-rpmlintrc index c3b202a1..6526f3d7 100644 --- a/systemd-rpmlintrc +++ b/systemd-rpmlintrc @@ -1,30 +1,10 @@ -addFilter("invalid-pkgconfig-file") -addFilter(".*dangling-symlink /sbin/(halt|init|poweroff|telinit|shutdown|runlevel|reboot).*") -addFilter(".*dangling-symlink .* /dev/null.*") -addFilter(".*files-duplicate .*/reboot\.8.*") -addFilter(".*files-duplicate .*/sd_is_socket\.3.*") -addFilter("non-conffile-in-etc /etc/bash_completion.d/systemd-bash-completion\.sh") -addFilter("non-conffile-in-etc /etc/rpm/macros\.systemd") +addFilter(".*filelist-forbidden-systemd-userdirs /etc/systemd/.*\.conf") addFilter(".*dbus-policy-allow-receive") -addFilter(".*dangling-symlink /lib/udev/devices/std(in|out|err).*") -addFilter(".*dangling-symlink /lib/udev/devices/core.*") -addFilter(".*dangling-symlink /lib/udev/devices/fd.*") -addFilter(".*incoherent-init-script-name boot\.udev.*") -addFilter(".init-script-without-%stop_on_removal-preun /etc/init\.d/boot\.udev") -addFilter(".init-script-without-%restart_on_update-postun /etc/init\.d/boot\.udev") addFilter(".*devel-file-in-non-devel-package.*udev.pc.*") -addFilter(".*libgudev-.*shlib-fixed-dependency.*") -addFilter(".*suse-filelist-forbidden-systemd-userdirs.*") -addFilter("libudev-mini.*shlib-policy-name-error.*") -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("devel-file-in-non-devel-package.*/usr/share/pkgconfig/(udev|systemd)\.pc.*") -addFilter(".*script-without-shebang.*/usr/lib/udev/rule_generator.functions.*") addFilter(".*missing-call-to-setgroups-before-setuid.*") -addFilter(".*missing-call-to-chdir-with-chroot.*") addFilter(".*systemd-service-without-service.*") -addFilter(".*shlib-policy-missing-suffix.*") -addFilter(".*suse-missing-rclink.*") addFilter("env-script-interpreter") +addFilter(".*files-duplicate /usr/lib/systemd/.*") +addFilter(".*files-duplicated-waste.*") +addFilter(".*explicit-lib-dependency .*") diff --git a/systemd.changes b/systemd.changes index 994e5ae4..b78f9545 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Sep 24 09:28:38 UTC 2021 - Franck Bui + +- systemd.spec: fix a bunch of rpmlint errors/warnings + ------------------------------------------------------------------- Fri Sep 24 07:27:58 UTC 2021 - Franck Bui diff --git a/systemd.spec b/systemd.spec index 5c0967de..4e995bdd 100644 --- a/systemd.spec +++ b/systemd.spec @@ -236,7 +236,7 @@ Summary: System V init tools License: LGPL-2.1-or-later Requires: %{name} = %{version}-%{release} Provides: sbin_init -Conflicts: otherproviders(sbin_init) +Conflicts: sbin_init Provides: systemd-sysvinit = %{version}-%{release} Provides: sysvinit:/sbin/init @@ -890,7 +890,7 @@ find %{buildroot}%{_testsuitedir}/ -name .git\* -exec rm -fr {} \; %endif # Build of installation images uses a hard coded list of packages with -# a %pre that needs to be run during the build. systemd is one of them +# a %%pre that needs to be run during the build. systemd is one of them # so keep the section even if it's empty. %pre : @@ -919,7 +919,7 @@ pam-config --add --systemd || : %endif # systemd-sysusers is not available in %pre so this needs to be done -# in %post. However this shouldn't be an issue since all files the +# in %%post. However this shouldn't be an issue since all files the # main package ships are owned by root. %sysusers_create systemd.conf @@ -1209,8 +1209,6 @@ fi %service_del_postun systemd-homed.service %endif -%clean - %files %defattr(-,root,root) %license LICENSE* @@ -1435,6 +1433,14 @@ fi %{_modprobedir}/systemd.conf # Some files created at runtime. +%ghost %{_rundir}/log +%ghost %{_rundir}/systemd +%ghost %{_rundir}/systemd/ask-password +%ghost %{_rundir}/systemd/seats +%ghost %{_rundir}/systemd/sessions +%ghost %{_rundir}/systemd/users +%ghost %{_rundir}/systemd/machines +%ghost %{_rundir}/systemd/shutdown %ghost %config(noreplace) %{_sysconfdir}/X11/xorg.conf.d/00-keyboard.conf %ghost %config(noreplace) %{_sysconfdir}/vconsole.conf %ghost %config(noreplace) %{_sysconfdir}/locale.conf @@ -1787,6 +1793,11 @@ fi %{_unitdir}/systemd-networkd.service %{_unitdir}/systemd-networkd.socket %{_unitdir}/systemd-networkd-wait-online.service +# Some files created at runtime +%ghost %{_rundir}/systemd/netif +%ghost %{_rundir}/systemd/netif/links +%ghost %{_rundir}/systemd/netif/leases +%ghost %{_rundir}/systemd/netif/lldp %endif %if %{with resolved} %{_bindir}/resolvectl