From: Clinton Ebadi Date: Sun, 2 Sep 2012 21:28:16 +0000 (-0400) Subject: Initial packaging of Debian/Domtool Apache Config X-Git-Tag: debian/0~1 X-Git-Url: https://git.hcoop.net/hcoop/zz_old/debian/hcoop-apache2-config.git/commitdiff_plain/ba5b86e0f109dbe271e94c15a83d610d8de30ac8 Initial packaging of Debian/Domtool Apache Config * 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 --- ba5b86e0f109dbe271e94c15a83d610d8de30ac8 diff --git a/debian/README b/debian/README new file mode 100644 index 0000000..4c8e572 --- /dev/null +++ b/debian/README @@ -0,0 +1,6 @@ +The Debian Package hcoop-apache2-config +---------------------------- + +Comments regarding the Package + + -- Clinton Ebadi Sun, 02 Sep 2012 01:14:19 -0400 diff --git a/debian/README.Debian b/debian/README.Debian new file mode 100644 index 0000000..5fdb6a4 --- /dev/null +++ b/debian/README.Debian @@ -0,0 +1,6 @@ +hcoop-apache2-config for Debian +------------------------------- + + + + -- Clinton Ebadi Sun, 02 Sep 2012 01:14:19 -0400 diff --git a/debian/README.source b/debian/README.source new file mode 100644 index 0000000..dc79eb6 --- /dev/null +++ b/debian/README.source @@ -0,0 +1,9 @@ +hcoop-apache2-config for Debian +------------------------------- + + + + + + diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..2a095d9 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +hcoop-apache2-config (0) stable; urgency=low + + * Initial Release. + + -- Clinton Ebadi Sun, 02 Sep 2012 01:14:19 -0400 diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..45a4fb7 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +8 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..2c6822a --- /dev/null +++ b/debian/control @@ -0,0 +1,16 @@ +Source: hcoop-apache2-config +Section: hcoop-config/httpd +Priority: extra +Maintainer: Clinton Ebadi +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 index 0000000..899c780 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,34 @@ +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: hcoop-apache2-config +Source: + +Files: * +Copyright: + +License: GPL-3.0+ + +Files: debian/* +Copyright: 2012 Clinton Ebadi +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 . + . + 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 index 0000000..e69de29 diff --git a/debian/hcoop-apache-clean-cache b/debian/hcoop-apache-clean-cache new file mode 100644 index 0000000..b9a2cd0 --- /dev/null +++ b/debian/hcoop-apache-clean-cache @@ -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 index 0000000..b1e985e --- /dev/null +++ b/debian/hcoop-apache2-config.dirs @@ -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 index 0000000..03658a3 --- /dev/null +++ b/debian/hcoop-apache2-config.hcoop-apache-sync-logs.cron.d @@ -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 index 0000000..9936c66 --- /dev/null +++ b/debian/hcoop-apache2-config.install @@ -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 index 0000000..a6c0b58 --- /dev/null +++ b/debian/hcoop-apache2-config.postinst @@ -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: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-remove' +# * `abort-deconfigure' `in-favour' +# `removing' +# +# 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 index 0000000..3dcae1d --- /dev/null +++ b/debian/hcoop-apache2-config.postrm @@ -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: +# * `remove' +# * `upgrade' +# * `failed-upgrade' +# * `remove' `in-favour' +# * `deconfigure' `in-favour' +# `removing' +# +# 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 index 0000000..2ec8094 --- /dev/null +++ b/debian/rules @@ -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 index 0000000..89ae9db --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (native) diff --git a/files/conf.d/00waklog b/files/conf.d/00waklog new file mode 100644 index 0000000..302d070 --- /dev/null +++ b/files/conf.d/00waklog @@ -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 index 0000000..b63a546 --- /dev/null +++ b/files/conf.d/hcoop-security @@ -0,0 +1,8 @@ +# Permit Mapping directories from afs (it is readable by the entire +# world as it is) + + + AllowOverride None + Order Deny,Allow + Allow from all + \ No newline at end of file diff --git a/files/conf.d/hcoop_vhosts b/files/conf.d/hcoop_vhosts new file mode 100644 index 0000000..e76b237 --- /dev/null +++ b/files/conf.d/hcoop_vhosts @@ -0,0 +1,2 @@ +Include /etc/apache2/vhosts/*.vhost +Include /etc/apache2/vhosts/*.vhost_ssl \ No newline at end of file