From ca306c0c7e45289450b0da11dd975c8ba4e99b2c Mon Sep 17 00:00:00 2001 From: Clinton Ebadi Date: Sat, 15 Dec 2012 22:36:03 -0500 Subject: [PATCH] First stab at common config package --- debian/README | 19 ++++++++++++ debian/changelog | 5 +++ debian/compat | 1 + debian/control | 16 ++++++++++ debian/copyright | 34 ++++++++++++++++++++ debian/docs | 0 debian/hcoop-common-config.install | 1 + debian/hcoop-common-config.postinst | 48 +++++++++++++++++++++++++++++ debian/hcoop-common-config.postrm | 42 +++++++++++++++++++++++++ debian/rules | 18 +++++++++++ debian/transform_insserv.conf.hcoop | 3 ++ files/openafs-client | 12 ++++++++ 12 files changed, 199 insertions(+) create mode 100644 debian/README create mode 100644 debian/changelog create mode 100644 debian/compat create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/docs create mode 100644 debian/hcoop-common-config.install create mode 100644 debian/hcoop-common-config.postinst create mode 100644 debian/hcoop-common-config.postrm create mode 100755 debian/rules create mode 100755 debian/transform_insserv.conf.hcoop create mode 100644 files/openafs-client diff --git a/debian/README b/debian/README new file mode 100644 index 0000000..5ae451e --- /dev/null +++ b/debian/README @@ -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 Sat, 15 Dec 2012 21:13:50 -0500 diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..e85aeaf --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +hcoop-common-config (0) unstable; urgency=low + + * Initial Release. + + -- Clinton Ebadi Sat, 15 Dec 2012 21:13:50 -0500 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..fe868d7 --- /dev/null +++ b/debian/control @@ -0,0 +1,16 @@ +Source: hcoop-common-config +Section: hcoop-config/admin +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-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 index 0000000..30fda3d --- /dev/null +++ b/debian/copyright @@ -0,0 +1,34 @@ +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: hcoop-common-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-common-config.install b/debian/hcoop-common-config.install new file mode 100644 index 0000000..6ba851a --- /dev/null +++ b/debian/hcoop-common-config.install @@ -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 index 0000000..3116938 --- /dev/null +++ b/debian/hcoop-common-config.postinst @@ -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: +# * `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 + + +# 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 index 0000000..2535f58 --- /dev/null +++ b/debian/hcoop-common-config.postrm @@ -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: +# * `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 + +# 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 index 0000000..4374a11 --- /dev/null +++ b/debian/rules @@ -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 index 0000000..360160d --- /dev/null +++ b/debian/transform_insserv.conf.hcoop @@ -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 index 0000000..c6afb8e --- /dev/null +++ b/files/openafs-client @@ -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 -- 2.20.1