[28299] in Source-Commits

home help back first fref pref prev next nref lref last post

cluster-login-config commit: Add .maintscript file, clean up maintscripts

daemon@ATHENA.MIT.EDU (Jonathan D Reed)
Sat Jul 5 13:01:27 2014

Date: Sat, 5 Jul 2014 13:01:19 -0400
From: Jonathan D Reed <jdreed@MIT.EDU>
Message-Id: <201407051701.s65H1JAT014569@drugstore.mit.edu>
To: source-commits@MIT.EDU

https://github.com/mit-athena/cluster-login-config/commit/b941415b9bc74495f18b935189ef6a81cc9e22f2
commit b941415b9bc74495f18b935189ef6a81cc9e22f2
Author: Jonathan Reed <jdreed@mit.edu>
Date:   Thu Jul 3 13:17:17 2014 -0400

    Add .maintscript file, clean up maintscripts
    
    - Add a .maintscript file and Depend: on debhelper 8.1.0 for that
      support.
    - Punt the postrm and preinst, which only existed for
      maintscript-helper code
    - Remove the maintscript-helper invocations from the postinst and
      prerm

 debian/changelog                                  |    4 +-
 debian/control                                    |    2 +-
 debian/debathena-cluster-login-config.maintscript |    9 ++++
 debian/debathena-cluster-login-config.postinst    |   18 +------
 debian/debathena-cluster-login-config.postrm      |   53 ---------------------
 debian/debathena-cluster-login-config.preinst     |   48 -------------------
 debian/debathena-cluster-login-config.prerm       |   12 -----
 7 files changed, 16 insertions(+), 130 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index ab712f5..51ceb74 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,8 +5,10 @@ debathena-cluster-login-config (1.42) UNRELEASED; urgency=low
   * Add groups to the pkla files to support disabling suspend and
     hibernate via logind (upower is now deprecated)
   * Drop support for gdm
+  * Clean up maintscripts and move maintscript-helper invocations to a new
+    .maintscript file
 
- -- Jonathan Reed <jdreed@mit.edu>  Thu, 03 Jul 2014 13:18:55 -0400
+ -- Jonathan Reed <jdreed@mit.edu>  Thu, 03 Jul 2014 13:19:47 -0400
 
 debathena-cluster-login-config (1.41) unstable; urgency=low
 
diff --git a/debian/control b/debian/control
index 857a30c..78e1bd8 100644
--- a/debian/control
+++ b/debian/control
@@ -2,7 +2,7 @@ Source: debathena-cluster-login-config
 Section: debathena-config/net
 Priority: extra
 Maintainer: Debathena Project <debathena@mit.edu>
-Build-Depends: debhelper (>= 7.0.50~),
+Build-Depends: debhelper (>= 8.1.0~),
  config-package-dev (>= 5.0~),
  system-services,
  lsb-release,
diff --git a/debian/debathena-cluster-login-config.maintscript b/debian/debathena-cluster-login-config.maintscript
new file mode 100644
index 0000000..748af9d
--- /dev/null
+++ b/debian/debathena-cluster-login-config.maintscript
@@ -0,0 +1,9 @@
+# We moved this to a single file in /var/lib/polkit-1
+rm_conffile /etc/polkit-1/localauthority/30-site.d/disable-hibernate.pkla 1.41 -- "$@"
+rm_conffile /etc/polkit-1/localauthority/30-site.d/disable-suspend.pkla 1.41 -- "$@"
+# We used to divert the upstart jobs themseves
+rm_conffile /etc/event.d/ttymsg 1.23 -- "$@"
+rm_conffile /etc/init/ttymsg.conf 1.23 -- "$@"
+# We briefly enabled backports for libstdc++
+rm_conffile /etc/apt/sources.list.d/debathena-backports.list 1.36 -- "$@"
+rm_conffile /etc/apt/preferences.d/debathena-libstdcplusplus.pref 1.36 -- "$@"
diff --git a/debian/debathena-cluster-login-config.postinst b/debian/debathena-cluster-login-config.postinst
index e8fe5fd..0a0257c 100644
--- a/debian/debathena-cluster-login-config.postinst
+++ b/debian/debathena-cluster-login-config.postinst
@@ -20,18 +20,6 @@ set -e
 
 #DEBHELPER#
 
-# We moved this to a single file in /var/lib/polkit-1
-dpkg-maintscript-helper rm_conffile /etc/polkit-1/localauthority/30-site.d/disable-hibernate.pkla 1.41 -- "$@"
-dpkg-maintscript-helper rm_conffile /etc/polkit-1/localauthority/30-site.d/disable-suspend.pkla 1.41 -- "$@"
-
-# Clean up from old conffiles
-dpkg-maintscript-helper rm_conffile /etc/event.d/ttymsg 1.23 -- "$@"
-dpkg-maintscript-helper rm_conffile /etc/init/ttymsg.conf 1.23 -- "$@"
-dpkg-maintscript-helper rm_conffile \
-    /etc/apt/sources.list.d/debathena-backports.list 1.36 -- "$@"
-dpkg-maintscript-helper rm_conffile \
-    /etc/apt/preferences.d/debathena-libstdcplusplus.pref 1.36 -- "$@"
-
 case "$1" in
     configure)
 	if dpkg --compare-versions "$2" lt '1.36.2~'; then
@@ -46,13 +34,13 @@ case "$1" in
 	    update-grub
 	fi
 
-	# Shut down sshd and reload gdm.
+	# Shut down sshd
+	# We do not need to kick lightdm -- it will refuse to run
+	# if the session vanishes out from under it.
 	if hash invoke-rc.d; then
 	    invoke-rc.d ssh stop
-            invoke-rc.d gdm reload || true
 	else
 	    /etc/init.d/ssh stop
-            /etc/init.d/gdm reload || true
 	fi
 
         # Make sure the gettys are running
diff --git a/debian/debathena-cluster-login-config.postrm b/debian/debathena-cluster-login-config.postrm
deleted file mode 100644
index f6fb3a2..0000000
--- a/debian/debathena-cluster-login-config.postrm
+++ /dev/null
@@ -1,53 +0,0 @@
-#!/bin/sh
-# postrm script for debathena-cluster-login-config
-#
-# see: dh_installdeb(1)
-
-set -e
-
-# summary of how this script can be called:
-#        * <postrm> `remove'
-#        * <postrm> `purge'
-#        * <old-postrm> `upgrade' <new-version>
-#        * <new-postrm> `failed-upgrade' <old-version>
-#        * <new-postrm> `abort-install'
-#        * <new-postrm> `abort-install' <old-version>
-#        * <new-postrm> `abort-upgrade' <old-version>
-#        * <disappearer's-postrm> `disappear' <overwriter>
-#          <overwriter-version>
-# for details, see http://www.debian.org/doc/debian-policy/ or
-# the debian-policy package
-
-# We moved this to a single file in /var/lib/polkit-1
-dpkg-maintscript-helper rm_conffile /etc/polkit-1/localauthority/30-site.d/disable-hibernate.pkla 1.41 -- "$@"
-dpkg-maintscript-helper rm_conffile /etc/polkit-1/localauthority/30-site.d/disable-suspend.pkla 1.41 -- "$@"
-
-# Clean up from old conffiles
-dpkg-maintscript-helper rm_conffile /etc/event.d/ttymsg 1.23 -- "$@"
-dpkg-maintscript-helper rm_conffile /etc/init/ttymsg.conf 1.23 -- "$@"
-dpkg-maintscript-helper rm_conffile \
-    /etc/apt/sources.list.d/debathena-backports.list 1.36 -- "$@"
-dpkg-maintscript-helper rm_conffile \
-    /etc/apt/preferences.d/debathena-libstdcplusplus.pref 1.36 -- "$@"
-
-case "$1" in
-    abort-install|abort-upgrade)
-    ;;
-
-    purge|remove|upgrade|failed-upgrade|disappear)
-    ;;
-
-    *)
-        echo "postrm 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/debathena-cluster-login-config.preinst b/debian/debathena-cluster-login-config.preinst
deleted file mode 100644
index de49273..0000000
--- a/debian/debathena-cluster-login-config.preinst
+++ /dev/null
@@ -1,48 +0,0 @@
-#!/bin/sh
-# preinst script for debathena-cluster-login-config
-#
-# see: dh_installdeb(1)
-
-set -e
-
-# summary of how this script can be called:
-#        * <new-preinst> `install'
-#        * <new-preinst> `install' <old-version>
-#        * <new-preinst> `upgrade' <old-version>
-#        * <old-preinst> `abort-upgrade' <new-version>
-# for details, see http://www.debian.org/doc/debian-policy/ or
-# the debian-policy package
-
-# We moved this to a single file in /var/lib/polkit-1
-dpkg-maintscript-helper rm_conffile /etc/polkit-1/localauthority/30-site.d/disable-hibernate.pkla 1.41 -- "$@"
-dpkg-maintscript-helper rm_conffile /etc/polkit-1/localauthority/30-site.d/disable-suspend.pkla 1.41 -- "$@"
-
-# Clean up from old conffiles
-dpkg-maintscript-helper rm_conffile /etc/event.d/ttymsg 1.23 -- "$@"
-dpkg-maintscript-helper rm_conffile /etc/init/ttymsg.conf 1.23 -- "$@"
-dpkg-maintscript-helper rm_conffile \
-    /etc/apt/sources.list.d/debathena-backports.list 1.36 -- "$@"
-dpkg-maintscript-helper rm_conffile \
-    /etc/apt/preferences.d/debathena-libstdcplusplus.pref 1.36 -- "$@"
-
-case "$1" in
-    install|upgrade)
-    ;;
-
-    abort-upgrade)
-    ;;
-
-    *)
-        echo "preinst 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/debathena-cluster-login-config.prerm b/debian/debathena-cluster-login-config.prerm
index 1fc5bfd..3aa1eda 100755
--- a/debian/debathena-cluster-login-config.prerm
+++ b/debian/debathena-cluster-login-config.prerm
@@ -21,18 +21,6 @@ set -e
 
 #DEBHELPER#
 
-# We moved this to a single file in /var/lib/polkit-1
-dpkg-maintscript-helper rm_conffile /etc/polkit-1/localauthority/30-site.d/disable-hibernate.pkla 1.41 -- "$@"
-dpkg-maintscript-helper rm_conffile /etc/polkit-1/localauthority/30-site.d/disable-suspend.pkla 1.41 -- "$@"
-
-# Clean up from old conffiles
-dpkg-maintscript-helper rm_conffile /etc/event.d/ttymsg 1.23 -- "$@"
-dpkg-maintscript-helper rm_conffile /etc/init/ttymsg.conf 1.23 -- "$@"
-dpkg-maintscript-helper rm_conffile \
-    /etc/apt/sources.list.d/debathena-backports.list 1.36 -- "$@"
-dpkg-maintscript-helper rm_conffile \
-    /etc/apt/preferences.d/debathena-libstdcplusplus.pref 1.36 -- "$@"
-
 case "$1" in
     remove|upgrade|deconfigure)
         perl -i'' -ne 's%^### (BEGIN|END) debathena-cluster-login-config\s*$%%m && ($skip = ($1 eq "BEGIN")); print unless $skip;' /etc/sudoers

home help back first fref pref prev next nref lref last post