From f35b1ba8b21367a36321307b0db73ce55bb9bb7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Thu, 4 Apr 2013 11:54:52 +0200 Subject: [PATCH] enable hardened build - switch to systemd macros in scriptlets (#850240) --- opencryptoki.spec | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/opencryptoki.spec b/opencryptoki.spec index 6893c83..71b92bc 100644 --- a/opencryptoki.spec +++ b/opencryptoki.spec @@ -1,7 +1,9 @@ +%global _hardened_build 1 + Name: opencryptoki Summary: Implementation of the PKCS#11 (Cryptoki) specification v2.11 Version: 2.4.2 -Release: 3%{?dist} +Release: 4%{?dist} License: CPL Group: System Environment/Base URL: http://sourceforge.net/projects/opencryptoki @@ -202,24 +204,13 @@ getent group pkcs11 >/dev/null || groupadd -r pkcs11 exit 0 %post -if [ $1 -eq 1 ] ; then - # Initial installation - /bin/systemctl daemon-reload >/dev/null 2>&1 || : -fi +%systemd_post pkcsslotd.service %preun -if [ $1 -eq 0 ] ; then - # Package removal, not upgrade - /bin/systemctl --no-reload disable pkcsslotd.service > /dev/null 2>&1 || : - /bin/systemctl stop pkcsslotd.service > /dev/null 2>&1 || : -fi +%systemd_preun pkcsslotd.service %postun -/bin/systemctl daemon-reload >/dev/null 2>&1 || : -if [ $1 -ge 1 ] ; then - # Package upgrade, not uninstall - /bin/systemctl try-restart pkcsslotd.service >/dev/null 2>&1 || : -fi +%systemd_postun_with_restart pkcsslotd.service %files @@ -276,6 +267,10 @@ fi %changelog +* Thu Apr 04 2013 Dan Horák - 2.4.2-4 +- enable hardened build +- switch to systemd macros in scriptlets (#850240) + * Mon Jan 28 2013 Dan Horák - 2.4.2-3 - add virtual opencryptoki(token) Provides to token modules and as Requires to main package (#904986)