[26784] in Source-Commits

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

/svn/athena r25753 - trunk/debathena/config/cluster-login-config/debian

daemon@ATHENA.MIT.EDU (Jonathan D Reed)
Fri Sep 7 13:26:18 2012

Date: Fri, 7 Sep 2012 13:26:12 -0400
From: Jonathan D Reed <jdreed@MIT.EDU>
Message-Id: <201209071726.q87HQCFv010118@drugstore.mit.edu>
To: source-commits@MIT.EDU
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Author: jdreed
Date: 2012-09-07 13:26:11 -0400 (Fri, 07 Sep 2012)
New Revision: 25753

Added:
   trunk/debathena/config/cluster-login-config/debian/debathena-cluster-login-config.gconf-defaults
   trunk/debathena/config/cluster-login-config/debian/debathena-cluster-login-config.gconf-mandatory
Removed:
   trunk/debathena/config/cluster-login-config/debian/transform_gdm.conf-custom.debathena.debathena
   trunk/debathena/config/cluster-login-config/debian/transform_gdm.conf.debathena
   trunk/debathena/config/cluster-login-config/debian/transform_gdm.conf.debathena.debathena
Modified:
   trunk/debathena/config/cluster-login-config/debian/changelog
   trunk/debathena/config/cluster-login-config/debian/control.in
   trunk/debathena/config/cluster-login-config/debian/debathena-cluster-login-config.gsettings-override
   trunk/debathena/config/cluster-login-config/debian/debathena-cluster-login-config.postinst
   trunk/debathena/config/cluster-login-config/debian/rules
Log:
In cluster-login-config:
  * Use dh_gconf instead of calling gconftool-2 in the postinst (Trac:
    #550)
  * Port the rest of the gconf mandatory keys to gsettings
  * De-support (and Break:) gdm << 2.25.2
  * Stop supporting Lucid and cleanup the rules file


Modified: trunk/debathena/config/cluster-login-config/debian/changelog
===================================================================
--- trunk/debathena/config/cluster-login-config/debian/changelog	2012-09-07 13:56:56 UTC (rev 25752)
+++ trunk/debathena/config/cluster-login-config/debian/changelog	2012-09-07 17:26:11 UTC (rev 25753)
@@ -1,3 +1,13 @@
+debathena-cluster-login-config (1.38) unstable; urgency=low
+
+  * Use dh_gconf instead of calling gconftool-2 in the postinst (Trac:
+    #550)
+  * Port the rest of the gconf mandatory keys to gsettings
+  * De-support (and Break:) gdm << 2.25.2
+  * Stop supporting Lucid and cleanup the rules file
+
+ -- Jonathan Reed <jdreed@mit.edu>  Fri, 07 Sep 2012 13:26:02 -0400
+
 debathena-cluster-login-config (1.37) unstable; urgency=low
 
   * Provide a gsettings-override file for Precise (Trac: #1242)

Modified: trunk/debathena/config/cluster-login-config/debian/control.in
===================================================================
--- trunk/debathena/config/cluster-login-config/debian/control.in	2012-09-07 13:56:56 UTC (rev 25752)
+++ trunk/debathena/config/cluster-login-config/debian/control.in	2012-09-07 17:26:11 UTC (rev 25753)
@@ -10,8 +10,8 @@
 Depends: ${misc:Depends}, debathena-afs-config, debathena-gdm-config, debathena-kiosk, gconf2, gnome-screensaver, update-notifier-common, debathena-machtype (>= 10.0.2-0debathena1~), python-dbus, grub-common
 Provides: ${diverted-files}
 Conflicts: ${diverted-files}
-Breaks: debathena-reactivate (<< 2~)
-X-Debathena-Build-For: lucid natty precise
+Breaks: debathena-reactivate (<< 2~), gdm (<< 2.25.2~)
+X-Debathena-Build-For: natty precise
 Description: Login configuration for Athena cluster machines
  This package sets up a login policy for Athena cluster machines by
  disabling console logins, disabling sshd, disabling user switching,

Added: trunk/debathena/config/cluster-login-config/debian/debathena-cluster-login-config.gconf-defaults
===================================================================
--- trunk/debathena/config/cluster-login-config/debian/debathena-cluster-login-config.gconf-defaults	                        (rev 0)
+++ trunk/debathena/config/cluster-login-config/debian/debathena-cluster-login-config.gconf-defaults	2012-09-07 17:26:11 UTC (rev 25753)
@@ -0,0 +1 @@
+/desktop/gnome/session/required_components/windowmanager "metacity"

Added: trunk/debathena/config/cluster-login-config/debian/debathena-cluster-login-config.gconf-mandatory
===================================================================
--- trunk/debathena/config/cluster-login-config/debian/debathena-cluster-login-config.gconf-mandatory	                        (rev 0)
+++ trunk/debathena/config/cluster-login-config/debian/debathena-cluster-login-config.gconf-mandatory	2012-09-07 17:26:11 UTC (rev 25753)
@@ -0,0 +1,8 @@
+/apps/gnome-screensaver/logout_enabled true
+/apps/gnome-screensaver/logout_delay 20
+/apps/gnome-screensaver/logout_command "/usr/share/debathena-cluster-login-config/screensaver_logout.sh"
+/apps/gnome-screensaver/user_switch_enabled false
+/apps/gnome-screensaver/lock_enabled true
+/apps/gnome-screensaver/lock_delay 1
+/apps/gnome-power-manager/timeout/sleep_display_ac 600
+/desktop/gnome/lockdown/disable_user_switching true

Modified: trunk/debathena/config/cluster-login-config/debian/debathena-cluster-login-config.gsettings-override
===================================================================
--- trunk/debathena/config/cluster-login-config/debian/debathena-cluster-login-config.gsettings-override	2012-09-07 13:56:56 UTC (rev 25752)
+++ trunk/debathena/config/cluster-login-config/debian/debathena-cluster-login-config.gsettings-override	2012-09-07 17:26:11 UTC (rev 25753)
@@ -3,5 +3,11 @@
 logout-delay=1200
 logout-command='/usr/share/debathena-cluster-login-config/screensaver_logout.sh'
 user-switch-enabled=false
+lock-delay=1
+lock-enabled=true
 
+[org.gnome.desktop.lockdown]
+disable-user-switching=true
 
+[org.gnome.settings-daemon.plugins.power]
+sleep-display-ac=600

Modified: trunk/debathena/config/cluster-login-config/debian/debathena-cluster-login-config.postinst
===================================================================
--- trunk/debathena/config/cluster-login-config/debian/debathena-cluster-login-config.postinst	2012-09-07 13:56:56 UTC (rev 25752)
+++ trunk/debathena/config/cluster-login-config/debian/debathena-cluster-login-config.postinst	2012-09-07 17:26:11 UTC (rev 25753)
@@ -129,62 +129,6 @@
 	# Attempt to initially set the root password.
 	/usr/sbin/athena-root-password
 
-	# Set mandatory gconf key values.
-	gcsrc=xml:readwrite:/etc/gconf/gconf.xml.mandatory
-	gc="gconftool-2 --direct --config-source=$gcsrc --set"
-	gcunset="gconftool-2 --direct --config-source=$gcsrc --unset"
-
-	# gnome-screensaver
-	$gc -t bool /apps/gnome-screensaver/logout_enabled true
-	$gc -t int /apps/gnome-screensaver/logout_delay 20
-	$gc -t string /apps/gnome-screensaver/logout_command \
-	    "/usr/share/debathena-cluster-login-config/screensaver_logout.sh"
-	# KLUDGE: gnome-screensaver can overwrite its internal
-	# logout_command setting with the embedded_keyboard_command
-	# value (http://bugzilla.gnome.org/show_bug.cgi?id=573495).
-	# So work around the problem by setting the latter to the same
-	# value as the former.  This should be removed after the bug
-	# has been fixed.  Also disable the embedded_keyboard to ensure
-	# that this value is not used otherwise.
-	$gc -t string /apps/gnome-screensaver/embedded_keyboard_command \
-	    "/usr/share/debathena-cluster-login-config/screensaver_logout.sh"
-	$gc -t bool /apps/gnome-screensaver/embedded_keyboard_enabled false
-	$gc -t bool /apps/gnome-screensaver/user_switch_enabled false
-	$gc -t bool /apps/gnome-screensaver/lock_enabled true
-	$gc -t int /apps/gnome-screensaver/lock_delay 1
-
-	# fast-user-switch-applet
-	$gc -t bool /apps/fast-user-switch-applet/show_active_users_only true
-	$gc -t bool /apps/fast-user-switch-applet/show_guest_login false
-
-	# gnome-power-manager
-	# As of Lucid, these are ignored and polkit is used instead
-	$gc -t bool /apps/gnome-power-manager/general/can_hibernate false
-	$gc -t bool /apps/gnome-power-manager/general/can_suspend false
-	# Change DPMS sleep time to 10 min
-	$gc -t int /apps/gnome-power-manager/timeout/sleep_display_ac 600
-
-	# This should be set to true on systems using
-	# indicator-applet-session, and false on systems that don't
-	# (i.e. those still using fast-user-switch-agent)
-	#
-	# (This setting completely disables fast-user-switch-applet,
-	# which provides the logout button, but is the only clean way
-	# to disable user switching as of indicator-applet-session
-	# 0.2.2)
-	if dpkg-query -f '${Status}' -W indicator-applet-session 2>/dev/null | grep -q 'install ok installed'; then
-	    $gc -t bool /desktop/gnome/lockdown/disable_user_switching true
-	else
-	    $gcunset /desktop/gnome/lockdown/disable_user_switching
-	fi
-
-	# Set up gconf defaults.
-	gcsrc=xml:readwrite:/etc/gconf/gconf.xml.defaults
-	gc="gconftool-2 --direct --config-source=$gcsrc --set"
-	$gc -t string \
-	    /desktop/gnome/session/required_components/windowmanager \
-	    "metacity"
-
         cat >>/etc/sudoers <<EOF
 ### BEGIN debathena-cluster-login-config
 ALL !ALL=!ALL

Modified: trunk/debathena/config/cluster-login-config/debian/rules
===================================================================
--- trunk/debathena/config/cluster-login-config/debian/rules	2012-09-07 13:56:56 UTC (rev 25752)
+++ trunk/debathena/config/cluster-login-config/debian/rules	2012-09-07 17:26:11 UTC (rev 25753)
@@ -1,67 +1,62 @@
 #!/usr/bin/make -f
 
-GDM_VERSION = $(shell dpkg-query --showformat='$${Version}' --show gdm)
-NEW_GDM = $(shell dpkg --compare-versions $(GDM_VERSION) ge '2.25.2~' && echo y)
-EVENT_D = $(shell test -f /etc/event.d/tty1 && echo y)
-
 DEB_DIVERT_EXTENSION = .debathena
-ifneq ($(wildcard /etc/gdm/gdm.conf-custom.debathena),)
-    GDM_CONFFILE = /etc/gdm/gdm.conf-custom.debathena.debathena
-else
-    GDM_CONFFILE = /etc/gdm/gdm.conf.debathena.debathena
-endif
+
+# We used to divert kexec
 DEB_UNDIVERT_FILES_debathena-cluster-login-config += \
-	/etc/default/kexec.debathena
-DEB_UNDIVERT_VERSION_/etc/default/kexec.debathena = 1.23~
+	/etc/default/kexec.debathena \
+# We diverted these for gdm << 2.25.2~, and there may be upgrades
+# from old-gdm to new-gdm.
+DEB_UNDIVERT_FILES_debathena-cluster-login-config += \
+	/etc/gdm/gdm.conf.debathena.debathena \
+	/etc/gdm/gdm.conf-custom.debathena.debathena
 
-ifneq ($(NEW_GDM),y)
-    DEB_TRANSFORM_FILES_debathena-cluster-login-config += \
-	${GDM_CONFFILE}
-else
-    DEB_REMOVE_FILES_debathena-cluster-login-config += \
+# Remove some sessions we don't want.
+DEB_REMOVE_FILES_debathena-cluster-login-config += \
 	/usr/share/xsessions/gnome-failsafe.desktop \
 	/usr/share/xsessions/xterm.desktop
-    DEB_TRANSFORM_FILES_debathena-cluster-login-config += \
+# Transform the already-transformed gdm pam config
+# to prevent root login on console
+DEB_TRANSFORM_FILES_debathena-cluster-login-config += \
 	/etc/pam.d/gdm.debathena.debathena
-    DEB_TRANSFORM_FILES_debathena-cluster-login-config += \
+
+
+# Stop transforming gdm's dbus service
+# (was workaround for Lucid stupidity)
+DEB_UNDIVERT_FILES_debathena-cluster-login-config += \
 	/etc/dbus-1/system.d/gdm.conf.debathena
-endif
 
-DEB_REMOVE_FILES_debathena-cluster-login-config += \
+# We used to remove this to disable user switching
+DEB_UNREMOVE_FILES_debathena-cluster-login-config += \
     /usr/lib/indicator-session/indicator-users-service
 
+# Install our fake getty for the VTs
 DEB_DIVERT_FILES_debathena-cluster-login-config += \
 	/sbin/getty.debathena
 
-ifeq ($(EVENT_D),y)
-    DEB_UNREMOVE_FILES_debathena-cluster-login-config += \
+# We used to remove these.  /etc/event.d is for Jaunty and earlier
+DEB_UNREMOVE_FILES_debathena-cluster-login-config += \
 	/etc/event.d/tty1 \
 	/etc/event.d/tty2 \
 	/etc/event.d/tty3 \
 	/etc/event.d/tty4 \
 	/etc/event.d/tty5 \
 	/etc/event.d/tty6
-    DEB_UNREMOVE_VERSION_/etc/event.d/tty1 = 1.24~
-    DEB_UNREMOVE_VERSION_/etc/event.d/tty2 = 1.24~
-    DEB_UNREMOVE_VERSION_/etc/event.d/tty3 = 1.24~
-    DEB_UNREMOVE_VERSION_/etc/event.d/tty4 = 1.24~
-    DEB_UNREMOVE_VERSION_/etc/event.d/tty5 = 1.24~
-    DEB_UNREMOVE_VERSION_/etc/event.d/tty6 = 1.24~
-else
-    DEB_UNREMOVE_FILES_debathena-cluster-login-config += \
+
+# Same as above, but for Karmic and later
+DEB_UNREMOVE_FILES_debathena-cluster-login-config += \
 	/etc/init/tty1.conf \
 	/etc/init/tty2.conf \
 	/etc/init/tty3.conf \
 	/etc/init/tty4.conf \
 	/etc/init/tty5.conf \
 	/etc/init/tty6.conf
-    DEB_UNREMOVE_VERSION_/etc/init/tty1.conf = 1.24~
-    DEB_UNREMOVE_VERSION_/etc/init/tty2.conf = 1.24~
-    DEB_UNREMOVE_VERSION_/etc/init/tty3.conf = 1.24~
-    DEB_UNREMOVE_VERSION_/etc/init/tty4.conf = 1.24~
-    DEB_UNREMOVE_VERSION_/etc/init/tty5.conf = 1.24~
-    DEB_UNREMOVE_VERSION_/etc/init/tty6.conf = 1.24~
-endif
 
 include /usr/share/cdbs/1/rules/debhelper.mk
 include /usr/share/cdbs/1/rules/config-package.mk
+
+# dh_gconf needs to get called explicitly to install the
+# .gconf-mandatory and .gconf-defaults files
+install/debathena-cluster-login-config::
+	dh_gconf --priority 90
+


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