From owner-freebsd-ports-bugs@FreeBSD.ORG Sat Dec 4 21:20:07 2010 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D04C8106566B for ; Sat, 4 Dec 2010 21:20:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id EB0F58FC1F for ; Sat, 4 Dec 2010 21:20:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id oB4LK1iN091472 for ; Sat, 4 Dec 2010 21:20:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id oB4LK1Xk091471; Sat, 4 Dec 2010 21:20:01 GMT (envelope-from gnats) Resent-Date: Sat, 4 Dec 2010 21:20:01 GMT Resent-Message-Id: <201012042120.oB4LK1Xk091471@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Michael Ranner Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AE272106564A for ; Sat, 4 Dec 2010 21:12:16 +0000 (UTC) (envelope-from mranner@dwarf.jawa.at) Received: from dwarf.jawa.at (chello084115144088.4.graz.surfer.at [84.115.144.88]) by mx1.freebsd.org (Postfix) with ESMTP id AF3088FC08 for ; Sat, 4 Dec 2010 21:12:14 +0000 (UTC) Received: from dwarf.jawa.at (localhost.ranner.eu [127.0.0.1]) by dwarf.jawa.at (8.14.4/8.14.4) with ESMTP id oB4LCDG5046693; Sat, 4 Dec 2010 22:12:13 +0100 (CET) (envelope-from mranner@dwarf.jawa.at) Received: (from root@localhost) by dwarf.jawa.at (8.14.4/8.14.4/Submit) id oB4LCD8u046692; Sat, 4 Dec 2010 22:12:13 +0100 (CET) (envelope-from mranner) Message-Id: <201012042112.oB4LCD8u046692@dwarf.jawa.at> Date: Sat, 4 Dec 2010 22:12:13 +0100 (CET) From: Michael Ranner To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: yzlin@FreeBSD.org Subject: ports/152838: [PATCH] www/suphp: [Add support for lighttpd] X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Dec 2010 21:20:07 -0000 >Number: 152838 >Category: ports >Synopsis: [PATCH] www/suphp: [Add support for lighttpd] >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sat Dec 04 21:20:01 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Michael Ranner >Release: FreeBSD 8.1-RELEASE amd64 >Organization: >Environment: System: FreeBSD dwarf.jawa.at 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Mon Aug 23 20:22:23 CEST 2010 >Description: Add support for lighttpd Added file(s): - files/lighttpd-suphp.conf.in - files/pkg-message.in Removed file(s): - pkg-message Port maintainer (yzlin@FreeBSD.org) is cc'd. Generated with FreeBSD Port Tools 0.99 >How-To-Repeat: >Fix: --- suphp-0.7.1_4.patch begins here --- diff -ruN --exclude=CVS /usr/ports/www/suphp/Makefile /usr/ports/www/suphp.update/Makefile --- /usr/ports/www/suphp/Makefile 2010-12-04 08:34:00.000000000 +0100 +++ /usr/ports/www/suphp.update/Makefile 2010-12-04 22:03:54.000000000 +0100 @@ -7,26 +7,31 @@ PORTNAME= suphp PORTVERSION= 0.7.1 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= www MASTER_SITES= http://www.suphp.org/download/ \ ${MASTER_SITE_LOCAL:S|%SUBDIR%|koitsu|} MAINTAINER= yzlin@FreeBSD.org -COMMENT= Securely execute PHP scripts under Apache +COMMENT= Securely execute PHP scripts under Apache or lighttpd +OPTIONS= APACHE "Build with apache" on \ + LIGHTY "Build with lighttpd" off +SUB_FILES= pkg-message GNU_CONFIGURE= yes USE_AUTOTOOLS= aclocal:env automake:env autoconf:env libtool:env +.if defined(WITH_APACHE) # Maintainer has not tested suPHP 0.6.x on Apache 1.3. USE_APACHE= 2.0+ +.endif CFLAGS+= -I${LOCALBASE}/include USE_PHP= yes WANT_PHP_CGI= yes MYPORTDOCS= apache/CONFIG apache/INSTALL apache/README CONFIG LICENSE INSTALL README -CONFIGURE_ARGS= CFLAGS="${CFLAGS}" --with-apxs=${APXS} +CONFIGURE_ARGS= CFLAGS="${CFLAGS}" # WITH_SETID_MODE should be a value of "owner", "force", or "paranoid". # It's important that you understand the differences between each mode. @@ -37,12 +42,38 @@ .include +.if defined(WITH_APACHE) +CONFIGURE_ARGS+= --with-apxs=${APXS} +PLIST_FILES+= %%APACHEMODDIR%%/mod_suphp.so \ + "@exec %D/sbin/apxs -e -a -n suphp %D/%f" \ + "@unexec %D/sbin/apxs -e -A -n suphp %D/%f" +.else +LIB_DEPENDS+= apr-1:${PORTSDIR}/devel/apr1 +APR_CONFIG= ${LOCALBASE}/bin/apr-1-config +APU_CONFIG= ${LOCALBASE}/bin/apu-1-config +.endif + +.if defined(WITH_LIGHTY) +RUN_DEPENDS+= ${LOCALBASE}/sbin/lighttpd:${PORTSDIR}/www/lighttpd +PLIST_FILES+= etc/lighttpd/conf.d/suphp.conf.sample +.endif + CONFIGURE_ARGS+= --with-apr=${LOCALBASE} +.if defined(WITH_APACHE) +.if defined(WITH_LIGHTY) +BROKEN= choose only apache or lighttpd +.endif +.endif + post-patch: @${REINPLACE_CMD} -e 's|2.61|2.68|g' ${WRKSRC}/aclocal.m4 @${REINPLACE_CMD} -e 's|1.10.1|1.11.1|g' ${WRKSRC}/aclocal.m4 @${CHMOD} 755 ${WRKSRC}/config/install-sh +.if defined(WITH_LIGHTY) + ${SED} -e 's|%%LOCALBASE%%|${LOCALBASE}|' \ + <${FILESDIR}/lighttpd-suphp.conf.in >${WRKDIR}/lighttpd-suphp.conf +.endif post-install: .if !defined(NOPORTDOCS) @@ -56,6 +87,9 @@ @${STRIP_CMD} ${PREFIX}/sbin/suphp .endif @${INSTALL_DATA} ${WRKSRC}/doc/suphp.conf-example ${PREFIX}/etc/suphp.conf-example +.if defined(WITH_LIGHTY) + @${INSTALL_DATA} ${WRKDIR}/lighttpd-suphp.conf ${PREFIX}/etc/lighttpd/conf.d/suphp.conf.sample +.endif @${CAT} ${PKGMESSAGE} .include diff -ruN --exclude=CVS /usr/ports/www/suphp/distinfo /usr/ports/www/suphp.update/distinfo --- /usr/ports/www/suphp/distinfo 2009-03-20 08:33:13.000000000 +0100 +++ /usr/ports/www/suphp.update/distinfo 2010-12-04 21:49:05.000000000 +0100 @@ -1,3 +1,2 @@ -MD5 (suphp-0.7.1.tar.gz) = c172dd4f15a75f4dcb08ea97d4202bb8 SHA256 (suphp-0.7.1.tar.gz) = 91d180046f95f66c9ad12f3ca67bba87e2b64338543145e68370babc4434e58a SIZE (suphp-0.7.1.tar.gz) = 386521 diff -ruN --exclude=CVS /usr/ports/www/suphp/files/lighttpd-suphp.conf.in /usr/ports/www/suphp.update/files/lighttpd-suphp.conf.in --- /usr/ports/www/suphp/files/lighttpd-suphp.conf.in 1970-01-01 01:00:00.000000000 +0100 +++ /usr/ports/www/suphp.update/files/lighttpd-suphp.conf.in 2010-12-04 21:49:05.000000000 +0100 @@ -0,0 +1,49 @@ +####################################################################### +## +## suPHP config +## -------------- +## +## http://www.suphp.org/ +## + +## +## mod_setenv - required to create environment for suphp +## +#server.modules += ( "mod_setenv" ) + +## +## Setup suphp environment to handle php files +## +$HTTP["url"] =~ ".php$" { + setenv.add-environment = ( + "SUPHP_HANDLER" => "application/x-httpd-php" + ) +} + +## +## mod_cgi - required for suphp +## +#server.modules += ( "mod_cgi" ) + +## +## Uncomment to enable suphp to handle other cgi scripts +## +#$HTTP["url"] =~ ".pl|.py|.cgi$" { +# setenv.add-environment = ( +# "SUPHP_HANDLER" => "x-suphp-cgi" +# ) +#} + +## +## Assign suphp to handle php files +## +cgi.assign += ( + ## Uncomment the following if you want suphp to handle other cgi scripts + #".pl" => "%%LOCALBASE%%/sbin/suphp", + #".py" => "%%LOCALBASE%%/sbin/suphp", + #".cgi" => "%%LOCALBASE%%/sbin/suphp", + ".php" => "%%LOCALBASE%%/sbin/suphp" +) + +# +####################################################################### diff -ruN --exclude=CVS /usr/ports/www/suphp/files/pkg-message.in /usr/ports/www/suphp.update/files/pkg-message.in --- /usr/ports/www/suphp/files/pkg-message.in 1970-01-01 01:00:00.000000000 +0100 +++ /usr/ports/www/suphp.update/files/pkg-message.in 2010-12-04 22:09:57.000000000 +0100 @@ -0,0 +1,68 @@ +---------------------------------------------------------------- +For help on using this module, please see the suPHP homepage: + + http://www.suphp.org/ + +Using suPHP can break some PHP-scripts, because of Apache's CGI +interface. +----------------------------------------------------------------- + +----------------------------------------------------------------- +For those migrating from suPHP 0.5.x, be aware there are many +changes since 0.6.x that can cause your current Apache environment +to stop working or behave oddly. Here are two migration tips: + +suPHP now uses a configuration file for runtime configuration. +The file is located at: + + %%PREFIX%%/etc/suphp.conf + +...but *has not* been created for you. A sample configuration +file has been installed here: + + %%PREFIX%%/etc/suphp.conf-example + +This means that many of the make.conf(5) knobs for the +www/suphp port are no longer used, and are modifiable in +real-time; thus, things like WITHOUT_CHECKPATH and SUPHP_PATH +are no longer needed. Instead, edit the config file. + +Equally as important, suPHP no longer uses a static MIME type +for determining what content get handled by suPHP. In 0.5.x, +you used the following Apache directives: + + suPHP_Engine on + AddType application/x-httpd-php .php + AddHandler x-httpd-php .php + +Since suPHP 0.6.x, you should use the following: + + suPHP_Engine on + AddType application/x-httpd-php .php + suPHP_AddHandler application/x-httpd-php + +Otherwise, Apache will begin serving PHP files as downloadable +content, rather than parse them with the PHP interpreter. +----------------------------------------------------------------- + +----------------------------------------------------------------- +If you use suPHP for lighttpd, copy conf.d/suphp.conf.sample to +conf.d/suphp.conf and add + + include "conf.d/suphp.conf" + +to the lighttpd.conf file. +----------------------------------------------------------------- + +----------------------------------------------------------------- +For those versions upgraded from 0.6.x to 0.7.x. There are some +new features and changes for the configuration file: + + - Multiple path (with patterns) & variable substitution + support for docroots + - Double-quoted strings at section '[handlers]' + ex. application/x-httpd-php="php:%%PREFIX%%/bin/php-cgi" + +These changes may lead to internal server error if without +modifications of the configuration file from previous version. +----------------------------------------------------------------- diff -ruN --exclude=CVS /usr/ports/www/suphp/pkg-message /usr/ports/www/suphp.update/pkg-message --- /usr/ports/www/suphp/pkg-message 2009-03-20 08:33:13.000000000 +0100 +++ /usr/ports/www/suphp.update/pkg-message 1970-01-01 01:00:00.000000000 +0100 @@ -1,59 +0,0 @@ ----------------------------------------------------------------- -For help on using this module, please see the suPHP homepage: - - http://www.suphp.org/ - -Using suPHP can break some PHP-scripts, because of Apache's CGI -interface. ------------------------------------------------------------------ - ------------------------------------------------------------------ -For those migrating from suPHP 0.5.x, be aware there are many -changes since 0.6.x that can cause your current Apache environment -to stop working or behave oddly. Here are two migration tips: - -suPHP now uses a configuration file for runtime configuration. -The file is located at: - - /usr/local/etc/suphp.conf - -...but *has not* been created for you. A sample configuration -file has been installed here: - - /usr/local/etc/suphp.conf-example - -This means that many of the make.conf(5) knobs for the -www/suphp port are no longer used, and are modifiable in -real-time; thus, things like WITHOUT_CHECKPATH and SUPHP_PATH -are no longer needed. Instead, edit the config file. - -Equally as important, suPHP no longer uses a static MIME type -for determining what content get handled by suPHP. In 0.5.x, -you used the following Apache directives: - - suPHP_Engine on - AddType application/x-httpd-php .php - AddHandler x-httpd-php .php - -Since suPHP 0.6.x, you should use the following: - - suPHP_Engine on - AddType application/x-httpd-php .php - suPHP_AddHandler application/x-httpd-php - -Otherwise, Apache will begin serving PHP files as downloadable -content, rather than parse them with the PHP interpreter. ------------------------------------------------------------------ - ------------------------------------------------------------------ -For those versions upgraded from 0.6.x to 0.7.x. There are some -new features and changes for the configuration file: - - - Multiple path (with patterns) & variable substitution - support for docroots - - Double-quoted strings at section '[handlers]' - ex. application/x-httpd-php="php:/usr/local/bin/php-cgi" - -These changes may lead to internal server error if without -modifications of the configuration file from previous version. ------------------------------------------------------------------ diff -ruN --exclude=CVS /usr/ports/www/suphp/pkg-plist /usr/ports/www/suphp.update/pkg-plist --- /usr/ports/www/suphp/pkg-plist 2007-12-11 21:38:58.000000000 +0100 +++ /usr/ports/www/suphp.update/pkg-plist 2010-12-04 21:49:05.000000000 +0100 @@ -1,8 +1,5 @@ sbin/suphp etc/suphp.conf-example -%%APACHEMODDIR%%/mod_suphp.so -@exec %D/sbin/apxs -e -a -n suphp %D/%f -@unexec %D/sbin/apxs -e -A -n suphp %D/%f %%PORTDOCS%%%%DOCSDIR%%/INSTALL %%PORTDOCS%%%%DOCSDIR%%/LICENSE %%PORTDOCS%%%%DOCSDIR%%/README --- suphp-0.7.1_4.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted: