]> TLD Linux GIT Repositories - packages/apache.git/blobdiff - apache.spec
- more triggers to provide smoother upgrade from 2.2
[packages/apache.git] / apache.spec
index fb09b12faa976c4c996329ca2c93694141493c2e..2a6123cf99976c1dcf7ee80c2d877ab7ace5f885 100644 (file)
@@ -40,7 +40,7 @@ Summary(ru.UTF-8):    Самый популярный веб-сервер
 Summary(tr.UTF-8):     Lider WWW tarayıcı
 Name:          apache
 Version:       2.4.1
-Release:       0.4
+Release:       0.5
 License:       Apache v2.0
 Group:         Networking/Daemons/HTTP
 Source0:       http://www.apache.org/dist/httpd/httpd-%{version}.tar.gz
@@ -189,7 +189,6 @@ Requires:   /sbin/chkconfig
 Requires:      apr >= %{apr_ver}
 Requires:      psmisc >= 20.1
 Requires:      rc-scripts >= 0.4.1.23
-Requires:      %{name}-mod_unixd = %{version}-%{release}
 Provides:      apache(modules-api) = %{_apache_modules_api}
 Provides:      group(http)
 Provides:      user(http)
@@ -571,6 +570,7 @@ Group:              Networking/Daemons/HTTP
 URL:           http://httpd.apache.org/docs/2.4/mod/mod_authn_core.html
 Requires:      %{name}-base = %{version}-%{release}
 Provides:      apache(mod_authn_core) = %{version}-%{release}
+Obsoletes:     apache(mod_authn_alias)
 Obsoletes:     apache-mod_authn_default < 2.4
 
 %description mod_authn_core
@@ -1967,16 +1967,6 @@ Provides:        apache(mod_socache_shmcb) = %{version}-%{release}
 %description mod_socache
 Shared object cache provider.
 
-%package mod_unixd
-Summary:       Basic (required) security for Unix-family platforms
-Group:         Networking/Daemons/HTTP
-URL:           http://httpd.apache.org/docs/2.4/mod/mod_unixd.html
-Requires:      %{name}-base = %{version}-%{release}
-Provides:      apache(mod_unixd) = %{version}-%{release}
-
-%description mod_unixd
-Basic (required) security for Unix-family platforms.
-
 %package mod_watchdog
 Summary:       Provides infrastructure for other modules to periodically run tasks
 Group:         Networking/Daemons/HTTP
@@ -2302,7 +2292,6 @@ echo "#LoadModule slotmem_shm_module      modules/mod_slotmem_shm.so" >> $CFG/00_mod_
 echo "#LoadModule socache_dbm_module   modules/mod_socache_dbm.so" > $CFG/00_mod_socache.conf
 echo "#LoadModule socache_memcache_module      modules/mod_socache_memcache.so" >> $CFG/00_mod_socache.conf
 echo "#LoadModule socache_shmcb_module modules/mod_socache_shmcb.so" >> $CFG/00_mod_socache.conf
-echo "LoadModule unixd_module  modules/mod_unixd.so" > $CFG/00_mod_unixd.conf
 echo "LoadModule watchdog_module       modules/mod_watchdog.so" > $CFG/00_mod_watchdog.conf
 echo "LoadModule xml2enc_module        modules/mod_xml2enc.so" > $CFG/00_mod_xml2enc.conf
 
@@ -2479,22 +2468,16 @@ Please report bugs to <http://bugs.pld-linux.org/>.
 EOF
 
 %triggerpostun base -- %{name} < 2.4.0
-%banner -e %{name} << EOF
-WARNING!!!
-Since apache-2.4 mod_authn_alias has been obsoleted.
-If you use access control (Deny,Allow) install mod_access_compat by doing:
-poldek -ivh %{name}-mod_access_compat
-
-In apache-2.4 mod_authn_default and mod_authz_default have been obsoleted by
-mod_authn_core and authz_core. If you used these modules install the new ones by invoking:
-poldek -ivh %{name}-mod_authn_core
-and/or
-poldek -ivh %{name}-mod_authz_core
-
-For more information on how to upgrade from Apache 2.2 visit:
-http://httpd.apache.org/docs/2.4/upgrading.html
-EOF
-
+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}
@@ -2503,6 +2486,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
@@ -2622,7 +2612,6 @@ fi
 %module_scripts mod_session
 %module_scripts mod_slotmem
 %module_scripts mod_socache
-%module_scripts mod_unixd
 %module_scripts mod_watchdog
 %module_scripts mod_xml2enc
 
@@ -2668,10 +2657,11 @@ fi
 %attr(640,root,root) %{_sysconfdir}/magic
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/httpd
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/*
-# MPM modules
+# required modules
 %attr(755,root,root) %{_libexecdir}/mod_mpm_event.so
 %attr(755,root,root) %{_libexecdir}/mod_mpm_prefork.so
 %attr(755,root,root) %{_libexecdir}/mod_mpm_worker.so
+%attr(755,root,root) %{_libexecdir}/mod_unixd.so
 
 %dir %{_libexecdir}
 
@@ -3185,11 +3175,6 @@ fi
 %attr(755,root,root) %{_libexecdir}/mod_socache_memcache.so
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*_mod_socache.conf
 
-%files mod_unixd
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_libexecdir}/mod_unixd.so
-%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*_mod_unixd.conf
-
 %files mod_watchdog
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_libexecdir}/mod_watchdog.so