[sec/f18] Apply latest packaging guidelines (systemd scriptlets for F18+)

Stefan Schulze Frielinghaus stefansf at fedoraproject.org
Fri Aug 17 15:56:30 UTC 2012


commit 358a3d3ae84102dd593be2f81b8ee4b7d79c42bf
Author: Stefan Schulze Frielinghaus <stefansf at fedoraproject.org>
Date:   Fri Aug 17 17:56:15 2012 +0200

    Apply latest packaging guidelines (systemd scriptlets for F18+)

 sec.spec |   22 +++++++---------------
 1 files changed, 7 insertions(+), 15 deletions(-)
---
diff --git a/sec.spec b/sec.spec
index b7f3900..2090286 100644
--- a/sec.spec
+++ b/sec.spec
@@ -1,6 +1,6 @@
 Name:           sec
 Version:        2.6.2
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        Simple Event Correlator script to filter log file entries
 Group:          System Environment/Daemons
 License:        GPLv2+
@@ -75,24 +75,13 @@ install -m 0644 -p %{SOURCE5} %{SOURCE6} %{SOURCE7} %{SOURCE8} \
 chmod 0644 contrib/convert.pl contrib/swatch2sec.pl
 
 %post
-if [ $1 -eq 1 ]; then
-        # Initial installation
-        /bin/systemctl daemon-reload >/dev/null 2>&1 || :
-fi
+%systemd_post sec.service
 
 %preun
-if [ $1 -eq 0 ]; then
-        # Package removal, not upgrade
-        /bin/systemctl --no-reload disable sec.service > /dev/null 2>&1 || :
-        /bin/systemctl stop sec.service > /dev/null 2>&1 || :
-fi
+%systemd_preun sec.service
 
 %postun
-/bin/systemctl daemon-reload >/dev/null 2>&1 || :
-if [ $1 -ge 1 ]; then
-        # Package upgrade, not uninstall
-        /bin/systemctl try-restart sec.service >/dev/null 2>&1 || :
-fi
+%systemd_postun_with_restart sec.service
 
 %clean
 rm -rf %{buildroot}
@@ -107,6 +96,9 @@ rm -rf %{buildroot}
 %{_unitdir}/sec.service
 
 %changelog
+* Fri Aug 17 2012 Stefan Schulze Frielinghaus <stefansf at fedoraproject.org> - 2.6.2-2
+- Apply latest packaging guidelines (systemd scriptlets for F18+)
+
 * Sat Jul 21 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2.6.2-1
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
 


More information about the scm-commits mailing list