[csw-devel] SF.net SVN: gar:[11688] csw/mgar/pkg/apache2/trunk
bdwalton at users.sourceforge.net
bdwalton at users.sourceforge.net
Mon Nov 22 03:51:29 CET 2010
Revision: 11688
http://gar.svn.sourceforge.net/gar/?rev=11688&view=rev
Author: bdwalton
Date: 2010-11-22 02:51:29 +0000 (Mon, 22 Nov 2010)
Log Message:
-----------
apache2: merge in fs-rework branch
Modified Paths:
--------------
csw/mgar/pkg/apache2/trunk/Makefile
csw/mgar/pkg/apache2/trunk/files/README.CSW.apache2
csw/mgar/pkg/apache2/trunk/files/build_cas_template
csw/mgar/pkg/apache2/trunk/files/config.layout
Property Changed:
----------------
csw/mgar/pkg/apache2/trunk/
Property changes on: csw/mgar/pkg/apache2/trunk
___________________________________________________________________
Added: svn:mergeinfo
+ /csw/mgar/pkg/apache2/branches/fs-rework:11678-11687
Modified: csw/mgar/pkg/apache2/trunk/Makefile
===================================================================
--- csw/mgar/pkg/apache2/trunk/Makefile 2010-11-22 02:39:37 UTC (rev 11687)
+++ csw/mgar/pkg/apache2/trunk/Makefile 2010-11-22 02:51:29 UTC (rev 11688)
@@ -198,7 +198,7 @@
PKGFILES_CSWap2worker = .*share/doc/ap2_worker.* .*sbin/httpd.worker
PKGFILES_CSWapache2rt = .*share/doc/apache2rt.*
-PROTOTYPE_FILTER = gawk '$$$$3 ~ /apache2\/etc/ && $$$$1 == "f" && $$$$3 !~ /CSW/ && $$$$3 !~ /original/ {$$$$1 = "e"; $$$$2 = "build"}; {print}'
+PROTOTYPE_FILTER = gawk '$$$$3 ~ /etc\/opt\/csw\/apache2/ && $$$$1 == "f" && $$$$3 !~ /CSW/ && $$$$3 !~ /original/ {$$$$1 = "e"; $$$$2 = "build"}; {print}'
include gar/category.mk
@@ -243,7 +243,7 @@
post-merge: create-templates
@echo " => Creating template files and CAS shell scripts..."
- @( cd $(PKGROOT)/opt/csw/apache2/etc; \
+ @( cd $(PKGROOT)/etc/opt/csw/apache2/; \
for f in *conf extra/* mime* magic*; do \
echo "...$$f"; \
mv $$f $$f.CSW; \
Modified: csw/mgar/pkg/apache2/trunk/files/README.CSW.apache2
===================================================================
--- csw/mgar/pkg/apache2/trunk/files/README.CSW.apache2 2010-11-22 02:39:37 UTC (rev 11687)
+++ csw/mgar/pkg/apache2/trunk/files/README.CSW.apache2 2010-11-22 02:51:29 UTC (rev 11688)
@@ -3,6 +3,8 @@
Please note that recent changes may affect the way you're used to
working with the CSW apache2 packages.
+*****************************************************
+
In the past, CSWap2prefork and CSWap2worker delivered a specific mpm
module for use with apache2. We now ship the prefork mpm as part of
CSWapache2 while the worker mpm remains in CSWap2worker.
@@ -14,5 +16,23 @@
/opt/csw/sbin/alternatives --help for information on how you can do
this.
+
+*****************************************************
+
+We are also moving configuration of apache from /opt/csw/apache2/etc
+to /etc/opt/csw/apache2. The files should be auto-migrated upon
+upgrade but if you've broken from the standard config file layout,
+you'll need to manually copy in those additional files. Sorry for the
+hassle, but this really needs to be done for a package like apache
+where the configuration will be unique on most machines.
+
+*****************************************************
+
+The default log directory is now /var/opt/csw/log/apache2. Old logs
+are not touched and the configuration will honour the old location. You
+should updated this and move the logs manually.
+
+*****************************************************
+
Thanks
-The OpenCSW apache2 team.
Modified: csw/mgar/pkg/apache2/trunk/files/build_cas_template
===================================================================
--- csw/mgar/pkg/apache2/trunk/files/build_cas_template 2010-11-22 02:39:37 UTC (rev 11687)
+++ csw/mgar/pkg/apache2/trunk/files/build_cas_template 2010-11-22 02:51:29 UTC (rev 11688)
@@ -4,35 +4,48 @@
#!/bin/sh
PIR=\${PKG_INSTALL_ROOT:-/}
-AP2_DIR=\$PIR/opt/csw/apache2
-AP2_CONF=\$AP2_DIR/etc/
+AP2_DIR=/opt/csw/apache2
+AP2_CONF=\$PIR/etc/opt/csw/apache2
+OLD_CONF=\$PIR\$AP2_DIR/etc
-CONF_FILE=\$AP2_CONF/$1
+NEW_CONF_FILE=\$AP2_CONF/$1
+OLD_CONF_FILE=\$OLD_CONF/$1
if [ "\$1" = install ]; then
- if [ ! -f "\$CONF_FILE" ]; then
+ if [ -f "\$NEW_CONF_FILE" ]; then
+ # existing 2.2.x install with migrated config.
+ echo "Doing nothing. Config file \$NEW_CONF_FILE in place already." >&2
+ elif [ -f "\$OLD_CONF_FILE" ]; then
+ # migrate old config, ensure it's updated
+ echo "Importing old config file from \$OLD_CONF_FILE." >&2
+ cp -p \$OLD_CONF_FILE \$NEW_CONF_FILE
+ if [ -n "\`grep mod_auth.so \$NEW_CONF_FILE\`" ]; then
+ echo "Updating the syntax to 2.2 format though..." >&2
+ \${PIR}/\$AP2_DIR/sbin/update20to22 \$NEW_CONF_FILE >&2
+ fi
+
+ # ensure we use the config files from the new location
+ perl -pi \
+ -e "s/etc\//\/etc\/opt\/csw\/apache2\//" \$NEW_CONF_FILE
+ else
+ # so, we're not an existing or 'needs migration' install, we must
+ # install from the templates.
echo "Installing $1 from CSW template." >&2
- cp -p \$CONF_FILE.CSW \$CONF_FILE
+ cp -p \$NEW_CONF_FILE.CSW \$NEW_CONF_FILE
perl -pi \
-e "s/#*ServerName.*www.example.com/ServerName \`hostname\`/;" \
-e "s/#*ServerAdmin you\@example.com/ServerAdmin root\@\`hostname\`/;" \
-e "s/^User.*daemon/User nobody/;" \
-e "s/^Group.*daemon/Group nobody/;" \
-e 's/^(LoadModule.*suexec.*)/#\$1/;' \
- -e 's/^#(Include.*httpd-mpm.conf)/\$1/;' \$CONF_FILE
+ -e 's/^#(Include.*httpd-mpm.conf)/\$1/;' \$NEW_CONF_FILE
- chown root:bin \$CONF_FILE
- chmod 644 \$CONF_FILE
- else
- echo "Not updating $1. It already exists." >&2
- if [ -n "\`grep mod_auth.so \$CONF_FILE\`" ]; then
- echo "Updating the syntax to 2.2 format though..." >&2
- \${PIR}/\$AP2_DIR/sbin/update20to22 \$CONF_FILE >&2
- fi
+ chown root:bin \$NEW_CONF_FILE
+ chmod 644 \$NEW_CONF_FILE
fi
else
echo "Not removing $1." >&2
# preserve ourselves with no changes
- cat \$CONF_FILE
+ cat \$NEW_CONF_FILE
fi
EOF
Modified: csw/mgar/pkg/apache2/trunk/files/config.layout
===================================================================
--- csw/mgar/pkg/apache2/trunk/files/config.layout 2010-11-22 02:39:37 UTC (rev 11687)
+++ csw/mgar/pkg/apache2/trunk/files/config.layout 2010-11-22 02:51:29 UTC (rev 11688)
@@ -7,7 +7,7 @@
libdir: ${exec_prefix}/lib
libexecdir: ${exec_prefix}/libexec
mandir: ${exec_prefix}/man
- sysconfdir: ${exec_prefix}/etc
+ sysconfdir: /etc/${prefix}
datadir: ${prefix}/share
installbuilddir: ${datadir}/build
errordir: ${datadir}/error
@@ -16,8 +16,8 @@
manualdir: ${datadir}/manual
cgidir: ${datadir}/cgi-bin
includedir: ${exec_prefix}/include
- localstatedir: ${prefix}/var
+ localstatedir: /var/opt/csw/apache2
runtimedir: /var/run
- logfiledir: ${localstatedir}/log
+ logfiledir: /var/opt/csw/log/apache2
proxycachedir: ${datadir}/proxy
</Layout>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the devel
mailing list