diff options
author | lawrance <lawrance@FreeBSD.org> | 2006-02-11 12:32:03 +0800 |
---|---|---|
committer | lawrance <lawrance@FreeBSD.org> | 2006-02-11 12:32:03 +0800 |
commit | 384733ded00765646f3dd0a2b76b1778e2e54205 (patch) | |
tree | 9fc1a0db4a50ace313becc114678735bc8e20ab7 /www | |
parent | 6f083fab2e76d46bbc0bab6810c869a7278f6a11 (diff) | |
download | freebsd-ports-gnome-384733ded00765646f3dd0a2b76b1778e2e54205.tar.gz freebsd-ports-gnome-384733ded00765646f3dd0a2b76b1778e2e54205.tar.zst freebsd-ports-gnome-384733ded00765646f3dd0a2b76b1778e2e54205.zip |
Allow frontpage ports to build with Apache 2.2.
PR: ports/91968
Submitted by: Scot Hetzel <swhetzel@gmail.com> (maintainer)
Diffstat (limited to 'www')
-rw-r--r-- | www/frontpage/Makefile | 2 | ||||
-rw-r--r-- | www/frontpage/files/frontpage.sh.in | 2 | ||||
-rw-r--r-- | www/frontpage/files/patch-fp_install.sh | 136 | ||||
-rw-r--r-- | www/frontpage/pkg-message | 2 | ||||
-rw-r--r-- | www/mod_frontpage-rtr/Makefile | 6 | ||||
-rw-r--r-- | www/mod_frontpage2-rtr/Makefile | 73 | ||||
-rw-r--r-- | www/mod_frontpage2-rtr/files/patch-apache2::mod_fpcgid.c | 105 | ||||
-rw-r--r-- | www/mod_frontpage2-rtr/files/patch-apache2::mod_frontpage.c | 81 | ||||
-rw-r--r-- | www/mod_frontpage2-rtr/pkg-message | 15 | ||||
-rw-r--r-- | www/mod_frontpage2-rtr/pkg-message13 | 17 | ||||
-rw-r--r-- | www/mod_frontpage2-rtr/pkg-plist | 3 |
11 files changed, 320 insertions, 122 deletions
diff --git a/www/frontpage/Makefile b/www/frontpage/Makefile index 1d90efc6d0ac..4d7f5b0dcac9 100644 --- a/www/frontpage/Makefile +++ b/www/frontpage/Makefile @@ -7,7 +7,7 @@ PORTNAME= frontpage PORTVERSION= 5.0.2.2635 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= www MASTER_SITES= # Needs to be manually fetched from http://www.rtr.com diff --git a/www/frontpage/files/frontpage.sh.in b/www/frontpage/files/frontpage.sh.in index 7568d83e0a57..f99e31c6f747 100644 --- a/www/frontpage/files/frontpage.sh.in +++ b/www/frontpage/files/frontpage.sh.in @@ -4,7 +4,7 @@ # PROVIDE: frontpage # REQUIRE: DAEMON -# BEFORE: apache +# BEFORE: apache apache20 apache21 apache22 # KEYWORD: FreeBSD # Define the following frontpage_* variables in one of the following: diff --git a/www/frontpage/files/patch-fp_install.sh b/www/frontpage/files/patch-fp_install.sh index 2c1b97be9287..4a34bbaafb37 100644 --- a/www/frontpage/files/patch-fp_install.sh +++ b/www/frontpage/files/patch-fp_install.sh @@ -1,5 +1,5 @@ --- frontpage/version5.0/fp_install.sh.orig Wed Jan 14 13:00:53 2004 -+++ frontpage/version5.0/fp_install.sh Sun Feb 6 18:34:34 2005 ++++ frontpage/version5.0/fp_install.sh Tue Jan 17 19:48:11 2006 @@ -13,7 +13,7 @@ main() { initialize @@ -137,26 +137,34 @@ echo "Please read the following license agreement (which can be found" echo "in $licensefile" echo -@@ -557,28 +552,36 @@ +@@ -553,32 +548,42 @@ + } + + # +-# Find out if this is an Apache 1.3 or Apache 2.0 installation ++# Find out if this is an Apache 1.3 or Apache 2.x installation # getapachevers() { - $echo "Which version of Apache will you be using? (1.3 or 2.0) ${nnl}" - read ApacheVers +- while [ "$ApacheVers" != "1.3" -a "$ApacheVers" != "2.0" ] + ApacheVers="" - while [ "$ApacheVers" != "1.3" -a "$ApacheVers" != "2.0" ] ++ while [ "$ApacheVers" != "1.3" -a "$ApacheVers" != "2.0" \ ++ -a "$ApacheVers" != "2.1" -a "$ApacheVers" != "2.2" ] do - $echo "Please enter either '1.3' or '2.0'" - $echo "Which version of Apache will you be using? (1.3 or 2.0) ${nnl}" -+ $echo "Which version of Apache will you be using? (1.3 or 2.0) [${DEFAULTVERSION}] ${nnl}" ++ $echo "Which version of Apache will you be using? (1.3 or 2.x) [${DEFAULTVERSION}] ${nnl}" read ApacheVers + if [ "$ApacheVers" = "" ] + then + ApacheVers=${DEFAULTVERSION} + fi -+ if [ "$ApacheVers" != "1.3" -a "$ApacheVers" != "2.0" ] ++ if [ "$ApacheVers" != "1.3" -a "$ApacheVers" != "2.0" \ ++ -a "$ApacheVers" != "2.1" -a "$ApacheVers" != "2.2" ] + then -+ echo "Please enter either '1.3' or '2.0'" ++ echo "Please enter either 1.3, 2.0, 2.1 or 2.2" + fi done @@ -182,7 +190,58 @@ read location if [ "$location" != "" ] then -@@ -946,6 +949,56 @@ +@@ -586,27 +591,30 @@ + fi + + # +- # We don't change the 1.3 behavior, but 2.0 requires apachectl, so ++ # We don't change the 1.3 behavior, but 2.x requires apachectl, so + # we double check +- if [ "$ApacheVers" = "2.0" -a `basename $HttpdFile` != "apachectl" ] +- then +- echo "Warning: The Apache control file you entered is not named 'apachectl'" +- myprompt 'yYnN' "Are you sure this is correct? (y/n)" "Y" +- +- if [ "$answer" != "y" -a "$answer" != "Y" ] +- then +- # Reset it +- HttpdFile="" +- fi +- fi +- +- if [ "$ApacheVers" = "1.3" ] +- then +- if [ ! -x "$HttpdFile" -o ! -f "$HttpdFile" ] +- then +- HttpdFile="" +- fi +- fi ++ case "$ApacheVers" in ++ 2.?) ++ if [ `basename $HttpdFile` != "apachectl" ] ++ then ++ echo "Warning: The Apache control file you entered is not named 'apachectl'" ++ myprompt 'yYnN' "Are you sure this is correct? (y/n)" "Y" ++ ++ if [ "$answer" != "y" -a "$answer" != "Y" ] ++ then ++ # Reset it ++ HttpdFile="" ++ fi ++ fi ++ ;; ++ ++ 1.3) ++ if [ ! -x "$HttpdFile" -o ! -f "$HttpdFile" ] ++ then ++ HttpdFile="" ++ fi ++ ;; ++ esac + + done + if [ "$ApacheVers" = "1.3" ] +@@ -946,6 +954,56 @@ return $retval } @@ -239,7 +298,7 @@ # examine weX.cnf file, make sure it is a patched apache server verifywebserver() { -@@ -964,27 +1017,22 @@ +@@ -964,27 +1022,22 @@ port=$webport echo "Verifying web server configuration..." @@ -278,7 +337,7 @@ fi getdocroot $weconfigfile || -@@ -993,28 +1041,41 @@ +@@ -993,28 +1046,41 @@ return 1 } @@ -336,7 +395,7 @@ return 1 fi -@@ -1088,7 +1149,7 @@ +@@ -1088,7 +1154,7 @@ echo "Skipping chown..." else servertype=`grep -i "^servertype:" $weconfigfile|sed -e 's/servertype://g'` @@ -345,7 +404,7 @@ then echo "Skipping non patched-apache web $weconfigfile" else -@@ -1120,10 +1181,9 @@ +@@ -1120,10 +1186,9 @@ echo echo "Processing webs in port $webport..." echo @@ -359,7 +418,7 @@ configfiledir=`dirname $configfile`"/" getdocroot $weconfigfile || -@@ -1364,10 +1424,9 @@ +@@ -1364,10 +1429,9 @@ port=$webport echo "Adding webs in port ${webport} to chown script..." @@ -373,7 +432,7 @@ configfiledir=`dirname $configfile`"/" getdocroot $weconfigfile || { -@@ -1474,11 +1533,16 @@ +@@ -1474,11 +1538,16 @@ configfile=$rootconfigfile return fi @@ -391,7 +450,7 @@ done rootconfigfile=$configfile } -@@ -1517,28 +1581,51 @@ +@@ -1517,28 +1586,51 @@ getrootconfigfile httpdconfigfile=$configfile @@ -449,7 +508,7 @@ webowner="" until [ "$webowner" != "" ] do -@@ -1553,6 +1640,12 @@ +@@ -1553,6 +1645,12 @@ echo getparam Group $configfile $port "Getting Group from " defgroup=$param @@ -462,7 +521,7 @@ webgroup="" until [ "$webgroup" != "" ] do -@@ -1670,6 +1763,113 @@ +@@ -1670,6 +1768,113 @@ return $retval } @@ -576,7 +635,7 @@ # Install a web on a multihosted server installvirtualwebs() { -@@ -1684,17 +1884,7 @@ +@@ -1684,17 +1889,7 @@ return $retval fi @@ -595,7 +654,7 @@ httpdconfigfile=$configfile getHttpRootDirective $configfile Port -@@ -1792,12 +1982,17 @@ +@@ -1792,12 +1987,17 @@ done webname="/" @@ -615,7 +674,7 @@ done servertype="apache-fp" -@@ -1880,9 +2075,9 @@ +@@ -1880,9 +2080,9 @@ echo servertype="apache-fp" @@ -628,7 +687,7 @@ configfiledir=`dirname $configfile`"/" getdocroot $weconfigfile || -@@ -1908,11 +2103,16 @@ +@@ -1908,11 +2108,16 @@ while $echo "Enter the web name (CTRL-D if no more webs): ${nnl}" read webname do @@ -646,7 +705,7 @@ done case "$webname" in -@@ -2113,42 +2313,43 @@ +@@ -2113,42 +2318,43 @@ weconfigfile=$1 servertype="apache-fp" @@ -719,7 +778,7 @@ fi else resconffile=$configfile -@@ -2274,7 +2475,7 @@ +@@ -2274,7 +2480,7 @@ print ARRAY[i] } } @@ -728,7 +787,7 @@ if [ "$param" = "" ] then -@@ -2340,22 +2541,22 @@ +@@ -2340,22 +2546,22 @@ # Apache 2.0 httpdmajor=2 fpversionoption="apache-2.0" @@ -761,7 +820,22 @@ return 0 elif [ $rtc -ne 0 ] then -@@ -2578,23 +2779,7 @@ +@@ -2403,10 +2609,11 @@ + NEWHTTPD=$NEWHTTPDNEW + + # First check for Apache 2 +- if [ "$ApacheVers" = "2.0" ] ++ if [ "$ApacheVers" = "2.0" -o "$ApacheVers" = "2.1" \ ++ -o "$ApacheVers" = "2.2" ] + then +- # It's Apache 2.0, check the details, and if ok, return. We don't +- # ship a prebuilt Apache 2.0, nor is there a patch to install ++ # It's Apache 2.x, check the details, and if ok, return. We don't ++ # ship a prebuilt Apache 2.x, nor is there a patch to install + checkVersion2 $installedApacheVers + rtc=$? + unset installedApacheVers +@@ -2578,23 +2785,7 @@ getModFpVersion1() { @@ -786,7 +860,7 @@ } checkModFpSo1() -@@ -2822,11 +3007,11 @@ +@@ -2822,11 +3013,11 @@ echo "This version of FrontPage requires either:" echo " Apache Version $sourceVersion" echo "or" @@ -800,7 +874,7 @@ echo "has been patched to work with FrontPage." myprompt 'yYnN' "Do you want to install this prebuilt version (y/n)" "N" if [ $answer = n ] || [ $answer = N ] -@@ -2908,22 +3093,6 @@ +@@ -2908,22 +3099,6 @@ installfpdso1() { @@ -823,7 +897,7 @@ echo "Using the Apache apxs utility to build mod_frontpage.so" CURPATH=$PATH PATH=$OLDPATH -@@ -2933,7 +3102,7 @@ +@@ -2933,7 +3108,7 @@ linux) opts=-Wc,-Dlinux ;; *) opts= ;; esac @@ -832,7 +906,7 @@ res=$? PATH=$CURPATH if [ $res -ne 0 ] -@@ -2943,7 +3112,7 @@ +@@ -2943,7 +3118,7 @@ echo "Using the Apache apxs utility to install mod_frontpage.so" PATH=$OLDPATH @@ -841,7 +915,7 @@ res=$? PATH=$CURPATH echo "Finished running the Apache apxs utility." -@@ -2953,22 +3122,6 @@ +@@ -2953,22 +3128,6 @@ installfpdso2() { @@ -864,7 +938,7 @@ echo "Using the Apache apxs utility to build mod_frontpage.so" CURPATH=$PATH PATH=$OLDPATH -@@ -2978,7 +3131,7 @@ +@@ -2978,7 +3137,7 @@ linux) opts=-Wc,-Dlinux ;; *) opts= ;; esac @@ -873,7 +947,7 @@ res=$? PATH=$CURPATH if [ $res -ne 0 ] -@@ -2987,7 +3140,7 @@ +@@ -2987,7 +3146,7 @@ fi echo "Using the Apache apxs utility to install mod_frontpage.so" PATH=$OLDPATH diff --git a/www/frontpage/pkg-message b/www/frontpage/pkg-message index 74390eed74df..e0f435830d37 100644 --- a/www/frontpage/pkg-message +++ b/www/frontpage/pkg-message @@ -9,4 +9,4 @@ Ports: Packages: mod_frontpage (Apache 1.3 DSO module, not from Microsoft) mod_frontpage13 (Apache 1.3 DSO module from Ready-to-Run) - mod_frontpage2 (Apache 2.x DSO module from Ready-to-Run) + mod_frontpage2x (Apache 2.x DSO module from Ready-to-Run) diff --git a/www/mod_frontpage-rtr/Makefile b/www/mod_frontpage-rtr/Makefile index bc2c73576e5c..c9dd6a8df23c 100644 --- a/www/mod_frontpage-rtr/Makefile +++ b/www/mod_frontpage-rtr/Makefile @@ -9,12 +9,10 @@ CATEGORIES= www MAINTAINER= swhetzel@gmail.com -WANT_APACHE= 13 - -PKGMESSAGE= ${MASTERDIR}/pkg-message13 +USE_APACHE= 13 .if defined(WITH_SSL) -AP_PORT= www/apache13-modssl +APACHE_PORT= www/apache13-modssl .endif MASTERDIR= ${.CURDIR}/../mod_frontpage2-rtr diff --git a/www/mod_frontpage2-rtr/Makefile b/www/mod_frontpage2-rtr/Makefile index 0d82cde50708..485053482a8c 100644 --- a/www/mod_frontpage2-rtr/Makefile +++ b/www/mod_frontpage2-rtr/Makefile @@ -7,10 +7,10 @@ PORTNAME= mod_frontpage PORTVERSION= 5.0.2.2635 -PORTREVISION= 0 +PORTREVISION= 1 CATEGORIES= www MASTER_SITES= # Requries manual fetch of files from http://www.rtr.com/ -PKGNAMESUFFIX= ${AP_VER} +PKGNAMESUFFIX= ${AP_VERSION:S/+//} DISTFILES= ${FRONTPAGE} MAINTAINER= swhetzel@gmail.com @@ -22,43 +22,44 @@ DIST_SUBDIR= fp${PORTVERSION:S/.//g} ONLY_FOR_ARCHS= i386 ia64 amd64 alpha sparc64 -USE_REINPLACE= yes +PATCH_WRKSRC= ${WRKDIR} -WANT_APACHE?= 2 +FPDIR= frontpage/version${FP_VER} -.include <bsd.port.pre.mk> -.include "${.CURDIR}/../apache20/Makefile.modules.3rd" -.include "${.CURDIR}/../frontpage/Makefile.fp.common" +EXTRACT_FILES= ${FPDIR}/apache-fp/mod_frontpage.c \ + ${FPDIR}/apache2/mod_fpcgid.c \ + ${FPDIR}/apache2/mod_fpcgid.h \ + ${FPDIR}/apache2/mod_frontpage.c \ + ${FPDIR}/apache2/mod_frontpage.h \ + ${FPDIR}/apache2/mod_suexec.h -.ifdef WITH_APACHE2 -FP_AP_VER= 2.0 -APACHE= apache2 -.else -FP_AP_VER= 1.3 -APACHE= apache -.endif +USE_APACHE?= 20+ +AP_FAST_BUILD= yes +AP_GENPLIST= yes + +AP_EXTRAS= -Wc,-DFreeBSD -FPDIR= frontpage/version${FP_VER} -FP_INSTALL= ${FPDIR}/fp_install.sh FP_SETPERM= ${FPDIR}/set_default_perms.sh .ifdef WITH_MODFP_COMPAT -FP_ARGS= -DIMPROVED_MODFP_COMPAT +AP_EXTRAS+= -DIMPROVED_MODFP_COMPAT .endif -.ifdef WITH_DISABLED -FP_ARGS+= -DDEFAULT_TO_OFF +.ifdef WITH_DISAPLED +AP_EXTRAS+= -DDEFAULT_TO_OFF .endif -NO_WRKSUBDIR= yes -EXTRACT_FILES= ${FPDIR}/apache-fp/mod_frontpage.c \ - ${FPDIR}/apache2/mod_fpcgid.c \ - ${FPDIR}/apache2/mod_fpcgid.h \ - ${FPDIR}/apache2/mod_frontpage.c \ - ${FPDIR}/apache2/mod_frontpage.h \ - ${FPDIR}/apache2/mod_suexec.h +.include <bsd.port.pre.mk> +.include "${.CURDIR}/../frontpage/Makefile.fp.common" -PLIST_SUB+= FP_VER=${FP_VER} \ - APACHE=${APACHE} +.if ${APACHE_VERSION} >= 20 +FP_AP_VER= 2.0 +WRKSRC= ${WRKDIR}/${FPDIR}/apache2 +SRC_FILE= mod_frontpage.c mod_fpcgid.c +.else +FP_AP_VER= 1.3 +WRKSRC= ${WRKDIR}/${FPDIR}/apache-fp +PKGMESSAGE= ${MASTERDIR}/pkg-message13 +.endif do-extract: @${RM} -rf ${WRKDIR} @@ -69,22 +70,6 @@ do-extract: exit 1; \ fi -do-build: -.ifdef WITH_APACHE2 - @${APXS} -c -Wc,-DFREEBSD ${FP_ARGS} ${WRKDIR}/${FPDIR}/apache2/mod_frontpage.c \ - ${WRKDIR}/${FPDIR}/apache2/mod_fpcgid.c -.else - @(cd ${WRKDIR}/${FPDIR}/apache-fp && \ - ${APXS} -c -Wc,-DFREEBSD ${FP_ARGS} ${WRKDIR}/${FPDIR}/apache-fp/mod_frontpage.c) -.endif - -do-install: -.ifdef WITH_APACHE2 - @${APXS} -i -a -n frontpage ${WRKDIR}/${FPDIR}/apache2/mod_frontpage.la -.else - @${APXS} -i -a -n frontpage ${WRKDIR}/${FPDIR}/apache-fp/mod_frontpage.so -.endif - post-install: .if (${PREFIX} != "/usr/local") @${CAT} ${PKGMESSAGE} | ${SED} -e 's|%%PREFIX%%|${PREFIX}|' diff --git a/www/mod_frontpage2-rtr/files/patch-apache2::mod_fpcgid.c b/www/mod_frontpage2-rtr/files/patch-apache2::mod_fpcgid.c index fb94895807a4..1d4a651bc729 100644 --- a/www/mod_frontpage2-rtr/files/patch-apache2::mod_fpcgid.c +++ b/www/mod_frontpage2-rtr/files/patch-apache2::mod_fpcgid.c @@ -1,15 +1,17 @@ ---- frontpage/version5.0/apache2/mod_fpcgid.c.orig Thu Jan 9 12:19:29 2003 -+++ frontpage/version5.0/apache2/mod_fpcgid.c Wed Feb 12 10:30:45 2003 -@@ -121,8 +121,6 @@ +--- frontpage/version5.0/apache2/mod_fpcgid.c-orig Fri Jun 27 15:18:28 2003 ++++ frontpage/version5.0/apache2/mod_fpcgid.c Tue Jan 17 18:01:02 2006 +@@ -120,8 +120,8 @@ + #include <sys/stat.h> #include <sys/un.h> /* for sockaddr_un */ - --module AP_MODULE_DECLARE_DATA frontpage_module; - +-module AP_MODULE_DECLARE_DATA frontpage_module; ++#include "mpm_common.h" ++#include "httpd.h" + #if 0 This section is not used in the FrontPage daemon. - static int cgid_init(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *main_server); -@@ -187,13 +185,6 @@ +@@ -187,13 +187,6 @@ #define DEFAULT_CONNECT_ATTEMPTS 15 #endif @@ -23,7 +25,16 @@ /* If a request includes query info in the URL (stuff after "?"), and * the query info does not contain "=" (indicative of a FORM submission), * then this routine is called to create the argument list to be passed -@@ -755,21 +746,42 @@ +@@ -685,7 +678,7 @@ + /* Bad things happened. Everyone should have cleaned up. */ + ap_log_rerror(APLOG_MARK, APLOG_ERR|APLOG_TOCLIENT, rc, r, + "couldn't create child process: %d: %s", rc, +- apr_filename_of_pathname(r->filename)); ++ apr_filepath_name_get(r->filename)); + } + } + frontpage_closePipeWrite(&pipe_info); +@@ -755,9 +748,12 @@ void* fpcreate_cgid_config(apr_pool_t *p, server_rec *s) { @@ -31,21 +42,14 @@ - (cgid_server_conf *) apr_pcalloc(p, sizeof(cgid_server_conf)); + cgid_server_conf *c; -- c->logname = NULL; -- c->logbytes = DEFAULT_LOGBYTES; -- c->bufbytes = DEFAULT_BUFBYTES; -- c->sockname = ap_server_root_relative(p, DEFAULT_SOCKET); -- return c; + c = (cgid_server_conf *) apr_pcalloc(p, sizeof(cgid_server_conf)); + + c->fp_status = -1; + c->fp_admin_status = -1; -+ c->logname = NULL; -+ c->logbytes = DEFAULT_LOGBYTES; -+ c->bufbytes = DEFAULT_BUFBYTES; -+ c->sockname = ap_server_root_relative(p, DEFAULT_SOCKET); -+ return c; - } + c->logname = NULL; + c->logbytes = DEFAULT_LOGBYTES; + c->bufbytes = DEFAULT_BUFBYTES; +@@ -767,9 +763,27 @@ void* fpmerge_cgid_config(apr_pool_t *p, void *basev, void *overridesv) { @@ -75,7 +79,7 @@ } static const char *set_scriptlog(cmd_parms *cmd, void *dummy, const char *arg) -@@ -823,8 +835,76 @@ +@@ -823,8 +837,76 @@ return NULL; } @@ -152,3 +156,64 @@ AP_INIT_TAKE1("FPScriptLog", set_scriptlog, NULL, RSRC_CONF, "the name of a log for script debugging info"), AP_INIT_TAKE1("FPScriptLogLength", set_scriptlog_length, NULL, RSRC_CONF, +@@ -935,12 +1017,13 @@ + apr_file_printf(f, "%s\n", sbuf); + + first = 1; +- APR_BRIGADE_FOREACH(e, bb) { ++ e = APR_BRIGADE_FIRST(bb); ++ while (e != APR_BRIGADE_SENTINEL(bb)) { + if (APR_BUCKET_IS_EOS(e)) { + break; + } + rv = apr_bucket_read(e, &buf, &len, APR_BLOCK_READ); +- if (!APR_STATUS_IS_SUCCESS(rv) || (len == 0)) { ++ if ((rv != APR_SUCCESS) || (len == 0)) { + break; + } + if (first) { +@@ -949,6 +1032,7 @@ + } + apr_file_write(f, buf, &len); + apr_file_puts("\n", f); ++ e = APR_BUCKET_NEXT(e); + } + + if (script_err) { +@@ -1036,14 +1120,16 @@ + const char *buf; + apr_size_t len; + apr_status_t rv; +- APR_BRIGADE_FOREACH(e, bb) { ++ e = APR_BRIGADE_FIRST(bb); ++ while (e != APR_BRIGADE_SENTINEL(bb)) { + if (APR_BUCKET_IS_EOS(e)) { + break; + } + rv = apr_bucket_read(e, &buf, &len, APR_BLOCK_READ); +- if (!APR_STATUS_IS_SUCCESS(rv)) { ++ if (rv != APR_SUCCESS) { + break; + } ++ e = APR_BUCKET_NEXT(e); + } + } + +@@ -1179,7 +1265,8 @@ + return rv; + } + +- APR_BRIGADE_FOREACH(bucket, bb) { ++ bucket = APR_BRIGADE_FIRST(bb); ++ while (bucket != APR_BRIGADE_SENTINEL(bb)) { + const char *data; + apr_size_t len; + +@@ -1223,6 +1310,7 @@ + /* silly script stopped reading, soak up remaining message */ + child_stopped_reading = 1; + } ++ bucket = APR_BUCKET_NEXT(bucket); + } + apr_brigade_cleanup(bb); + } diff --git a/www/mod_frontpage2-rtr/files/patch-apache2::mod_frontpage.c b/www/mod_frontpage2-rtr/files/patch-apache2::mod_frontpage.c index 39973b181ca0..812a64a055c8 100644 --- a/www/mod_frontpage2-rtr/files/patch-apache2::mod_frontpage.c +++ b/www/mod_frontpage2-rtr/files/patch-apache2::mod_frontpage.c @@ -1,6 +1,14 @@ ---- frontpage/version5.0/apache2/mod_frontpage.c.orig Thu Jan 9 12:19:30 2003 -+++ frontpage/version5.0/apache2/mod_frontpage.c Wed Feb 12 11:29:29 2003 -@@ -578,6 +578,32 @@ +--- frontpage/version5.0/apache2/mod_frontpage.c-orig Tue Dec 2 20:18:45 2003 ++++ frontpage/version5.0/apache2/mod_frontpage.c Tue Jan 17 18:01:02 2006 +@@ -62,7 +62,6 @@ + #include <dirent.h> + #include <errno.h> + #include <unistd.h> +-#include "apr_compat.h" + #include "apr_strings.h" + #include "http_log.h" + +@@ -590,6 +589,32 @@ * Thanks to Scot Hetzel (hetzels@westbend.net) */ ap_add_version_component(p, "FrontPage/5.0.2.2635"); @@ -33,7 +41,47 @@ return OK; } -@@ -836,6 +862,27 @@ +@@ -781,20 +806,20 @@ + return DECLINED; + + /* +- * Note: ap_pstrdup allocates memory, but it checks for out of memory ++ * Note: apr_pstrdup allocates memory, but it checks for out of memory + * conditions - it will not return if out of memory. + */ +- r->handler = ap_pstrdup(r->pool, "cgi-script"); +- ap_table_set(r->notes, "alias-forced-type", r->handler); ++ r->handler = apr_pstrdup(r->pool, "cgi-script"); ++ apr_table_set(r->notes, "alias-forced-type", r->handler); + +- ap_table_set(r->subprocess_env, "FPEXE", ap_pstrdup(r->pool, szFpexe)); ++ apr_table_set(r->subprocess_env, "FPEXE", apr_pstrdup(r->pool, szFpexe)); + sprintf(szBuf, "%d", webroot.st_uid ); +- ap_table_set(r->subprocess_env, "FPUID", ap_pstrdup(r->pool, szBuf)); ++ apr_table_set(r->subprocess_env, "FPUID", apr_pstrdup(r->pool, szBuf)); + sprintf(szBuf, "%d", webroot.st_gid ); +- ap_table_set(r->subprocess_env, "FPGID", ap_pstrdup(r->pool, szBuf)); ++ apr_table_set(r->subprocess_env, "FPGID", apr_pstrdup(r->pool, szBuf)); + +- ap_table_set(r->notes,"FPexecfilename", ap_pstrcat(r->pool, FPSTUB, NULL)); +- r->filename = ap_pstrcat(r->pool, r->filename, szCgi, NULL); ++ apr_table_set(r->notes,"FPexecfilename", apr_pstrcat(r->pool, FPSTUB, NULL)); ++ r->filename = apr_pstrcat(r->pool, r->filename, szCgi, NULL); + + return OK; + } +@@ -836,8 +861,8 @@ + sprintf(szBuf, "/%04d", iLcid); + + /* see the note in FrontPageAlias */ +- execFilename = ap_pstrcat(r->pool, FP, szDir, szBuf, szBase, NULL); +- ap_table_set(r->notes,"FPexecfilename", execFilename); ++ execFilename = apr_pstrcat(r->pool, FP, szDir, szBuf, szBase, NULL); ++ apr_table_set(r->notes,"FPexecfilename", execFilename); + /* We need to set the finfo field now. Otherwise Apache will set + the path_info field automatically but incorrectly, which will result + in the wrong file being checked. +@@ -849,6 +874,27 @@ /* @@ -61,7 +109,7 @@ * This routine looks for shtml.exe, fpcount.exe, author.exe and admin.exe * in a URI, and if found we call FrontPageAlias() to check for a valid * FrontPage scenario. -@@ -847,6 +894,7 @@ +@@ -860,6 +906,7 @@ { char* szVti; char* szCgi; @@ -69,7 +117,7 @@ /* * Decline if we're improperly initialized. -@@ -855,6 +903,13 @@ +@@ -868,6 +915,13 @@ return DECLINED; /* @@ -83,7 +131,7 @@ * Check once for anything with _vti_bin. This is much faster than * checking all our paths, because anything without this is definitely * not a FrontPage scenario. -@@ -875,7 +930,7 @@ +@@ -888,7 +942,7 @@ return FrontPageAlias(r, szCgi, AUTHOR); /* * Convert inadvertent shtml.dll to shtml.exe @@ -92,7 +140,7 @@ */ if ((szCgi = strstr(szVti, SHTML2 ))) { -@@ -885,9 +940,17 @@ +@@ -898,9 +952,17 @@ if ((szCgi = strstr(szVti, SHTML ))) return FrontPageAlias(r, szCgi, SHTML); if ((szCgi = strstr(szVti, ADMIN ))) @@ -112,3 +160,20 @@ if ((szCgi = strstr(szVti, FPCOUNT))) return FrontPageAlias(r, szCgi, FPCOUNT); +@@ -939,13 +1001,13 @@ + static int FrontPageFixup(request_rec *r) + { + +- if (!ap_table_get(r->notes, "FPexecfilename")) ++ if (!apr_table_get(r->notes, "FPexecfilename")) + { + FrontPageXlate(r); + } +- if (ap_table_get(r->notes,"FPexecfilename")) ++ if (apr_table_get(r->notes,"FPexecfilename")) + { +- r->filename = (char*) ap_table_get(r->notes,"FPexecfilename"); ++ r->filename = (char*) apr_table_get(r->notes,"FPexecfilename"); + apr_stat(&r->finfo, r->filename, APR_FINFO_MIN, r->pool); + } + diff --git a/www/mod_frontpage2-rtr/pkg-message b/www/mod_frontpage2-rtr/pkg-message index 4d4091408320..4b594c9a71e9 100644 --- a/www/mod_frontpage2-rtr/pkg-message +++ b/www/mod_frontpage2-rtr/pkg-message @@ -2,6 +2,13 @@ 1.) +The Frontpage module has been added to your Apache httpd.conf file, +as an inactive module. To activate this module: + + apxs -e -a -n frontpage mod_frontpage.so + +2.) + You'll need to change the AllowOverride directive in %%PREFIX%%/etc/apache2/httpd.conf under the default web from None to at least "AuthConfig Limit Indexes Options". @@ -20,7 +27,7 @@ You'll also need to change the AllowOverride Directive on all virtual hosts that you are going to enable with Frontpage Extentions. -2.) +3.) You can turn the extensions and the frontpage administration on/off per site in httpd.conf and per virtual server. @@ -43,7 +50,7 @@ FrontPageAdminEnable # Same as 'FrontPageAdmin On' FrontPageAdminDisable # Same as 'FrontPageAdmin Off' -3.) +4.) If this is a fresh Apache install, you should remove the symbolic link to the %%PREFIX%%/www/data directory, and create a real directory. @@ -52,7 +59,7 @@ rm %%PREFIX%%/www/data mkdir %%PREFIX%%/www/data -4.) +5.) After you have made these changes, you'll need to execute: @@ -70,7 +77,7 @@ check the document root for .htaccess files. Rename them, and then combine them with the .htaccess files created by the frontpage install. -5.) +6.) If you have installed the port in another PREFIX than "/usr/local" you have to create a symlink. Microsoft has hardcoded the local diff --git a/www/mod_frontpage2-rtr/pkg-message13 b/www/mod_frontpage2-rtr/pkg-message13 index 72fc01f10b0c..da70af0e46b3 100644 --- a/www/mod_frontpage2-rtr/pkg-message13 +++ b/www/mod_frontpage2-rtr/pkg-message13 @@ -2,6 +2,13 @@ 1.) +The Frontpage module has been added to your Apache httpd.conf file, +as an inactive module. To activate this module: + + apxs -e -a -n frontpage mod_frontpage.so + +2.) + Check your httpd.conf, if you have included a ResourceConfig and AccessConfig. If you do not have these files, you'll have to add these lines to make the frontpage extensions work properly. These @@ -13,7 +20,7 @@ ResourceConfig /dev/null AccessConfig /dev/null -2.) +3.) You'll need to change the AllowOverride directive under the default web from None to at least "AuthConfig Limit Indexes Options". @@ -32,7 +39,7 @@ You'll also need to change the AllowOverride Directive on all virtual hosts that you are going to enable with Frontpage Extentions. -3.) +4.) You can turn the extensions and the frontpage administration on/off per site in httpd.conf and per virtual server. @@ -55,7 +62,7 @@ FrontPageAdminEnable # Same as 'FrontPageAdmin On' FrontPageAdminDisable # Same as 'FrontPageAdmin Off' -4.) +5.) If this is a fresh Apache install, you should remove the symbolic link to the %%PREFIX%%/www/data directory, and create a real directory. @@ -64,7 +71,7 @@ rm %%PREFIX%%/www/data mkdir %%PREFIX%%/www/data -5.) +6.) After you have made these changes, you'll need to execute: @@ -82,7 +89,7 @@ check the document root for .htaccess files. Rename them, and then combine them with the .htaccess files created by the frontpage install. -6.) +7.) If you have installed the port in another PREFIX than "/usr/local" you have to create a symlink. Microsoft has hardcoded the local diff --git a/www/mod_frontpage2-rtr/pkg-plist b/www/mod_frontpage2-rtr/pkg-plist deleted file mode 100644 index 1649e81d4c15..000000000000 --- a/www/mod_frontpage2-rtr/pkg-plist +++ /dev/null @@ -1,3 +0,0 @@ -@unexec %D/sbin/apxs -e -A -n frontpage %D/libexec/%%APACHE%%/mod_frontpage.so -libexec/%%APACHE%%/mod_frontpage.so -@exec %D/sbin/apxs -e -a -n frontpage %D/libexec/%%APACHE%%/mod_frontpage.so |