X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=apache.spec;h=61437dcf2ff2d4662f3ae8fb6ad4714c31f14eac;hb=3c32885b9c366f46bfe169753459ac24981d96e4;hp=49997b9f0d12b8ba0365a5e57d4101aadd6bfdac;hpb=e711be6cd990ece78786a0a0801b4ae13e26c7d2;p=packages%2Fapache.git diff --git a/apache.spec b/apache.spec index 49997b9..61437dc 100644 --- a/apache.spec +++ b/apache.spec @@ -1,29 +1,39 @@ -# TODO: +# # TODO: # - config examples for mod_* # - --with-suexec-uidmin=500 or =1000 ? # - subpackages for MPMs # - !!!check if all modules (*.so) are exactly the same for different MPMs # - check those autn modules inner deps # - for external packages: don't use any apache module name in dep as they -# differ for apache 1.3/2.0/2.2!? any better ideas? rpm Suggests: tags? -# - for mod_auth_* modules require each auth module to require virtual authn so at least *_default is chosen? +# differ for apache 1.3/2.0/2.2!? any better ideas? rpm Suggests: tags? +# - for mod_auth_* modules require each auth module to require virtual authn so at least *_default +# is chosen? # - same for mod_authz # - mod_auth_digest and mod_auth_basic R: apache(authn) ? # - drop mod_case_filter* or find summary and description for them # - build modules only once (not with each mpm) +# - FYI: http://wiki.apache.org/httpd/InternalDummyConnection # Conditional build: %bcond_without ssl # build without SSL support %bcond_without ldap # build without LDAP support -%bcond_without metuxmpm # metux MPM %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.7d +%define apr_ver 1:1.2 +%else +%define openssl_ver 0.9.8i +%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 @@ -33,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.9 -Release: 10 -License: Apache +Version: 2.2.22 +Release: 2 +License: Apache v2.0 Group: Networking/Daemons/HTTP Source0: http://www.apache.org/dist/httpd/httpd-%{version}.tar.gz -# Source0-md5: 80d3754fc278338033296f0d41ef2c04 +# Source0-md5: d77fa5af23df96a8af68ea8114fa6ce1 Source1: %{name}.init Source2: %{name}.logrotate Source3: %{name}.sysconfig @@ -67,60 +77,56 @@ 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 -# project homepage http://www.metux.de/mpm/en/?patpage=index -# http://www.sannes.org/metuxmpm/ -Patch5: httpd-2.0.48-metuxmpm-r8.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 Patch12: httpd-2.0.46-sslmutex.patch Patch14: httpd-2.0.48-corelimit.patch Patch15: httpd-2.0.48-debuglog.patch Patch18: %{name}-v6only-ENOPROTOOPT.patch Patch19: %{name}-conffile-path.patch Patch20: %{name}-apxs.patch -# http://www.telana.com/peruser.php (2.2.3-0.3.0) -Patch21: httpd-peruser.patch -Patch22: %{name}-libtool.patch Patch23: %{name}-suexec_fcgi.patch -Patch24: %{name}-revert-bug-40463.patch +Patch24: %{name}-bug-48094.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 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 >= 0.9.7d} -%{?with_ssl:BuildRequires: openssl-tools >= 0.9.7d} +%{?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.639 BuildRequires: sed >= 4.0 BuildRequires: zlib-devel -# packages that were in apache-2.0.rpm, for compatibility Requires: %{name}-errordocs = %{version}-%{release} Requires: %{name}-mod_alias = %{version}-%{release} -Requires: %{name}-mod_asis = %{version}-%{release} Requires: %{name}-mod_auth = %{version}-%{release} -Requires: %{name}-mod_cern_meta = %{version}-%{release} -Requires: %{name}-mod_cgi = %{version}-%{release} Requires: %{name}-mod_env = %{version}-%{release} -Requires: %{name}-mod_include = %{version}-%{release} Requires: %{name}-mod_log_config = %{version}-%{release} Requires: %{name}-mod_mime = %{version}-%{release} Requires: %{name}-mod_mime_magic = %{version}-%{release} @@ -138,6 +144,19 @@ BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %define _libexecdir %{_libdir}/apache %define _cgibindir %{_prefix}/lib/cgi-bin/%{name} +%define httpd_restart \ + if /bin/systemd_booted; then \ + /bin/systemctl restart httpd.service \ + else \ + %service -q httpd restart \ + fi +%define httpd_reload \ + if /bin/systemd_booted; then \ + /bin/systemctl reload httpd.service \ + else \ + %service -q httpd reload \ + fi + %description Apache is a powerful, full-featured, efficient and freely-available Web server. Apache is also the most popular Web server on the @@ -191,13 +210,12 @@ Requires(pre): /bin/id Requires(pre): /usr/bin/getgid Requires(pre): /usr/sbin/groupadd Requires(pre): /usr/sbin/useradd -Requires: /etc/mime.types Requires: /sbin/chkconfig -Requires: apr >= 1:1.2 -Requires: mailcap +Requires: apr >= %{apr_ver} Requires: psmisc >= 20.1 -Requires: rc-scripts >= 0.4.0.15 -Requires: webapps +Requires: rc-scripts >= 0.4.1.23 +Requires: sed >= 4.0 +Requires: systemd-units Provides: apache(modules-api) = %{_apache_modules_api} Provides: group(http) Provides: user(http) @@ -820,20 +838,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 @@ -956,6 +987,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 @@ -1384,7 +1416,9 @@ Summary(pl.UTF-8): Wiązanie określonych rozszerzeń plików z zachowaniem i za Group: Networking/Daemons/HTTP URL: http://httpd.apache.org/docs/2.2/mod/mod_mime.html Requires: %{name}-base = %{version}-%{release} +Requires: mailcap Provides: apache(mod_mime) = %{version}-%{release} +Provides: webserver(mime) %description mod_mime This module is used to associate various bits of "meta information" @@ -1464,6 +1498,23 @@ 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} +Provides: webserver(reqtimeout) + +%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 @@ -1471,6 +1522,7 @@ Group: Networking/Daemons/HTTP URL: http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html Requires: %{name}-base = %{version}-%{release} Provides: apache(mod_rewrite) = %{version}-%{release} +Provides: webserver(rewrite) %description mod_rewrite This package contains It provides a rule-based rewriting engine to @@ -1537,6 +1589,10 @@ 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} +%if "%{pld_release}" != "ac" +Requires: apr-util-dbm-db +%endif Provides: apache(mod_ssl) = 1:%{version}-%{release} %description mod_ssl @@ -1736,25 +1792,25 @@ 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 %patch14 -p1 %patch15 -p1 %patch18 -p1 %patch19 -p1 %patch20 -p1 -%patch21 -p1 -%patch22 -p1 %patch23 -p1 %patch24 -p1 +%patch25 -p1 +%patch26 -p1 +%patch28 -p1 +%patch29 -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` @@ -1785,12 +1841,12 @@ touch ssl_expr_scan.c cd ../.. CPPFLAGS="-DMAX_SERVER_LIMIT=200000 -DBIG_SECURITY_HOLE=1" -for mpm in prefork worker %{?with_metuxmpm:metuxmpm} %{?with_peruser:peruser} %{?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 \ @@ -1869,7 +1925,7 @@ cd .. done -for mpm in %{?with_metuxmpm:metuxmpm} %{?with_peruser:peruser} 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." @@ -1879,65 +1935,75 @@ 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} \ - $RPM_BUILD_ROOT%{_datadir}/cgi-bin + $RPM_BUILD_ROOT%{_sysconfdir}/{webapps.d,conf.d,vhosts.d} \ + $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 %{?with_metuxmpm:metuxmpm} %{?with_peruser:peruser} 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 ln -s conf.d $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf -install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/httpd -install %{SOURCE2} $RPM_BUILD_ROOT/etc/logrotate.d/httpd -install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/httpd +install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/httpd +cp -a %{SOURCE2} $RPM_BUILD_ROOT/etc/logrotate.d/httpd +cp -a %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/httpd touch $RPM_BUILD_ROOT/var/log/httpd/{access,error,agent,referer,suexec}_log %if %{with ssl} install -d $RPM_BUILD_ROOT%{_sysconfdir}/ssl -install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/ssl/server.crt -install %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/ssl/server.key +cp -a %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/ssl/server.crt +cp -a %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/ssl/server.key %endif -install %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf - -CFG="$RPM_BUILD_ROOT%{_sysconfdir}/conf.d/" - -install %{SOURCE7} $CFG/10_common.conf - -install %{SOURCE23} $CFG/01_mod_mime.conf -install %{SOURCE24} $CFG/01_mod_authz_host.conf -install %{SOURCE25} $CFG/01_mod_cgid.conf -install %{SOURCE26} $CFG/01_mod_log_config.conf -install %{SOURCE27} $CFG/01_mod_mime_magic.conf -install %{SOURCE28} $CFG/01_mod_cache.conf -install %{SOURCE8} $CFG/20_mod_vhost_alias.conf -install %{SOURCE9} $CFG/25_mod_status.conf -install %{SOURCE10} $CFG/30_mod_proxy.conf -install %{SOURCE11} $CFG/35_mod_info.conf -install %{SOURCE12} $CFG/40_mod_ssl.conf -install %{SOURCE13} $CFG/45_mod_dav.conf -install %{SOURCE14} $CFG/59_mod_dir.conf -install %{SOURCE15} $CFG/13_mod_suexec.conf -install %{SOURCE16} $CFG/58_mod_deflate.conf -install %{SOURCE17} $CFG/57_mod_autoindex.conf -install %{SOURCE18} $CFG/30_errordocs.conf -install %{SOURCE19} $CFG/30_manual.conf -install %{SOURCE20} $CFG/16_mod_userdir.conf -install %{SOURCE21} $CFG/10_mpm.conf -install %{SOURCE22} $CFG/20_languages.conf +cp -a %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf + +CFG="$RPM_BUILD_ROOT%{_sysconfdir}/conf.d" + +cp -a %{SOURCE7} $CFG/10_common.conf +cp -a %{SOURCE23} $CFG/01_mod_mime.conf +cp -a %{SOURCE24} $CFG/01_mod_authz_host.conf +cp -a %{SOURCE25} $CFG/01_mod_cgid.conf +cp -a %{SOURCE26} $CFG/01_mod_log_config.conf +cp -a %{SOURCE27} $CFG/01_mod_mime_magic.conf +cp -a %{SOURCE28} $CFG/01_mod_cache.conf +cp -a %{SOURCE8} $CFG/20_mod_vhost_alias.conf +cp -a %{SOURCE9} $CFG/25_mod_status.conf +cp -a %{SOURCE10} $CFG/30_mod_proxy.conf +cp -a %{SOURCE11} $CFG/35_mod_info.conf +cp -a %{SOURCE12} $CFG/40_mod_ssl.conf +cp -a %{SOURCE13} $CFG/45_mod_dav.conf +cp -a %{SOURCE14} $CFG/59_mod_dir.conf +cp -a %{SOURCE15} $CFG/13_mod_suexec.conf +cp -a %{SOURCE16} $CFG/58_mod_deflate.conf +cp -a %{SOURCE17} $CFG/57_mod_autoindex.conf +cp -a %{SOURCE18} $CFG/30_errordocs.conf +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 ' @@ -2176,18 +2253,18 @@ mv -f /var/lock/subsys/httpd{.disabled,} 2>/dev/null # main package are very important for all this to work. # restart webserver at the end of transaction -%service httpd restart +%httpd_restart # macro called at module post scriptlet %define module_post \ if [ "$1" = "1" ]; then \ - %service -q httpd restart \ + %httpd_restart \ fi # macro called at module postun scriptlet %define module_postun \ if [ "$1" = "0" ]; then \ - %service -q httpd restart \ + %httpd_restart \ fi # it's sooo annoying to write them @@ -2250,6 +2327,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 @@ -2265,22 +2343,22 @@ fi %post cgi_test if [ "$1" = "1" ]; then - %service -q httpd reload + %httpd_reload fi %postun cgi_test if [ "$1" = "0" ]; then - %service -q httpd reload + %httpd_reload fi %post errordocs if [ "$1" = "1" ]; then - %service -q httpd reload + %httpd_reload fi %postun errordocs if [ "$1" = "0" ]; then - %service -q httpd reload + %httpd_reload fi %files @@ -2297,13 +2375,15 @@ fi %{_sysconfdir}/logs %ghost %{_sysconfdir}/httpd.conf %attr(750,root,root) %dir %{_sysconfdir}/conf.d +%attr(750,root,root) %dir %{_sysconfdir}/vhosts.d %attr(750,root,root) %dir %{_sysconfdir}/webapps.d %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} @@ -2314,6 +2394,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 @@ -2324,6 +2408,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 @@ -2346,8 +2432,6 @@ fi %files index %defattr(644,root,root,755) %config(noreplace,missingok) %{_datadir}/html/index.html* -%{_datadir}/html/*.gif -%{_datadir}/html/*.png %files tools %defattr(644,root,root,755) @@ -2356,10 +2440,10 @@ fi %attr(755,root,root) %{_sbindir}/htdigest %attr(755,root,root) %{_sbindir}/logresolve %attr(755,root,root) %{_sbindir}/rotatelogs -%{_mandir}/man8/ab.8* +%{_mandir}/man1/ab.1* %{_mandir}/man8/apachectl.8* %{_mandir}/man1/htdigest.1* -%{_mandir}/man8/logresolve.8* +%{_mandir}/man1/logresolve.1* %{_mandir}/man8/rotatelogs.8* %files devel @@ -2372,7 +2456,7 @@ fi %{_libexecdir}/build/config_vars.mk %attr(755,root,root) %{_libexecdir}/build/*.sh %{_includedir} -%{_mandir}/man8/apxs.8* +%{_mandir}/man1/apxs.1* %files mod_actions %defattr(644,root,root,755) @@ -2647,11 +2731,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)