]> git.pld-linux.org Git - packages/apache.git/commitdiff
- triggers to ease upgrade to 2.4 (handles simple configuration properly)
authorAdam Gołębiowski <adamg@pld-linux.org>
Sun, 26 Feb 2012 15:17:37 +0000 (15:17 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    apache.spec -> 1.663

apache.spec

index 5e9ad3bc5ae194ee1b108b2811dc3ff75a46d2e8..104fdd0f6e6e876ce90955a956b284ecb769ee2f 100644 (file)
@@ -2411,6 +2411,16 @@ if [ ! -L /etc/httpd/httpd.conf ]; then
        install -d /etc/httpd
        ln -s conf.d /etc/httpd/httpd.conf
 fi
+if [ -f /etc/sysconfig/httpd ]; then
+        MPM=$(grep HTTPD_MPM /etc/sysconfig/httpd |sed 's,HTTPD_MPM=,,;s,",,g')
+        if [ -n $MPM ]; then
+                echo "LoadModule mpm_${MPM}_module                modules/mod_mpm_${MPM}.so" > /etc/httpd/conf.d/10_mpm.conf.rpmnew
+                cat /etc/httpd/conf.d/10_mpm.conf >> /etc/httpd/conf.d/10_mpm.conf.rpmnew
+                mv /etc/httpd/conf.d/10_mpm.conf.rpmnew /etc/httpd/conf.d/10_mpm.conf
+                sed -i -e 's,HTTPD_MPM.*,,g' /etc/sysconfig/httpd
+        fi
+fi
+
 exit 0
 
 %post base
@@ -2526,6 +2536,18 @@ if [ -z "$HTTPD_CONF" ]; then
 fi
 %systemd_trigger httpd.service
 
+%triggerpostun base -- %{name} < 2.4.0
+cp -f /etc/httpd/apache.conf{,.rpmsave}
+sed -i -e '
+       /^DefaultType.*/s,.*,,
+       /^Include /s,^Include ,IncludeOptional ,
+       /^NameVirtualHost.*/s,.*,,
+       /^User/s,^,LoadModule unixd_module modules/mod_unixd.so\n,
+' /etc/httpd/apache.conf
+sed -i -e '
+       s,^LockFile /var/run/httpd/accept.lock,Mutex file:/var/run/httpd/,g
+' /etc/httpd/conf.d/10_mpm.conf
+
 %triggerpostun mod_ssl -- %{name}-mod_ssl < 1:2.2.0-3.1
 cp -f /etc/httpd/conf.d/40_mod_ssl.conf{,.rpmsave}
 sed -i -e '
@@ -2533,6 +2555,13 @@ sed -i -e '
        s,/var/cache/apache,/var/cache/httpd,g
 ' /etc/httpd/conf.d/40_mod_ssl.conf
 
+%triggerpostun mod_ssl -- %{name}-mod_ssl < 1:2.4.0
+cp -f /etc/httpd/conf.d/40_mod_ssl.conf{,.rpmsave}
+sed -i -e '
+       /^SSLMutex/s,^,#,
+       /^NameVirtualHost.*/s,.*,,
+' /etc/httpd/conf.d/40_mod_ssl.conf
+
 %posttrans base
 # restore lock which we disabled in pretrans
 mv -f /var/lock/subsys/httpd{.disabled,} 2>/dev/null
This page took 0.814004 seconds and 4 git commands to generate.