OpenPKG CVS Repository http://cvs.openpkg.org/ ____________________________________________________________________________
Server: cvs.openpkg.org Name: Christoph Schug Root: /v/openpkg/cvs Email: [EMAIL PROTECTED] Module: openpkg-src Date: 13-Apr-2006 17:54:28 Branch: HEAD Handle: 2006041316542700 Added files: openpkg-src/apache2 apache2.base apache2.conf apache2.sh Modified files: openpkg-src/apache2 apache2.spec rc.apache2 Log: reworked Apache 2.2 package and aligned it with existing Apache 1.3 package Summary: Revision Changes Path 1.1 +218 -0 openpkg-src/apache2/apache2.base 1.1 +33 -0 openpkg-src/apache2/apache2.conf 1.1 +11 -0 openpkg-src/apache2/apache2.sh 1.71 +35 -17 openpkg-src/apache2/apache2.spec 1.13 +13 -8 openpkg-src/apache2/rc.apache2 ____________________________________________________________________________ patch -p0 <<'@@ .' Index: openpkg-src/apache2/apache2.base ============================================================================ $ cvs diff -u -r0 -r1.1 apache2.base --- /dev/null 2006-04-13 17:54:00 +0200 +++ apache2.base 2006-04-13 17:54:28 +0200 @@ -0,0 +1,218 @@ +## +## apache2.base -- Apache Base/Default Configuration +## ______________________________________________________ +## +## PLEASE DO NOT EDIT THIS FILE!! ADJUST CONFIGURATION BY +## OVERRIDING DIRECTIVES IN "apache.conf" INSTEAD, PLEASE! +## ______________________________________________________ +## + +# global server +ServerRoot @l_prefix@ +ServerAdmin root@@[EMAIL PROTECTED]@l_domainname@ +ServerName @[EMAIL PROTECTED]@l_domainname@ +ServerTokens os +User @l_nusr@ +Group @l_ngrp@ + +# runtime files +<IfModule mpm_prefork_module> + PidFile @l_prefix@/var/apache2/run/apache2.pid + ScoreBoardFile @l_prefix@/var/apache2/run/apache2.sb +</IfModule> + +# server behaviour +Timeout 300 +KeepAlive on +MaxKeepAliveRequests 100 +KeepAliveTimeout 15 +<IfModule mpm_prefork_module> + MinSpareServers 5 + MaxSpareServers 10 + StartServers 5 + MaxClients 150 + MaxRequestsPerChild 0 +</IfModule> +HostnameLookups off +UseCanonicalName on + +# access logging +<IfModule log_config_module> + LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined + LogFormat "%h %l %u %t \"%r\" %>s %b" common + LogFormat "%{Referer}i -> %U" referer + LogFormat "%{User-agent}i" agent + CustomLog @l_prefix@/var/apache2/log/access.log common env=!ignore_global_access +</IfModule> + +# error logging +LogLevel warn +ErrorLog @l_prefix@/var/apache2/log/error.log +ServerSignature on + +# secure root directory +<Directory /> + Options FollowSymLinks + AllowOverride None + Order deny,allow + Deny from all +</Directory> + +# configure global document root +DocumentRoot @l_prefix@/share/apache2/htdocs +<IfModule alias_module> + Alias /apache-htdocs @l_prefix@/share/apache2/htdocs +</IfModule> +<Directory "@l_prefix@/share/apache2/htdocs"> + Options Indexes FollowSymLinks MultiViews + AllowOverride none + Order allow,deny + Allow from all +</Directory> + +# default directories and files +<IfModule userdir_module> + UserDir public_html +</IfModule> +<IfModule dir_module> + DirectoryIndex index.html +</IfModule> + +# local configuration files +AccessFileName .htaccess +<Files ~ "^\.ht"> + Order allow,deny + Deny from all + Satisfy All +</Files> + +# global Icons and CGI directory +<IfModule alias_module> + Alias /apache-icons @l_prefix@/share/apache2/icons + <Directory "@l_prefix@/share/apache2/icons"> + Options Indexes MultiViews + AllowOverride None + Order allow,deny + Allow from all + </Directory> + ScriptAlias /openpkg-cgi "@l_prefix@/cgi" + <Directory "@l_prefix@/cgi"> + AllowOverride None + Options None + Order allow,deny + Allow from all + </Directory> +</IfModule> + +# automatic CGI recognition by extension +<IfModule mime_module> + <IfModule cgi_module> + AddHandler cgi-script .cgi + </IfModule> +</IfModule> + +# automatic directory indexing +<IfModule autoindex_module> + IndexOptions FancyIndexing + ReadmeName README + HeaderName HEADER + IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t + DefaultIcon /apache-icons/unknown.gif + AddIcon /apache-icons/back.gif .. + AddIcon /apache-icons/dir.gif ^^DIRECTORY^^ + AddIcon /apache-icons/blank.gif ^^BLANKICON^^ + AddIcon /apache-icons/binary.gif .bin .exe + AddIcon /apache-icons/binhex.gif .hqx + AddIcon /apache-icons/tar.gif .tar + AddIcon /apache-icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv + AddIcon /apache-icons/compressed.gif .Z .z .tgz .gz .zip + AddIcon /apache-icons/a.gif .ps .ai .eps + AddIcon /apache-icons/layout.gif .html .shtml .htm .pdf + AddIcon /apache-icons/text.gif .txt + AddIcon /apache-icons/c.gif .c + AddIcon /apache-icons/p.gif .pl .py + AddIcon /apache-icons/f.gif .for + AddIcon /apache-icons/dvi.gif .dvi + AddIcon /apache-icons/uuencoded.gif .uu + AddIcon /apache-icons/script.gif .conf .sh .shar .csh .ksh .tcl + AddIcon /apache-icons/tex.gif .tex + AddIcon /apache-icons/bomb.gif core + AddIconByEncoding (CMP,/apache-icons/compressed.gif) x-compress x-gzip + AddIconByType (TXT,/apache-icons/text.gif) text/* + AddIconByType (IMG,/apache-icons/image2.gif) image/* + AddIconByType (SND,/apache-icons/sound2.gif) audio/* + AddIconByType (VID,/apache-icons/movie.gif) video/* +</IfModule> + +# MIME types and content negotiation +DefaultType text/plain +<IfModule mime_module> + TypesConfig @l_prefix@/etc/apache2/mime.types + AddType application/x-tar .tgz + AddEncoding x-compress Z + AddEncoding x-gzip gz tgz + AddLanguage da .dk + AddLanguage nl .nl + AddLanguage en .en + AddLanguage et .ee + AddLanguage fr .fr + AddLanguage de .de + AddLanguage el .el + AddLanguage he .he + AddCharset ISO-8859-8 .iso8859-8 + AddLanguage it .it + AddLanguage ja .ja + AddCharset ISO-2022-JP .jis + AddLanguage kr .kr + AddCharset ISO-2022-KR .iso-kr + AddLanguage no .no + AddLanguage pl .po + AddCharset ISO-8859-2 .iso-pl + AddLanguage pt .pt + AddLanguage pt-br .pt-br + AddLanguage ltz .lu + AddLanguage ca .ca + AddLanguage es .es + AddLanguage sv .se + AddLanguage cz .cz + AddLanguage ru .ru + AddLanguage tw .tw + AddCharset Big5 .Big5 .big5 + AddCharset WINDOWS-1251 .cp-1251 + AddCharset CP866 .cp866 + AddCharset ISO-8859-5 .iso-ru + AddCharset KOI8-R .koi8-r + AddCharset UCS-2 .ucs2 + AddCharset UCS-4 .ucs4 + AddCharset UTF-8 .utf8 +</IfModule> +<IfModule negotiation_module> + LanguagePriority en da nl et fr de el it ja kr no pl pt pt-br ru ltz ca es sv tw +</IfModule> +<IfModule mime_magic_module> + MIMEMagicFile @l_prefix@/etc/apache2/mime.magic +</IfModule> + +# SSL/TLS support +<IfModule ssl_module> + SSLRandomSeed startup builtin + SSLRandomSeed connect builtin + SSLMutex sem + SSLSessionCache shm:@l_prefix@/var/apache2/run/ssl_scache(512000) + SSLSessionCacheTimeout 300 + SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL + <IfModule setenvif_module> + SetEnvIf User-Agent ".*MSIE.*" \ + nokeepalive ssl-unclean-shutdown \ + downgrade-1.0 force-response-1.0 + </IfModule> + <Files ~ "\.(cgi|shtml|pl|phtml|php?)$"> + SSLOptions +StdEnvVars + </Files> + <Directory "@l_prefix@/cgi"> + SSLOptions +StdEnvVars + </Directory> +</IfModule> + +Include "@l_prefix@/etc/apache2/apache2.d/*.conf" + @@ . patch -p0 <<'@@ .' Index: openpkg-src/apache2/apache2.conf ============================================================================ $ cvs diff -u -r0 -r1.1 apache2.conf --- /dev/null 2006-04-13 17:54:00 +0200 +++ apache2.conf 2006-04-13 17:54:28 +0200 @@ -0,0 +1,33 @@ +## +## apache2.conf -- Apache Custom Configuration +## + +# include Apache default/base configuration +Include "@l_prefix@/etc/apache2/apache2.base" + +Listen 127.0.0.1:80 +NameVirtualHost 127.0.0.1:80 + +<VirtualHost 127.0.0.1:80> + ServerName @[EMAIL PROTECTED]@l_domainname@ + ServerAlias [EMAIL PROTECTED]@ + ServerAdmin [EMAIL PROTECTED]@l_domainname@ + ServerSignature on + + DocumentRoot @l_prefix@/share/apache2/htdocs + <Directory @l_prefix@/share/apache2/htdocs> + Options Indexes FollowSymLinks MultiViews + AllowOverride none + Order allow,deny + Allow from all + </Directory> + + ScriptAlias /cgi-bin @l_prefix@/cgi + <Directory @l_prefix@/cgi> + Options Indexes FollowSymLinks MultiViews ExecCGI + AllowOverride None + Order allow,deny + Allow from all + </Directory> +</VirtualHost> + @@ . patch -p0 <<'@@ .' Index: openpkg-src/apache2/apache2.sh ============================================================================ $ cvs diff -u -r0 -r1.1 apache2.sh --- /dev/null 2006-04-13 17:54:00 +0200 +++ apache2.sh 2006-04-13 17:54:28 +0200 @@ -0,0 +1,11 @@ +## +## apache2.sh -- Apache Shell Environment Script +## + +# +# Run-time paths +# + +export PATH="@l_path@" +export LD_LIBRARY_PATH="@l_ld_library_path@" + @@ . patch -p0 <<'@@ .' Index: openpkg-src/apache2/apache2.spec ============================================================================ $ cvs diff -u -r1.70 -r1.71 apache2.spec --- openpkg-src/apache2/apache2.spec 4 Apr 2006 19:18:59 -0000 1.70 +++ openpkg-src/apache2/apache2.spec 13 Apr 2006 15:54:27 -0000 1.71 @@ -39,7 +39,7 @@ Group: Web License: ASF Version: %{V_apache} -Release: 20060404 +Release: 20060413 # package options (suexec related) %option with_suexec yes @@ -60,6 +60,9 @@ Source0: http://www.apache.org/dist/httpd/httpd-%{V_apache}.tar.gz Source1: http://perl.apache.org/dist/mod_perl-%{V_mod_perl}.tar.gz Source2: rc.apache2 +Source3: apache2.base +Source4: apache2.conf +Source5: apache2.sh Patch0: apache2.patch # build information @@ -81,10 +84,6 @@ BuildPreReq: openldap, openssl >= 0.9.8 PreReq: openldap, openssl >= 0.9.8 %endif -%if "%{with_mod_perl}" == "yes" -BuildPreReq: perl -PreReq: perl -%endif AutoReq: no AutoReqProv: no Conflicts: apache @@ -100,10 +99,10 @@ of users have contributed ideas, code, and documentation to the project. - NOTICE: This is Apache 2.0, a complete work-off of the old Apache - 1.3 code-base, now based on the Apache Portable Runtime (APR). It - is mostly configuration compatible to Apache 1.3, but the C API is - completely incompatible. + NOTICE: This is Apache 2.2, which is the sucessor of Apache 2.0, a + complete work-off of the old Apache 1.3 code-base, now based on the + Apache Portable Runtime (APR). It is mostly configuration compatible + to Apache 1.3, but the C API is completely incompatible. %track prog apache2 = { @@ -173,6 +172,7 @@ --cache-file=./config.cache \ --enable-layout=GNU \ --prefix=%{l_prefix} \ + --with-program-name=apache2 \ --sysconfdir=%{l_prefix}/etc/apache2 \ --libexecdir=%{l_prefix}/libexec/apache2 \ --with-mpm=prefork \ @@ -181,7 +181,7 @@ --with-suexec-bin=%{l_prefix}/sbin/suexec \ --with-suexec-caller=%{with_suexec_caller} \ --with-suexec-userdir=%{with_suexec_userdir} \ - --with-suexec-logfile=%{l_prefix}/var/apache/log/suexec.log \ + --with-suexec-logfile=%{l_prefix}/var/apache2/log/suexec.log \ %endif %if "%{with_mod_deflate}" == "yes" --enable-deflate \ @@ -233,23 +233,40 @@ ) || exit $? %install - # install package + # install Apache rm -rf $RPM_BUILD_ROOT ( cd httpd-%{V_apache} %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT + rm -f $RPM_BUILD_ROOT%{l_prefix}/etc/apache2/apache2.conf + rm -fr $RPM_BUILD_ROOT%{l_prefix}/etc/apache2/{extra,original} ) || exit $? - # adjust configuration - %{l_shtool} subst \ - -e 's;^\(Listen\).*;\1 127.0.0.1:80;' \ - $RPM_BUILD_ROOT%{l_prefix}/etc/apache2/httpd.conf - %if "%{with_shared_core}" == "yes" %{l_shtool} subst \ -e 's;^build_libtool_libs=no;build_libtool_libs=yes;' \ $RPM_BUILD_ROOT%{l_prefix}/share/apache2/build/libtool %endif + # install shell environment script + %{l_shtool} install -c -m 644 %{l_value -s -a} \ + -e 's;@l_path@;%{l_build_path};' \ + -e 's;@l_ld_library_path@;%{l_build_ldlp};' \ + %{SOURCE apache2.sh} \ + $RPM_BUILD_ROOT%{l_prefix}/etc/apache2/ + + # create default configuration + l_hostname=`%{l_shtool} echo -e %h` + l_domainname=`%{l_shtool} echo -e %d | cut -c2-` + %{l_shtool} install -c -m 644 %{l_value -s -a} \ + -e "s;@l_hostname@;$l_hostname;g" \ + -e "s;@l_domainname@;$l_domainname;g" \ + %{SOURCE apache2.base} \ + %{SOURCE apache2.conf} \ + $RPM_BUILD_ROOT%{l_prefix}/etc/apache2/ + mv $RPM_BUILD_ROOT%{l_prefix}/etc/apache2/magic \ + $RPM_BUILD_ROOT%{l_prefix}/etc/apache2/mime.magic + %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/apache2/apache2.d + # install run-command script %{l_shtool} mkdir -f -p -m 755 \ $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d @@ -281,7 +298,8 @@ %if "%{with_suexec}" == "yes" '%attr(4755,%{l_susr},%{l_mgrp}) %{l_prefix}/sbin/suexec' \ %endif - '%config %{l_prefix}/etc/apache2/*' + '%config %{l_prefix}/etc/apache2/*' \ + '%config %attr(444,%{l_musr},%{l_mgrp}) %{l_prefix}/etc/apache2/apache2.base' %files -f files @@ . patch -p0 <<'@@ .' Index: openpkg-src/apache2/rc.apache2 ============================================================================ $ cvs diff -u -r1.12 -r1.13 rc.apache2 --- openpkg-src/apache2/rc.apache2 30 Jul 2004 14:03:01 -0000 1.12 +++ openpkg-src/apache2/rc.apache2 13 Apr 2006 15:54:27 -0000 1.13 @@ -5,13 +5,13 @@ %config apache2_enable="$openpkg_rc_def" - apache2_log_files="@l_prefix@/var/apache2/log/access_log" + apache2_log_files="@l_prefix@/var/apache2/log/access.log" apache2_log_rotsteps="10" apache2_log_rotminsize="10M" apache2_log_rotcomplevel="9" apache2_log_rotprolog="true" apache2_log_rotepilog="true" - apache2_err_files="@l_prefix@/var/apache2/log/error_log" + apache2_err_files="@l_prefix@/var/apache2/log/error.log" apache2_err_rotsteps="10" apache2_err_rotminsize="1M" apache2_err_rotcomplevel="9" @@ -19,7 +19,7 @@ apache2_err_rotepilog="true" %common - apache2_pidfile="@l_prefix@/var/apache2/run/httpd.pid" + apache2_pidfile="@l_prefix@/var/apache2/run/apache2.pid" apache2_signal () { [ -f $apache2_pidfile ] && kill -$1 `cat $apache2_pidfile` } @@ -27,7 +27,7 @@ %status -u @l_susr@ -o apache2_usable="no" apache2_active="no" - @l_prefix@/sbin/apachectl configtest 2>/dev/null && apache2_usable="yes" + @l_prefix@/sbin/apache2 -t 2>/dev/null && apache2_usable="yes" rcService apache2 enable yes && \ apache2_signal 0 && apache2_active="yes" echo "apache2_enable=\"$apache2_enable\"" @@ -37,18 +37,23 @@ %start -u @l_susr@ rcService apache2 enable yes || exit 0 rcService apache2 active yes && exit 0 - @l_prefix@/sbin/apachectl start + @l_prefix@/sbin/apache2 -k start %stop -u @l_susr@ rcService apache2 enable yes || exit 0 rcService apache2 active no && exit 0 - @l_prefix@/sbin/apachectl stop + @l_prefix@/sbin/apache2 -k stop sleep 2 %restart -u @l_susr@ rcService apache2 enable yes || exit 0 rcService apache2 active no && exit 0 - @l_prefix@/sbin/apachectl restart + @l_prefix@/sbin/apache2 -k restart + +%reload -u @l_susr@ + rcService apache2 enable yes || exit 0 + rcService apache2 active no && exit 0 + @l_prefix@/sbin/apache2 -k graceful %daily -u @l_susr@ rcService apache2 enable yes || exit 0 @@ -67,7 +72,7 @@ -E "$apache2_err_rotepilog; echo 1 >$hintfile" \ ${apache2_err_files} if [ -s $hintfile ]; then - @l_prefix@/sbin/apachectl restart + @l_prefix@/sbin/apache2 -k graceful fi rcTmp -k @@ . ______________________________________________________________________ The OpenPKG Project www.openpkg.org CVS Repository Commit List openpkg-cvs@openpkg.org