https://issues.shibboleth.net/jira/browse/SSPCPP-219
authorScott Cantor <cantor.2@osu.edu>
Tue, 4 Aug 2009 20:48:35 +0000 (20:48 +0000)
committerScott Cantor <cantor.2@osu.edu>
Tue, 4 Aug 2009 20:48:35 +0000 (20:48 +0000)
shibboleth.spec.in

index 2629006..997d07c 100644 (file)
@@ -1,7 +1,7 @@
 Name:          shibboleth
 Summary:       Open source system for attribute-based Web SSO
 Version:       @-VERSION-@
-Release:       3
+Release:       1
 #Copyright:    Internet2
 Group:         System Environment/Libraries
 License:       Apache style
@@ -132,15 +132,20 @@ fi
 /sbin/ldconfig
 %endif
 
+# Key generation
+cd %{_sysconfdir}/%{name}
+sh ./keygen.sh -b
+
 %if "%{_vendor}" == "redhat"
        # This adds the proper /etc/rc*.d links for the script
        /sbin/chkconfig --add shibd
+       # On upgrade, restart components if they're already running.
+    if [ "$1" -gt "1" ] ; then
+        /etc/init.d/shibd status 1>/dev/null && /etc/init.d/shibd restart 1>/dev/null
+        %{!?_without_builtinapache:/etc/init.d/httpd status 1>/dev/null && /etc/init.d/httpd restart 1>/dev/null}
+    fi
 %endif
 
-# Key generation
-cd %{_sysconfdir}/%{name}
-sh ./keygen.sh -b
-
 %preun
 %if "%{_vendor}" == "redhat"
        if [ "$1" = 0 ] ; then
@@ -154,13 +159,6 @@ sh ./keygen.sh -b
 /sbin/ldconfig
 %endif
 
-%if "%{_vendor}" == "redhat"
-       if [ "$1" -ge "1" ] ; then
-               #/sbin/service shibd condrestart >/dev/null 2>&1 || :
-               /etc/init.d/shibd status 1>/dev/null && /etc/init.d/shibd start 1>/dev/null
-       fi
-%endif
-
 %posttrans
 # ugly hack if init script got removed during %postun by upgraded (buggy/2.1) package
 %if "%{_vendor}" == "redhat"
@@ -225,6 +223,9 @@ sh ./keygen.sh -b
 %doc %{_datadir}/doc/%{name}/api
 
 %changelog
+* Tue Aug 4 2009 Scott Cantor  <cantor.2@osu.edu>  - 2.2.1-1
+- Initial version for 2.2.1, with shibd/httpd restart on upgrade
+
 * Thu Jun 25 2009 Scott Cantor  <cantor.2@osu.edu>  - 2.2-3
 - Add additional cleanup to posttrans fix