OpenPKG CVS Repository
http://cvs.openpkg.org/
____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall
Root: /e/openpkg/cvs Email: [EMAIL PROTECTED]
Module: openpkg-src openpkg-web Date: 27-Nov-2003 13:06:39
Branch: HEAD Handle: 2003112712063701
Modified files:
openpkg-src/apache apache.base apache.spec
openpkg-web news.txt
Log:
add optional suPHP support
Summary:
Revision Changes Path
1.12 +7 -0 openpkg-src/apache/apache.base
1.183 +50 -1 openpkg-src/apache/apache.spec
1.7558 +1 -0 openpkg-web/news.txt
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-src/apache/apache.base
============================================================================
$ cvs diff -u -r1.11 -r1.12 apache.base
--- openpkg-src/apache/apache.base 8 Oct 2003 09:45:42 -0000 1.11
+++ openpkg-src/apache/apache.base 27 Nov 2003 12:06:38 -0000 1.12
@@ -240,3 +240,10 @@
AddType application/x-httpd-php3 .php3
</IfModule>
+# suPHP support
+<IfModule mod_suphp.c>
+ suPHP_Engine on
+ suPHP_ConfigPath @l_prefix@/etc/php
+ AddHandler x-httpd-php .suphp
+</IfModule>
+
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/apache/apache.spec
============================================================================
$ cvs diff -u -r1.182 -r1.183 apache.spec
--- openpkg-src/apache/apache.spec 26 Nov 2003 07:32:54 -0000 1.182
+++ openpkg-src/apache/apache.spec 27 Nov 2003 12:06:38 -0000 1.183
@@ -49,6 +49,7 @@
%define V_mod_access_referer 1.0.2
%define V_mod_roaming 1.0.2
%define V_mod_relocate 1.0
+%define V_suphp 0.3.1
# package information
Name: apache
@@ -60,13 +61,17 @@
Group: Web
License: ASF
Version: %{V_apache}
-Release: 20031126
+Release: 20031127
# package options (suexec related)
%option with_suexec yes
%option with_suexec_caller %{l_nusr}
%option with_suexec_userdir public_html
+# package options (suphp related)
+%option with_suphp no
+%option with_suphp_caller %{l_nusr}
+
# package options (additionally used Apache modules; can be enabled without
thinking)
%option with_mod_ssl no
%option with_mod_perl no
@@ -195,12 +200,14 @@
Source13:
http://software.tangent.org/download/mod_relocate-%{V_mod_relocate}.tar.gz
Source14: http://www.php.net/distributions/php-%{V_mod_php3}.tar.gz
Source15:
http://www.muquit.com/muquit/software/mod_auth_ldap/mod_auth_ldap.tar.gz
+Source16: http://www.suphp.org/download/suphp-%{V_suphp}.tar.gz
Source20: apache.conf
Source21: apache.base
Source22: apache.vhost
Source23: apache.pl
Source24: rc.apache
Patch0: apache.patch
+Patch1: http://www.suphp.org/download/suphp-%{V_suphp}-solaris.patch
# build information
Prefix: %{l_prefix}
@@ -352,6 +359,10 @@
BuildPreReq: gdbm, gdbm::with_ndbm = yes
PreReq: gdbm, gdbm::with_ndbm = yes
%endif
+%if "%{with_suphp}" == "yes"
+BuildPreReq: php, gcc
+PreReq: php
+%endif
AutoReq: no
AutoReqProv: no
@@ -417,6 +428,10 @@
%if "%{with_mod_auth_ldap}" == "yes"
%setup15 -q -T -D -a 15
%endif
+%if "%{with_suphp}" == "yes"
+ %setup16 -q -T -D -a 16
+ %patch1 -p0
+%endif
%build
# prepare environment
@@ -817,6 +832,23 @@
) || exit $?
%endif
+ # optionally prepare mod_suphp
+%if "%{with_suphp}" == "yes"
+ ( cd suphp-%{V_suphp}
+ cp src/apache/mod_suphp.c ../apache_%{V_apache}/src/modules/extra/
+ chmod +rx configure
+ CC="%{l_cc}" \
+ CFLAGS="%{l_cflags -O}" \
+ ./configure \
+ --prefix=%{l_prefix} \
+ --with-apxs="" \
+ --with-apache-user=%{with_suphp_caller} \
+ --with-php=%{l_prefix}/cgi/php \
+ --with-logfile=%{l_prefix}/var/apache/log/suphp.log
+ %{l_make} %{l_mflags -O}
+ ) || exit $?
+%endif
+
# configure Apache
( cd apache_%{V_apache}
%if "%{with_debug}" == "yes"
@@ -847,6 +879,9 @@
ldflags="$ldflags %{l_ldflags}"
libs="$libs -lndbm -lgdbm"
%endif
+%if "%{with_suphp}" == "yes"
+ cflags="$cflags -DPATH_TO_SUPHP='\"%{l_prefix}/sbin/suphp\"'"
+%endif
CC="%{l_cc}" \
CFLAGS="$cflags" \
LDFLAGS="$ldflags" \
@@ -931,6 +966,9 @@
%if "%{with_mod_relocate}" == "yes"
--activate-module=src/modules/extra/mod_relocate.o \
%endif
+%if "%{with_suphp}" == "yes"
+ --activate-module=src/modules/extra/mod_suphp.o \
+%endif
--enable-module=so
%{l_make} %{l_mflags -O} build-quiet
) || exit $?
@@ -974,6 +1012,14 @@
rm -rf $RPM_BUILD_ROOT%{l_prefix}/lib/php/build
%endif
+ # optionally install suPHP wrapper binary
+%if "%{with_suphp}" == "yes"
+ ( cd suphp-%{V_suphp}
+ %{l_shtool} install -c -s -m 711 \
+ src/suphp $RPM_BUILD_ROOT%{l_prefix}/sbin/
+ ) || exit $?
+%endif
+
# create default configuration
l_hostname=`%{l_shtool} echo -e %h`
l_domainname=`%{l_shtool} echo -e %d | cut -c2-`
@@ -1003,6 +1049,9 @@
%{l_files_std} \
%if "%{with_suexec}" == "yes"
'%attr(4755,%{l_susr},%{l_mgrp}) %{l_prefix}/sbin/suexec' \
+%endif
+%if "%{with_suphp}" == "yes"
+ '%attr(4711,%{l_susr},%{l_mgrp}) %{l_prefix}/sbin/suphp' \
%endif
'%config %{l_prefix}/etc/apache/*' \
%if "%{with_mod_ssl}" == "yes"
@@ .
patch -p0 <<'@@ .'
Index: openpkg-web/news.txt
============================================================================
$ cvs diff -u -r1.7557 -r1.7558 news.txt
--- openpkg-web/news.txt 27 Nov 2003 10:48:20 -0000 1.7557
+++ openpkg-web/news.txt 27 Nov 2003 12:06:37 -0000 1.7558
@@ -1,3 +1,4 @@
+27-Nov-2003: Upgraded package: P<apache-1.3.29-20031127>
27-Nov-2003: New package: P<distcc-2.11.2-20031127>
27-Nov-2003: Upgraded package: P<gcc34-3.4s20031126-20031127>
27-Nov-2003: Upgraded package: P<db-4.2.50.0-20031127>
@@ .
______________________________________________________________________
The OpenPKG Project www.openpkg.org
CVS Repository Commit List [EMAIL PROTECTED]