ports/138466: [patch] 'rc.d/apache22 graceful' fails (WITH_OPENSSL_PORT=yes)

Dmitry Pryanishnikov lynx.ripe at gmail.com
Tue Sep 1 22:10:01 UTC 2009


>Number:         138466
>Category:       ports
>Synopsis:       [patch] 'rc.d/apache22 graceful' fails (WITH_OPENSSL_PORT=yes)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Sep 01 22:10:00 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Dmitry Pryanishnikov
>Release:        6.2-RELEASE
>Organization:
Home
>Environment:
FreeBSD test.homenet 6.2-RELEASE-p7 FreeBSD 6.2-RELEASE-p7 #0: Thu Aug 30 16:53:51 EEST 2007     dmitry at test.homenet:/usr/obj/usr/RELENG_6_2/src/sys/test  i386

>Description:
Script /usr/local/etc/rc.d/apache22 installed by www/apache22 port doesn't source /usr/local/sbin/envvars for commands 'graceful' and 'gracefulstop'. For apache built against OpenSSL from ports (WITH_OPENSSL_PORT=yes) _and_ when OpenSSL in base system is too old (like 0.9.8e in 6.2-RELEASE), this causes fatal error during these commands execution, e.g.:

httpd: Syntax error on line 86 of /usr/local/etc/apache22/httpd.conf: Cannot load /usr/local/libexec/apache22/mod_ssl.so into server: /usr/local/libexec/apache22/mod_ssl.so: Undefined symbol "SSL_get_servername"

The apparent cause of the problem is that /usr/local/sbin/envvars defines LD_LIBRARY_PATH to contain /usr/local/lib in front of it, so mod_ssl.so uses correct libraries (for OpenSSL build from ports). Without this step, mod_ssl.so uses incorrect libraries (from the base system).
>How-To-Repeat:
Build www/apache22 in 6.2-RELEASE with WITH_OPENSSL_PORT=yes, start it, then issue /usr/local/etc/rc.d/apache22 graceful or gracefulstop.
>Fix:
The accompanying patch sources /usr/local/sbin/envvars in the apache22_requirepidfile function, which is common for graceful and gracefulstop operations.

Patch attached with submission follows:

--- apache22.in.orig	Tue Aug 25 14:41:13 2009
+++ apache22.in	Tue Sep  1 22:53:21 2009
@@ -130,6 +130,11 @@
 
 apache22_requirepidfile()
 {
+	if test -f /usr/local/sbin/envvars
+	then
+		. /usr/local/sbin/envvars
+	fi
+
 	if [ ! "0`check_pidfile ${pidfile} ${command}`" -gt 1 ]; then
 		echo "${name} not running? (check $pidfile)."
 		exit 1


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list