# TODO:
+# - distcache.spec
# - mod_case_filter
# - mod_case_filter_in
# - mod_optional_fn_{export,import}
# - mod_ext_filter
# - mod_echo
# - config examples for mod_*
-# - check if all modules are (de)registered in %%post/%%postun
# - find smart way to deregister module if its moved from main package
# to subpackage (maybe test -f ?)
# - add %%post/%%postun to suexec
# Conditional build:
%bcond_without ssl # build without SSL support
%bcond_without ldap # build without LDAP support
-%bcond_with external_pcre # build with external PCRE support (Apache bug #27550)
+%bcond_without metuxmpm
+%bcond_without peruser
+%bcond_without external_pcre # build with external PCRE support (Apache bug #27550)
+%bcond_with distcache
#
%include /usr/lib/rpm/macros.perl
# this is internal macro, don't change to %%apache_modules_api
-%define _apache_modules_api 20020903
+%define _apache_modules_api 20051115
Summary: The most widely used Web server on the Internet
Summary(de): Leading World Wide Web-Server
Summary(es): Servidor HTTPD para proveer servicios WWW
Summary(ru): óÁÍÙÊ ÐÏÐÕÌÑÒÎÙÊ ×ÅÂ-ÓÅÒ×ÅÒ
Summary(tr): Lider WWW tarayýcý
Name: apache
-Version: 2.0.54
-Release: 3
+Version: 2.2.0
+Release: 0.1
License: Apache Group License
Group: Networking/Daemons
Source0: http://www.apache.org/dist/httpd/httpd-%{version}.tar.gz
-# Source0-md5: 772503748ffb85301385d47fb2b96eca
+# Source0-md5: 760aecf26a071e15141170636af43456
Source1: %{name}.init
Source2: %{name}.logrotate
Source3: %{name}-icons.tar.gz
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
BuildRequires: apr-devel >= 1:1.0.0
BuildRequires: apr-util-devel >= 1:1.0.0
BuildRequires: db-devel
+%{?with_distcache:BuildRequires: distcache-libs-devel or distcache-devel}
BuildRequires: expat-devel
BuildRequires: gdbm-devel >= 1.8.3
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
Requires(postun): /usr/sbin/groupdel
Requires(post,preun): /sbin/chkconfig
Requires(post): fileutils
+Requires: /sbin/chkconfig
Requires: /etc/mime.types
Requires: apr >= 1:1.0.0-2
-Requires: %{name}-apxs = %{version}-%{release}
-Requires: FHS >= 2.3-12
Requires: mailcap
Requires: psmisc >= 20.1
Provides: apache(modules-api) = %{_apache_modules_api}
-Provides: apache(mod_access)
+#Provides: apache(mod_access)
Provides: apache(mod_alias)
Provides: apache(mod_asis)
Provides: apache(mod_autoindex)
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
%description apxs -l pl
Narzêdzie do rozszerzania Apache'a.
-
+
%package devel
Summary: Module development tools for the Apache web server
Summary(es): Archivos de inclusión del Apache para desarrollo de módulos
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
Summary(pl): Programy testowe/przyk³adowe cgi
Group: Networking/Utilities
Requires: %{name} = %{version}-%{release}
+Requires: FHS >= 2.3-12
%description cgi_test
Two cgi test/demo programs: test-cgi and print-env.
%patch0 -p1
%patch1 -p1
%patch2 -p1
-%patch3 -p1
+# DROP, we don't use internal apr
+#%patch3 -p1
%patch4 -p1
-%patch5 -p1
-%patch7 -p1
-%patch8 -p1
-%patch9 -p1
+# FIXME, UPDATE
+#%patch5 -p1
+# APPLIED?
+#%patch7 -p1
+# APPLIED?
+#%patch8 -p1
+# seems applied
+#%patch9 -p1
%patch10 -p1
-%patch11 -p1
-%patch12 -p1
-%patch13 -p1
+# CHECK
+#%patch11 -p1
+# CHECK
+#%patch12 -p1
+# CHECK
+#%patch13 -p1
%patch14 -p1
%patch15 -p1
-%patch16 -p1
-%patch17 -p1
+# seems applied
+#%patch16 -p1
+# CHECK
+#%patch17 -p1
%patch18 -p1
%patch19 -p1
%patch20 -p1
-%patch21 -p1
-%patch22 -p1
-%patch23 -p1
-%{?with_external_pcre:%patch24 -p2}
+# UPDATE
+#%patch21 -p1
+# DROP, apache2 already uses apr1 api
+#%patch22 -p1
+# seems applied
+# %patch23 -p1
+# DROP?
+#%{?with_external_pcre:%patch24 -p2}
%{__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
%{__perl} -pi -e "s:apu-config:apu-1-config:g" support/apxs.in
install /usr/share/automake/config.* build/
CPPFLAGS="-DMAX_SERVER_LIMIT=200000 -DBIG_SECURITY_HOLE=1"
-for mpm in metuxmpm peruser perchild prefork worker; do
+for mpm in %{?with_metuxmpm:metuxmpm} %{?with_peruser:peruser} prefork worker; do
install -d "buildmpm-${mpm}"; cd "buildmpm-${mpm}"
../%configure \
--prefix=%{_sysconfdir} \
--exec-prefix=%{_libexecdir} \
--with-installbuilddir=%{_libdir}/apache/build \
+ --disable-v4-mapped \
--enable-layout=PLD \
--enable-modules=all \
--enable-mods-shared=all \
--enable-auth-anon \
--enable-auth-dbm \
+ --enable-authn-dbd \
+ --enable-authn-alias \
+ --enable-authz-dbm \
+ --enable-authz-owner \
+ %{?with_ldap:--enable-authnz-ldap} \
--enable-auth-digest \
--enable-file-cache \
- --enable-echo \
--enable-cache \
- --enable-charset-lite \
- --enable-mem-cache \
--enable-disk-cache \
+ --enable-mem-cache \
+ --enable-dbd \
+ --enable-bucketeer \
+ --enable-dumpio \
+ --enable-echo \
+ --enable-charset-lite \
+ --enable-deflate \
+ %{?with_ldap:--enable-ldap} \
--enable-ext-filter \
--enable-case-filter \
--enable-case-filter-in \
- --enable-deflate \
+ --enable-log-forensic \
+ --enable-logio \
--with-z=%{_prefix} \
--enable-mime-magic \
--enable-cern-meta \
--enable-expires \
--enable-headers \
+ --enable-ident \
--enable-usertrack \
--enable-unique-id \
--enable-proxy \
--enable-proxy-connect \
--enable-proxy-ftp \
--enable-proxy-http \
- %{?with_ssl:--enable-ssl} \
+ --enable-proxy-ajp \
+ --enable-proxy-balancer \
+ %{?with_ssl:--enable-ssl %{?with_distcache:--enable-distcache}} \
--enable-optional-hook-export \
--enable-optional-hook-import \
--enable-optional-fn-import \
--enable-optional-fn-export \
- %{?with_ldap:--enable-ldap} \
- %{?with_ldap:--enable-auth-ldap} \
+ --enable-http \
--enable-dav \
--enable-info \
--enable-suexec \
--enable-cgi \
--enable-cgid \
--enable-dav-fs \
+ --enable-dav-lock \
--enable-vhost-alias \
+ --enable-imagemap \
--enable-speling \
--enable-rewrite \
--enable-so \
--with-suexec-umask=077 \
--with-apr=%{_bindir}/apr-1-config \
--with-apr-util=%{_bindir}/apu-1-config \
- %{?with_external_pcre:--with-external-pcre}
+ %{?with_external_pcre:--with-pcre}
%{__make}
./httpd.${mpm} -l | grep -v "${mpm}" > modules-inside
cd ..
done
-for mpm in metuxmpm peruser perchild worker; do
+for mpm in %{?with_metuxmpm:metuxmpm} %{?with_peruser:peruser} worker; 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."
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT/etc/{logrotate.d,rc.d/init.d,sysconfig,monit} \
$RPM_BUILD_ROOT%{_var}/{log/{httpd,archiv/httpd},{run,cache}/apache,lock/mod_dav} \
+ $RPM_BUILD_ROOT%{_sysconfdir}/{webapps.d,conf.d} \
$RPM_BUILD_ROOT%{_datadir}/cgi-bin
# prefork is default one
logdir=%{_var}/log/httpd \
proxycachedir=%{_var}/cache/httpd
-for mpm in metuxmpm peruser perchild worker; do
+for mpm in %{?with_metuxmpm:metuxmpm} %{?with_peruser:peruser} worker; do
install buildmpm-${mpm}/httpd.${mpm} $RPM_BUILD_ROOT%{_sbindir}/httpd.${mpm}
ln -s httpd.conf $RPM_BUILD_ROOT%{_sysconfdir}/httpd.${mpm}.conf
done
install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/httpd
install %{SOURCE2} $RPM_BUILD_ROOT/etc/logrotate.d/apache
-install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/apache
-install %{SOURCE5} $RPM_BUILD_ROOT/etc/monit
+install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/httpd
+install %{SOURCE5} $RPM_BUILD_ROOT/etc/monit/httpd.monitrc
touch $RPM_BUILD_ROOT/var/log/httpd/{access,error,agent,referer,suexec}_log
/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
WARNING!!!
Since apache-2.0.50-6 autoindex module has been separated to package
%{name}-mod_autoindex If you want to have the same functionality do:
-poldek --upgrade %{name}-mod_autoindex
+poldek -Uv %{name}-mod_autoindex
EOF
-%triggerpostun -- %{name} <= 2.0.54-2
+%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 from package apache into separate !!!
-!!! subpackage apache-cgi_test. If you need printenv !!!
-!!! and/or test-cgi, please install apache-cgi_test !!!
-!!! package, e.g. by running poldek -Uv apache-cgi_test !!!
-!!! !!!
-!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+WARNING!!!
+CGI demo/test programs - printenv and test-cgi, have been released
+from package apache into separate subpackage apache-cgi_test. If you
+need printenv and/or test-cgi, please install apache-cgi_test package,
+e.g. by running poldek -Uv apache-cgi_test
EOF
-%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."
+# update /etc/sysconfig/apache -> httpd rename
+if [ -f /etc/sysconfig/apache.rpmsave ]; then
+ cp -f /etc/sysconfig/httpd{,.rpmnew}
+ mv -f /etc/sysconfig/{apache.rpmsave,httpd}
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
+%triggerpostun -- %{name} < 2.0.55-3.1
+if ! grep -q 'Include webapps.d/' /etc/httpd/httpd.conf/10_httpd.conf; then
+# make sure webapps.d is included
+cp -f /etc/httpd/httpd.conf/10_httpd.conf{,.rpmsave}
+# this file is ugly, so just append new lines
+cat <<EOF >> /etc/httpd/httpd.conf/10_httpd.conf
+# Include webapps config
+Include webapps.d/*.conf
+EOF
fi
-%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."
+# rename monitrc to be service name like other files
+if [ -f /etc/monit/apache.monitrc.rpmsave ]; then
+ mv -f /etc/monit/httpd.monitrc{,.rpmnew}
+ mv -f /etc/monit/{apache.monitrc.rpmsave,httpd.monitrc}
fi
-%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
+%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.
-%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."
+# 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_auth_anon
-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
+%module_post
+
+%postun mod_auth
+%module_postun
+
+%post mod_auth_anon
+%module_post
+
+%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
%attr(754,root,root) /etc/rc.d/init.d/httpd
+# TODO: switch to conf.d, instead of confusing *dir* httpd.conf
%attr(750,root,root) %dir %{_sysconfdir}/httpd.conf
+%attr(750,root,root) %dir %{_sysconfdir}/webapps.d
%attr(750,root,root) %dir %{_sysconfdir}/modules
%attr(750,root,root) %dir %{_sysconfdir}/run
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf/*_httpd.conf
%attr(640,root,root) %{_sysconfdir}/magic
-%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/*
+%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(750,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/monit/*.monitrc
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/monit/*.monitrc
-%attr(755,root,root) %{_libexecdir}/mod_access.so
+#%attr(755,root,root) %{_libexecdir}/mod_access.so
%attr(755,root,root) %{_libexecdir}/mod_alias.so
%attr(755,root,root) %{_libexecdir}/mod_asis.so
%attr(755,root,root) %{_libexecdir}/mod_cern_meta.so
%lang(de) %{_datadir}/manual/mod/mpm_common.html.de
%lang(es) %{_datadir}/manual/mod/mpm_common.html.es
%lang(ja) %{_datadir}/manual/mod/mpm_common.html.ja*
-%{_datadir}/manual/mod/mod_access.html.en
-%lang(ja) %{_datadir}/manual/mod/mod_access.html.ja*
+#%{_datadir}/manual/mod/mod_access.html.en
+#%lang(ja) %{_datadir}/manual/mod/mod_access.html.ja*
%{_datadir}/manual/mod/mod_alias.html.en
%lang(ja) %{_datadir}/manual/mod/mod_alias.html.ja*
%lang(ko) %{_datadir}/manual/mod/mod_alias.html.ko.euc-kr
%attr(755,root,root) %{_sbindir}/dbmmanage
%attr(755,root,root) %{_sbindir}/htdbm
%{_mandir}/man1/dbmmanage.1*
+%{_mandir}/man1/htdbm.1*
%files mod_auth_digest
%defattr(644,root,root,755)