Bug 138466

Summary: [patch] www/apache22: 'rc.d/apache22 graceful' fails (WITH_OPENSSL_PORT=yes)
Product: Ports & Packages Reporter: Dmitry Pryanishnikov <lynx.ripe>
Component: Individual Port(s)Assignee: Philip M. Gollucci <pgollucci>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Dmitry Pryanishnikov 2009-09-01 23:10:00 UTC
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).

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:
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.
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2009-09-02 10:37:50 UTC
Responsible Changed
From-To: freebsd-ports-bugs->apache

Fix synopsis and assign.
Comment 2 Philip M. Gollucci freebsd_committer 2009-12-10 10:35:35 UTC
Responsible Changed
From-To: apache->pgollucci

I'll take it.
Comment 3 Philip M. Gollucci freebsd_committer 2009-12-11 23:43:33 UTC
State Changed
From-To: open->closed

Committed, with minor changes. Thanks!
Comment 4 dfilter service freebsd_committer 2009-12-11 23:43:34 UTC
pgollucci    2009-12-11 23:43:26 UTC

  FreeBSD ports repository

  Modified files:
    www/apache22         Makefile 
    www/apache22/files   apache22.in 
  Log:
  - envvars needs to be sourced before _all_ commands if it exists
  
  PR:             ports/138466 (based on)
  Submitted by:   Dmitry Pryanishnikov <lynx.ripe@gmail.com>
  
  Revision  Changes    Path
  1.248     +1 -1      ports/www/apache22/Makefile
  1.6       +3 -1      ports/www/apache22/files/apache22.in
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"