]> git.pld-linux.org Git - packages/apache.git/blobdiff - apache.spec
depend on openssl VERSION
[packages/apache.git] / apache.spec
index cf31560a2e047fb7568ab55a8378e0f1180079e8..384e75b58169beff5799019f5aac438159c06d52 100644 (file)
@@ -30,7 +30,7 @@
 %define                openssl_ver     0.9.7d
 %define                apr_ver         1:1.2
 %else
-%define                openssl_ver     0.9.8i
+%define                openssl_ver     1.0.1e
 %define                apr_ver         1:1.4.5
 %endif
 %include       /usr/lib/rpm/macros.perl
@@ -43,12 +43,12 @@ Summary(pt_BR.UTF-8):       Servidor HTTPD para prover serviços WWW
 Summary(ru.UTF-8):     Самый популярный веб-сервер
 Summary(tr.UTF-8):     Lider WWW tarayıcı
 Name:          apache
-Version:       2.2.21
-Release:       3
+Version:       2.2.31
+Release:       4
 License:       Apache v2.0
 Group:         Networking/Daemons/HTTP
 Source0:       http://www.apache.org/dist/httpd/httpd-%{version}.tar.gz
-# Source0-md5: b24ca6db942a4f8e57c357e5e3058d31
+# Source0-md5: bc81bdf42a6c10d0ee9e6908014cc0f5
 Source1:       %{name}.init
 Source2:       %{name}.logrotate
 Source3:       %{name}.sysconfig
@@ -78,18 +78,23 @@ Source26:   %{name}-mod_log_config.conf
 Source27:      %{name}-mod_mime_magic.conf
 Source28:      %{name}-mod_cache.conf
 Source29:      %{name}-example.net.conf
+Source30:      %{name}.tmpfiles
+Source31:      %{name}.service
 Patch0:                %{name}-configdir_skip_backups.patch
 Patch1:                %{name}-layout.patch
 Patch2:                %{name}-suexec.patch
 Patch3:                %{name}-branding.patch
 Patch4:                %{name}-apr.patch
+Patch5:                apache-bug-49058.patch
 # what about this? it isn't applied...
 Patch6:                httpd-2.0.40-xfsz.patch
 Patch7:                %{name}-syslibs.patch
 Patch8:                httpd-2.0.45-encode.patch
 Patch9:                %{name}-paths.patch
 Patch10:       httpd-2.0.46-dav401dest.patch
+Patch11:       apache-bug-39311-preforkonly.patch
 Patch12:       httpd-2.0.46-sslmutex.patch
+Patch13:       apache-bug-50002.patch
 Patch14:       httpd-2.0.48-corelimit.patch
 Patch15:       httpd-2.0.48-debuglog.patch
 Patch18:       %{name}-v6only-ENOPROTOOPT.patch
@@ -103,6 +108,8 @@ Patch26:    apache-mod_vhost_alias_docroot.patch
 # http://mpm-itk.sesse.net/
 Patch28:       apache-mpm-itk.patch
 Patch29:       libtool-tag.patch
+Patch30:       apache-bug-39653.patch
+Patch31:       httpd-dummy-connection-result.patch
 URL:           http://httpd.apache.org/
 BuildRequires: apr-devel >= %{apr_ver}
 BuildRequires: apr-util-devel >= 1:1.3.10-2
@@ -118,12 +125,13 @@ BuildRequires:    pkgconfig
 BuildRequires: rpm >= 4.4.9-56
 BuildRequires: rpm-build >= 4.4.0
 BuildRequires: rpm-perlprov >= 4.1-13
-BuildRequires: rpmbuild(macros) >= 1.268
+BuildRequires: rpmbuild(macros) >= 1.647
 BuildRequires: sed >= 4.0
 BuildRequires: zlib-devel
 Requires:      %{name}-errordocs = %{version}-%{release}
 Requires:      %{name}-mod_alias = %{version}-%{release}
 Requires:      %{name}-mod_auth = %{version}-%{release}
+Requires:      %{name}-mod_authz_default = %{version}-%{release}
 Requires:      %{name}-mod_env = %{version}-%{release}
 Requires:      %{name}-mod_log_config = %{version}-%{release}
 Requires:      %{name}-mod_mime = %{version}-%{release}
@@ -195,10 +203,13 @@ Requires(pre):    /bin/id
 Requires(pre): /usr/bin/getgid
 Requires(pre): /usr/sbin/groupadd
 Requires(pre): /usr/sbin/useradd
+Requires(post,preun,postun):   systemd-units >= 38
 Requires:      /sbin/chkconfig
 Requires:      apr >= %{apr_ver}
 Requires:      psmisc >= 20.1
 Requires:      rc-scripts >= 0.4.1.23
+Requires:      sed >= 4.0
+Requires:      systemd-units >= 38
 Provides:      apache(modules-api) = %{_apache_modules_api}
 Provides:      group(http)
 Provides:      user(http)
@@ -1218,6 +1229,7 @@ Group:            Networking/Daemons/HTTP
 URL:           http://httpd.apache.org/docs/2.2/mod/mod_headers.html
 Requires:      %{name}-base = %{version}-%{release}
 Provides:      apache(mod_headers) = %{version}-%{release}
+Provides:      webserver(headers)
 
 %description mod_headers
 This package contains mod_headers module. The module allows for the
@@ -1572,7 +1584,7 @@ Epoch:            1
 Group:         Networking/Daemons/HTTP
 URL:           http://httpd.apache.org/docs/2.2/mod/mod_ssl.html
 Requires:      %{name}-base = %{version}-%{release}
-Requires:      openssl >= %{openssl_ver}
+%requires_eq_to openssl openssl-devel
 %if "%{pld_release}" != "ac"
 Requires:      apr-util-dbm-db
 %endif
@@ -1775,11 +1787,15 @@ Dwa programy testowe/przykładowe cgi: test-cgi and print-env.
 %patch2 -p1
 %patch3 -p1
 %patch4 -p1
+%patch5 -p1
+
 %patch7 -p1
 %patch8 -p1
 %patch9 -p1
 %patch10 -p1
 %patch12 -p1
+%patch11 -p1
+%patch13 -p1
 %patch14 -p1
 %patch15 -p1
 %patch18 -p1
@@ -1789,8 +1805,10 @@ Dwa programy testowe/przykładowe cgi: test-cgi and print-env.
 %patch24 -p1
 %patch25 -p1
 %patch26 -p1
-%patch28 -p1
+%{?with_itk:%patch28 -p1}
 %patch29 -p1
+%patch30 -p1
+%patch31 -p1
 
 # using system apr, apr-util and pcre
 %{__rm} -r srclib/{apr,apr-util,pcre}
@@ -1918,21 +1936,29 @@ done
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT/etc/{logrotate.d,rc.d/init.d,sysconfig} \
+install -d $RPM_BUILD_ROOT/etc/{logrotate.d,rc.d/init.d,sysconfig,systemd/system} \
        $RPM_BUILD_ROOT%{_var}/{log/{httpd,archive/httpd},{run,cache}/httpd,lock/mod_dav} \
        $RPM_BUILD_ROOT%{_sysconfdir}/{webapps.d,conf.d,vhosts.d} \
-       $RPM_BUILD_ROOT%{_datadir}/{cgi-bin,vhosts}
+       $RPM_BUILD_ROOT%{_datadir}/{cgi-bin,vhosts} \
+       $RPM_BUILD_ROOT/usr/lib/tmpfiles.d \
+       $RPM_BUILD_ROOT%{systemdunitdir}
 
 # prefork is default one
 %{__make} -C buildmpm-prefork install \
        DESTDIR=$RPM_BUILD_ROOT
+mpm=prefork
+sed -e "s|@EXEC@|%{_sbindir}/httpd.${mpm}|g;s|@NAME@|${mpm}|g" < %{SOURCE31} \
+       > $RPM_BUILD_ROOT%{systemdunitdir}/httpd-${mpm}.service
 
 # install other mpm-s
 for mpm in worker %{?with_event:event} %{?with_itk:itk}; do
        install buildmpm-${mpm}/httpd.${mpm} $RPM_BUILD_ROOT%{_sbindir}/httpd.${mpm}
+       sed -e "s|@EXEC@|%{_sbindir}/httpd.${mpm}|g;s|@NAME@|${mpm}|g" < %{SOURCE31} \
+               > $RPM_BUILD_ROOT%{systemdunitdir}/httpd-${mpm}.service
 done
 
 ln -s httpd.prefork $RPM_BUILD_ROOT%{_sbindir}/httpd
+ln -s %{systemdunitdir}/httpd-prefork.service $RPM_BUILD_ROOT/etc/systemd/system/httpd.service
 ln -s %{_libexecdir} $RPM_BUILD_ROOT%{_sysconfdir}/modules
 ln -s %{_localstatedir}/run/httpd $RPM_BUILD_ROOT%{_sysconfdir}/run
 ln -s %{_var}/log/httpd $RPM_BUILD_ROOT%{_sysconfdir}/logs
@@ -1978,6 +2004,8 @@ cp -a %{SOURCE21} $CFG/10_mpm.conf
 cp -a %{SOURCE22} $CFG/20_languages.conf
 cp -a %{SOURCE29} $RPM_BUILD_ROOT%{_sysconfdir}/vhosts.d/example.net.conf
 
+install %{SOURCE30} $RPM_BUILD_ROOT/usr/lib/tmpfiles.d/%{name}.conf
+
 echo "LoadModule alias_module modules/mod_alias.so" > $CFG/00_mod_alias.conf
 echo "LoadModule authn_file_module     modules/mod_authn_file.so" > $CFG/00_mod_authn_file.conf
 echo "LoadModule authn_dbm_module      modules/mod_authn_dbm.so" > $CFG/00_mod_authn_dbm.conf
@@ -2096,18 +2124,21 @@ exit 0
 /sbin/chkconfig --add httpd
 umask 137
 touch /var/log/httpd/{access,error,agent,referer}_log
+%systemd_post httpd.service
 
 %preun base
 if [ "$1" = "0" ]; then
        %service httpd stop
        /sbin/chkconfig --del httpd
 fi
+%systemd_preun httpd.service
 
 %postun base
 if [ "$1" = "0" ]; then
        %userremove http
        %groupremove http
 fi
+%systemd_reload
 
 %triggerpostun base -- %{name} < 2.0.50-6.9
 %banner %{name}-2.0.50-6 << EOF
@@ -2195,6 +2226,13 @@ Please report bugs to <http://bugs.pld-linux.org/>.
 
 EOF
 
+%triggerpostun base -- %{name} < 2.2.22-2
+. /etc/sysconfig/httpd
+if [ -z "$HTTPD_CONF" ]; then
+       echo 'HTTPD_CONF="/etc/httpd/apache.conf"' >> /etc/sysconfig/httpd
+fi
+%systemd_trigger httpd.service
+
 %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 '
@@ -2217,17 +2255,20 @@ mv -f /var/lock/subsys/httpd{.disabled,} 2>/dev/null
 
 # restart webserver at the end of transaction
 %service httpd restart
+%systemd_service_restart httpd.service
 
 # macro called at module post scriptlet
 %define        module_post \
 if [ "$1" = "1" ]; then \
        %service -q httpd restart \
+       %systemd_service_restart httpd.service \
 fi
 
 # macro called at module postun scriptlet
 %define        module_postun \
 if [ "$1" = "0" ]; then \
        %service -q httpd restart \
+       %systemd_service_restart httpd.service \
 fi
 
 # it's sooo annoying to write them
@@ -2307,21 +2348,25 @@ fi
 %post cgi_test
 if [ "$1" = "1" ]; then
        %service -q httpd reload
+       %systemd_service_reload httpd.service
 fi
 
 %postun cgi_test
 if [ "$1" = "0" ]; then
        %service -q httpd reload
+       %systemd_service_reload httpd.service
 fi
 
 %post errordocs
 if [ "$1" = "1" ]; then
        %service -q httpd reload
+       %systemd_service_reload httpd.service
 fi
 
 %postun errordocs
 if [ "$1" = "0" ]; then
        %service -q httpd reload
+       %systemd_service_reload httpd.service
 fi
 
 %files
@@ -2346,7 +2391,7 @@ fi
 %attr(640,root,root) %config(noreplace,missingok) %verify(not md5 mtime size) %{_sysconfdir}/vhosts.d/example.net.conf
 %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/*
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/httpd
 
 %dir %{_libexecdir}
 
@@ -2357,6 +2402,10 @@ fi
 %dir %attr(770,root,http) /var/run/httpd
 %dir %attr(770,root,http) /var/cache/httpd
 
+/usr/lib/tmpfiles.d/%{name}.conf
+%{systemdunitdir}/httpd-*.service
+%config(noreplace) %verify(not md5 mtime size) /etc/systemd/system/httpd.service
+
 %{_mandir}/man8/httpd.8*
 
 %attr(2751,root,logs) %dir /var/log/httpd
@@ -2700,6 +2749,7 @@ fi
 %attr(755,root,root) %{_sbindir}/httxt2dbm
 %attr(755,root,root) %{_libexecdir}/mod_rewrite.so
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*_mod_rewrite.conf
+%{_mandir}/man1/httxt2dbm.1*
 
 %files mod_setenvif
 %defattr(644,root,root,755)
This page took 1.105956 seconds and 4 git commands to generate.