7143740 svc:/system/install/server:default can conflict with svc:/network/http:apache22
--- a/components/apache2/Solaris/http-apache22 Wed Feb 29 22:39:04 2012 +0000
+++ b/components/apache2/Solaris/http-apache22 Thu Mar 01 03:33:56 2012 -0800
@@ -20,7 +20,7 @@
# CDDL HEADER END
#
#
-# Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
#
. /lib/svc/share/smf_include.sh
@@ -60,6 +60,8 @@
APACHE_VAR_ROOT=${APACHE_VAR_ROOT}/${APACHE_VERSION}
fi
+APACHE_USER_ENVVARS=${APACHE_ETC_ROOT}/envvars
+
getprop httpd/enable_64bit
if [ "${PROPVAL}" != "" ] ; then
case ${PROPVAL} in
@@ -108,27 +110,27 @@
# /etc/apache2/<version>/envvars file
# delete the line so that it defaults to prefork
# type
- ALREADY_SET=`grep "HTTPD=" ${APACHE_ETC_ROOT}/envvars`
+ ALREADY_SET=`grep "HTTPD=" ${APACHE_USER_ENVVARS}`
if [ "${ALREADY_SET}" != "" ]; then
- sed -e '/^HTTPD=/ d' ${APACHE_ETC_ROOT}/envvars > ${APACHE_ETC_ROOT}/envvars.new
- cp ${APACHE_ETC_ROOT}/envvars.new ${APACHE_ETC_ROOT}/envvars
- rm ${APACHE_ETC_ROOT}/envvars.new
+ sed -e '/^HTTPD=/ d' ${APACHE_USER_ENVVARS} > ${APACHE_USER_ENVVARS}.new
+ cp ${APACHE_USER_ENVVARS}.new ${APACHE_USER_ENVVARS}
+ rm ${APACHE_USER_ENVVARS}.new
fi
;;
worker)
# set HTTPD value to httpd.worker within
# /etc/apache2/<version>/envvars file
- ALREADY_SET=`grep "HTTPD=" ${APACHE_ETC_ROOT}/envvars`
+ ALREADY_SET=`grep "HTTPD=" ${APACHE_USER_ENVVARS}`
if [ "${ALREADY_SET}" != "" ]; then
sed -e '/^HTTPD=/c\
-HTTPD='${APACHE_BIN}'/httpd.worker' ${APACHE_ETC_ROOT}/envvars > ${APACHE_ETC_ROOT}/envvars.new
+HTTPD='${APACHE_BIN}'/httpd.worker' ${APACHE_USER_ENVVARS} > ${APACHE_USER_ENVVARS}.new
else
sed -e '$a\
-HTTPD='${APACHE_BIN}'/httpd.worker' ${APACHE_ETC_ROOT}/envvars > ${APACHE_ETC_ROOT}/envvars.new
+HTTPD='${APACHE_BIN}'/httpd.worker' ${APACHE_USER_ENVVARS} > ${APACHE_USER_ENVVARS}.new
fi
- cp ${APACHE_ETC_ROOT}/envvars.new ${APACHE_ETC_ROOT}/envvars
- rm ${APACHE_ETC_ROOT}/envvars.new
+ cp ${APACHE_USER_ENVVARS}.new ${APACHE_USER_ENVVARS}
+ rm ${APACHE_USER_ENVVARS}.new
;;
*)
if [ "x${APACHE_VERSION}" != "x" ]; then
@@ -156,7 +158,7 @@
;;
esac
-${APACHE_BIN}/apachectl ${STARTUP_OPTIONS} ${cmd} 2>&1
+APACHE_USER_ENVVARS="${APACHE_USER_ENVVARS}" ${APACHE_BIN}/apachectl ${STARTUP_OPTIONS} ${cmd} 2>&1
if [ $? -ne 0 ]; then
echo "Server failed to start. Check the error log (defaults to ${APACHE_VAR_ROOT}/logs/error_log) for more information, if any."
--- a/components/apache2/patches/Makefile.in.patch Wed Feb 29 22:39:04 2012 +0000
+++ b/components/apache2/patches/Makefile.in.patch Thu Mar 01 03:33:56 2012 -0800
@@ -1,5 +1,5 @@
--- Makefile.in Tue Nov 25 12:24:49 2008
-+++ Makefile.in Thu May 19 08:09:10 2011
++++ Makefile.in Tue Feb 28 07:08:05 2012
@@ -49,6 +49,9 @@
-e 's#@@Port@@#$(PORT)#g' \
-e 's#@@SSLPort@@#$(SSLPORT)#g' \
@@ -10,20 +10,27 @@
< $$i; \
else \
sed -n -e '/@@LoadModule@@/q' \
-@@ -87,6 +90,12 @@
+@@ -87,6 +90,19 @@
cp -p envvars-std $(DESTDIR)$(sbindir)/envvars ; \
fi ; \
fi
-+ @if ! grep "$(sysconfdir)/envvars" $(DESTDIR)$(sbindir)/envvars > /dev/null; then \
-+ echo 'if [ -f $(sysconfdir)/envvars ]; then' >> $(DESTDIR)$(sbindir)/envvars ; \
-+ echo '. $(sysconfdir)/envvars' >> $(DESTDIR)$(sbindir)/envvars ; \
++ @if ! grep "{APACHE_USER_ENVVARS}" $(DESTDIR)$(sbindir)/envvars > /dev/null; then \
++ echo '# If you run apachectl with APACHE_USER_ENVVARS in its environment'\
++ >> $(DESTDIR)$(sbindir)/envvars ; \
++ echo '# the specified file will be sourced here. The standard path is'\
++ >> $(DESTDIR)$(sbindir)/envvars ; \
++ echo '# /etc/apache2/2.2/envvars.' >> $(DESTDIR)$(sbindir)/envvars ; \
++ echo '' >> $(DESTDIR)$(sbindir)/envvars ; \
++ echo 'if [ "x$${APACHE_USER_ENVVARS}" != "x" -a -f "$${APACHE_USER_ENVVARS}" ]; then'\
++ >> $(DESTDIR)$(sbindir)/envvars ; \
++ echo '. "$${APACHE_USER_ENVVARS}"' >> $(DESTDIR)$(sbindir)/envvars ; \
+ echo 'fi' >> $(DESTDIR)$(sbindir)/envvars ; \
+ fi
+ @grep "^#" $(top_builddir)/support/envvars-std > $(DESTDIR)$(sysconfdir)/envvars
# Create a sanitized config_vars.mk
build/config_vars.out: build/config_vars.mk
-@@ -165,7 +174,6 @@
+@@ -165,7 +181,6 @@
install-other:
@test -d $(DESTDIR)$(logfiledir) || $(MKINSTALLDIRS) $(DESTDIR)$(logfiledir)