X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=apache.spec;h=a280dd729230b3f9659b1a62ea0b43de88609364;hb=b394bcfd2936143cd98a7913d284c7b8ab75e017;hp=101fa0a98c6f4b2c6c8d2399c909f8b900ca8aa4;hpb=b0f2bfe41055fa391078f39ed62d3fdf1637ba44;p=packages%2Fapache.git diff --git a/apache.spec b/apache.spec index 101fa0a..a280dd7 100644 --- a/apache.spec +++ b/apache.spec @@ -19,18 +19,21 @@ %bcond_without ldap # build without LDAP support %bcond_without peruser # peruser MPM %bcond_without event # event MPM +%bcond_with itk # ITK MPM %bcond_with distcache # distcache support %bcond_with bucketeer # debug one -# -%include /usr/lib/rpm/macros.perl + # this is internal macro, don't change to %%apache_modules_api %define _apache_modules_api 20051115 -%if "%{pld_release}" != "ac" -%define openssl_ver 0.9.8i -%else +%if "%{pld_release}" == "ac" %define openssl_ver 0.9.7d +%define apr_ver 1:1.2 +%else +%define openssl_ver 1.0.1e +%define apr_ver 1:1.4.5 %endif +%include /usr/lib/rpm/macros.perl Summary: The most widely used Web server on the Internet Summary(de.UTF-8): Leading World Wide Web-Server Summary(es.UTF-8): Servidor HTTPD para proveer servicios WWW @@ -40,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.14 -Release: 9 +Version: 2.2.32 +Release: 1 License: Apache v2.0 Group: Networking/Daemons/HTTP Source0: http://www.apache.org/dist/httpd/httpd-%{version}.tar.gz -# Source0-md5: 2c1e3c7ba00bcaa0163da7b3e66aaa1e +# Source0-md5: 8141657cf0c58f14de2a5ce9426df2bc Source1: %{name}.init Source2: %{name}.logrotate Source3: %{name}.sysconfig @@ -74,19 +77,24 @@ Source25: %{name}-mod_cgid.conf 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: %{name}-bug-40970.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 @@ -94,31 +102,36 @@ Patch19: %{name}-conffile-path.patch Patch20: %{name}-apxs.patch Patch23: %{name}-suexec_fcgi.patch Patch24: %{name}-bug-48094.patch -# http://marc.info/?l=apache-httpd-dev&m=125712658610440&w=2 -Patch25: %{name}-shutdown-sockets.patch +# http://scripts.mit.edu/trac/browser/trunk/server/common/patches/httpd-2.2.x-mod_ssl-sessioncaching.patch?rev=1348 +Patch25: httpd-2.2.x-mod_ssl-sessioncaching.patch +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 >= 1:1.2 -BuildRequires: apr-util-devel >= 1:1.3 -BuildRequires: autoconf +BuildRequires: apr-devel >= %{apr_ver} +BuildRequires: apr-util-devel >= 1:1.3.10-2 +BuildRequires: autoconf >= 2.13 BuildRequires: automake -BuildRequires: db-devel %{?with_distcache:BuildRequires: distcache-devel} -BuildRequires: expat-devel -BuildRequires: gdbm-devel >= 1.8.3 BuildRequires: libtool >= 2:1.5 %{?with_ldap:BuildRequires: openldap-devel >= 2.3.0} -%{?with_ssl:BuildRequires: openssl-devel >= %{openssl_version}} -%{?with_ssl:BuildRequires: openssl-tools >= %{openssl_version}} +%{?with_ssl:BuildRequires: openssl-devel >= %{openssl_ver}} +%{?with_ssl:BuildRequires: openssl-tools >= %{openssl_ver}} BuildRequires: pcre-devel +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} @@ -190,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 >= 1:1.2 +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) @@ -816,20 +832,33 @@ proxy. Dołączono dwa moduły pozwalające magazynować dane w pamięci dysku (używane do cache'owania proxy). %package mod_case_filter -Summary: TODO +Summary: Apache output filter that converts all output to upper case +Summary(pl.UTF-8): Filtr wyjściowy Apache'a zamieniający wszystkie litery na wielkie Group: Networking/Daemons/HTTP Requires: %{name}-base = %{version}-%{release} Provides: apache(mod_case_filter) = %{version}-%{release} %description mod_case_filter +Apache output filter that converts all output to upper case. + +%description mod_case_filter -l pl.UTF-8 +Filtr wyjściowy Apache'a zamieniający wszystkie litery w wyjściu na +wielkie. %package mod_case_filter_in -Summary: TODO +Summary: Apache input filter that converts all request body to upper case +Summary(pl.UTF-8): Filtr wejściowy Apache'a zamieniający wszystkie litery w żądaniu na wielkie Group: Networking/Daemons/HTTP Requires: %{name}-base = %{version}-%{release} Provides: apache(mod_case_filter_in) = %{version}-%{release} %description mod_case_filter_in +Apache input filter that converts all request body (not headers) to +upper case. + +%description mod_case_filter_in -l pl.UTF-8 +Filtr wejściowy Apache'a zamieniający wszystkie litery w ciele żądania +(ale nie nagłówkach) na wielkie. %package mod_cern_meta Summary: CERN httpd metafile semantics @@ -952,6 +981,7 @@ URL: http://httpd.apache.org/docs/2.2/en/mod/mod_dav.html Requires: %{name}-base = %{version}-%{release} Requires: apache-mod_authn_file Requires: apache-mod_setenvif +Requires: apr-util-dbm-db Provides: apache(mod_dav) = %{version}-%{release} %description mod_dav @@ -1199,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 @@ -1462,6 +1493,22 @@ Moduł zawiera implementację serwera proxy/cache dla Apache. Implementacja zawiera obsługę FTP, CONNECT (dla SSL), HTTP/0.9, HTTP/1.0 i HTTP/1.1. +%package mod_reqtimeout +Summary: Apache module to set timeout and minimum data rate for receiving requests +Summary(pl.UTF-8): Moduł Apache'a pozwalający na ustawianie limitu czasu oraz minimalnego transferu danych +Group: Networking/Daemons/HTTP +URL: http://httpd.apache.org/docs/2.2/mod/mod_reqtimeout.html +Requires: %{name}-base = %{version}-%{release} +Provides: apache(mod_reqtimeout) = %{version}-%{release} + +%description mod_reqtimeout +Apache module to set timeout and minimum data rate for receiving +requests. + +%description mod_reqtimeout -l pl.UTF-8 +Moduł Apache'a pozwalający na ustawianie limitu czasu oraz minimalnego +transferu danych. + %package mod_rewrite Summary: Apache module with rule-based engine for rewrite requested URLs on the fly Summary(pl.UTF-8): Moduł Apache'a do "przepisywania" adresów URL w locie @@ -1536,7 +1583,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_version} +%requires_ge_to openssl openssl-devel %if "%{pld_release}" != "ac" Requires: apr-util-dbm-db %endif @@ -1739,12 +1786,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 -%patch11 -p1 %patch12 -p1 +%patch11 -p1 +%patch13 -p1 %patch14 -p1 %patch15 -p1 %patch18 -p1 @@ -1753,9 +1803,14 @@ Dwa programy testowe/przykładowe cgi: test-cgi and print-env. %patch23 -p1 %patch24 -p1 %patch25 -p1 +%patch26 -p1 +%{?with_itk:%patch28 -p1} +%patch29 -p1 +%patch30 -p1 +%patch31 -p1 # using system apr, apr-util and pcre -rm -rf srclib/{apr,apr-util,pcre} +%{__rm} -r srclib/{apr,apr-util,pcre} # sanity check MODULES_API=`awk '/#define MODULE_MAGIC_NUMBER_MAJOR/ {print $3}' include/ap_mmn.h` @@ -1786,12 +1841,12 @@ touch ssl_expr_scan.c cd ../.. CPPFLAGS="-DMAX_SERVER_LIMIT=200000 -DBIG_SECURITY_HOLE=1" -for mpm in prefork worker %{?with_event:event}; do +for mpm in prefork worker %{?with_event:event} %{?with_itk:itk}; do install -d "buildmpm-${mpm}"; cd "buildmpm-${mpm}" ../%configure \ --enable-layout=PLD \ --disable-v4-mapped \ - $( [ "${mpm}" = "prefork" -o "${mpm}" = "worker" -o "${mpm}" = "event" ] && echo "--enable-exception-hook" ) \ + $( [ "${mpm}" = "prefork" -o "${mpm}" = "worker" -o "${mpm}" = "event" -o "${mpm}" = "itk" ] && echo "--enable-exception-hook" ) \ --enable-modules=all \ --enable-mods-shared=all \ --enable-auth-anon \ @@ -1870,7 +1925,7 @@ cd .. done -for mpm in worker %{?with_event:event}; do +for mpm in worker %{?with_event:event} %{?with_itk:itk}; do if ! cmp -s buildmpm-prefork/modules-inside buildmpm-${mpm}/modules-inside; then echo "List of compiled modules is different between prefork-MPM and ${mpm}-MPM!" echo "Build failed." @@ -1880,21 +1935,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 + $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}; do +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 @@ -1938,6 +2001,9 @@ cp -a %{SOURCE19} $CFG/30_manual.conf cp -a %{SOURCE20} $CFG/16_mod_userdir.conf 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 @@ -1987,9 +2053,10 @@ echo "LoadModule rewrite_module modules/mod_rewrite.so" > $CFG/00_mod_rewrite.co echo "LoadModule usertrack_module modules/mod_usertrack.so" > $CFG/00_mod_usertrack.conf echo "LoadModule unique_id_module modules/mod_unique_id.so" > $CFG/00_mod_unique_id.conf echo "LoadModule substitute_module modules/mod_substitute.so" > $CFG/00_mod_substitute.conf +echo "LoadModule reqtimeout_module modules/mod_reqtimeout.so" >> $CFG/00_mod_reqtimeout.conf # anything in style dir not ending with .css is trash -rm -rf $RPM_BUILD_ROOT%{_datadir}/manual/style/{lang,latex,xsl} +%{__rm} -r $RPM_BUILD_ROOT%{_datadir}/manual/style/{lang,latex,xsl} find $RPM_BUILD_ROOT%{_datadir}/manual/style -type f ! -name '*.css' -print0 | xargs -0r rm -f # find manual files @@ -2018,11 +2085,11 @@ EOF ln -sf suexec $RPM_BUILD_ROOT%{_sbindir}/suexec.fcgi # no value -rm $RPM_BUILD_ROOT%{_libexecdir}/build/config.nice -rm $RPM_BUILD_ROOT%{_libexecdir}/*.exp -rm $RPM_BUILD_ROOT%{_sysconfdir}/mime.types -rm $RPM_BUILD_ROOT%{_sysconfdir}/httpd.prefork.conf -rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/{extra,original} +%{__rm} $RPM_BUILD_ROOT%{_libexecdir}/build/config.nice +%{__rm} $RPM_BUILD_ROOT%{_libexecdir}/*.exp +%{__rm} $RPM_BUILD_ROOT%{_sysconfdir}/mime.types +%{__rm} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.prefork.conf +%{__rm} -r $RPM_BUILD_ROOT%{_sysconfdir}/{extra,original} %clean rm -rf $RPM_BUILD_ROOT @@ -2056,18 +2123,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 @@ -2155,6 +2225,13 @@ Please report bugs to . 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 ' @@ -2177,17 +2254,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 @@ -2250,6 +2330,7 @@ fi %module_scripts mod_mime_magic %module_scripts mod_negotiation %module_scripts mod_proxy +%module_scripts mod_reqtimeout %module_scripts mod_rewrite %module_scripts mod_setenvif %module_scripts mod_speling @@ -2266,21 +2347,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 @@ -2302,9 +2387,10 @@ fi %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*_common.conf %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*_mpm.conf +%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} @@ -2315,6 +2401,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 @@ -2325,6 +2415,8 @@ fi %dir %{_datadir}/cgi-bin %dir %{_datadir}/html +%dir %{_datadir}/vhosts +# do not adapter here, %{_datadir} != /usr/share here %{_datadir}/icons %files doc -f manual.files @@ -2646,11 +2738,17 @@ fi %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*_mod_proxy.conf %attr(755,root,root) %{_libexecdir}/mod_proxy*.so +%files mod_reqtimeout +%defattr(644,root,root,755) +%attr(755,root,root) %{_libexecdir}/mod_reqtimeout.so +%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*_mod_reqtimeout.conf + %files mod_rewrite %defattr(644,root,root,755) %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)