public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/inn] epel10: Coalesce systemd scriptlets
@ 2026-08-26 8:07
0 siblings, 0 replies; only message in thread
From: @ 2026-08-26 8:07 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/inn
Branch : epel10
Commit : 611716ce4d99a7eb779cd5ee76d9bac80aba50b1
Author : Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Date : 2021-03-02T15:45:45+01:00
Stats : +8/-22 in 1 file(s)
URL : https://src.fedoraproject.org/rpms/inn/c/611716ce4d99a7eb779cd5ee76d9bac80aba50b1?branch=epel10
Log:
Coalesce systemd scriptlets
It is more efficient to do callout just once.
Also, call the scriptlets for all units. For some units the scriptlets
are noops, but it's more future-proof to call them anyway.
---
diff --git a/inn.spec b/inn.spec
index 9c37e4e..faa4c8a 100644
--- a/inn.spec
+++ b/inn.spec
@@ -263,6 +263,9 @@ install -pm644 %{S:30} %{buildroot}%{_sysconfdir}/rsyslog.d/inn.conf
%check
LD_LIBRARY_PATH=%{buildroot}%{_libdir} make -C tests test
+%global inn_units_with_restart innd.service innd-expire.timer innd-nntpsend.timer innd-rnews.timer
+%global inn_units innd-expire.service innd-nntpsend.service innd-rnews.service
+
%pre -n inews
getent group news >/dev/null || groupadd -g 13 -r news
getent passwd news >/dev/null || \
@@ -289,29 +292,15 @@ exit 0
su -m news -c '/usr/libexec/news/makedbz -i -o'
umask 002
-touch /var/log/news/news.notice
-touch /var/log/news/news.crit
-touch /var/log/news/news.err
+touch /var/log/news/news.notice /var/log/news/news.crit /var/log/news/news.err
chown -R news:news /var/log/news*
-%systemd_post innd.service
-
-%systemd_post innd-expire.timer
-%systemd_post innd-nntpsend.timer
-%systemd_post innd-rnews.timer
+%systemd_post %{inn_units_with_restart} %{inn_units}
%ldconfig_scriptlets libs
%preun
-%systemd_preun innd.service
-
-%systemd_preun innd-expire.service
-%systemd_preun innd-nntpsend.service
-%systemd_preun innd-rnews.service
-
-%systemd_preun innd-expire.timer
-%systemd_preun innd-nntpsend.timer
-%systemd_preun innd-rnews.timer
+%systemd_preun %{inn_units_with_restart} %{inn_units}
if [ $1 = 0 ]; then
if [ -f /var/lib/news/history.dir ]; then
@@ -320,11 +309,8 @@ if [ $1 = 0 ]; then
fi
%postun
-%systemd_postun_with_restart innd.service
-
-%systemd_postun_with_restart innd-expire.timer
-%systemd_postun_with_restart innd-nntpsend.timer
-%systemd_postun_with_restart innd-rnews.timer
+%systemd_postun_with_restart %{inn_units}
+%systemd_postun %{inn_units}
%files
%license doc/GPL
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-08-26 8:07 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-26 8:07 [rpms/inn] epel10: Coalesce systemd scriptlets
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox