# HG changeset patch # User Mike Sullivan # Date 1371416734 25200 # Node ID ebb3e4503fede5853bfbc544a15f949f6f1185d9 # Parent ee87318d9935892aeda3856a42c0f27bc5392cb8 backout 16515692/15771644/16701480/15648359/16401460 - needs more work diff -r ee87318d9935 -r ebb3e4503fed components/apache2/Solaris/apache2.1m.sunman --- a/components/apache2/Solaris/apache2.1m.sunman Fri Jun 14 16:37:38 2013 -0700 +++ b/components/apache2/Solaris/apache2.1m.sunman Sun Jun 16 14:05:34 2013 -0700 @@ -1,6 +1,6 @@ '\" te -.\" Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved. -.TH apache2 1M "May 2013" "SunOS 5.12" "System Administration Commands" +.\" Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. +.TH apache2 1M "May 2011" "SunOS 5.11" "System Administration Commands" .SH NAME apache2 \- Apache HTTP Server Version 2 overview .SH SYNOPSIS @@ -19,28 +19,6 @@ .LP Both 32-bit and 64-bit versions of the servers are installed. It also includes two of the most popular MPMs - Prefork and Worker. -.sp -Apache 2 can be enabled by authorized user within the service -management facility (SMF), using the following fault management -resource identifier (FMRI): -.sp -.in +2 -.nf -svc:/network/http:apache22 -.fi -.in -2 -.sp -Available SMF properties are listed in the following table: -.sp -.TS -tab(^G) allbox; -cw(2.750000i)| cw(2.750000i) -lw(2.750000i)| lw(2.750000i). -SMF Property Name^Value -httpd/server_type^prefork (default) or worker -httpd/enable_64bit^true or false(default) -httpd/startup_options^valid apachectl options -.TE .SH FILES .sp .LP @@ -87,10 +65,6 @@ .RS 4n Contains server configuration files. A newly-installed server contains a default \fBhttpd.conf\fR file. This is the main configuration file. -.sp -If there is need to use different main configuration file (e.g. to run -multiple Apache 2 instances), it's possible by providing Apache '-f' -option via SMF property httpd/startup_options. .RE .sp @@ -121,11 +95,6 @@ File for specifying the environment settings which the server uses at startup. This is the user-editable version of the /usr/apache2/[version]/bin/envvars file. -.sp -Note that this is default path to envvars file only in case where main -configuration file is in directory /etc/apache2/[version]/2.2/. If this -is not the case Apache 2 will look for envvars file in the same -directory where is main configuration file. .RE .sp @@ -414,67 +383,18 @@ configuration in the \fBhttpd.conf\fR file. .RE -.SH EXAMPLES -.LP -\fBExample 1 \fRTo enable 64-bit server -.sp - -.in +2 -.nf -# \fBsvccfg -s apache22 setprop httpd/enable_64bit=false\fR -# \fBsvcadm refresh apache22\fR -# \fBsvcadm enable apache22\fR -.fi -.in -2 -.sp - -.LP -\fBExample 2 \fRTo switch to worker server type -.sp - -.in +2 -.nf -# \fBsvccfg -s apache22 setprop httpd/server_type=worker\fR -# \fBsvcadm refresh apache22\fR -# \fBsvcadm restart apache22\fR -.fi -.in -2 -.sp - -.LP -\fBExample 3 \fRCreate new SMF apache instance -.sp -.LP -This expects that valid configuration exists in -/var/myapache/httpd.conf and it has altered all relevant directives -against default apache instance (e.g. PidFile, Listen, DocumentRoot, -ErrorLog and CustomLog). -.sp -.in +2 -.nf -# \fBcp /lib/svc/manifest/network/http-apache22.xml my-apache22.xml\fR -.sp -Edit my-apache22.xml and rename instance name to my-apache22. - -# \fBsvccfg import my-apache22.xml\fR -# \fBsvccfg -s my-apache22 setprop httpd/startup_options=\\("-f" "/var/myapache/httpd.conf"\\)\fR -# \fBsvcadm refresh my-apache22\fR -.fi -.in -2 -.sp - .SH SEE ALSO .sp .LP \fBattributes(5)\fR, \fBhttpd(8)\fR, apachectl(8) .sp .LP -http://httpd.apache.org/docs/ +http://www.apache.org .SH NOTES .sp .LP In addition to the documentation and man pages included with Solaris, -more information is available at http://httpd.apache.org/\&. +more information is available at http://www.apache.org\&. .sp .LP The Apache 2 man pages are provided with the programming modules. To diff -r ee87318d9935 -r ebb3e4503fed components/apache2/Solaris/http-apache22 --- a/components/apache2/Solaris/http-apache22 Fri Jun 14 16:37:38 2013 -0700 +++ b/components/apache2/Solaris/http-apache22 Sun Jun 16 14:05:34 2013 -0700 @@ -20,7 +20,7 @@ # CDDL HEADER END # # -# Copyright (c) 2008, 2013, 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 @@ -32,7 +32,7 @@ #if startup options contain multiple arguments separated by a blank, #then they should be specified as below -#e.g., %> svccfg -s apache22 setprop httpd/startup_options=\("-f" "/etc/apache2/2.2/new.conf"\) +#e.g., %> svccfg -s apache22 setprop 'httpd/startup_options=("-f" "/etc/apache2/2.2/new.conf")' # STARTUP_OPTIONS= @@ -52,20 +52,6 @@ return } -# Check whether alternate config file was specified using option -f. -# If it's the case, Apache will search in the same directory for -# availability of environment file. -envvars_path_update() { - eval "set -- $1" - while [ $# -gt 0 ]; do - case "$1" in - -f) APACHE_USER_ENVVARS=`dirname "${2:-}"`/envvars; break;; - -f*) APACHE_USER_ENVVARS=`dirname "${1#-f}"`/envvars; break;; - esac - shift - done -} - APACHE_VERSION=`echo ${SMF_FMRI} | sed 's/[^0-9]//g;s/./\.&/g;s/^\.//'` if [ "x${APACHE_VERSION}" != "x" ]; then echo "Apache version is ${APACHE_VERSION}" @@ -111,7 +97,6 @@ echo startupoptions set echo val=${PROPVAL} STARTUP_OPTIONS="${PROPVAL} -k" - envvars_path_update "${PROPVAL}" fi getprop httpd/server_type @@ -121,10 +106,31 @@ case ${SERVER_TYPE} in prefork) - HTTPD=${APACHE_BIN}/httpd + # If HTTPD value is set in + # /etc/apache2//envvars file + # delete the line so that it defaults to prefork + # type + ALREADY_SET=`grep "HTTPD=" ${APACHE_USER_ENVVARS}` + if [ "${ALREADY_SET}" != "" ]; then + 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) - HTTPD=${APACHE_BIN}/httpd.worker + # set HTTPD value to httpd.worker within + # /etc/apache2//envvars file + ALREADY_SET=`grep "HTTPD=" ${APACHE_USER_ENVVARS}` + if [ "${ALREADY_SET}" != "" ]; then + sed -e '/^HTTPD=/c\ +HTTPD='${APACHE_BIN}'/httpd.worker' ${APACHE_USER_ENVVARS} > ${APACHE_USER_ENVVARS}.new + else + sed -e '$a\ +HTTPD='${APACHE_BIN}'/httpd.worker' ${APACHE_USER_ENVVARS} > ${APACHE_USER_ENVVARS}.new + fi + + cp ${APACHE_USER_ENVVARS}.new ${APACHE_USER_ENVVARS} + rm ${APACHE_USER_ENVVARS}.new ;; *) if [ "x${APACHE_VERSION}" != "x" ]; then @@ -152,7 +158,7 @@ ;; esac -HTTPD="${HTTPD}" APACHE_USER_ENVVARS="${APACHE_USER_ENVVARS}" ${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." diff -r ee87318d9935 -r ebb3e4503fed components/apache2/apache-22.p5m --- a/components/apache2/apache-22.p5m Fri Jun 14 16:37:38 2013 -0700 +++ b/components/apache2/apache-22.p5m Sun Jun 16 14:05:34 2013 -0700 @@ -21,9 +21,6 @@ # Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. # default mangler.man.stability uncommitted> - \ - default facet.devel all> - set name=pkg.fmri \ value=pkg:/web/server/apache-22@$(IPS_COMPONENT_VERSION),$(BUILD_VERSION) set name=pkg.summary \ @@ -76,7 +73,7 @@ file path=lib/svc/method/http-apache22 file path=usr/apache2/2.2/bin/$(MACH64)/ab file path=usr/apache2/2.2/bin/$(MACH64)/apachectl -file path=usr/apache2/2.2/bin/$(MACH64)/apxs facet.devel=true +file path=usr/apache2/2.2/bin/$(MACH64)/apxs file path=usr/apache2/2.2/bin/$(MACH64)/checkgid file path=usr/apache2/2.2/bin/$(MACH64)/dbmmanage file path=usr/apache2/2.2/bin/$(MACH64)/envvars @@ -93,7 +90,7 @@ file usr/apache2/2.2/bin/$(MACH64)/suexec path=usr/apache2/2.2/bin/$(MACH64)/suexec.disabled mode=0500 file path=usr/apache2/2.2/bin/ab file path=usr/apache2/2.2/bin/apachectl -file path=usr/apache2/2.2/bin/apxs facet.devel=true +file path=usr/apache2/2.2/bin/apxs file path=usr/apache2/2.2/bin/checkgid file path=usr/apache2/2.2/bin/dbmmanage file path=usr/apache2/2.2/bin/envvars @@ -319,7 +316,7 @@ file path=usr/apache2/2.2/man/man1/htpasswd.1 file path=usr/apache2/2.2/man/man8/ab.8 file path=usr/apache2/2.2/man/man8/apachectl.8 -file path=usr/apache2/2.2/man/man8/apxs.8 facet.devel=all +file path=usr/apache2/2.2/man/man8/apxs.8 file path=usr/apache2/2.2/man/man8/htcacheclean.8 file path=usr/apache2/2.2/man/man8/httpd.8 file path=usr/apache2/2.2/man/man8/logresolve.8 @@ -578,7 +575,7 @@ link path=usr/apache2/2.2/build/64 target=$(MACH64) link path=usr/apache2/2.2/libexec/64 target=$(MACH64) link path=usr/bin/$(MACH64)/ab target=../../apache2/2.2/bin/$(MACH64)/ab -link path=usr/bin/$(MACH64)/apxs target=../../apache2/2.2/bin/$(MACH64)/apxs facet.devel=all +link path=usr/bin/$(MACH64)/apxs target=../../apache2/2.2/bin/$(MACH64)/apxs link path=usr/bin/$(MACH64)/dbmmanage target=../../apache2/2.2/bin/$(MACH64)/dbmmanage link path=usr/bin/$(MACH64)/htcacheclean target=../../apache2/2.2/bin/$(MACH64)/htcacheclean link path=usr/bin/$(MACH64)/htdbm target=../../apache2/2.2/bin/$(MACH64)/htdbm diff -r ee87318d9935 -r ebb3e4503fed components/apache2/patches/apachectl.patch --- a/components/apache2/patches/apachectl.patch Fri Jun 14 16:37:38 2013 -0700 +++ b/components/apache2/patches/apachectl.patch Sun Jun 16 14:05:34 2013 -0700 @@ -1,14 +1,15 @@ -Allows SMF method to override Apache binary to start and thus select if -we want prefork/worker Apache MPM. - ---- support/apachectl.in Tue Jul 11 20:38:44 2006 -+++ support/apachectl.in Tue May 14 07:40:03 2013 -@@ -41,7 +41,7 @@ - # -------------------- -------------------- - # - # the path to your httpd binary, including options if necessary --HTTPD='@exp_sbindir@/@progname@' -+HTTPD=${HTTPD:-@exp_sbindir@/@progname@} - # - # pick up any necessary environment variables - if test -f @exp_sbindir@/envvars; then +--- support/apachectl.in.orig Tue Jul 11 20:38:44 2006 ++++ support/apachectl.in Tue Feb 12 02:24:17 2008 +@@ -75,6 +75,12 @@ + ARGV="-h" + fi + ++if [ ! -d "@exp_runtimedir@" ]; then ++ mkdir -p @exp_runtimedir@ ++ chown -R webservd @exp_runtimedir@ ++ chgrp -R webservd @exp_runtimedir@ ++fi ++ + case $ARGV in + start|stop|restart|graceful|graceful-stop) + $HTTPD -k $ARGV diff -r ee87318d9935 -r ebb3e4503fed components/apache2/patches/bug54719.patch --- a/components/apache2/patches/bug54719.patch Fri Jun 14 16:37:38 2013 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,29 +0,0 @@ -https://issues.apache.org/bugzilla/show_bug.cgi?id=54719 - ---- server/log.c 2009-05-21 10:31:52.000000000 -0700 -+++ server/log.c 2013-04-03 02:34:41.324804956 -0700 -@@ -775,7 +775,7 @@ AP_DECLARE(void) ap_log_pid(apr_pool_t * - static pid_t saved_pid = -1; - pid_t mypid; - apr_status_t rv; -- const char *fname; -+ const char *fname, *dname; - - if (!filename) { - return; -@@ -804,6 +804,15 @@ AP_DECLARE(void) ap_log_pid(apr_pool_t * - fname); - } - -+ dname = apr_pstrndup(p, filename, (strrchr(filename, '/')+1)-filename); -+ if (APR_SUCCESS != (rv = apr_dir_make_recursive(dname, -+ APR_OS_DEFAULT, p))) { -+ ap_log_error(APLOG_MARK, APLOG_ERR, rv, NULL, -+ "could not create pid directory: %s", -+ dname); -+ exit(1); -+ } -+ - if ((rv = apr_file_open(&pid_file, fname, - APR_WRITE | APR_CREATE | APR_TRUNCATE, - APR_UREAD | APR_UWRITE | APR_GREAD | APR_WREAD, p)) diff -r ee87318d9935 -r ebb3e4503fed components/tomcat/tomcat.p5m --- a/components/tomcat/tomcat.p5m Fri Jun 14 16:37:38 2013 -0700 +++ b/components/tomcat/tomcat.p5m Sun Jun 16 14:05:34 2013 -0700 @@ -49,7 +49,7 @@ value=PSARC/2008/711 set name=org.opensolaris.consolidation value=$(CONSOLIDATION) dir path=var/tomcat6/conf group=webservd owner=webservd -dir path=var/tomcat6/logs group=webservd owner=webservd mode=0700 +dir path=var/tomcat6/logs group=webservd owner=webservd dir path=var/tomcat6/temp group=webservd owner=webservd dir path=var/tomcat6/webapps group=webservd owner=webservd dir path=var/tomcat6/work group=webservd owner=webservd