Bug 127418 - [patch] www/apache22: initialize environment in rc.d script a bit later
Summary: [patch] www/apache22: initialize environment in rc.d script a bit later
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-apache (Nobody)
Depends on:
Reported: 2008-09-16 07:30 UTC by Eygene Ryabinkin
Modified: 2008-12-28 08:12 UTC (History)
0 users

See Also:

apache22.sh.in.dont-disrupt-environment (899 bytes, text/plain)
2008-09-16 07:30 UTC, Eygene Ryabinkin
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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.
Use the following contents of, for example,
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 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 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 
  Removed files:
    www/apache22/files   patch-CVE-2008-2939 
  - 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
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 3 Philip M. Gollucci freebsd_committer 2008-12-27 20:29:56 UTC
Responsible Changed
From-To: clement->apache

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

already commited by clement@