From 935b9586c49f00142b9bcc8208116411e3e9eff9 Mon Sep 17 00:00:00 2001 From: jorton Date: Jul 25 2007 17:16:39 +0000 Subject: - spec file cleanups: provide httpd-suexec, mod_dav; don't obsolete mod_jk; drop trailing dots from Summaries - init script add LSB info header, support force-reload (#246944) update description drop 1.3 config check pass $pidfile to daemon and pidfile everywhere --- diff --git a/httpd.init b/httpd.init index 6009d23..713d033 100755 --- a/httpd.init +++ b/httpd.init @@ -3,12 +3,22 @@ # httpd Startup script for the Apache HTTP Server # # chkconfig: - 85 15 -# description: Apache is a World Wide Web server. It is used to serve \ -# HTML files and CGI. +# description: The Apache HTTP Server is an efficient and extensible \ +# server implementing the current HTTP standards. # processname: httpd # config: /etc/httpd/conf/httpd.conf # config: /etc/sysconfig/httpd # pidfile: /var/run/httpd.pid +# +### BEGIN INIT INFO +# Provides: httpd +# Required-Start: $local_fs $remote_fs $network $named +# Required-Stop: $local_fs $remote_fs $network +# Should-Start: distcache +# Short-Description: start and stop Apache HTTP Server +# Description: The Apache HTTP Server is an extensible server +# implementing the current HTTP standards. +### END INIT INFO # Source function library. . /etc/rc.d/init.d/functions @@ -36,30 +46,13 @@ pidfile=${PIDFILE-/var/run/httpd.pid} lockfile=${LOCKFILE-/var/lock/subsys/httpd} RETVAL=0 -# check for 1.3 configuration -check13 () { - CONFFILE=/etc/httpd/conf/httpd.conf - GONE="(ServerType|BindAddress|Port|AddModule|ClearModuleList|" - GONE="${GONE}AgentLog|RefererLog|RefererIgnore|FancyIndexing|" - GONE="${GONE}AccessConfig|ResourceConfig)" - if LANG=C grep -Eiq "^[[:space:]]*($GONE)" $CONFFILE; then - echo - echo 1>&2 " Apache 1.3 configuration directives found" - echo 1>&2 " please read @docdir@/migration.html" - failure "Apache 1.3 config directives test" - echo - exit 1 - fi -} - # The semantics of these two functions differ from the way apachectl does # things -- attempting to start while running is a failure, and shutdown # when not running is also a failure. So we just do it the way init scripts # are expected to behave here. start() { echo -n $"Starting $prog: " - check13 || exit 1 - LANG=$HTTPD_LANG daemon $httpd $OPTIONS + LANG=$HTTPD_LANG daemon --pidfile=${pidfile} $httpd $OPTIONS RETVAL=$? echo [ $RETVAL = 0 ] && touch ${lockfile} @@ -71,7 +64,7 @@ start() { # errant children. stop() { echo -n $"Stopping $prog: " - killproc -d 10 $httpd + killproc -p ${pidfile} -d 10 $httpd RETVAL=$? echo [ $RETVAL = 0 ] && rm -f ${lockfile} ${pidfile} @@ -83,7 +76,7 @@ reload() { echo $"not reloading due to configuration syntax error" failure $"not reloading $httpd due to configuration syntax error" else - killproc $httpd -HUP + killproc -p ${pidfile} $httpd -HUP RETVAL=$? fi echo @@ -111,7 +104,7 @@ case "$1" in start fi ;; - reload) + force-reload|reload) reload ;; graceful|help|configtest|fullstatus) @@ -120,7 +113,7 @@ case "$1" in ;; *) echo $"Usage: $prog {start|stop|restart|condrestart|reload|status|fullstatus|graceful|help|configtest}" - exit 1 + RETVAL=3 esac exit $RETVAL diff --git a/httpd.spec b/httpd.spec index b9b2d81..ed96959 100644 --- a/httpd.spec +++ b/httpd.spec @@ -6,7 +6,7 @@ Summary: Apache HTTP Server Name: httpd Version: 2.2.4 -Release: 4 +Release: 5 URL: http://httpd.apache.org/ Source0: http://www.apache.org/dist/httpd/httpd-%{version}.tar.gz Source1: index.html @@ -47,9 +47,10 @@ Obsoletes: httpd-suexec Requires(pre): /usr/sbin/useradd Requires(post): chkconfig Provides: webserver +Provides: mod_dav = %{version}-%{release}, httpd-suexec = %{version}-%{release} Provides: httpd-mmn = %{mmn} -Obsoletes: apache, secureweb, mod_dav, mod_gzip, stronghold-apache, stronghold-htdocs -Obsoletes: mod_put, mod_roaming, mod_jk +Obsoletes: apache, secureweb, mod_dav, mod_gzip, stronghold-apache +Obsoletes: stronghold-htdocs, mod_put, mod_roaming Conflicts: pcre < 4.0 %description @@ -74,7 +75,7 @@ to install this package. %package manual Group: Documentation -Summary: Documentation for the Apache HTTP server. +Summary: Documentation for the Apache HTTP server Requires: httpd = %{version}-%{release} Obsoletes: secureweb-manual, apache-manual @@ -461,6 +462,15 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/httpd/build/*.sh %changelog +* Tue Jul 24 2007 Joe Orton 2.2.4-5 +- spec file cleanups: provide httpd-suexec, mod_dav; + don't obsolete mod_jk; drop trailing dots from Summaries +- init script + * add LSB info header, support force-reload (#246944) + * update description + * drop 1.3 config check + * pass $pidfile to daemon and pidfile everywhere + * Wed May 9 2007 Joe Orton 2.2.4-4 - update welcome page branding