From matt@megaweapon.zigg.com Sat Nov 27 13:21:35 1999
Return-Path: <matt@megaweapon.zigg.com>
Received: from megaweapon.zigg.com (megaweapon.zigg.com [206.114.60.8])
	by hub.freebsd.org (Postfix) with ESMTP id 993FE14CF1
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 27 Nov 1999 13:21:30 -0800 (PST)
	(envelope-from matt@megaweapon.zigg.com)
Received: (from matt@localhost)
	by megaweapon.zigg.com (8.9.3/8.9.3) id PAA75717;
	Sat, 27 Nov 1999 15:44:19 -0500 (EST)
	(envelope-from matt)
Message-Id: <199911272044.PAA75717@megaweapon.zigg.com>
Date: Sat, 27 Nov 1999 15:44:19 -0500 (EST)
From: matt@zigg.com
Sender: matt@megaweapon.zigg.com
Reply-To: matt@zigg.com
To: FreeBSD-gnats-submit@freebsd.org
Subject: www/apache13-modssl has PREFIX problems finding OpenSSL
X-Send-Pr-Version: 3.2

>Number:         15123
>Category:       ports
>Synopsis:       www/apache13-modssl has PREFIX problems finding OpenSSL
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Nov 27 13:30:02 PST 1999
>Closed-Date:    Thu Dec 20 03:15:35 PST 2001
>Last-Modified:  Fri Dec 21 10:40:00 PST 2001
>Originator:     Matt Behrens
>Release:        FreeBSD 3.3-STABLE i386
>Organization:
zigg.com
>Environment:

FreeBSD megaweapon.zigg.com 3.3-STABLE FreeBSD 3.3-STABLE #2: Sat Nov 20 19:51:35 EST 1999     matt@megaweapon.zigg.com:/usr/src/sys/compile/MEGAWEAPON  i386

>Description:

www/apache13-modssl has a problem finding OpenSSL which appears to
be PREFIX-related, but may also happen even if /usr/local is used
as the PREFIX.  When the module is being configured it searches
for OpenSSL include files.  It cannot find them because
${PREFIX}/include/openssl is not in its search path.

I suspect, but cannot confirm, that this would fail even if PREFIX
was not set  because OpenSSL would then install its includes into
/usr/local/include/openssl, and the closest match to that in the
script's list is /usr/local/include/ssl.

In addition, this failure does not return an error code, which
would enable the ports system to detect that the configure had
failed.  Rather, it marks .configure_done and happily moves right
along to the build phase, which of course does return an error
code.

>How-To-Repeat:

# cd /usr/ports/www/apache13-modssl
# make PREFIX=/foo/bar install

>Fix:

The port (or maybe source tarball?) needs to fix
work/mod_ssl-2.4.9-1.3.9/pkg.sslmod/libssl.module at line 343 to
include a reference to ${PREFIX}/include/openssl in its include
search.  Of course this would probably be done with sed before
configure is called.  However this port is somewhat complex and I
think the maintainer might have a better idea than I would how to
actually go about doing this.

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports->rse 
Responsible-Changed-By: dirk 
Responsible-Changed-When: Wed Dec 1 08:05:22 PST 1999 
Responsible-Changed-Why:  
Over to port maintainer. 

From: Matt Behrens <matt@zigg.com>
To: freebsd-gnats-submit@freebsd.org, matt@zigg.com
Cc:  
Subject: Re: ports/15123: www/apache13-modssl has PREFIX problems finding OpenSSL
Date: Thu, 02 Dec 1999 08:59:37 -0500

 Update:
 
 I was able to make the port build by manually changing libssl.module as
 found in the work/apache_1.3.9/src/modules/ssl directory before the
 configure phase.  I had previously and incorrectly identified the
 solution as adding $PREFIX/include/openssl.  I was not paying enough
 attention to the script.  The correct solution to that particular
 problem would be to either add $PREFIX/include or change occurrences of
 /usr/local on that line to $PREFIX.
 
 In addition, there are a few other places that $PREFIX needs to be added
 or substituted in a similar manner:
 
 1.  Line 351; to make the error message correctly reflect the list of
 directories that was searched in case of a problem.
 
 2.  Line 263; to allow for a more reasonable fallback for SSL_BASE (just
 for correctness' sake; I did not actually have problems with this
 portion of the script), /usr/local should be changed to the value of
 $PREFIX.
 
 3.  Lines 369 and 452; to permit searching for libraries in $PREFIX/lib,
 /usr/local should be changed here.
 
 4.  Lines 378 and 463; to make the error message correctly reflect the
 list of directories that were searched in case of a problem.
 
 Again, I regret that I don't presently have time to figure out how to
 make a clean solution to this port, but I might this weekend if the
 maintainer hasn't done it just yet.  In any event, with these changes
 made manually prior to the configure phase, the port builds and installs
 cleanly and seems to operate well.
 

From: Matt Behrens <matt@zigg.com>
To: freebsd-gnats-submit@freebsd.org, matt@zigg.com
Cc:  
Subject: Re: ports/15123: www/apache13-modssl has PREFIX problems finding OpenSSL
Date: Fri, 10 Dec 1999 22:03:42 -0500 (EST)

 Attached is a shar archive containing (a) a patch to Makefile and
 (b) a new patch-af to put in the patches directory.  Works great
 for me.
 
 Thanks!
 
 # This is a shell archive.  Save it in a file, remove anything before
 # this line, and then unpack it by entering "sh file".  Note, it may
 # create directories; files and directories will be owned by you and
 # have default permissions.
 #
 # This archive contains:
 #
 #	Makefile.patch
 #	patches/patch-af
 #
 echo x - Makefile.patch
 sed 's/^X//' >Makefile.patch << 'END-of-Makefile.patch'
 X--- Makefile.broken	Fri Dec 10 21:24:35 1999
 X+++ Makefile	Fri Dec 10 21:35:28 1999
 X@@ -111,6 +111,12 @@
 X post-patch:
 X 	@cd ${WRKSRC} \
 X 	&& find . -type f -name "*.orig" -print | xargs ${RM} -f
 X+	@${SED} 's#@@PREFIX@@#${PREFIX}#g' \
 X+		< ${WRKSRC}/src/modules/ssl/libssl.module \
 X+		> ${WRKSRC}/src/modules/ssl/libssl.module.NEW
 X+	@${MV} \
 X+		${WRKSRC}/src/modules/ssl/libssl.module.NEW \
 X+		${WRKSRC}/src/modules/ssl/libssl.module
 X 
 X post-build:
 X 	@cd ${WRKSRC} \
 END-of-Makefile.patch
 echo x - patches/patch-af
 sed 's/^X//' >patches/patch-af << 'END-of-patches/patch-af'
 X--- src/modules/ssl/libssl.module.broken	Fri Dec 10 21:18:47 1999
 X+++ src/modules/ssl/libssl.module	Fri Dec 10 21:20:22 1999
 X@@ -260,7 +260,7 @@
 X     if [ ".$SSL_BASE" = . ]; then
 X         SSL_BASE=`egrep '^SSL_BASE=' $file | tail -1 | awk -F= '{print $2}'`
 X         if [ ".$SSL_BASE" = . ]; then
 X-            SSL_BASE="/usr/local/ssl"
 X+            SSL_BASE="@@PREFIX@@/ssl"
 X         fi
 X     fi
 X     case $SSL_BASE in
 X@@ -340,7 +340,7 @@
 X     #
 X     if [ ".$SSL_BASE" = .SYSTEM ]; then
 X         SSL_INCDIR=""
 X-        for p in . /usr/include /usr/include/ssl/ /usr/local/include /usr/local/include/ssl; do
 X+        for p in . /usr/include /usr/include/ssl/ /usr/local/include /usr/local/include/ssl @@PREFIX@@/include; do
 X             if [ -f "$p/openssl/ssl.h" ]; then
 X                 SSL_INCDIR="$p"
 X                 break
 X@@ -348,7 +348,7 @@
 X         done
 X         if [ ".$SSL_INCDIR" = . ]; then
 X             echo "Error: Cannot find SSL header files in any of the following dirs:" 1>&2
 X-            echo "Error: . /usr/include /usr/include/ssl/ /usr/local/include /usr/local/include/ssl" 1>&2
 X+            echo "Error: . /usr/include /usr/include/ssl/ /usr/local/include /usr/local/include/ssl @@PREFIX@@/include" 1>&2
 X             exit 1
 X         fi
 X     else
 X@@ -366,7 +366,7 @@
 X     #
 X     if [ ".$SSL_BASE" = .SYSTEM ]; then
 X         SSL_LIBDIR=""
 X-        for p in . /lib /usr/lib /usr/local/lib; do
 X+        for p in . /lib /usr/lib /usr/local/lib @@PREFIX@@/lib; do
 X             if [ -f "$p/libssl.a" -o -f "$p/libssl.so" ]; then
 X                 SSL_LIBDIR="$p"
 X                 my_real_ssl_libdir="$p"
 X@@ -375,7 +375,7 @@
 X         done
 X         if [ ".$SSL_LIBDIR" = . ]; then
 X             echo "Error: Cannot find SSL library files in any of the following dirs:" 1>&2
 X-            echo "Error: . /lib /usr/lib /usr/local/lib" 1>&2
 X+            echo "Error: . /lib /usr/lib /usr/local/lib @@PREFIX@@/lib" 1>&2
 X             exit 1
 X         fi
 X     else
 X@@ -449,7 +449,7 @@
 X     if [ ".$RSA_BASE" != . ]; then
 X         if [ ".$RSA_BASE" = .SYSTEM ]; then
 X             my_found=no
 X-            for p in . /lib /usr/lib /usr/local/lib; do
 X+            for p in . /lib /usr/lib /usr/local/lib @@PREFIX@@/lib; do
 X                 if [ -f "$p/librsaref.a" -o -f "$p/librsaref.so" ]; then
 X                     SSL_LDFLAGS="$SSL_LDFLAGS -L$p"
 X                     SSL_LIBS="$SSL_LIBS -lrsaref"
 X@@ -460,7 +460,7 @@
 X             done
 X             if [ .$my_found = .no ]; then
 X                 echo "Error: Cannot find RSAref library in any of the following dirs:" 1>&2
 X-                echo "Error: . /lib /usr/lib /usr/local/lib" 1>&2
 X+                echo "Error: . /lib /usr/lib /usr/local/lib @@PREFIX@@/lib" 1>&2
 X                 exit 1
 X             fi
 X         else
 END-of-patches/patch-af
 exit
 
 
Responsible-Changed-From-To: rse->freebsd-ports 
Responsible-Changed-By: dirk 
Responsible-Changed-When: Mon Nov 5 04:59:20 PST 2001 
Responsible-Changed-Why:  
rse doesn't maintain apache13-modssl any longer. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=15123 
State-Changed-From-To: open->closed 
State-Changed-By: ijliao 
State-Changed-When: Thu Dec 20 03:15:35 PST 2001 
State-Changed-Why:  
committed, thanks 
it takes a long time to fix this problem ... 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=15123 

From: Christopher K Davis <ckd@ckdhr.com>
To: freebsd-gnats-submit@FreeBSD.org
Cc:  
Subject: Re: ports/15123: www/apache13-modssl has PREFIX problems finding OpenSSL
Date: 21 Dec 2001 13:39:46 -0500

 The committed patch no longer cleanly applies to Apache+mod_ssl; this is 
 not surprising since it was submitted just over 2 years ago....
 
 It also appears to be no longer necessary based on a quick glance.
>Unformatted:
