diff options
author | jedgar <jedgar@FreeBSD.org> | 2001-08-31 19:42:17 +0800 |
---|---|---|
committer | jedgar <jedgar@FreeBSD.org> | 2001-08-31 19:42:17 +0800 |
commit | d0f66b46964f19e6a9c122251b46f793836fb568 (patch) | |
tree | 4b6a00889c47d6c0b5a39f5b313ea2cb5b121c9f /www/mod_frontpage/files | |
parent | c2fdddb95f858ed0f4d91e5e8f9325b7b61f961b (diff) | |
download | freebsd-ports-graphics-d0f66b46964f19e6a9c122251b46f793836fb568.tar.gz freebsd-ports-graphics-d0f66b46964f19e6a9c122251b46f793836fb568.tar.zst freebsd-ports-graphics-d0f66b46964f19e6a9c122251b46f793836fb568.zip |
Add mod_frontpage, a modular version of FrontPage extentions.
PR: 29202
Submitted by: Martin Blapp <mb@imp.ch>
Diffstat (limited to 'www/mod_frontpage/files')
-rw-r--r-- | www/mod_frontpage/files/apache.sh.sample | 58 | ||||
-rw-r--r-- | www/mod_frontpage/files/patch-aa | 64 | ||||
-rw-r--r-- | www/mod_frontpage/files/patch-fa | 52 | ||||
-rw-r--r-- | www/mod_frontpage/files/patch-fb | 293 | ||||
-rw-r--r-- | www/mod_frontpage/files/patch-fn | 15 |
5 files changed, 482 insertions, 0 deletions
diff --git a/www/mod_frontpage/files/apache.sh.sample b/www/mod_frontpage/files/apache.sh.sample new file mode 100644 index 00000000000..8b5a24f5e18 --- /dev/null +++ b/www/mod_frontpage/files/apache.sh.sample @@ -0,0 +1,58 @@ +#!/bin/sh + +if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then + echo "$0: Cannot determine the PREFIX" >&2 + exit 1 +fi + +# +# Create New FrontPage suidkey +# + +new_key() { + + CUR_UMASK=`umask` + skdir=${PREFIX}/frontpage/version4.0/apache-fp + PERL=PERL5 + + if [ -x ${PREFIX}/libexec/apache/mod_frontpage.so ] + then + + #NOTE: We need Perl 5, to generate a new key + if [ -x ${PERL} ] + then + umask 077 + ${PERL} -e '@a=(split(//, "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*-=_+")); print((map {$a[rand(scalar @a)]} (1..128)), "\n");' > $skdir/suidkey + umask ${CUR_UMASK} + fi + fi + +} + +# +# Main +# + +case "$1" in + +start) + if [ -x ${PREFIX}/sbin/apachectl ] + then + new_key + ${PREFIX}/sbin/apachectl start && echo -n ' httpd' + fi + ;; + +stop) + if [ -r /var/run/httpd.pid ] + then + ${PREFIX}/sbin/apachectl stop && echo -n ' httpd' + fi + ;; + +*) + echo "usage: $0 {start|stop}" 1>&2 + exit 64 + ;; + +esac diff --git a/www/mod_frontpage/files/patch-aa b/www/mod_frontpage/files/patch-aa new file mode 100644 index 00000000000..499466005a4 --- /dev/null +++ b/www/mod_frontpage/files/patch-aa @@ -0,0 +1,64 @@ +--- DSO/Makefile.PL.orig Tue Jul 24 23:01:08 2001 ++++ DSO/Makefile.PL Tue Jul 24 23:02:58 2001 +@@ -4,26 +4,7 @@ + # You can use it according to the Apache licence
+ # Please send modifications to: <jmdault@mandrakesoft.com> so other
+ # modules can benefit from it!
+-
+-print "Enter the path of your httpd binary.\n";
+-print "It should be something like /usr/local/apache/bin).\n";
+-print "If you don't know, enter the word 'findit'. I will try to look\n";
+-print "for you... but it will take a few minutes.\n";
+-print "Your choice: ";
+-$thechoice=<STDIN>;
+-#$thechoice="/usr/sbin/httpd\n";
+-chop $thechoice;
+-
+-if ($thechoice eq "findit") {
+- print "\nTrying to find httpd.... please be patient!\n";
+- $thechoice=`find / -type f -iname httpd 2>/dev/null|grep bin| \
+- xargs -n 1 file|grep linked|cut -f1 -d: 2>/dev/null`;
+- chop $thechoice;
+- print "\nFound: $thechoice\n";
+- ($test1,$test2,@junk)=split(/\n/,$thechoice);
+- if ($test2) {die "\nSorry, found more than 1 potential httpd...\n"; }
+-}
+-
++$thechoice="/usr/local/sbin/httpd";
+ print "\nLet's see if it's a valid httpd...";
+ $_=`$thechoice -v`;
+ if (/Server version:/) { print " YES!\n";
+@@ -91,12 +72,10 @@ + }
+ print "DocumentRoot: $documentroot\n";
+
+-#$_=`ls -dln $documentroot|cut -c 17-30`;
+-$_=`ls -dln /var/log|cut -c 17-30`;
+-if (/^(\d*)(\s*)(\d*)/) {
+- $uid=$1; $gid=$3;
+- print "Content uid $uid, gid $gid\n";
+-}
++$webdir = $documentroot;
++$webdir =~ s/"//g;
++($uid, $gid) = (stat $webdir)[4,5];
++print "Content uid, gid: $uid, $gid\n";
+
+ #
+ # User "apache" in Mandrake has user 48, gid 48
+@@ -136,6 +115,7 @@ + $_=~ s|"\$\(fpexec_bin\)|\\\\\"$sbindir\/fpexec\\\\|;
+ $_=~ s|\$\(httpdconf\)|$httpdconf|;
+ $_=~ s|\$\(libexecdir\)|$libexecdir|;
++$_=~ s|root.root|root:wheel|;
+ print MAKF $_;
+ }
+
+@@ -143,7 +123,7 @@ + ### Now, *that*'s very *ugly* ;-)
+ ###
+ print "Extracting the Source Code from the patch...\n";
+-$patch=` ls ../patch*|xargs -iPAT -n1 patch -f -i `;
++$patch=`patch -f < patch-1.5.1mdk-1.3.19 2>&1 > /dev/null`;
+ $result=`rm -f Makefile.tmpl *.orig *.rej *~`;
+
+ print "\n\nDone!!! Now have a look at the Makefile to see if it's ";
diff --git a/www/mod_frontpage/files/patch-fa b/www/mod_frontpage/files/patch-fa new file mode 100644 index 00000000000..88797383aaf --- /dev/null +++ b/www/mod_frontpage/files/patch-fa @@ -0,0 +1,52 @@ +--- frontpage/version4.0/change_server.sh.orig Mon Aug 14 11:51:36 2000 ++++ frontpage/version4.0/change_server.sh Wed Mar 7 22:12:02 2001 +@@ -38,9 +38,12 @@ + { + VERSION="4.0" + PATH=".:/bin:/usr/bin:/sbin:/usr/sbin:/usr/ucb:/etc:/usr/bsd" +- NEWHTTPDNEW="/usr/local/frontpage/version${VERSION}/apache-fp/httpd" +- NEWHTTPDCOMPAT="/usr/local/frontpage/version${VERSION}/apache-fp/httpd.Compat" +- DEFAULTHTTPD="/usr/local/apache/sbin/httpd" ++ AP_TARGET=`PREFIX/sbin/apxs -q TARGET` ++ NEWHTTPDNEW="PREFIX/sbin/${AP_TARGET}" ++ NEWMODFPNEW="PREFIX/libexec/apache/mod_frontpage.so" ++ NEWHTTPDCOMPAT="${NEWHTTPDNEW}" ++ NEWMODFPCOMAPT="${NEWMODFPNEW}" ++ DEFAULTHTTPD="PREFIX/sbin/${AP_TARGET}" + + case "`echo 'x\c'`" in + 'x\c') echo="echo -n" nnl= ;; #BSD +@@ -217,8 +220,22 @@ + + clear + ++ if ($strings $httpdfile | $fgrep "etc/apache/${AP_TARGET}.conf" > /dev/null) ++ then ++ NEWHTTPD=$NEWHTTPDNEW ++ NEWMODFP=$NEWMODFPNEW ++ echo "Selected server uses FreeBSD directory structure:" ++ ++ targetVersionNumber=`$httpdfile -v | sed 's%^.*Apache/\([0-9\.]*\).*%\1%' | head -1` ++ targetFPVersionNumber=`$strings \`dirname \\\`dirname $httpdfile\\\`\`/libexec/apache/mod_frontpage.so | \ ++ $fgrep "FrontPage/" 2> /dev/null | sed -e 's%^.*FrontPage/\([0-9\.]*\).*%\1%' | tail -1` ++ ++ sourceVersionNumber=`$NEWHTTPD -v | sed 's%^.*Apache/\([0-9\.]*\).*%\1%' | head -1` ++ sourceFPVersionNumber=`$strings $NEWMODFP | $fgrep "FrontPage/" 2> /dev/null | \ ++ sed -e 's%^.*FrontPage/\([0-9\.]*\).*%\1%' | tail -1` ++ else + +- if ($strings $httpdfile | $fgrep "etc/httpd.conf" > /dev/null) ++ if ($strings $httpdfile | $fgrep "etc/${AP_TARGET}.conf" > /dev/null) + then + NEWHTTPD=$NEWHTTPDNEW + echo "Selected server uses NEW directory structure:" +@@ -235,7 +252,8 @@ + sourceVersionNumber=`$NEWHTTPD -v | sed 's%^.*Apache/\([0-9\.]*\).*%\1%' | head -1` + sourceFPVersionNumber=`$strings $NEWHTTPD | $fgrep "FrontPage/" 2> /dev/null | sed -e ' + s%^.*FrontPage/\([0-9\.]*\).*%\1%' | tail -1` +- ++ fi ++ + echo + echo "Currently running Apache/${targetVersionNumber} FrontPage/${nnl}" + if [ "${targetFPVersionNumber}" = "" ] diff --git a/www/mod_frontpage/files/patch-fb b/www/mod_frontpage/files/patch-fb new file mode 100644 index 00000000000..1c7e4c0ac7f --- /dev/null +++ b/www/mod_frontpage/files/patch-fb @@ -0,0 +1,293 @@ +--- frontpage/version4.0/fp_install.sh.orig Mon Aug 14 11:51:36 2000 ++++ frontpage/version4.0/fp_install.sh Wed Mar 7 22:16:28 2001 +@@ -48,7 +48,8 @@ + { + VERSION="4.0" + PATH=".:/bin:/usr/bin:/sbin:/usr/sbin:/usr/ucb:/etc:/usr/bsd" +- INSTALLDIRDEFAULT="/usr/local/frontpage" ++ AP_TARGET=`PREFIX/sbin/apxs -q TARGET` ++ INSTALLDIRDEFAULT="PREFIX/frontpage" + + case "`echo 'x\c'`" in + 'x\c') echo="echo -n" nnl= ;; #BSD +@@ -129,7 +130,7 @@ + checkuser() + { + # +- # Make sure we are not running as root. ++ # Make sure we are running as root. + # + + whoami=`whoami 2>/dev/null` || whoami=`/usr/bin/id | sed -e ' s/).*//; s/^.*(//;'` +@@ -322,27 +323,27 @@ + + retval=0 + +- echo +- echo "Where would you like to install the FrontPage Extensions. If you" +- echo "select a location other than /usr/local/frontpage/ then a symbolic" +- echo "link will be created from /usr/local/frontpage/ to the location that" +- echo "is chosen." +- echo +- $echo "FrontPage Extensions directory [/usr/local/frontpage/]: ${nnl}" +- read installdir ++# echo ++# echo "Where would you like to install the FrontPage Extensions. If you" ++# echo "select a location other than /usr/local/frontpage/ then a symbolic" ++# echo "link will be created from /usr/local/frontpage/ to the location that" ++# echo "is chosen." ++# echo ++# $echo "FrontPage Extensions directory [${INSTALLDIRDEFAULT}]: ${nnl}" ++# read installdir + +- if [ "$installdir" = "" ] +- then ++# if [ "$installdir" = "" ] ++# then + installdir=$INSTALLDIRDEFAULT +- fi ++# fi + installdir=`dirname $installdir`/`basename $installdir` + +- if [ ! -d "$installdir" ] +- then +- echo "Creating $installdir" +- if mkdir "$installdir" +- then +- echo "Directory $installdir has been created." ++# if [ ! -d "$installdir" ] ++# then ++# echo "Creating $installdir" ++# if mkdir "$installdir" ++# then ++# echo "Directory $installdir has been created." + if chmod "$prot" "$installdir" + then + echo "Directory $installdir chmoded to $prot." +@@ -350,22 +351,22 @@ + echo "ERROR: Unable to chmod $installdir to $prot." + retval=1 + fi +- else +- echo "ERROR: Unable to create $installdir!" +- retval=1 +- fi +- else +- echo "WARNING: Directory $installdir already exists." +- echo "Installation will overwrite existing files." +- echo +- +- myprompt 'yYnN' "Continue the installation (y/n)" "N" +- echo +- if [ $answer = n ] || [ $answer = N ] +- then +- exit 0 +- fi +- fi ++# else ++# echo "ERROR: Unable to create $installdir!" ++# retval=1 ++# fi ++# else ++# echo "WARNING: Directory $installdir already exists." ++# echo "Installation will overwrite existing files." ++# echo ++ ++# myprompt 'yYnN' "Continue the installation (y/n)" "N" ++# echo ++# if [ $answer = n ] || [ $answer = N ] ++# then ++# exit 0 ++# fi ++# fi + + if [ "$installdir" != "/usr/local/frontpage" ] + then +@@ -415,7 +416,7 @@ + vtfile="fp40.$machine.tar" + echo "Platform is $machine." + +- vtfilelocation="`pwd`/" ++ vtfilelocation="/usr/ports/distfiles/" + + getextfilename $vtfilelocation $vtfile || return 1 + +@@ -539,7 +540,7 @@ + upgrade="no" + echo "For details on how to upgrade servers manually, please see" + echo "the Server Extension Resource Kit (SERK), located in" +- echo "/usr/local/frontpage/version${VERSION}/serk" ++ echo "MOD_FPDOCDIR/serk" + echo + return $retval + else +@@ -656,10 +657,15 @@ + *pache*) getHttpDirective $configfile AccessConfig $port + if [ "$param" != "" ] + then +- file=`basename $param` +- accessconffile="${configfiledir}${file}" ++ if [ "${param}" = "/dev/null" ] ++ then ++ accessconffile="${configfile}" ++ else ++ file=`basename $param` ++ accessconffile="${configfiledir}${file}" ++ fi + else +- accessconffile="${configfiledir}access.conf" ++ accessconffile="${configfiledir}conf/access.conf" + fi + + if [ ! -f "$accessconffile" ] +@@ -1106,18 +1112,29 @@ + + webname="/" + ++ defconfigfile="PREFIX/etc/apache/${AP_TARGET}.conf" ++ + configfile="" + while ( [ "$configfile" = "" ] || [ ! -f $configfile ] ) + do +- $echo "Server config filename: ${nnl}" ++ $echo "Server config filename: [$defconfigfile] ${nnl}" + read configfile +- done ++ if [ "$configfile" = "" ] ++ then ++ configfile=$defconfigfile ++ fi ++done + ++ defadmin="fpadmin" + admin="" + until [ "$admin" != "" ] + do +- $echo "FrontPage Administrator's user name: ${nnl}" ++ $echo "FrontPage Administrator's user name: [$defadmin] ${nnl}" + read admin ++ if [ "$admin" = "" ] ++ then ++ admin=$defadmin ++ fi + done + + getparam Port $configfile +@@ -1132,6 +1149,39 @@ + getparam User $configfile + defwebowner=$param + ++ if [ "$defwebowner" = "" ] ++ then ++ getHttpDirective $configfile ResourceConfig $port ++ if [ "$param" != "" ] ++ then ++ if [ "${param}" = "/dev/null" ] ++ then ++ resconffile="${configfile}" ++ else ++ file=`basename $param` ++ resconffile="${configfiledir}${file}" ++ fi ++ else ++ resconffile="${configfiledir}srm.conf" ++ fi ++ ++ if [ ! -f "$resconffile" ] ++ then ++ echo "ERROR: $resconffile does not exist!" ++ return 1 ++ fi ++ ++ getparam DocumentRoot $resconffile ++ docroot=$param ++ if [ ! -d "$docroot" ] ++ then ++ echo "ERROR: $docroot does not exist!" ++ return 1 ++ fi ++ ++ defwebowner=`$lsg ${docroot}${service} | $awk ' { print $3}'` ++ fi ++ + weconfigfile="${installdir}/we${port}.cnf" + + webowner="" +@@ -1147,6 +1197,12 @@ + + getparam Group $configfile + defgroup=$param ++ ++ if [ "$defgroup" = "" ] ++ then ++ defgroup=`$lsg ${docroot}${service} | $awk ' { print $4}'` ++ fi ++ + webgroup="" + until [ "$webgroup" != "" ] + do +@@ -1158,6 +1214,8 @@ + webgroup=$defgroup + fi + done ++ ++defservertypenum="3" + + until [ "$servertype" != "" ] + do +@@ -1168,9 +1226,13 @@ + echo " 4. netscape-fasttrack" + echo " 5. netscape-enterprise" + echo " 6. stronghold" +- $echo "What type of Server is this: ${nnl}" ++ $echo "What type of Server is this: [$defservertypenum] ${nnl}" + read servertypenum + echo ++ if [ "$servertypenum" = "" ] ++ then ++ servertypenum=$defservertypenum ++ fi + + case $servertypenum in + "1") servertype="ncsa" ;; +@@ -1546,6 +1608,8 @@ + read admin + done + ++ defservertypenum="3" ++ + until [ "$servertype" != "" ] + do + echo +@@ -1555,9 +1619,13 @@ + echo " 4. netscape-fasttrack" + echo " 5. netscape-enterprise" + echo " 6. stronghold" +- $echo "What type of Server is this: ${nnl}" ++ $echo "What type of Server is this: [$defservertypenum] ${nnl}" + read servertypenum + echo ++ if [ "$servertypenum" = "" ] ++ then ++ servertypenum=$defservertypenum ++ fi + + case $servertypenum in + "1") servertype="ncsa" ;; +@@ -2024,7 +2092,6 @@ + then + getHttpRootDirective $configfile $directive + fi +- + } + + getnetscapedocroot() +@@ -2217,7 +2284,7 @@ + + initialize + step1 +-step2 ++#step2 + step3 + # + # Run the external permissions script. diff --git a/www/mod_frontpage/files/patch-fn b/www/mod_frontpage/files/patch-fn new file mode 100644 index 00000000000..ed2572945fb --- /dev/null +++ b/www/mod_frontpage/files/patch-fn @@ -0,0 +1,15 @@ +--- frontpage/version4.0/set_default_perms.sh.orig Mon May 24 12:45:14 1999 ++++ frontpage/version4.0/set_default_perms.sh Thu Feb 24 01:47:01 2000 +@@ -81,10 +81,10 @@ + chmod 4755 $FPDIR/apache-fp/_vti_bin/fpexe || die set fpexe to be suid + + # Set httpd +-chmod 555 $FPDIR/apache-fp/httpd || die make httpd executable ++#chmod 555 $FPDIR/apache-fp/httpd || die make httpd executable + + # Set httpd.Compat +-chmod 555 $FPDIR/apache-fp/httpd.Compat || die make httpd.Compat executable ++#chmod 555 $FPDIR/apache-fp/httpd.Compat || die make httpd.Compat executable + + # The apache-fp directory should not be writable to protect the stub program. + chmod 555 $FPDIR/apache-fp/_vti_bin || die restrict the apache-fp directory |