ports/97047: www/suphp -- Maintainer update
Jeremy Chadwick
freebsd at jdc.parodius.com
Tue May 9 16:50:16 UTC 2006
>Number: 97047
>Category: ports
>Synopsis: www/suphp -- Maintainer update
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: maintainer-update
>Submitter-Id: current-users
>Arrival-Date: Tue May 09 16:50:10 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator: Jeremy Chadwick
>Release: FreeBSD 4.11-STABLE i386
>Organization:
Parodius Networking
>Environment:
System: FreeBSD pentarou.parodius.com 4.11-STABLE FreeBSD 4.11-STABLE #0: Thu Jan 12 01:50:11 PST 2006 root at pentarou.parodius.com:/usr/obj/usr/src/sys/PENTAROU i386
>Description:
Maintainer update for www/suphp. Changes include the following:
* major: Fix for recent ports/Mk PHP framework changes. Now
refers to the correct php-cgi binary and path
- Thanks to Miles Lubin for pointing this out!
* minor: Addition of SUPHP_PATH knob. Now the PATH envvar for
PHP scripts is tunable. Default is /bin:/usr/bin
- Requested by Miles Lubin
* minor: Cosmetical change of port description (COMMENT)
* minor: Cosmetical clean-up of pkg-descr; proper URI, too
Changes tested on 4.11-STABLE, but needs additional testing on
RELENG_5 and RELENG_6. Miles, can you test these for me?
>How-To-Repeat:
n/a
>Fix:
Apply below patch. If this doesn't apply cleanly (for some reason),
let me know and I'll put it up on the web or send a tarball instead.
diff -ruN /usr/ports/www/suphp.orig/Makefile /usr/ports/www/suphp/Makefile
--- /usr/ports/www/suphp.orig/Makefile Mon May 8 02:03:30 2006
+++ /usr/ports/www/suphp/Makefile Tue May 9 09:35:55 2006
@@ -7,12 +7,12 @@
PORTNAME= suphp
PORTVERSION= 0.5.2
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= www
MASTER_SITES= http://www.suphp.org/download/
MAINTAINER= freebsd at jdc.parodius.com
-COMMENT= Securely execute ~user PHP scripts
+COMMENT= Securely execute PHP scripts
GNU_CONFIGURE= yes
USE_PHP= yes
@@ -20,7 +20,7 @@
WANT_PHP_CGI= yes
WITH_LOGFILE?= /var/log/suphp.log
-PHP_PATH?= ${LOCALBASE}/bin/php
+PHP_PATH?= ${LOCALBASE}/bin/php-cgi
MIN_UID?= 80
MIN_GID?= 80
WITH_SETID_MODE?= owner
@@ -34,6 +34,14 @@
--with-min-uid=${MIN_GID} \
--with-apxs=${APXS}
+# This is the default of the PATH environment variable when scripts
+# are run under suphp. This path is normally hard-coded into suphp.c.
+# Many people prefer to have /usr/local and other utilities available
+# to php scripts.
+# Make sure the path is colon-delimited!
+#
+SUPHP_PATH?= /bin:/usr/bin
+
## Available knobs:
## WITHOUT_CHECKPATH: disable check if script resides in DOCUMENT_ROOT
.if defined(WITHOUT_CHECKPATH)
@@ -57,6 +65,10 @@
pre-everything:: show-options
@${DO_NADA}
+
+post-patch:
+ @${REINPLACE_CMD} -e 's|%%SUPHP_PATH%%|${SUPHP_PATH}|g' \
+ ${WRKSRC}/src/suphp.c
post-install:
.if !defined(NOPORTDOCS)
diff -ruN /usr/ports/www/suphp.orig/files/patch-src::suphp.c /usr/ports/www/suphp/files/patch-src::suphp.c
--- /usr/ports/www/suphp.orig/files/patch-src::suphp.c Wed Dec 31 16:00:00 1969
+++ /usr/ports/www/suphp/files/patch-src::suphp.c Tue May 9 09:32:50 2006
@@ -0,0 +1,11 @@
+--- src/suphp.c.orig Tue Jul 13 02:43:41 2004
++++ src/suphp.c Tue May 9 08:59:46 2006
+@@ -55,7 +55,7 @@
+
+ // Set secure PATH
+
+- suphp_setenv("PATH", "/bin:/usr/bin", 1);
++ suphp_setenv("PATH", "%%SUPHP_PATH%%", 1);
+
+ // Check for PHP_CONFIG environment variable
+
diff -ruN /usr/ports/www/suphp.orig/pkg-descr /usr/ports/www/suphp/pkg-descr
--- /usr/ports/www/suphp.orig/pkg-descr Tue Jun 24 23:50:52 2003
+++ /usr/ports/www/suphp/pkg-descr Tue May 9 08:49:06 2006
@@ -1,8 +1,9 @@
-suPHP is a combination of an Apache module (mod_suphp) and an executable
-which provides a wrapper for PHP. With both together, it is possible to
-execute PHP scripts with the permissions of their owner without having
-to place a PHP binary in each user's cgi-bin directory. suPHP doesn't
-need Apache's suExec, provides a logging function and support for
+suPHP is a combination of an Apache module (mod_suphp) and an
+executable which provides a wrapper for PHP. With both
+together, it is possible to execute PHP scripts with the
+permissions of their owner without having to place a PHP
+binary in each user's cgi-bin directory. suPHP doesn't need
+Apache's suExec, provides a logging function and support for
different php.ini's.
-WWW: http://www.suphp.org
+WWW: http://www.suphp.org/
diff -ruN /usr/ports/www/suphp.orig/pkg-message /usr/ports/www/suphp/pkg-message
--- /usr/ports/www/suphp.orig/pkg-message Tue Jun 24 23:50:52 2003
+++ /usr/ports/www/suphp/pkg-message Tue May 9 08:48:44 2006
@@ -3,7 +3,8 @@
for PHP for Apache.
For help on using this module, please see the suPHP homepage:
- http://www.suphp.org
+
+ http://www.suphp.org/
Important hints:
Using suPHP can break some PHP-scripts, because of Apache's CGI
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list