ports/70345: suphp portupdate

Jeremy Chadwick freebsd at jdc.parodius.com
Thu Aug 12 05:30:03 UTC 2004


>Number:         70345
>Category:       ports
>Synopsis:       suphp portupdate
>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:   Thu Aug 12 05:30:02 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Jeremy Chadwick
>Release:        FreeBSD 4.10-PRERELEASE i386
>Organization:
Parodius Networking
>Environment:
System: FreeBSD pentarou.parodius.com 4.10-PRERELEASE FreeBSD 4.10-PRERELEASE #0: Wed May 5 03:33:17 PDT 2004 root at pentarou.parodius.com:/usr/obj/usr/src/sys/PENTAROU i386
>Description:
	In lieu of this PR, please close PR #69662 (now outdated/deprecated),
	and PR #70286 (the claim is incorrect).  This PR has precedence.

	The included diff below should update suphp to fix the "make -C" problem
	in it's entirety (to work on all FreeBSD systems), and clean up some of
	the stock suphp Makefiles and what not.

	I've tested this diff on Apache 1.3.x and Apache 2.0.x, on both -STABLE
	and -CURRENT.  It works as expected.
>How-To-Repeat:
	n/a
>Fix:
	Apply below patch.


diff -ruN suphp.orig/Makefile suphp/Makefile
--- suphp.orig/Makefile	Sun Aug  1 02:48:19 2004
+++ suphp/Makefile	Wed Aug 11 22:06:16 2004
@@ -7,22 +7,21 @@
 
 PORTNAME=	suphp
 PORTVERSION=	0.5.2
+PORTREVISION=	1
 CATEGORIES=	www
 MASTER_SITES=	http://www.suphp.org/download/
 
 MAINTAINER=	freebsd at jdc.parodius.com
-COMMENT=	A combination which provides a wrapper for PHP
+COMMENT=	Securely execute ~user PHP scripts
 
 GNU_CONFIGURE=	yes
-USE_GMAKE=	yes
 USE_PHP=	yes
-WANT_PHP_CGI=	yes
 USE_APACHE=	yes
+WANT_PHP_CGI=	yes
 CONFLICTS=	mod_php4-4* php-4.*
 
-LOGFILE?=	/var/log/suphp.log
+WITH_LOGFILE?=	/var/log/suphp.log
 PHP_PATH?=	${LOCALBASE}/bin/php
-APACHE_USER?=	${WWWOWN}
 MIN_UID?=	80
 MIN_GID?=	80
 WITH_SETID_MODE?=	owner
@@ -31,37 +30,29 @@
 LANG=		en de
 
 CONFIGURE_ARGS+=	--with-php=${PHP_PATH} \
-			--with-logfile=${LOGFILE} \
-			--with-apache-user=${APACHE_USER} \
+			--with-logfile=${WITH_LOGFILE} \
+			--with-apache-user=${WWWOWN} \
 			--with-min-gid=${MIN_UID} \
 			--with-min-uid=${MIN_GID} \
 			--with-apxs=${APXS}
 
 ## Available knobs:
-##   WITHOUT_CHECKPATH: disable check if script resides in DOCUMENT_ROOT
+##   WITHOUT_CHECKPATH:    disable check if script resides in DOCUMENT_ROOT
 .if defined(WITHOUT_CHECKPATH)
 CONFIGURE_ARGS+=	--disable-checkpath
 .endif
-##   WITHOUT_CHECKUID: accept UIDs that are not listed in /etc/passwd
+##   WITHOUT_CHECKUID:     accept UIDs that are not listed in /etc/passwd
 .if defined(WITHOUT_CHECKUID)
 CONFIGURE_ARGS+=	--disable-checkuid
 .endif
-##   WITHOUT_CHECKGID: accept GIDs that are not listed in /etc/group
+##   WITHOUT_CHECKGID:     accept GIDs that are not listed in /etc/group
 .if defined(WITHOUT_CHECKGID)
 CONFIGURE_ARGS+=	--disable-checkgid
 .endif
-##   WITH_SETID_MODE: Mode to use for setting UID/GID.
+##   WITH_SETID_MODE:      mode to use for setting UID/GID.
 CONFIGURE_ARGS+=	--with-setid-mode=${WITH_SETID_MODE}
 
 .include <bsd.port.pre.mk>
-
-##
-## Sanity check; -C flag for make(1) was added in 4.8, but was not
-## fully fixed until shortly before 4.9-RELEASE.  We need -C !
-##
-.if ${OSVERSION} < 490000
-BROKEN=	Please upgrade to FreeBSD 4.9-RELEASE or higher \(see PR bin/50981\).
-.endif
 
 .if exists(${LOCALBASE}/include/apache2/apr.h) || defined(WITH_APACHE2)
 APACHE_PORT=	www/apache2
diff -ruN suphp.orig/files/patch-src::Makefile.in suphp/files/patch-src::Makefile.in
--- suphp.orig/files/patch-src::Makefile.in	Sat Jul 17 10:34:03 2004
+++ suphp/files/patch-src::Makefile.in	Wed Aug 11 22:03:42 2004
@@ -1,6 +1,6 @@
---- src/Makefile.in.orig	Mon Aug 25 11:50:48 2003
-+++ src/Makefile.in	Thu Jul 15 22:52:13 2004
-@@ -28,11 +28,13 @@
+--- src/Makefile.in.orig	Tue Jul 13 02:43:41 2004
++++ src/Makefile.in	Wed Aug 11 22:02:44 2004
+@@ -28,37 +28,38 @@
  INCLUDES = -I$(top_srcdir)/src
  RM = rm -f
  
@@ -17,7 +17,18 @@
  
  suphp.mod:
  	@if test "$(APXS)" != "/notfound/"; then \
-@@ -49,7 +51,6 @@
+ 	  if test "$(APACHE_VERSION_2)" = "true"; then \
+ 	    echo "*** INFO: Building mod_suphp for Apache 2.0 ***"; \
+-	    $(MAKE) $(MAKEDEFS) -C apache2; \
++	    cd apache2 && $(MAKE) $(MAKEDEFS); \
+ 	  fi; \
+ 	  if test "$(APACHE_VERSION_1_3)" = "true"; then \
+ 	    echo "*** INFO: Building mod_suphp for Apache 1.3 ***"; \
+-	    $(MAKE) $(MAKEDEFS) -C apache; \
++	    cd apache && $(MAKE) $(MAKEDEFS); \
+ 	  fi; \
+ 	else \
+ 	  echo "*** WARNING: No 'apxs' found. Skipping mod_suphp! ***"; \
  	fi
  
  install: suphp suphp.mod
@@ -25,9 +36,25 @@
  	$(INSTALL_PROGRAM) -m 4755 suphp $(DESTDIR)$(sbindir)/suphp
  	@if test "$(APXS)" != "/notfound/"; then \
  	  if test "$(APACHE_VERSION_2)" = "true"; then \
-@@ -69,6 +70,6 @@
- 	@$(MAKE) $(MAKEDEFS) -C apache clean
- 	@$(MAKE) $(MAKEDEFS) -C apache2 clean
+ 	    echo "*** INFO: Installing mod_suphp for Apache 2.0 ***"; \
+-	    $(MAKE) $(MAKEDEFS) -C apache2 install; \
++	    cd apache2 && $(MAKE) $(MAKEDEFS) install; \
+ 	  fi; \
+ 	  if test "$(APACHE_VERSION_1_3)" = "true"; then \
+ 	    echo "*** INFO: Installing mod_suphp for Apache 1.3 ***"; \
+-	    $(MAKE) $(MAKEDEFS) -C apache install; \
++	    cd apache && $(MAKE) $(MAKEDEFS) install; \
+ 	  fi; \
+ 	else \
+ 	  echo "*** WARNING: No 'apxs' found. Skipping installation of mod_suphp! ***"; \
+@@ -66,9 +67,9 @@
+ 
+ clean:
+ 	$(RM) suphp *.o
+-	@$(MAKE) $(MAKEDEFS) -C apache clean
+-	@$(MAKE) $(MAKEDEFS) -C apache2 clean
++	cd apache && $(MAKE) $(MAKEDEFS) clean
++	cd apache2 && $(MAKE) $(MAKEDEFS) clean
  
 -%.o : %.c
 +${OBJS}: ${SRCS}
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list