[packages/php/PHP_5_3] migrate configs /etc/php/conf.d -> /etc/phpXY/conf.d/
glen
glen at pld-linux.org
Sun May 18 00:56:01 CEST 2014
commit 92dc4300673c0767b4395ff3f3b006914d21ce3b
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Sun May 18 01:53:15 2014 +0300
migrate configs /etc/php/conf.d -> /etc/phpXY/conf.d/
php.spec | 21 +++++++++++++++++++--
1 file changed, 19 insertions(+), 2 deletions(-)
---
diff --git a/php.spec b/php.spec
index e477a86..3fe3e71 100644
--- a/php.spec
+++ b/php.spec
@@ -119,7 +119,7 @@ ERROR: You need to select at least one Apache SAPI to build shared modules.
%endif
%endif
-%define rel 8
+%define rel 9
%define orgname php
%define ver_suffix 53
%define php_suffix %{!?with_default_php:%{ver_suffix}}
@@ -385,7 +385,6 @@ PHP - це мова написання скриптів, що вбудовуют
Summary: PHP DSO module for Apache 1.3.x
Summary(pl.UTF-8): Moduł DSO (Dynamic Shared Object) PHP dla Apache 1.3.x
Group: Development/Languages/PHP
-Requires(triggerpostun): sed >= 4.0
Requires: %{name}-common = %{epoch}:%{version}-%{release}
Requires: apache1(EAPI) >= 1.3.33-2
Requires: apache1-mod_mime
@@ -2711,6 +2710,24 @@ fi
[ ! -f /etc/apache/conf.d/??_mod_php.conf ] || %service -q apache restart
[ ! -f /etc/httpd/conf.d/??_mod_php.conf ] || %service -q httpd restart
+%triggerpostun common -- php-common < 4:5.3.28-7
+# migrate configs /etc/php/conf.d -> /etc/phpXY/conf.d/
+# do config migration in php-common trigger, as the trigger is ran after all packages are upgraded
+# this way we can stick to one trigger, instead of attaching one for each (sub)package!
+for f in /etc/php/*.ini.rpmsave /etc/php/*.d/*.ini.rpmsave; do
+ test -f "$f" || continue
+ bn=${f#/etc/php/}
+ dn=${bn%/*}
+ fn=${bn#*/}
+ test "$dn" = "$fn" && dn=
+ fn=${fn%.rpmsave}
+ nf=%{_sysconfdir}/$dn/$fn
+ test -f "$nf" || continue
+ cp -vf $nf{,.rpmnew}
+ mv -vf $f $nf
+ %{__sed} -i -e 's#%{_libdir}/php#%{_libdir}/%{name}#' $nf
+done
+
# common macros called at extension post/postun scriptlet
%define extension_scripts() \
%post %1 \
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/php.git/commitdiff/92dc4300673c0767b4395ff3f3b006914d21ce3b
More information about the pld-cvs-commit
mailing list