Summary: The most widely used Web server on the Internet. Summary(cs): Nejrozšířenější internetový WWW server. Name: apache Version: 1.3.12 Release: 6cs Group: System Environment/Daemons Group(cs): Systémové prostředí/Démoni %define mczversion 3.1.0 %define mczname mcz-%{version}-%{mczversion} 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 Source11: http://www.intersoft.cz/mod_czech/download/mod_czech3/Version_3_1_0/Apache_1_3_12_Version/%{mczname}.tar.gz Source12: docs-RH6.2cz.tar.gz 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 Provides: mod_czech Packager: Ivo Panacek %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 includes mod_czech = module for automatic conversion between different Czech character encodings from http://www.intersoft.cz/mod_czech/ Warning: mod_czech is not ready (in current version) to be compiled into Apache and at the same time not used (missing directive AddModule). Until repaired, do NOT comment out that directive if httpd.conf. The module functionality can be always disabled using directive "CzechModule off". %description -l cs Apache je výkonný, efektivní, volně šiřitelný WWW server s mnoha vlastnostmi. Je nejrozšířenější WWW server na internetu. Tento balík obsahuje mod_czech = modul pro automatické překódovávání dokumentů mezi různými kódovými sadami) z http://www.intersoft.cz/mod_czech/ Varování: mod_czech není v této verzi připraven na situaci, kdy je sice zakompilován do Apache, ale není povolen (direktivou AddModule). Než to bude opraveno, tuto direktivu tam nechte. Vlastní modul můžete vždycky vypnout direktivou "CzechModule off". %package devel Group: Development/Libraries Group(cs): Systémové prostředí/Knihovny Summary: Development tools for the Apache Web server. Summary(cs): Vývojové nástroje pro 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. %description -l cs devel Balík devel obsahuje hlavičkové soubory a program apxs, které jsou nutné pro vývoj a kompilace DSO (dynamicky sdílených objektů) pro server Apache. %package manual Group: Documentation Group(cs): Dokumentace Summary: Documentation for the Apache Web server. Summary(cs): Dokumentace pro Apache WWW 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/. %description -l cs manual Balík apache-manual obsahuje kompletní dokumentaci k WWW serveru Apache. Nainstalujte si ho, potřebujete-li mít na lokálním stroji dokumentaci k Apache. Tyto informace lze nalézt i na Síti na http://www.apache.org/docs/. %prep # unpack mod_czech files before original apache %setup -T -D -q -b 11 -n %{mczname} %setup -q -n apache_%{version} -a 10 # apply mod_czech patches before RedHat ones patch -p1 -b -z .mcz-base -s -E < ../%{mczname}/mcz-apache-%{version}.patch patch -p1 -b -z .mcz-conf -s -E < ../%{mczname}/mcz-apache-%{version}-conf.patch patch -p1 -s -E < ../%{mczname}/mcz-apache-%{version}-htdocs.patch # copy pictures for default chcp page and change chcp.html to reflect new location cp ../%{mczname}/pictures/* icons perl -p -i.mcz-ivop -e 's,/icons/mod_czech/,/icons/,g' src/modules/czech/mod_czech.inc # my mcz enhancements perl -p -i.mcz-ivop -e 's/US-ASCII/iso-8859-2/ if /^BrowserMatch \[Ll\]ynx /' \ conf/httpd.conf-dist conf/httpd.conf-dist-win conf/httpd.conf-dist.nw perl -p -i.mcz-ke -e 's/public_html/html/' \ index conf/httpd.conf-dist conf/httpd.conf-dist-win conf/httpd.conf-dist.nw ( cd htdocs/manual/mod/mod_czech ; ln -s mod_czech.html index.html ) # patch default Apache httpd.conf with RedHat specific issues perl -p -i.ivop -e ' s/^(ServerRoot ).*$/$1 "\/etc\/httpd"/; s/^.(LockFile ).*$/$1 \/var\/lock\/httpd.lock/; s/^(PidFile ).*$/$1 \/var\/run\/httpd.pid/; s/^(ScoreBoardFile ).*$/$1 \/var\/run\/httpd.scoreboard/; s/^(MaxSpareServers ).*$/$1 20/; s/^(StartServers ).*$/$1 8/; s/^(MaxRequestsPerChild ).*$/$1 100/; s/^(\s*TypesConfig ).*$/$1 \/etc\/mime.types/; s/^(Group ).*$/$1 nobody/; s/^(ServerAdmin ).*$/$1 root\@localhost/; s/^(.ServerName ).*$/$1 localhost/; s/\@\@ServerRoot\@\@/\/home\/httpd/; s/^(DocumentRoot ).*$/$1 "\/home\/httpd\/html"/; s/(Directory.*\/home\/httpd\/)htdocs/$1html/; s/^(\s*Options\s+Indexes ).*$/$1 Includes FollowSymLinks/; s/^(\s*DirectoryIndex ).*$/$1 index.html index.htm index.shtml index.cgi index.txt index.php3/; s/^(\s*MIMEMagicFile ).*$/$1 conf\/magic/; s/^(ErrorLog ).*$/$1 \/var\/log\/httpd\/error_log/; s/(CustomLog )logs\//$1 \/var\/log\/httpd\//; $inCgiBin = 1 if /^\s*/; s/^\s*.(AddType application.*php3)\s*$/\n $1\n/; s/^\s*.(AddType application.*php3-source.*phps)\s*$/ $1\n<\/IfModule>\n/; s/^(\s*).(AddHandler imap-file map)\s*$/$1$2/; $inPos1 = 3 if $inPos1 == 2; $inPos1 = 1 if //; if( $inPos1 == 3 ) { $inPos1 = 0; printf qq{ \# Allow access to local system documentation from localhost Alias /doc/ /usr/doc/ order deny,allow deny from all allow from localhost Options Indexes FollowSymLinks }; } $inPos2 = 3 if $inPos2 == 2; $inPos2 = 1 if //; if( $inPos2 == 3 ) { $inPos2 = 0; printf qq{ \# If the perl module is installed, this will be enabled. Alias /perl/ /home/httpd/perl/ SetHandler perl-script PerlHandler Apache::Registry Options +ExecCGI \# \# Allow http put (such as Netscape Gold publish feature) \# Use htpasswd to generate /etc/httpd/conf/passwd. \# You must unremark these two lines at the top of this file as well: \#LoadModule put_module modules/mod_put.so \#AddModule mod_put.c \# \#Alias /upload /tmp \# \# EnablePut On \# AuthType Basic \# AuthName Temporary \# AuthUserFile /etc/httpd/conf/passwd \# EnableDelete Off \# umask 007 \# \# require valid-user \# \# }; } ' conf/httpd.conf-dist # patch manual perl -pi -e ' s/mod_php/mod_php3/g; s/PHP /PHP3 /g; ' htdocs/manual/mod/index.html %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 \ --with-port=80 \ --libexecdir=/usr/lib/apache \ --add-module=$RPM_SOURCE_DIR/mod_bandwidth.c \ --add-module=$RPM_SOURCE_DIR/mod_put.c \ --activate-module=src/modules/throttle/mod_throttle.o \ --activate-module=src/modules/czech/libczech.a \ --enable-module=all \ --enable-shared=max \ --disable-shared=czech \ --disable-shared=alias \ --enable-rule=EAPI \ --disable-rule=WANTHSREGEX \ --disable-module=auth_dbm \ --with-perl=/usr/bin/perl \ --enable-suexec \ --suexec-docroot=/home/httpd/html \ --suexec-userdir=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 # do NOT install RedHat default index page # 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 # install czech index page instead #install -m644 htdocs/index.html.cs \ # $RPM_BUILD_ROOT/home/httpd/html/index.html ( cd $RPM_BUILD_ROOT/home/httpd/html; tar xvzf $RPM_SOURCE_DIR/docs-RH6.2cz.tar.gz ) install -m644 htdocs/apache_pb.gif \ $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 perl -p -i.ivop -e 's/(lib\/apache\/)/\/usr\/$1/ ' $RPM_BUILD_ROOT/etc/httpd/conf/httpd.conf* perl -p -i.ke -e 's/(mod_throttle.so)$/$1\n#LoadModule php3_module \/usr\/lib\/apache\/libphp3.so/; s/(mod_throttle.c$)/$1\n#AddModule mod_php3.c/' $RPM_BUILD_ROOT/etc/httpd/conf/httpd.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/html/apache_pb.gif /home/httpd/html/cestina.html /home/httpd/html/redhatcz.gif /home/httpd/html/redhatcz_bg.gif /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(4711,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 * Mon Jul 03 2000 Ivo Panacek - typo in META http-equiv in index.html fixed - location of icons for chcp fixed * Mon May 15 2000 Ivo Panacek - SUID bit set for /usr/sbin/suexec * Mon Apr 10 2000 Ivo Panacek - fixed different DocumentRoot and Directory for accessing it - fixed mod_php reference in manual (changed to mod_php3) - enhanced entry page (index.html) and added test page for mod_czech * Sun Apr 09 2000 Milan Kerslager - added php3 module to httpd.conf - user directory changed from public_html to html (aka /home/httpd/html) - added --suexec-userdir=html * Sun Apr 02 2000 Ivo Panacek - added mod_czech and Czech translation - dropped RedHat httpd.conf and original Apache version modified in this specfile following RedHat guidelines * 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.