Bug 127418

Summary: [patch] www/apache22: initialize environment in rc.d script a bit later
Product: Ports & Packages Reporter: Eygene Ryabinkin <rea-fbsd>
Component: Individual Port(s)Assignee: freebsd-apache (Nobody) <apache>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
apache22.sh.in.dont-disrupt-environment none

Description Eygene Ryabinkin 2008-09-16 07:30:01 UTC
Apache 2.x rc.d script initializes Apache environment at the time of
configuration check.  Sometimes it is too early, because environment
tuners from ${PREFIX}/etc/apache22/envvars.d/ can greatly modify the
script environment.  For example, my script heavily mangle with PATH, so
after running environment cleaners the 'sysctl' command is not available
and it produces slightly worrying warning.

Fix: The following patch cures the situation for me.  It just makes
configuration file checking to be spawned in the separate shell and the
real environment correction is made late in the prestart phase.  It also
adds the function 'apache22_source_envvars' to avoid code duplication.
How-To-Repeat: 
Use the following contents of, for example,
${PREFIX}/etc/apache22/envvars.d/010.path.env
-----
export PATH=/bin:/usr/bin:/usr/sbin:/usr/local/bin
-----
and try restarting Apache.  If will complain about unavailability
of sysctl binary (for the modern versions of www/apache22, with
files/apache22.sh.in version 1.6 or later).
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2008-09-16 07:30:12 UTC
Responsible Changed
From-To: freebsd-ports-bugs->clement

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 dfilter service freebsd_committer freebsd_triage 2008-12-15 22:06:05 UTC
clement     2008-12-15 22:05:56 UTC

  FreeBSD ports repository

  Modified files:
    www/apache22         Makefile distinfo pkg-plist 
    www/apache22/files   apache22.sh.in 
                         patch-srclib:apr-util:build:dbm.m4 
  Removed files:
    www/apache22/files   patch-CVE-2008-2939 
  Log:
  - Update to 2.2.11
  - Always depend on pcre from ports [1]
  - Fix plist with LDAP/without apr-util DSO
  - source envvars as late as possible [2]
  
  Requested by:           ale
                          Eygene Ryabinkin <rea-fbsd at codelabs dot ru> [2]
  PR:                     ports/127418 [2]
  
  Revision  Changes    Path
  1.227     +6 -11     ports/www/apache22/Makefile
  1.76      +3 -3      ports/www/apache22/distinfo
  1.8       +2 -2      ports/www/apache22/files/apache22.sh.in
  1.2       +0 -11     ports/www/apache22/files/patch-CVE-2008-2939 (dead)
  1.5       +5 -79     ports/www/apache22/files/patch-srclib:apr-util:build:dbm.m4
  1.91      +7 -2      ports/www/apache22/pkg-plist
_______________________________________________
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"
Comment 3 Philip M. Gollucci freebsd_committer freebsd_triage 2008-12-27 20:29:56 UTC
Responsible Changed
From-To: clement->apache

apache team
Comment 4 Philip M. Gollucci freebsd_committer freebsd_triage 2008-12-28 08:12:33 UTC
State Changed
From-To: open->closed

already commited by clement@