]> git.pld-linux.org Git - packages/apache.git/blobdiff - apache.spec
- epoch for apache(mod_ssl) virtual provide
[packages/apache.git] / apache.spec
index 919df643dca01c67d7d61145ecb5f26808cdc172..52aaa885b2027f4b859c6d7aa16cca60ae66abb0 100644 (file)
@@ -16,6 +16,9 @@
 # - check if all modules (*.so) are exactly the same for different MPMs
 # - install stage fails with distcc (make -jN)
 # - /var/run/apache is also owned by apache1.spec, so rename it to /var/run/httpd spec here (NOTE: if you fix this also adjust apache-mod_fastcgi.spec)
+# - does main package really need apxs dep?
+# - review: http://securitytracker.com/alerts/2005/Aug/1014826.html
+# - http://www.gentoo.org/security/en/glsa/glsa-200509-12.xml (ssl and pcre)
 #
 # Conditional build:
 %bcond_without ssl             # build without SSL support
@@ -35,7 +38,7 @@ Summary(ru):  
 Summary(tr):   Lider WWW tarayýcý
 Name:          apache
 Version:       2.0.54
-Release:       3.1
+Release:       6
 License:       Apache Group License
 Group:         Networking/Daemons
 Source0:       http://www.apache.org/dist/httpd/httpd-%{version}.tar.gz
@@ -84,11 +87,13 @@ Patch18:    %{name}-v6only-ENOPROTOOPT.patch
 Patch19:       %{name}-conffile-path.patch
 Patch20:       %{name}-apxs.patch
 # http://www.telana.com/peruser.php
-Patch21:       httpd-2.0.50-peruser-r3.patch
+Patch21:       httpd-2.0.52-peruser-0.1.6.patch
 Patch22:       %{name}-apr1.patch
 Patch23:       %{name}-normalize-path.patch
 # http://issues.apache.org/bugzilla/attachment.cgi?id=13377 external pcre
 Patch24:       %{name}2-pcre-patch.diff
+# http://issues.apache.org/bugzilla/attachment.cgi?id=16102 DoS
+Patch25:       %{name}2-byterange.patch
 URL:           http://httpd.apache.org/
 BuildRequires: automake
 BuildRequires: apr-devel >= 1:1.0.0
@@ -102,8 +107,9 @@ BuildRequires:      libtool >= 2:1.5
 %{?with_ssl:BuildRequires:     openssl-tools >= 0.9.7d}
 %{?with_external_pcre:BuildRequires:   pcre-devel}
 BuildRequires: perl-devel >= 1:5.6
+BuildRequires: rpm-build >= 4.4.0
 BuildRequires: rpm-perlprov >= 4.1-13
-BuildRequires: rpmbuild(macros) >= 1.202
+BuildRequires: rpmbuild(macros) >= 1.228
 BuildRequires: zlib-devel
 PreReq:                perl-base
 PreReq:                rc-scripts >= 0.4.0.15
@@ -143,6 +149,8 @@ Provides:   user(http)
 Provides:      webserver = apache
 Obsoletes:     apache-extra
 Obsoletes:     apache6
+# for the posttrans scriptlet, conflicts because in vserver environment rpm package is not installed.
+Conflicts:     rpm < 4.4.2-0.2
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define                _sysconfdir     /etc/httpd
@@ -596,7 +604,7 @@ Summary(pl):        Modu
 Summary(ru):   íÏÄÕÌØ SSL/TLS ÄÌÑ ×ÅÂ-ÓÅÒ×ÅÒÁ Apache
 Group:         Networking/Daemons
 Epoch:         1
-Provides:      apache(mod_ssl) = %{version}-%{release}
+Provides:      apache(mod_ssl) = 1:%{version}-%{release}
 Requires:      %{name} = %{version}-%{release}
 
 %description mod_ssl
@@ -773,6 +781,7 @@ Dwa programy testowe/przyk
 %patch22 -p1
 %patch23 -p1
 %{?with_external_pcre:%patch24 -p2}
+%patch25 -p0
 
 %{__perl} -pi -e "s@/usr/local/bin/perl@%{__perl}@" $(grep -rl "/usr/local/bin/perl" *)
 %{__perl} -pi -e "s@BUILD_SUBDIRS.*@BUILD_SUBDIRS =@g" srclib/Makefile.in
@@ -997,11 +1006,6 @@ rm -rf $RPM_BUILD_ROOT
 /sbin/chkconfig --add httpd
 umask 137
 touch /var/log/httpd/{access,error,agent,referer}_log
-if [ -f /var/lock/subsys/httpd ]; then
-       /etc/rc.d/init.d/httpd restart 1>&2
-else
-       echo "Run \"/etc/rc.d/init.d/httpd start\" to start apache HTTP daemon."
-fi
 
 %preun
 if [ "$1" = "0" ]; then
@@ -1026,7 +1030,7 @@ Since apache-2.0.50-6 autoindex module has been separated to package
 poldek -Uv %{name}-mod_autoindex
 EOF
 
-%triggerpostun -- %{name} < 2.0.54-3
+%triggerpostun -- %{name} < 2.0.54-4
 %banner %{name}-2.0.54-2 << EOF
 WARNING!!!
 CGI demo/test programs - printenv and test-cgi, have been released
@@ -1041,354 +1045,183 @@ if [ -f /etc/sysconfig/apache.rpmsave ]; then
        mv -f /etc/sysconfig/{apache.rpmsave,httpd}
 fi
 
-%post mod_actions
-if [ -f /var/lock/subsys/httpd ]; then
-       /etc/rc.d/init.d/httpd restart 1>&2
-else
-       echo "Run \"/etc/rc.d/init.d/httpd start\" to start apache HTTP daemon."
+%posttrans
+# minimizing apache restarts logics. we restart webserver:
+#
+# 1. at the end of transaction. (posttrans, feature from rpm 4.4.2)
+# 2. first install of module (post: $1 = 1)
+# 2. uninstall of module (postun: $1 == 0)
+#
+# the strict internal deps between apache modules and
+# main package are very important for all this to work.
+
+# restart webserver at the end of transaction
+%service httpd restart
+
+# macro called at module post scriptlet
+%define        module_post \
+if [ "$1" = "1" ]; then \
+       %service -q httpd restart \
 fi
 
-%preun mod_actions
-if [ "$1" = "0" ]; then
-       if [ -f /var/lock/subsys/httpd ]; then
-               /etc/rc.d/init.d/httpd restart 1>&2
-       fi
+# macro called at module postun scriptlet
+%define        module_postun \
+if [ "$1" = "0" ]; then \
+       %service -q httpd restart \
 fi
 
+%post mod_actions
+%module_post
+
+%postun mod_actions
+%module_postun
+
 %post mod_auth
-if [ -f /var/lock/subsys/httpd ]; then
-       /etc/rc.d/init.d/httpd restart 1>&2
-else
-       echo "Run \"/etc/rc.d/init.d/httpd start\" to start apache HTTP daemon."
-fi
+%module_post
 
-%preun mod_auth
-if [ "$1" = "0" ]; then
-       if [ -f /var/lock/subsys/httpd ]; then
-               /etc/rc.d/init.d/httpd restart 1>&2
-       fi
-fi
+%postun mod_auth
+%module_postun
 
 %post mod_auth_anon
-if [ -f /var/lock/subsys/httpd ]; then
-       /etc/rc.d/init.d/httpd restart 1>&2
-else
-       echo "Run \"/etc/rc.d/init.d/httpd start\" to start apache HTTP daemon."
-fi
+%module_post
 
-%preun mod_auth_anon
-if [ "$1" = "0" ]; then
-       if [ -f /var/lock/subsys/httpd ]; then
-               /etc/rc.d/init.d/httpd restart 1>&2
-       fi
-fi
+%postun mod_auth_anon
+%module_postun
 
 %post mod_auth_dbm
-if [ -f /var/lock/subsys/httpd ]; then
-       /etc/rc.d/init.d/httpd restart 1>&2
-else
-       echo "Run \"/etc/rc.d/init.d/httpd start\" to start apache HTTP daemon."
-fi
+%module_post
 
-%preun mod_auth_dbm
-if [ "$1" = "0" ]; then
-       if [ -f /var/lock/subsys/httpd ]; then
-               /etc/rc.d/init.d/httpd restart 1>&2
-       fi
-fi
+%postun mod_auth_dbm
+%module_postun
 
 %post mod_autoindex
-if [ -f /var/lock/subsys/httpd ]; then
-       /etc/rc.d/init.d/httpd restart 1>&2
-else
-       echo "Run \"/etc/rc.d/init.d/httpd start\" to start apache HTTP daemon."
-fi
+%module_post
 
-%preun mod_autoindex
-if [ "$1" = "0" ]; then
-       if [ -f /var/lock/subsys/httpd ]; then
-               /etc/rc.d/init.d/httpd restart 1>&2
-       fi
-fi
+%postun mod_autoindex
+%module_postun
 
 %post mod_cache
-if [ -f /var/lock/subsys/httpd ]; then
-       /etc/rc.d/init.d/httpd restart 1>&2
-else
-       echo "Run \"/etc/rc.d/init.d/httpd start\" to start apache HTTP daemon."
-fi
+%module_post
 
-%preun mod_cache
-if [ "$1" = "0" ]; then
-       if [ -f /var/lock/subsys/httpd ]; then
-               /etc/rc.d/init.d/httpd restart 1>&2
-       fi
-fi
+%postun mod_cache
+%module_postun
 
 %post mod_cgid
-if [ -f /var/lock/subsys/httpd ]; then
-       /etc/rc.d/init.d/httpd restart 1>&2
-else
-       echo "Run \"/etc/rc.d/init.d/httpd start\" to start apache HTTP daemon."
-fi
+%module_post
 
-%preun mod_cgid
-if [ "$1" = "0" ]; then
-       if [ -f /var/lock/subsys/httpd ]; then
-               /etc/rc.d/init.d/httpd restart 1>&2
-       fi
-fi
+%postun mod_cgid
+%module_postun
 
 %post mod_charset_lite
-if [ -f /var/lock/subsys/httpd ]; then
-       /etc/rc.d/init.d/httpd restart 1>&2
-else
-       echo "Run \"/etc/rc.d/init.d/httpd start\" to start apache HTTP daemon."
-fi
+%module_post
 
-%preun mod_charset_lite
-if [ "$1" = "0" ]; then
-       if [ -f /var/lock/subsys/httpd ]; then
-               /etc/rc.d/init.d/httpd restart 1>&2
-       fi
-fi
+%postun mod_charset_lite
+%module_postun
 
 %post mod_dav
-if [ -f /var/lock/subsys/httpd ]; then
-       /etc/rc.d/init.d/httpd restart 1>&2
-else
-       echo "Run \"/etc/rc.d/init.d/httpd start\" to start apache HTTP daemon."
-fi
+%module_post
 
-%preun mod_dav
-if [ "$1" = "0" ]; then
-       if [ -f /var/lock/subsys/httpd ]; then
-               /etc/rc.d/init.d/httpd restart 1>&2
-       fi
-fi
+%postun mod_dav
+%module_postun
 
 %post mod_auth_digest
-if [ -f /var/lock/subsys/httpd ]; then
-       /etc/rc.d/init.d/httpd restart 1>&2
-else
-       echo "Run \"/etc/rc.d/init.d/httpd start\" to start apache HTTP daemon."
-fi
+%module_post
 
-%preun mod_auth_digest
-if [ "$1" = "0" ]; then
-       if [ -f /var/lock/subsys/httpd ]; then
-               /etc/rc.d/init.d/httpd restart 1>&2
-       fi
-fi
+%postun mod_auth_digest
+%module_postun
 
 %post mod_deflate
-if [ -f /var/lock/subsys/httpd ]; then
-       /etc/rc.d/init.d/httpd restart 1>&2
-else
-       echo "Run \"/etc/rc.d/init.d/httpd start\" to start apache HTTP daemon."
-fi
+%module_post
 
-%preun mod_deflate
-if [ "$1" = "0" ]; then
-       if [ -f /var/lock/subsys/httpd ]; then
-               /etc/rc.d/init.d/httpd restart 1>&2
-       fi
-fi
+%postun mod_deflate
+%module_postun
 
 %post mod_dir
-if [ -f /var/lock/subsys/httpd ]; then
-       /etc/rc.d/init.d/httpd restart 1>&2
-else
-       echo "Run \"/etc/rc.d/init.d/httpd start\" to start apache HTTP daemon."
-fi
+%module_post
 
-%preun mod_dir
-if [ "$1" = "0" ]; then
-       if [ -f /var/lock/subsys/httpd ]; then
-               /etc/rc.d/init.d/httpd restart 1>&2
-       fi
-fi
+%postun mod_dir
+%module_postun
 
 %post mod_expires
-if [ -f /var/lock/subsys/httpd ]; then
-       /etc/rc.d/init.d/httpd restart 1>&2
-else
-       echo "Run \"/etc/rc.d/init.d/httpd start\" to start apache HTTP daemon."
-fi
+%module_post
 
-%preun mod_expires
-if [ "$1" = "0" ]; then
-       if [ -f /var/lock/subsys/httpd ]; then
-               /etc/rc.d/init.d/httpd restart 1>&2
-       fi
-fi
+%postun mod_expires
+%module_postun
 
 %post mod_file_cache
-if [ -f /var/lock/subsys/httpd ]; then
-       /etc/rc.d/init.d/httpd restart 1>&2
-else
-       echo "Run \"/etc/rc.d/init.d/httpd start\" to start apache HTTP daemon."
-fi
+%module_post
 
-%preun mod_file_cache
-if [ "$1" = "0" ]; then
-       if [ -f /var/lock/subsys/httpd ]; then
-               /etc/rc.d/init.d/httpd restart 1>&2
-       fi
-fi
+%postun mod_file_cache
+%module_postun
 
 %post mod_headers
-if [ -f /var/lock/subsys/httpd ]; then
-       /etc/rc.d/init.d/httpd restart 1>&2
-else
-       echo "Run \"/etc/rc.d/init.d/httpd start\" to start apache HTTP daemon."
-fi
+%module_post
 
-%preun mod_headers
-if [ "$1" = "0" ]; then
-       if [ -f /var/lock/subsys/httpd ]; then
-               /etc/rc.d/init.d/httpd restart 1>&2
-       fi
-fi
+%postun mod_headers
+%module_postun
 
 %post mod_imap
-if [ -f /var/lock/subsys/httpd ]; then
-       /etc/rc.d/init.d/httpd restart 1>&2
-else
-       echo "Run \"/etc/rc.d/init.d/httpd start\" to start apache HTTP daemon."
-fi
+%module_post
 
-%preun mod_imap
-if [ "$1" = "0" ]; then
-       if [ -f /var/lock/subsys/httpd ]; then
-               /etc/rc.d/init.d/httpd restart 1>&2
-       fi
-fi
+%postun mod_imap
+%module_postun
 
 %post mod_info
-if [ -f /var/lock/subsys/httpd ]; then
-       /etc/rc.d/init.d/httpd restart 1>&2
-else
-       echo "Run \"/etc/rc.d/init.d/httpd start\" to start apache HTTP daemon."
-fi
+%module_post
 
-%preun mod_info
-if [ "$1" = "0" ]; then
-       if [ -f /var/lock/subsys/httpd ]; then
-               /etc/rc.d/init.d/httpd restart 1>&2
-       fi
-fi
+%postun mod_info
+%module_postun
 
 %post mod_proxy
-if [ -f /var/lock/subsys/httpd ]; then
-       /etc/rc.d/init.d/httpd restart 1>&2
-else
-       echo "Run \"/etc/rc.d/init.d/httpd start\" to start apache HTTP daemon."
-fi
+%module_post
 
-%preun mod_proxy
-if [ "$1" = "0" ]; then
-       if [ -f /var/lock/subsys/httpd ]; then
-               /etc/rc.d/init.d/httpd restart 1>&2
-       fi
-fi
+%postun mod_proxy
+%module_postun
 
 %post mod_rewrite
-if [ -f /var/lock/subsys/httpd ]; then
-       /etc/rc.d/init.d/httpd restart 1>&2
-else
-       echo "Run \"/etc/rc.d/init.d/httpd start\" to start apache HTTP daemon."
-fi
+%module_post
 
-%preun mod_rewrite
-if [ "$1" = "0" ]; then
-       if [ -f /var/lock/subsys/httpd ]; then
-               /etc/rc.d/init.d/httpd restart 1>&2
-       fi
-fi
+%postun mod_rewrite
+%module_postun
 
 %post mod_ssl
-if [ -f /var/lock/subsys/httpd ]; then
-       /etc/rc.d/init.d/httpd restart 1>&2
-else
-       echo "Run \"/etc/rc.d/init.d/httpd start\" to start apache HTTP daemon."
-fi
+%module_post
 
-%preun mod_ssl
-if [ "$1" = "0" ]; then
-       if [ -f /var/lock/subsys/httpd ]; then
-               /etc/rc.d/init.d/httpd restart 1>&2
-       fi
-fi
+%postun mod_ssl
+%module_postun
 
 %post mod_status
-if [ -f /var/lock/subsys/httpd ]; then
-       /etc/rc.d/init.d/httpd restart 1>&2
-else
-       echo "Run \"/etc/rc.d/init.d/httpd start\" to start apache HTTP daemon."
-fi
+%module_post
 
-%preun mod_status
-if [ "$1" = "0" ]; then
-       if [ -f /var/lock/subsys/httpd ]; then
-               /etc/rc.d/init.d/httpd restart 1>&2
-       fi
-fi
+%postun mod_status
+%module_postun
 
 %post mod_usertrack
-if [ -f /var/lock/subsys/httpd ]; then
-       /etc/rc.d/init.d/httpd restart 1>&2
-else
-       echo "Run \"/etc/rc.d/init.d/httpd start\" to start apache HTTP daemon."
-fi
+%module_post
 
-%preun mod_usertrack
-if [ "$1" = "0" ]; then
-       if [ -f /var/lock/subsys/httpd ]; then
-               /etc/rc.d/init.d/httpd restart 1>&2
-       fi
-fi
+%postun mod_usertrack
+%module_postun
 
 %post mod_unique_id
-if [ -f /var/lock/subsys/httpd ]; then
-       /etc/rc.d/init.d/httpd restart 1>&2
-else
-       echo "Run \"/etc/rc.d/init.d/httpd start\" to start apache HTTP daemon."
-fi
+%module_post
 
-%preun mod_unique_id
-if [ "$1" = "0" ]; then
-       if [ -f /var/lock/subsys/httpd ]; then
-               /etc/rc.d/init.d/httpd restart 1>&2
-       fi
-fi
+%postun mod_unique_id
+%module_postun
 
 %post mod_vhost_alias
-if [ -f /var/lock/subsys/httpd ]; then
-       /etc/rc.d/init.d/httpd restart 1>&2
-else
-       echo "Run \"/etc/rc.d/init.d/httpd start\" to start apache HTTP daemon."
-fi
+%module_post
 
-%preun mod_vhost_alias
-if [ "$1" = "0" ]; then
-       if [ -f /var/lock/subsys/httpd ]; then
-               /etc/rc.d/init.d/httpd restart 1>&2
-       fi
-fi
+%postun mod_vhost_alias
+%module_postun
 
 %post cgi_test
-if [ -f /var/lock/subsys/httpd ]; then
-       /etc/rc.d/init.d/httpd restart 1>&2
-else
-       echo "Run \"/etc/rc.d/init.d/httpd start\" to start apache HTTP daemon."
+if [ "$1" = "1" ]; then
+       %service -q httpd reload
 fi
 
-%preun cgi_test
+%postun cgi_test
 if [ "$1" = "0" ]; then
-       if [ -f /var/lock/subsys/httpd ]; then
-               /etc/rc.d/init.d/httpd restart 1>&2
-       fi
+       %service -q httpd reload
 fi
 
 %files
This page took 0.070252 seconds and 4 git commands to generate.