First stab at common config package
authorClinton Ebadi <clinton@unknownlamer.org>
Sun, 16 Dec 2012 03:36:03 +0000 (22:36 -0500)
committerClinton Ebadi <clinton@unknownlamer.org>
Sun, 16 Dec 2012 03:36:03 +0000 (22:36 -0500)
12 files changed:
debian/README [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-common-config.install [new file with mode: 0644]
debian/hcoop-common-config.postinst [new file with mode: 0644]
debian/hcoop-common-config.postrm [new file with mode: 0644]
debian/rules [new file with mode: 0755]
debian/transform_insserv.conf.hcoop [new file with mode: 0755]
files/openafs-client [new file with mode: 0644]

diff --git a/debian/README b/debian/README
new file mode 100644 (file)
index 0000000..5ae451e
--- /dev/null
@@ -0,0 +1,19 @@
+The Debian Package hcoop-common-config
+----------------------------
+
+Config snippets to make things work despite Debian's best attempts to
+thwart us.
+
+Dependency based boot:
+
+ openafs must be started before even the firewall so that the firewall
+ can be configured with afs users. The openafs lsb tags are thus
+ overridden to force it into rcS, and the post-install updates
+ everything. This very well may break single user mode entirely.
+
+ Additionally, some services like apache2 don't function correctly
+ with pts users before nscd is started, so nscd is added to the system
+ $named virtual service as it is effectively required for name
+ resolution on our machines.
+
+ -- Clinton Ebadi <clinton@unknownlamer.org>  Sat, 15 Dec 2012 21:13:50 -0500
diff --git a/debian/changelog b/debian/changelog
new file mode 100644 (file)
index 0000000..e85aeaf
--- /dev/null
@@ -0,0 +1,5 @@
+hcoop-common-config (0) unstable; urgency=low
+
+  * Initial Release.
+
+ -- Clinton Ebadi <clinton@unknownlamer.org>  Sat, 15 Dec 2012 21:13:50 -0500
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..fe868d7
--- /dev/null
@@ -0,0 +1,16 @@
+Source: hcoop-common-config
+Section: hcoop-config/admin
+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-common-config.git
+#Vcs-Browser: http://git.debian.org/?p=collab-maint/hcoop-common-config.git;a=summary
+
+Package: hcoop-common-config
+Architecture: all
+Depends: openafs-client, nscd, ${misc:Depends}
+Description: Common HCoop node config
+ Configuration changes to stock Debian required for all HCoop nodes
+ that cannot be handled through preseeding.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644 (file)
index 0000000..30fda3d
--- /dev/null
@@ -0,0 +1,34 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: hcoop-common-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-common-config.install b/debian/hcoop-common-config.install
new file mode 100644 (file)
index 0000000..6ba851a
--- /dev/null
@@ -0,0 +1 @@
+files/openafs-client etc/insserv/overrides
\ No newline at end of file
diff --git a/debian/hcoop-common-config.postinst b/debian/hcoop-common-config.postinst
new file mode 100644 (file)
index 0000000..3116938
--- /dev/null
@@ -0,0 +1,48 @@
+#!/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
+
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+# We want to run last (need the diversions to be installed first)
+case "$1" in
+    configure)
+       # It would be nice to use -d or something, but for whatever
+       # reason when adding and removing links in rcS insserv doesn't
+       # actually do anything unless you force remove the script
+       # first!
+       insserv -rf openafs-client
+       insserv openafs-client
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+
+
+exit 0
diff --git a/debian/hcoop-common-config.postrm b/debian/hcoop-common-config.postrm
new file mode 100644 (file)
index 0000000..2535f58
--- /dev/null
@@ -0,0 +1,42 @@
+#!/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
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+case "$1" in
+    remove|purge)
+       insserv -rf openafs-client
+       insserv openafs-client
+    ;;
+
+    upgrade|deconfigure)
+    ;;
+
+    failed-upgrade)
+    ;;
+
+    *)
+        echo "prerm called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+exit 0
diff --git a/debian/rules b/debian/rules
new file mode 100755 (executable)
index 0000000..4374a11
--- /dev/null
@@ -0,0 +1,18 @@
+#!/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_DIVERT_EXTENSION = .hcoop
+
+DEB_TRANSFORM_FILES_hcoop-common-config += \
+       /etc/insserv.conf.hcoop
+
+include /usr/share/cdbs/1/rules/debhelper.mk
+include /usr/share/cdbs/1/rules/config-package.mk
diff --git a/debian/transform_insserv.conf.hcoop b/debian/transform_insserv.conf.hcoop
new file mode 100755 (executable)
index 0000000..360160d
--- /dev/null
@@ -0,0 +1,3 @@
+#!/usr/bin/perl -0p
+
+s/^\$named(\s+.*)$/\$named$1 +nscd/m or die;
diff --git a/files/openafs-client b/files/openafs-client
new file mode 100644 (file)
index 0000000..c6afb8e
--- /dev/null
@@ -0,0 +1,12 @@
+### BEGIN INIT INFO
+# Provides:             openafs-client
+# Required-Start:       $remote_fs $time $network
+# Required-Stop:        $remote_fs $network
+# Should-Start:         $syslog
+# X-Start-Before:       ferm
+# Default-Start:        S
+# Default-Stop:         0  6
+# Short-Description:    OpenAFS client
+# Description:          Starts or stops the OpenAFS client, loading the
+#                       OpenAFS kernel module as necessary.
+### END INIT INFO
\ No newline at end of file