Initial packaging of Debian/Domtool Apache Config
authorClinton Ebadi <clinton@unknownlamer.org>
Sun, 2 Sep 2012 21:28:16 +0000 (17:28 -0400)
committerClinton Ebadi <clinton@unknownlamer.org>
Sun, 2 Sep 2012 21:28:16 +0000 (17:28 -0400)
* Installs conf.d/* for using domtool generated vhosts, waklog, and
  afs
* Enables mod_waklog, disables on removal
* Creates cron job for syncing logs into afs space
* DEFECT: Can not be removed: you have to purge and manually restart
  apache
* MISSING: Does not set its own firewall rules

19 files changed:
debian/README [new file with mode: 0644]
debian/README.Debian [new file with mode: 0644]
debian/README.source [new file with mode: 0644]
debian/changelog [new file with mode: 0644]
debian/compat [new file with mode: 0644]
debian/control [new file with mode: 0644]
debian/copyright [new file with mode: 0644]
debian/docs [new file with mode: 0644]
debian/hcoop-apache-clean-cache [new file with mode: 0644]
debian/hcoop-apache2-config.dirs [new file with mode: 0644]
debian/hcoop-apache2-config.hcoop-apache-sync-logs.cron.d [new file with mode: 0644]
debian/hcoop-apache2-config.install [new file with mode: 0644]
debian/hcoop-apache2-config.postinst [new file with mode: 0644]
debian/hcoop-apache2-config.postrm [new file with mode: 0644]
debian/rules [new file with mode: 0755]
debian/source/format [new file with mode: 0644]
files/conf.d/00waklog [new file with mode: 0644]
files/conf.d/hcoop-security [new file with mode: 0644]
files/conf.d/hcoop_vhosts [new file with mode: 0644]

diff --git a/debian/README b/debian/README
new file mode 100644 (file)
index 0000000..4c8e572
--- /dev/null
@@ -0,0 +1,6 @@
+The Debian Package hcoop-apache2-config
+----------------------------
+
+Comments regarding the Package
+
+ -- Clinton Ebadi <clinton@unknownlamer.org>  Sun, 02 Sep 2012 01:14:19 -0400
diff --git a/debian/README.Debian b/debian/README.Debian
new file mode 100644 (file)
index 0000000..5fdb6a4
--- /dev/null
@@ -0,0 +1,6 @@
+hcoop-apache2-config for Debian
+-------------------------------
+
+<possible notes regarding this package - if none, delete this file>
+
+ -- Clinton Ebadi <clinton@unknownlamer.org>  Sun, 02 Sep 2012 01:14:19 -0400
diff --git a/debian/README.source b/debian/README.source
new file mode 100644 (file)
index 0000000..dc79eb6
--- /dev/null
@@ -0,0 +1,9 @@
+hcoop-apache2-config for Debian
+-------------------------------
+
+<this file describes information about the source package, see Debian policy
+manual section 4.14. You WILL either need to modify or delete this file>
+
+
+
+
diff --git a/debian/changelog b/debian/changelog
new file mode 100644 (file)
index 0000000..2a095d9
--- /dev/null
@@ -0,0 +1,5 @@
+hcoop-apache2-config (0) stable; urgency=low
+
+  * Initial Release.
+
+ -- Clinton Ebadi <clinton@unknownlamer.org>  Sun, 02 Sep 2012 01:14:19 -0400
diff --git a/debian/compat b/debian/compat
new file mode 100644 (file)
index 0000000..45a4fb7
--- /dev/null
@@ -0,0 +1 @@
+8
diff --git a/debian/control b/debian/control
new file mode 100644 (file)
index 0000000..2c6822a
--- /dev/null
@@ -0,0 +1,16 @@
+Source: hcoop-apache2-config
+Section: hcoop-config/httpd
+Priority: extra
+Maintainer: Clinton Ebadi <clinton@unknownlamer.org>
+Build-Depends: debhelper (>= 8.0.0), cdbs, config-package-dev
+Standards-Version: 3.9.3
+Homepage: http://hcoop.net
+#Vcs-Git: git://git.debian.org/collab-maint/hcoop-apache2-config.git
+#Vcs-Browser: http://git.debian.org/?p=collab-maint/hcoop-apache2-config.git;a=summary
+
+Package: hcoop-apache2-config
+Architecture: all
+Depends: libapache2-mod-waklog, apache2-mpm-prefork, apache2.2-common, ${misc:Depends}
+Description: Configuration for HCoop/Domtool Apache
+ Configuration bits required for apache to operate as a user web node
+ controlled by domtool.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644 (file)
index 0000000..899c780
--- /dev/null
@@ -0,0 +1,34 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: hcoop-apache2-config
+Source: <url://example.com>
+
+Files: *
+Copyright: <years> <put author's name and email here>
+           <years> <likewise for another author>
+License: GPL-3.0+
+
+Files: debian/*
+Copyright: 2012 Clinton Ebadi <clinton@unknownlamer.org>
+License: GPL-3.0+
+
+License: GPL-3.0+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+ .
+ This package is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+ .
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ .
+ On Debian systems, the complete text of the GNU General
+ Public License version 3 can be found in "/usr/share/common-licenses/GPL-3".
+
+# Please also look if there are files or directories which have a
+# different copyright/license attached and list them here.
+# Please avoid to pick license terms that are more restrictive than the
+# packaged work, as it may make Debian's contributions unacceptable upstream.
diff --git a/debian/docs b/debian/docs
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/debian/hcoop-apache-clean-cache b/debian/hcoop-apache-clean-cache
new file mode 100644 (file)
index 0000000..b9a2cd0
--- /dev/null
@@ -0,0 +1,5 @@
+# /etc/cron.d/hcoop-apache-clean-cache: Clean the disk cache every 23
+# minutes.
+MAILTO=logs@mire.hcoop.net
+
+*/23 * * * * root /usr/sbin/htcacheclean -n -t -p/var/cache/apache2/mod_disk_cache -l700M
diff --git a/debian/hcoop-apache2-config.dirs b/debian/hcoop-apache2-config.dirs
new file mode 100644 (file)
index 0000000..b1e985e
--- /dev/null
@@ -0,0 +1 @@
+etc/apache2/vhosts
\ No newline at end of file
diff --git a/debian/hcoop-apache2-config.hcoop-apache-sync-logs.cron.d b/debian/hcoop-apache2-config.hcoop-apache-sync-logs.cron.d
new file mode 100644 (file)
index 0000000..03658a3
--- /dev/null
@@ -0,0 +1,5 @@
+# /etc/cron.d/hcoop-apache-sync-logs: Copy apache logs to user
+# homedirs every 20 minutes.
+MAILTO=logs@hcoop.net
+
+0 */2 * * * root /afs/hcoop.net/common/etc/scripts/apache-sync-logs >/dev/null 2>&1
diff --git a/debian/hcoop-apache2-config.install b/debian/hcoop-apache2-config.install
new file mode 100644 (file)
index 0000000..9936c66
--- /dev/null
@@ -0,0 +1 @@
+files/conf.d/* etc/apache2/conf.d
diff --git a/debian/hcoop-apache2-config.postinst b/debian/hcoop-apache2-config.postinst
new file mode 100644 (file)
index 0000000..a6c0b58
--- /dev/null
@@ -0,0 +1,46 @@
+#!/bin/sh
+# postinst script for hcoop-apache2-config
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <postinst> `configure' <most-recently-configured-version>
+#        * <old-postinst> `abort-upgrade' <new version>
+#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+#          <new-version>
+#        * <postinst> `abort-remove'
+#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+#          <failed-install-package> <version> `removing'
+#          <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+    configure)
+       if [ -z "$2" ]; then
+           a2enmod -q waklog
+       fi
+
+       if [ -e "/etc/apache2/mods-enabled/waklog.load" ]; then
+           invoke-rc.d apache2 restart
+       fi
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/hcoop-apache2-config.postrm b/debian/hcoop-apache2-config.postrm
new file mode 100644 (file)
index 0000000..3dcae1d
--- /dev/null
@@ -0,0 +1,43 @@
+#!/bin/sh
+# prerm script for hcoop-apache2-config
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <prerm> `remove'
+#        * <old-prerm> `upgrade' <new-version>
+#        * <new-prerm> `failed-upgrade' <old-version>
+#        * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
+#        * <deconfigured's-prerm> `deconfigure' `in-favour'
+#          <package-being-installed> <version> `removing'
+#          <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+    remove|purge)
+       a2dismod -q -f waklog || true
+#      invoke-rc.d apache2 restart
+    ;;
+
+    upgrade|deconfigure)
+    ;;
+
+    failed-upgrade)
+    ;;
+
+    *)
+        echo "prerm called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/rules b/debian/rules
new file mode 100755 (executable)
index 0000000..2ec8094
--- /dev/null
@@ -0,0 +1,15 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+DEB_DH_INSTALL_CRON_ARGS_DEFAULT = --name=hcoop-apache-sync-logs
+
+include /usr/share/cdbs/1/rules/debhelper.mk
+include /usr/share/cdbs/1/rules/config-package.mk
diff --git a/debian/source/format b/debian/source/format
new file mode 100644 (file)
index 0000000..89ae9db
--- /dev/null
@@ -0,0 +1 @@
+3.0 (native)
diff --git a/files/conf.d/00waklog b/files/conf.d/00waklog
new file mode 100644 (file)
index 0000000..302d070
--- /dev/null
@@ -0,0 +1 @@
+WaklogAFSCell hcoop.net
\ No newline at end of file
diff --git a/files/conf.d/hcoop-security b/files/conf.d/hcoop-security
new file mode 100644 (file)
index 0000000..b63a546
--- /dev/null
@@ -0,0 +1,8 @@
+# Permit Mapping directories from afs (it is readable by the entire
+# world as it is)
+
+<Directory /afs/hcoop.net/>
+       AllowOverride None
+       Order Deny,Allow
+       Allow from all
+</Directory>
\ No newline at end of file
diff --git a/files/conf.d/hcoop_vhosts b/files/conf.d/hcoop_vhosts
new file mode 100644 (file)
index 0000000..e76b237
--- /dev/null
@@ -0,0 +1,2 @@
+Include /etc/apache2/vhosts/*.vhost
+Include /etc/apache2/vhosts/*.vhost_ssl
\ No newline at end of file