Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Feb 2002 17:56:56 -0600 (CST)
From:      "Scot W. Hetzel" <hetzels@westbend.net>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   ports/34890: www/frontpage: fp_install.sh fails on quoted Apache Directive values
Message-ID:  <200202122356.g1CNuuu52821@mail.westbend.net>

next in thread | raw e-mail | index | archive | help

>Number:         34890
>Category:       ports
>Synopsis:       www/frontpage: fp_install.sh fails on quoted Apache Directive values
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Tue Feb 12 16:00:02 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Scot W. Hetzel
>Release:        FreeBSD 4.4-STABLE i386
>Organization:
West Bend Internet
>Environment:
System: FreeBSD wbiW009.westbend.net 4.4-STABLE FreeBSD 4.4-STABLE #1: Fri Dec 21 03:59:03 CST 2001 root@wbiW009.westbend.net:/usr/obj/usr/src/sys/GENERIC-SMP i386

>Description:
	The fp_install.sh script fails to find the DocumentRoot due to the
	DocumentRoot's value is in quotes.

>How-To-Repeat:
	Install either apache13 or apache13-modssl ports, then install the
	mod_frontpage and frontpage ports.

	Then execute /usr/local/frontpage/version5.0/fp_install.sh.  The
	script will fail when checking for the DocumentRoot.

	    #/usr/local/frontpage/version5.0/fp_install.sh
	    :
	    :
	    FrontPage Administrator's user name:  [fpadmin]
	    ERROR: "/usr/local/www/tv" does not exist!

	While the above quotes looks like they are coming from the script,
	they are actually come from the httpd.conf file.
	
>Fix:
	Changed Files:
	   Makefile
	   files/patch-fp_install.sh

Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/www/frontpage/Makefile,v
retrieving revision 1.2
diff -u -r1.2 Makefile
--- Makefile	28 Dec 2001 00:42:44 -0000	1.2
+++ Makefile	12 Feb 2002 23:52:23 -0000
@@ -7,6 +7,7 @@
 
 PORTNAME=	frontpage
 PORTVERSION=	5.0.2.2623
+PORTREVISION=	1
 CATEGORIES=	www
 MASTER_SITES=	ftp://ftp.microsoft.com/products/frontpage/ \
 		ftp://www.westbend.net/Mirrors/ftp.microsoft.com/Products/frontpage/
Index: files/patch-fp_install.sh
===================================================================
RCS file: /home/ncvs/ports/www/frontpage/files/patch-fp_install.sh,v
retrieving revision 1.2
diff -u -r1.2 patch-fp_install.sh
--- files/patch-fp_install.sh	21 Jan 2002 15:19:42 -0000	1.2
+++ files/patch-fp_install.sh	12 Feb 2002 23:39:33 -0000
@@ -1,5 +1,5 @@
---- frontpage/version5.0/fp_install.sh.orig	Mon Apr 16 14:39:25 2001
-+++ frontpage/version5.0/fp_install.sh		Mon Jan 21 11:45:36 2002
+--- fp_install.sh.orig	Mon Apr 16 07:39:25 2001
++++ fp_install.sh	Tue Feb 12 17:37:58 2002
 @@ -12,7 +12,7 @@
  main() {
      initialize
@@ -86,7 +86,31 @@
      
      if [ "$installdir" != "/usr/local/frontpage" ]
      then
-@@ -1290,20 +1256,30 @@
+@@ -805,16 +771,22 @@
+                 accessconffile="${configfiledir}${file}"
+                 ;;
+         esac
++	if [ ! -f $accessconffile ]
++	then
++	    echo "ERROR:  $accessconffile does not exist! Using $configfile instead."
++	    accessconffile=$configfile
++	fi
+     else
+         accessconffile="${configfiledir}access.conf"
+         if [ ! -f $accessconffile ]
+         then
++	    echo "ERROR: No AccessConfig directive found, add 'AccessConfig /dev/null' to $configfile"
+             accessconffile=$configfile
+         fi
+     fi
+     if [ "$accessconffile" != "" -a "$accessconffile" != "/dev/null" -a ! -f "$accessconffile" ]
+     then
+-        echo "$accessconffile does not exist."
++        echo "ERROR: $accessconffile does not exist!"
+         return 1
+     fi
+ 
+@@ -1290,20 +1262,30 @@
      echo " " 
      
      webname="/"
@@ -119,7 +143,7 @@
      done
      
      getHttpRootDirective $configfile Port
-@@ -1316,9 +1292,23 @@
+@@ -1316,9 +1298,23 @@
      done
      weconfigfile="${installdir}/we${port}.cnf"
      
@@ -143,7 +167,7 @@
      webowner=""
      until [ "$webowner" != "" ]
      do
-@@ -1333,6 +1323,12 @@
+@@ -1333,6 +1329,12 @@
      echo 
      getparam Group $configfile $port "Getting Group from "
      defgroup=$param
@@ -156,7 +180,7 @@
      webgroup=""
      until [ "$webgroup" != "" ]
      do
-@@ -1464,7 +1460,7 @@
+@@ -1464,7 +1466,7 @@
          return $retval
      fi
      
@@ -165,3 +189,38 @@
      configfile=""
      while ( [ "$configfile" = "" ] || [ ! -f $configfile ] )
      do
+@@ -1922,10 +1924,16 @@
+                 resconffile="${configfiledir}${file}"
+                 ;;
+         esac
++	if [ ! -f $resconffile ]
++	then
++	    echo "ERROR:  $resconffile does not exist! Using $configfile instead."
++	    resconffile=$configfile
++	fi
+     else
+         resconffile="${configfiledir}srm.conf"
+         if [ ! -f $resconffile ]
+         then
++	    echo "ERROR: No ResourceConfig directive found, add 'ResourceConfig /dev/null' to $configfile"
+             resconffile=$configfile
+         fi
+     fi
+@@ -1999,7 +2007,7 @@
+     
+     param=`cat $configfile | $awk "
+             /^[^#]* *< *${virtualhost}/,/^[^#]* *< *\/${virtualhost}/ { next }
+-            /^[^#]* *${mc_string}[ $TAB]/  { print \\\$2 }"` 
++            /^[^#]* *${mc_string}[ $TAB]/  { print \\\$2 }" | sed -e 's/"//g'` 
+             
+     return 0
+ }
+@@ -2050,7 +2058,7 @@
+                                     print ARRAY[i] 
+                                 }
+                             }
+-                    } "`
++                    } " | sed -e 's/"//g'`
+     
+     if [ "$param" = "" ]
+     then
>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200202122356.g1CNuuu52821>