[Webapps-common-discuss] [commit] r79 - in trunk: debian dpkg examples examples/webapp-apache-example examples/webapp-apache-example/debian templates

Sean Finney seanius at costa.debian.org
Sun May 14 20:47:23 UTC 2006


Author: seanius
Date: 2006-05-14 20:47:22 +0000 (Sun, 14 May 2006)
New Revision: 79

Added:
   trunk/examples/webapp-apache-example/
Removed:
   trunk/examples/webapp-test-apache-inline/
   trunk/examples/webapp-test-apache-simple/
   trunk/examples/webapp-test-apache-template/
Modified:
   trunk/debian/changelog
   trunk/debian/rules
   trunk/debian/webapps-common.dirs
   trunk/debian/webapps-common.postinst
   trunk/dpkg/common
   trunk/examples/buildpackages.sh
   trunk/examples/webapp-apache-example/apache_template.conf
   trunk/examples/webapp-apache-example/debian/changelog
   trunk/examples/webapp-apache-example/debian/config
   trunk/examples/webapp-apache-example/debian/control
   trunk/examples/webapp-apache-example/debian/dirs
   trunk/examples/webapp-apache-example/debian/postinst
   trunk/examples/webapp-apache-example/debian/postrm
   trunk/examples/webapp-apache-example/debian/prerm
   trunk/examples/webapp-apache-example/debian/rules
   trunk/examples/webapp-apache-example/index.html
   trunk/templates/apache2-wc-master.conf
Log:
update examples

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2006-05-14 20:16:02 UTC (rev 78)
+++ trunk/debian/changelog	2006-05-14 20:47:22 UTC (rev 79)
@@ -4,6 +4,7 @@
   * you can now have multiple instances on the same host.  this involved
     a rather large rewrite of code, but much to my surprise and confusement
     this "feature" resulted in almost 200 lines less of code.  go figure.
+  * updated examples to be generally better examples
 
  -- sean finney <seanius at debian.org>  Tue, 09 May 2006 23:47:15 +0200
 

Modified: trunk/debian/rules
===================================================================
--- trunk/debian/rules	2006-05-14 20:16:02 UTC (rev 78)
+++ trunk/debian/rules	2006-05-14 20:47:22 UTC (rev 79)
@@ -13,7 +13,8 @@
 SHARE:=${TMPDIR}/usr/share/webapps-common
 DOC:=${TMPDIR}/usr/share/doc/webapps-common
 
-builddocs=no
+# set to no here or in the environment to skip building the documentation
+# builddocs=no
 
 configure: configure-stamp
 configure-stamp:

Modified: trunk/debian/webapps-common.dirs
===================================================================
--- trunk/debian/webapps-common.dirs	2006-05-14 20:16:02 UTC (rev 78)
+++ trunk/debian/webapps-common.dirs	2006-05-14 20:47:22 UTC (rev 79)
@@ -9,3 +9,6 @@
 etc/webapps-common/apps-enabled/apache-ssl
 etc/webapps-common/apps-enabled/apache-perl
 etc/apache2/conf.d
+etc/apache/conf.d
+etc/apache-ssl/conf.d
+etc/apache-perl/conf.d

Modified: trunk/debian/webapps-common.postinst
===================================================================
--- trunk/debian/webapps-common.postinst	2006-05-14 20:16:02 UTC (rev 78)
+++ trunk/debian/webapps-common.postinst	2006-05-14 20:47:22 UTC (rev 79)
@@ -8,9 +8,19 @@
 if [ "$1" = "configure" ] || [ "$1" = "reconfigure" ]; then
 	if [ ! -f /etc/webapps-common/virtualhosts.conf ]; then
 		ucf ${template_dir}/virtualhosts.conf /etc/webapps-common/virtualhosts.conf
+		# XXX should probably respect perms here?
+		chmod a+r /etc/webapps-common/virtualhosts.conf
 	fi
 
-	ucf ${template_dir}/apache2-wc-master.conf /etc/apache2/conf.d/webapps-common.conf
+	tfile=`mktemp -t`
+	for httpd in apache apache2 apache-ssl apache-perl; do
+		sed -e "s,HTTPD,$httpd,g" < ${template_dir}/apache2-wc-master.conf > $tfile
+		ucf $tfile /etc/$httpd/conf.d/webapps-common.conf
+		# XXX should probably respect permissions here
+		chown root:www-data /etc/$httpd/conf.d/webapps-common.conf
+		# XXX should probably reload the servers here?
+	done
+	rm -f $tfile
 fi
 
 #DEBHELPER#

Modified: trunk/dpkg/common
===================================================================
--- trunk/dpkg/common	2006-05-14 20:16:02 UTC (rev 78)
+++ trunk/dpkg/common	2006-05-14 20:47:22 UTC (rev 79)
@@ -81,27 +81,6 @@
 }
 
 ###
-### update the webapps-common apache siteconf file
-###
-wc_update_apache_siteconf(){
-	true
-#	local tmpconf siteid_dir siteconf
-#	_wc_debug "wc_update_apache_siteconf() $@"
-#	tmpconf=`_wc_mktmp`
-#
-#	siteconf="$wc_confdir/siteids.conf"
-#	siteid_dir="$wc_confdir/siteids.d"
-#
-#	for p in `ls $siteid_dir/*.conf 2>/dev/null`; do
-#		grep -vE '[[:space:]]*#' $p |\
-#			while read site loc; do
-#				echo "SetEnvIf REQUEST_URI '^http://$site/$loc' X_DEBIAN_SITEID=$site/$loc" >> "$tmpconf"
-#			done
-#	done
-#	ucf "$tmpconf" "$siteconf"
-}
-
-###
 ### dump package configuration to a config file
 ###
 wc_write_package_httpd_configs(){
@@ -141,6 +120,7 @@
 			mkdir -p `dirname "$output"`
 				
 			# and register it via ucf
+			# XXX preserving owner/mode?
 			chmod 640 "$tmpconf"
 			ucf "$tmpconf" "$output"
 			chgrp www-data "$output"

Modified: trunk/examples/buildpackages.sh
===================================================================
--- trunk/examples/buildpackages.sh	2006-05-14 20:16:02 UTC (rev 78)
+++ trunk/examples/buildpackages.sh	2006-05-14 20:47:22 UTC (rev 79)
@@ -1,7 +1,6 @@
 #!/bin/sh
 
-packages="webapp-test-apache-inline webapp-test-apache-simple \
-         webapp-test-apache-template"
+packages="webapp-apache-example"
 
 nwd=`dirname $0`
 cd $nwd

Copied: trunk/examples/webapp-apache-example (from rev 78, trunk/examples/webapp-test-apache-template)

Modified: trunk/examples/webapp-apache-example/apache_template.conf
===================================================================
--- trunk/examples/webapp-test-apache-template/apache_template.conf	2006-05-14 20:16:02 UTC (rev 78)
+++ trunk/examples/webapp-apache-example/apache_template.conf	2006-05-14 20:47:22 UTC (rev 79)
@@ -1,8 +1,16 @@
 # this is a sample template-based configuration file for apache.
 # this file will be included as-is, with the exception that
 # certain substitutions will occur with the result
-Alias _WC_WEBSITE_SUBDIRECTORY_ /usr/share/webapp-test-apache-template/www
 
-<Directory /usr/share/webapp-test-apache-template/www>
-	# other stuff could be done here
+# for exampke, this will expand to either
+#	Alias /foo /bar
+# or
+#	DocumentRoot /bar
+#
+# depending on how the admin has chosen to configure the application.
+#	Where foo is the 
+_WC_DOCROOT_DIRECTIVE_
+
+<Directory /usr/share/webapp-apache-example/www>
+	# other stuff could be done here...
 </Directory>

Modified: trunk/examples/webapp-apache-example/debian/changelog
===================================================================
--- trunk/examples/webapp-test-apache-template/debian/changelog	2006-05-14 20:16:02 UTC (rev 78)
+++ trunk/examples/webapp-apache-example/debian/changelog	2006-05-14 20:47:22 UTC (rev 79)
@@ -1,4 +1,4 @@
-webapp-test-apache-template (0.0) UNRELEASED; urgency=low
+webapp-apache-example (0.0) UNRELEASED; urgency=low
 
   * initial version.
 

Modified: trunk/examples/webapp-apache-example/debian/config
===================================================================
--- trunk/examples/webapp-test-apache-template/debian/config	2006-05-14 20:16:02 UTC (rev 78)
+++ trunk/examples/webapp-apache-example/debian/config	2006-05-14 20:47:22 UTC (rev 79)
@@ -5,4 +5,4 @@
 . /usr/share/debconf/confmodule
 . /usr/share/webapps-common/dpkg/config
 wc_apache_conf_style="template"
-wc_go webapp-test-apache-template $@
+wc_go webapp-apache-example $@

Modified: trunk/examples/webapp-apache-example/debian/control
===================================================================
--- trunk/examples/webapp-test-apache-template/debian/control	2006-05-14 20:16:02 UTC (rev 78)
+++ trunk/examples/webapp-apache-example/debian/control	2006-05-14 20:47:22 UTC (rev 79)
@@ -1,11 +1,11 @@
-Source: webapp-test-apache-template
+Source: webapp-apache-example
 Section: admin
 Priority: optional
 Maintainer: sean finney <seanius at debian.org>
 Build-Depends: debhelper (>= 4.0.0)
 Standards-Version: 3.6.1
 
-Package: webapp-test-apache-template
+Package: webapp-apache-example
 Architecture: all
 Depends: webapps-common, ${misc:Depends}
 Description: test package for webapps-common

Modified: trunk/examples/webapp-apache-example/debian/dirs
===================================================================
--- trunk/examples/webapp-test-apache-template/debian/dirs	2006-05-14 20:16:02 UTC (rev 78)
+++ trunk/examples/webapp-apache-example/debian/dirs	2006-05-14 20:47:22 UTC (rev 79)
@@ -1,3 +1,3 @@
-usr/share/webapps-common/install/webapp-test-apache-template/httpd
-usr/share/webapp-test-apache-template/www
-etc/webapp-test-apache-template
+usr/share/webapps-common/install/webapp-apache-example/httpd
+usr/share/webapp-apache-example/www
+etc/webapp-apache-example

Modified: trunk/examples/webapp-apache-example/debian/postinst
===================================================================
--- trunk/examples/webapp-test-apache-template/debian/postinst	2006-05-14 20:16:02 UTC (rev 78)
+++ trunk/examples/webapp-apache-example/debian/postinst	2006-05-14 20:47:22 UTC (rev 79)
@@ -5,6 +5,6 @@
 . /usr/share/debconf/confmodule
 . /usr/share/webapps-common/dpkg/postinst
 wc_apache_conf_style="template"
-wc_go webapp-test-apache-template $@
+wc_go webapp-apache-example $@
 
 #DEBHELPER#

Modified: trunk/examples/webapp-apache-example/debian/postrm
===================================================================
--- trunk/examples/webapp-test-apache-template/debian/postrm	2006-05-14 20:16:02 UTC (rev 78)
+++ trunk/examples/webapp-apache-example/debian/postrm	2006-05-14 20:47:22 UTC (rev 79)
@@ -4,6 +4,6 @@
 
 . /usr/share/debconf/confmodule
 . /usr/share/webapps-common/dpkg/postrm
-wc_go webapp-test-apache-template $@
+wc_go webapp-apache-example $@
 
 #DEBHELPER#

Modified: trunk/examples/webapp-apache-example/debian/prerm
===================================================================
--- trunk/examples/webapp-test-apache-template/debian/prerm	2006-05-14 20:16:02 UTC (rev 78)
+++ trunk/examples/webapp-apache-example/debian/prerm	2006-05-14 20:47:22 UTC (rev 79)
@@ -5,6 +5,6 @@
 . /usr/share/debconf/confmodule
 . /usr/share/webapps-common/dpkg/prerm
 wc_apache_conf_style="template"
-wc_go webapp-test-apache-template $@
+wc_go webapp-apache-example $@
 
 #DEBHELPER#

Modified: trunk/examples/webapp-apache-example/debian/rules
===================================================================
--- trunk/examples/webapp-test-apache-template/debian/rules	2006-05-14 20:16:02 UTC (rev 78)
+++ trunk/examples/webapp-apache-example/debian/rules	2006-05-14 20:47:22 UTC (rev 79)
@@ -10,7 +10,7 @@
 #export DH_VERBOSE=1
 
 # some shorthand variables to make life a little easier
-p:=webapp-test-apache-template
+p:=webapp-apache-example
 ptmp:=debian/$p
 INSTDIR:=${ptmp}/usr/share/webapps-common/install/$p/httpd
 WEBDOCDIR:=${ptmp}/usr/share/$p/www

Modified: trunk/examples/webapp-apache-example/index.html
===================================================================
--- trunk/examples/webapp-test-apache-template/index.html	2006-05-14 20:16:02 UTC (rev 78)
+++ trunk/examples/webapp-apache-example/index.html	2006-05-14 20:47:22 UTC (rev 79)
@@ -1,3 +1,3 @@
 <p>
-welcome to the front page for webapp-test-apache-template!
+welcome to the front page for webapp-apache-example!
 </p>

Modified: trunk/templates/apache2-wc-master.conf
===================================================================
--- trunk/templates/apache2-wc-master.conf	2006-05-14 20:16:02 UTC (rev 78)
+++ trunk/templates/apache2-wc-master.conf	2006-05-14 20:47:22 UTC (rev 79)
@@ -1,5 +1,5 @@
-# master configuration file for webapps-common, apache2 flavor
-# this file is responsible for instructing apache2 to load all
+# master configuration file for webapps-common, HTTPD flavor.
+# this file is responsible for instructing HTTPD to load all
 # application configuration files for packages configured via
-# webapps common.
-Include /etc/webapps-common/apps-enabled/apache2/=global=/*.conf
+# webapps-common.
+Include /etc/webapps-common/apps-enabled/HTTPD/=global=/*.conf




More information about the Webapps-common-discuss mailing list