Summary: The most widely used Web server on the Internet. Name: apache Version: 1.3.12 Release: 2 Group: System Environment/Daemons Source: ftp://ftp.apache.org/apache/dist/apache_%{version}.tar.gz Source1: apache-index.html Source2: poweredby.png Source3: httpd.init Source4: apache.logrotate Source5: apache-access.conf Source6: apache-httpd.conf Source7: apache-srm.conf Source8: ftp://ftp.cohprog.com/pub/apache/module/1.3.0/mod_bandwidth.c Source9: mod_put.c Source10: http://www.snert.com/Software/Throttle/mod_throttle208.tgz Patch0: apache_1.3.6-redhat.patch Patch1: apache-1.3.11-apxs.patch Patch2: apache_1.3.11-phhttpd.patch Patch3: apache_1.3.12-eapi-2.6.0.patch Patch4: apache_1.3.12-piranha.patch Copyright: Freely distributable and usable BuildRoot: %{_tmppath}/apache-root Requires: /etc/mime.types Prereq: /sbin/chkconfig, /bin/mktemp, /bin/rm, mailcap, grep, textutils Provides: webserver %description Apache is a powerful, full-featured, efficient and freely-available Web server. Apache is also the most popular Web server on the Internet. Install the apache package if you need a Web server. %package devel Group: Development/Libraries Summary: Development tools for the Apache Web server. Obsoletes: secureweb-devel %description devel The apache-devel package contains the APXS binary and other files that you'll need to build Dynamic Shared Objects (DSOs) for Apache. If you are installing the Apache Web server, and you want to be able to compile or develop additional modules for Apache, you'll need to install this package. %package manual Group: Documentation Summary: Documentation for the Apache Web server. %description manual The apache-manual package contains the complete manual and reference guide for the Apache Web server. If you need Apache documentation installed on the local machine, install this package. The information can also be found on the Web at http://www.apache.org/docs/. %prep %setup -q -n apache_%{version} -a 10 %patch0 -p1 -b .redhat %patch1 -p1 -b .apxs %patch2 -p1 -b .phhttpd %patch3 -p1 -b .eapi %patch4 -p1 -b .piranha %build OPTIM="$RPM_OPT_FLAGS" \ ./configure --prefix=/usr \ --with-layout=RedHat \ --add-module=$RPM_SOURCE_DIR/mod_bandwidth.c \ --add-module=$RPM_SOURCE_DIR/mod_put.c \ --activate-module=src/modules/throttle/mod_throttle.o \ --enable-module=all \ --enable-shared=max \ --enable-rule=EAPI \ --disable-rule=WANTHSREGEX \ --disable-module=auth_dbm \ --with-perl=/usr/bin/perl \ --enable-suexec \ --suexec-docroot=/home/httpd/html \ --suexec-caller=nobody make %install rm -rf $RPM_BUILD_ROOT make install root=$RPM_BUILD_ROOT strip $RPM_BUILD_ROOT/usr/sbin/httpd strip $RPM_BUILD_ROOT/usr/lib/apache/*so # remove apachectl; we have our own SYSV init stuff rm $RPM_BUILD_ROOT/usr/sbin/apachectl rm $RPM_BUILD_ROOT/usr/man/man8/apachectl.8 # install SYSV init stuff mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d install -m755 $RPM_SOURCE_DIR/httpd.init \ $RPM_BUILD_ROOT/etc/rc.d/init.d/httpd for I in 0 1 2 6; do mkdir -p $RPM_BUILD_ROOT/etc/rc.d/rc$I.d ln -s ../init.d/httpd $RPM_BUILD_ROOT/etc/rc.d/rc$I.d/K15httpd done for I in 3 5; do mkdir -p $RPM_BUILD_ROOT/etc/rc.d/rc$I.d ln -s ../init.d/httpd $RPM_BUILD_ROOT/etc/rc.d/rc$I.d/S85httpd done # install log rotation stuff mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d install -m644 $RPM_SOURCE_DIR/apache.logrotate \ $RPM_BUILD_ROOT/etc/logrotate.d/apache ln -s ../../var/log/httpd $RPM_BUILD_ROOT/etc/httpd/logs ln -s ../../usr/lib/apache $RPM_BUILD_ROOT/etc/httpd/modules install -m644 $RPM_SOURCE_DIR/apache-index.html \ $RPM_BUILD_ROOT/home/httpd/html/index.html install -m644 $RPM_SOURCE_DIR/poweredby.png \ $RPM_BUILD_ROOT/home/httpd/html # replace Apache's default config files with our own versions install -m644 $RPM_SOURCE_DIR/apache-access.conf \ $RPM_BUILD_ROOT/etc/httpd/conf/access.conf install -m644 $RPM_SOURCE_DIR/apache-httpd.conf \ $RPM_BUILD_ROOT/etc/httpd/conf/httpd.conf install -m644 $RPM_SOURCE_DIR/apache-srm.conf \ $RPM_BUILD_ROOT/etc/httpd/conf/srm.conf # install apache source code for devel package #mkdir -p $RPM_BUILD_ROOT/usr/src #tar xzf $RPM_SOURCE_DIR/apache_%{version}.tar.gz -C $RPM_BUILD_ROOT/usr/src find $RPM_BUILD_ROOT -type f | \ xargs grep -l "/usr/local/bin/perl5" | \ xargs perl -pi -e "s|/usr/local/bin/perl5|/usr/bin/perl|g;" find $RPM_BUILD_ROOT -type f | \ xargs grep -l "/usr/local/bin/perl" | \ xargs perl -pi -e "s|/usr/local/bin/perl|/usr/bin/perl|g;" %clean rm -rf $RPM_BUILD_ROOT %post /sbin/chkconfig --add httpd [ -f /etc/mime.types ] || exit 0 # safely add .htm to mime types if it is not already there TEMPTYPES=`/bin/mktemp /tmp/mimetypes.XXXXXX` [ -z "$TEMPTYPES" ] && { echo "could not make temporary file, htm not added to /etc/mime.types" >&2 exit 1 } ( grep -v "^text/html" /etc/mime.types types=$(grep "^text/html" /etc/mime.types | cut -f2-) echo -en "text/html\t\t\t" for val in $types ; do if [ "$val" = "htm" ] ; then continue fi echo -n "$val " done echo "htm" ) > $TEMPTYPES cat $TEMPTYPES > /etc/mime.types && /bin/rm -f $TEMPTYPES %preun if [ $1 = 0 ]; then /etc/rc.d/init.d/httpd stop > /dev/null 2>&1 /sbin/chkconfig --del httpd fi %files %defattr(-,root,root) %dir /etc/httpd/conf %config /etc/httpd/conf/access.conf %config /etc/httpd/conf/srm.conf %config /etc/httpd/conf/httpd.conf %config /etc/httpd/conf/magic /etc/httpd/logs /etc/httpd/modules %config /etc/logrotate.d/apache %config /etc/rc.d/init.d/httpd %config(missingok) /etc/rc.d/rc3.d/S85httpd %config(missingok) /etc/rc.d/rc5.d/S85httpd %config(missingok) /etc/rc.d/rc0.d/K15httpd %config(missingok) /etc/rc.d/rc1.d/K15httpd %config(missingok) /etc/rc.d/rc2.d/K15httpd %config(missingok) /etc/rc.d/rc6.d/K15httpd %dir /home/httpd %dir /home/httpd/cgi-bin %dir /home/httpd/html %config(noreplace) /home/httpd/html/index.html /home/httpd/html/poweredby.png /home/httpd/icons /usr/lib/apache /usr/man/man1/* /usr/man/man8/ab.8* /usr/man/man8/httpd.8* /usr/man/man8/logresolve.8* /usr/man/man8/rotatelogs.8* /usr/man/man8/suexec.8* /usr/sbin/ab /usr/sbin/httpd /usr/sbin/logresolve /usr/sbin/rotatelogs %attr(0711,root,root) /usr/sbin/suexec /usr/bin/* %attr(-,nobody,nobody) %dir /var/cache/httpd %dir /var/log/httpd %files manual %defattr(-,root,root) /home/httpd/html/manual %files devel %defattr(-,root,root) /usr/include/apache /usr/sbin/apxs /usr/man/man8/apxs.8* %changelog * Wed Mar 01 2000 Nalin Dahyabhai - make suexec limit UIDs and GIDs to < 51 instead of 100 * Fri Feb 25 2000 Nalin Dahyabhai - update to 1.3.12 - add EAPI patch * Thu Feb 17 2000 Preston Brown - ifmodule directive for php stuff. - load mod_perl before mod_php (#8169) * Tue Feb 14 2000 Zach Brown - minor fix to phhttpd patch * Thu Feb 10 2000 Preston Brown - improved default index.html. * Thu Feb 03 2000 Preston Brown - strip dynamically loadable modules. * Mon Feb 02 2000 Zach Brown - add phhttpd 'Tunnel' directive and code to use it * Mon Jan 31 2000 Cristian Gafton - rebuild to fix depenencies * Tue Jan 25 2000 Bernhard Rosenkraenzer - 1.3.11 - deal with the fact that RPM now gzips man pages * Wed Jan 12 2000 Preston Brown - new poweredby.png w/new logo - apxs.8 man page moved to devel archive (#6661) - don't remove old logfiles on package de-install (#8268) - more updates to logrotate to avoid spurious cron mail (#8110) * Mon Jan 10 2000 Preston Brown - mod_throttle added; mod_bandwidth updated. * Mon Dec 17 1999 Dale Lovelace - Add configuration for mod_put to httpd.conf * Mon Dec 06 1999 Preston Brown - documentation cleanups in httpd.conf (#5357, #6655) - fixed logrotate script to ignore error if no apache running (#7074) * Wed Nov 10 1999 Jeff Johnson - add put module. * Thu Nov 04 1999 Preston Brown - make suexec non-suid. People can enable it if they wish themselves. - somehow the unified httpd.conf got trashed. fixed. - manual is now a subpackage - point to /usr/share/magic as the magic file location; don't use the apache-specific one. - fix apxs module installation issues (#5650) * Tue Sep 21 1999 Bill Nottingham - move DSO in httpd.conf to after ServerRoot * Mon Sep 20 1999 Preston Brown - it is httpd stop, not httpsd stop (# 5254) - suexec added (# 5257) * Thu Sep 09 1999 Preston Brown - remove apachectl man page (# 4459) * Fri Aug 27 1999 Preston Brown - upgraded to 1.3.9 - fix bug # 3680 (suexec docroot was wrong) - fix bug # 2378 (logrotate with -USR1 not -HUP) - fix bug # 3548 (logrotate complains if apache not running) - httpd.conf is now in the unified apache format as distributed * Mon Aug 16 1999 Bill Nottingham - initscript munging * Sat May 21 1999 Bill Nottingham - fix broken link in index.html * Wed Apr 07 1999 Bill Nottingham - allow indexes in /doc * Tue Apr 06 1999 Preston Brown - strip binaries * Mon Apr 05 1999 Preston Brown - prerequire /bin/rm, added /doc path pointing to /usr/doc for localhost * Fri Mar 26 1999 Preston Brown - updated log rotating scripts to not complain if logs aren't present. * Thu Mar 25 1999 Preston Brown - fixed up path to perl * Wed Mar 24 1999 Preston Brown - updated init script to conform to new standards - upgraded to 1.3.6, fixed apxs patch * Mon Mar 22 1999 Preston Brown - clean up logfiles on deinstallation * Sun Mar 21 1999 Cristian Gafton - auto rebuild in the new build environment (release 4) * Fri Mar 12 1999 Cristian Gafton - added mod_bandwidth - updated to 1.3.4 - prereq mailcap * Fri Dec 18 1998 Cristian Gafton - added patch to disable building support for ndbm - build against glibc 2.1 * Mon Oct 12 1998 Cristian Gafton - updated to 1.3.3 to catch up with bug fixes - added the /usr/bin/* binaries to the spec file list * Fri Sep 25 1998 Cristian Gafton - change ownership of cache dir to nobody - added "Red Hat" to the server string - updated to version 1.3.2 - fixed all references to httpsd in config files * Fri Sep 04 1998 Cristian Gafton - small fixes to the spec file - patch to handle correctly the -d option - leave out the .usr.src.apache_%{version} for now * Thu Sep 03 1998 Preston Brown - patched apxs not to bomb out if it can't find httpd * Wed Sep 02 1998 Preston Brown - upgraded to apache 1.3.1. - Heavy rewrite. - changed providing a_web_server to just webserver. Humor is not an option. * Mon Aug 10 1998 Erik Troan - updated to build as non-root user - added patch to defeat header dos attack * Thu May 07 1998 Prospector System - translations modified for de, fr, tr * Wed May 06 1998 Cristian Gafton - fixed the default config files to be more paranoid about security * Sat May 02 1998 Cristian Gafton - fixed init script - added index.htm to the list of acceptable indexes * Sat May 02 1998 Cristian Gafton - updated to 1.2.6 - added post script to install htm extension for text/html into /etc/mime.types * Wed Apr 22 1998 Michael K. Johnson - enhanced sysv init script * Tue Jan 06 1998 Erik Troan - updated to 1.2.5, which includes many security fixes * Wed Dec 31 1997 Otto Hammersmith - fixed overkill on http.init stop * Wed Dec 31 1997 Erik Troan - added patch for backslash DOS attach * Thu Nov 06 1997 Donnie Barnes - added htdigest binary to file list * Mon Nov 03 1997 Donnie Barnes - made the default index.html be config(noreplace) so we no longer blow away other folks' index.html * Wed Oct 29 1997 Donnie Barnes - added chkconfig support - added restart|status options to initscript - renamed httpd.init to httpd * Tue Oct 07 1997 Elliot Lee - Redid spec file, patches, etc. from scratch.