Bug 57245 - last update lost /etc/sysconfig/apache parse
Summary: last update lost /etc/sysconfig/apache parse
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: apache (Show other bugs)
(Show other bugs)
Version: 7.2
Hardware: All Linux
medium
medium
Target Milestone: ---
Assignee: Joe Orton
QA Contact: David Lawrence
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-12-07 19:26 UTC by Christopher McCrory
Modified: 2007-04-18 16:38 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-09-21 10:11:55 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

Description Christopher McCrory 2001-12-07 19:26:53 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.6) Gecko/20011120

Description of problem:
the last apache errata lost this:
# Source additional OPTIONS if we have them.
if [ -f /etc/sysconfig/apache ] ; then
        . /etc/sysconfig/apache
fi


Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. rpm -Fvh
ftp://ftp.redhat.com/pub/redhat/linux/updates/7.2/en/os/i386/apache-1.3.22-2.i386.rpm
2.
3.
	

Actual Results:  lost custom tweeks in /etc/sysconfig/apache

Expected Results:  /etc/sysconfig/apache being parsed


Additional info:

this was a very useful config tool
I use:
[chrismcc]$ cat /etc/sysconfig/apache 

for I in $(env|cut -d= -f1) ; do unset $I; done
ulimit -n 4096
PATH=/bin:/usr/bin:/sbin:/usr/sbin
export PATH
...
to cleanse apache's environment


I also tweeked the sysv init thus:
--- httpd	Fri Dec  7 11:14:54 2001
+++ /etc/init.d/httpd	Fri Nov 16 16:23:02 2001
@@ -37,7 +37,7 @@
 
	gsub(/^LIB/,"");\
 
	gsub(/\.SO$/,"");\
 
	print "-DHAVE_" $0}'`
-
echo ${moduleargs}
+
echo ${MODULEARGS-$moduleargs}
 }
 start() {
 	echo -n $"Starting $prog: "


that allow me to customize the httpd args via /etc/sysconfig/apache:
# pass args for <IfDefine ...>'s in apache configs
# OPTIONS are additions
# MODULEARGS will _replace_ the dynamic list done via SysV script
# Put options here
OPTIONS=""
# Put modules here: i.e. MODULEARGS="-DHAVE_MYCUSTOMARG" 
# MODULEARGS=
# we add IAM_HOSTNAME for per server options
OPTIONS="-DIAM_$(/bin/hostname --short|env -i tr '[:lower:]' '[:upper:]')
${OPTIONS}"


for instance this allows me to install a lot of apache stuff on a
development server but only run:
httpd -DHAVE_PHP4 -DIM_DEVEL
where I don't want -DHAVE_SSL -DHAVE_DAV , etc.


This might not be used by a lot of people, but it is extreamly useful to
those of us that do

Comment 1 Christopher McCrory 2002-02-03 17:32:34 UTC
patch:

@@ -218,7 +285,7 @@
 %pre
 # Add the "apache" user
 /usr/sbin/useradd -c "Apache" -u 48 \
-       -s /bin/false -r -d /var/www apache 2> /dev/null || :
+       -s /bin/false -r -d %{contentdir} apache 2> /dev/null || :




patch: 
--- httpd.init.orig	Sun Feb  3 09:30:59 2002
+++ httpd.init	Sun Feb  3 09:31:09 2002
@@ -13,6 +13,7 @@
 
 # Source function library.
 . /etc/rc.d/init.d/functions
+. /etc/sysconfig/apache
 
 # This will prevent initlog from swallowing up a pass-phrase prompt if
 # mod_ssl needs a pass-phrase from the user.
@@ -35,7 +36,7 @@
 	gsub(/^LIB/,"");\
 	gsub(/\.SO$/,"");\
 	print "-DHAVE_" $0}'`
-
echo ${moduleargs}
+
echo ${MODULEARGS-$moduleargs}
 }
 
 # The semantics of these two functions differ from the way apachectl does


Comment 2 Christopher McCrory 2002-02-03 18:18:57 UTC
patch for apachectl:

--- apachectl	Sun Feb  3 10:16:38 2002
+++ apachectl.orig	Sun Feb  3 10:16:38 2002
@@ -42,7 +42,7 @@
                 gsub(/^LIB/,"");\
                 gsub(/\.SO$/,"");\
                 print "-DHAVE_" $0}'`
-        echo ${MODULEARGS-$moduleargs}
+        echo ${moduleargs}
 }
 #
 # |||||||||||||||||||| START CONFIGURATION SECTION  ||||||||||||||||||||



Comment 3 Christopher McCrory 2002-02-03 18:22:02 UTC
Oops that was backwards, D'oh

--- apachectl.orig	Sun Feb  3 10:16:38 2002
+++ apachectl	Sun Feb  3 10:16:38 2002
@@ -42,7 +42,7 @@
                 gsub(/^LIB/,"");\
                 gsub(/\.SO$/,"");\
                 print "-DHAVE_" $0}'`
-        echo ${moduleargs}
+        echo ${MODULEARGS-$moduleargs}
 }
 #
 # |||||||||||||||||||| START CONFIGURATION SECTION  ||||||||||||||||||||


apachectl parses /etc/sysconfig/apache but /etc/init.d/httpd does not
the sysv init starts and stops via /usr/sbin/httpd not apachectl
this can end up with different results depending on how you do the startup



Comment 4 Joe Orton 2004-09-21 10:11:55 UTC
Thanks for the report.  This bug is no longer present in the Apache
httpd 2.0 packages in Red Hat Enterprise Linux and Fedora Core.



Note You need to log in before you can comment on or make changes to this bug.