SPECS: php4.spec - use %posttrans to minimize apache restarts (as ...

glen glen at pld-linux.org
Tue Aug 16 00:57:41 CEST 2005


Author: glen                         Date: Mon Aug 15 22:57:41 2005 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- use %posttrans to minimize apache restarts (as rpm never promised ordering between install and erase, what in fact may change that ordering in order to run erasures in parallel with installs.)

---- Files affected:
SPECS:
   php4.spec (1.469 -> 1.470) 

---- Diffs:

================================================================
Index: SPECS/php4.spec
diff -u SPECS/php4.spec:1.469 SPECS/php4.spec:1.470
--- SPECS/php4.spec:1.469	Mon Aug 15 18:12:31 2005
+++ SPECS/php4.spec	Tue Aug 16 00:57:36 2005
@@ -74,7 +74,7 @@
 Summary(uk):	PHP ÷ĹŇÓŚ§ 4 - ÍĎ×Á ĐŇĹĐŇĎĂĹÓŐ×ÁÎÎŃ HTML-ĆÁĘĚŚ×, ×ÉËĎÎŐ×ÁÎÁ ÎÁ ÓĹŇ×ĹŇŚ
 Name:		php4
 Version:	4.4.0
-Release:	5%{?with_hardening:hardened}
+Release:	5.7%{?with_hardening:hardened}
 Epoch:		3
 Group:		Libraries
 License:	PHP
@@ -379,6 +379,8 @@
 Provides:	php-session = %{epoch}:%{version}-%{release}
 Obsoletes:	php-session < 3:4.2.1-2
 Obsoletes:	php4-openssl < 3:4.4.0-4
+# for the posttrans scriptlet, conflicts because in vserver enviroinment rpm package is not installed.
+Conflicts:	rpm < 4.4.2-0.2
 
 %description common
 Common files needed by all PHP SAPIs.
@@ -1902,22 +1904,6 @@
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-# minimizing apache restarts logics:
-#
-# 1. we restart webserver after extension install only:
-# 1.1 if it's first install (post: $1 = 1)
-# 1.2 or uninstall of extension (postun: $1 == 0)
-# 2. the upgrades are handled by common package:
-# 2.1 webserver is restarted only if common package was upgraded (postun: $1 = 1)
-#
-# note that this creates "delay" when webserver is restarted, ie the
-# actual restart is done by *previous* version of php-common package
-# (the one being just postun'ed).
-#
-# the strict internal deps between extensions (and apache modules) and
-# common package are very important for all this to work. also conf.d
-# without conf.d this would be more complex.
-
 %post -n apache1-mod_php4
 if [ "$1" = "1" ]; then
 	%service -q apache restart
@@ -1954,13 +1940,19 @@
 fi
 
 %post	common -p /sbin/ldconfig
-%postun	common
-/sbin/ldconfig
-# extension_post here is all correct.
-%extension_post
+%postun	common -p /sbin/ldconfig
 
-# compensate missing restart of earlier -common package.
-%triggerpostun common -- %{name}-common < 3:4.4.0-4.42
+%posttrans common
+# minimizing apache restarts logics. we restart webserver:
+#
+# 1. at the end of transaction. (posttrans, feature from rpm 4.4.2)
+# 2. first install of extension (post: $1 = 1)
+# 2. uninstall of extension (postun: $1 == 0)
+#
+# the strict internal deps between extensions (and apache modules) and
+# common package are very important for all this to work.
+
+# restart webserver at the end of transaction
 [ ! -f /etc/apache/conf.d/??_mod_php4.conf ] || %service -q apache restart
 [ ! -f /etc/httpd/httpd.conf/??_mod_php4.conf ] || %service -q httpd restart
 
@@ -3097,6 +3089,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.470  2005/08/15 22:57:36  glen
+- use %posttrans to minimize apache restarts (as rpm never promised ordering between install and erase, what in fact may change that ordering in order to run erasures in parallel with installs.)
+
 Revision 1.469  2005/08/15 16:12:31  glen
 - rel 5, STBR
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/php4.spec?r1=1.469&r2=1.470&f=u




More information about the pld-cvs-commit mailing list