r41531 - in /desktop/experimental/gdm3/debian: changelog control control.in gdm3.init gdm3.install gdm3.links gdm3.postinst gdm3.prerm generate-config patches/91_dconf_database_path.patch patches/92_systemd_unit.patch patches/series rules

joss at users.alioth.debian.org joss at users.alioth.debian.org
Sat Apr 26 20:43:48 UTC 2014


Author: joss
Date: Sat Apr 26 20:43:48 2014
New Revision: 41531

URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=41531
Log:
* Move configuration generation to a separate script.
* Use dh_systemd.
* 92_systemd_unit.patch: port our init script specifics to the unit 
  file.
* Install the unit file.
* Install a symlink to display-manager.service for the default display 
  manager, according to the value set in debconf.
* Add a symlink to gdm3.service since this is the name of the old init 
  script.

Added:
    desktop/experimental/gdm3/debian/generate-config
    desktop/experimental/gdm3/debian/patches/92_systemd_unit.patch
Modified:
    desktop/experimental/gdm3/debian/changelog
    desktop/experimental/gdm3/debian/control
    desktop/experimental/gdm3/debian/control.in
    desktop/experimental/gdm3/debian/gdm3.init
    desktop/experimental/gdm3/debian/gdm3.install
    desktop/experimental/gdm3/debian/gdm3.links
    desktop/experimental/gdm3/debian/gdm3.postinst
    desktop/experimental/gdm3/debian/gdm3.prerm
    desktop/experimental/gdm3/debian/patches/91_dconf_database_path.patch
    desktop/experimental/gdm3/debian/patches/series
    desktop/experimental/gdm3/debian/rules

Modified: desktop/experimental/gdm3/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/experimental/gdm3/debian/changelog?rev=41531&op=diff
==============================================================================
--- desktop/experimental/gdm3/debian/changelog	[utf-8] (original)
+++ desktop/experimental/gdm3/debian/changelog	[utf-8] Sat Apr 26 20:43:48 2014
@@ -31,6 +31,15 @@
   * Make a direct symlink to the new greeter.dconf-defaults file in the 
     dconf defaults directory.
   * Simplify the dconf regeneration in gdm3.init thanks to that.
+  * Move configuration generation to a separate script.
+  * Use dh_systemd.
+  * 92_systemd_unit.patch: port our init script specifics to the unit 
+    file.
+  * Install the unit file.
+  * Install a symlink to display-manager.service for the default display 
+    manager, according to the value set in debconf.
+  * Add a symlink to gdm3.service since this is the name of the old init 
+    script.
 
  -- Laurent Bigonville <bigon at debian.org>  Fri, 11 Apr 2014 15:25:51 +0200
 

Modified: desktop/experimental/gdm3/debian/control
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/experimental/gdm3/debian/control?rev=41531&op=diff
==============================================================================
--- desktop/experimental/gdm3/debian/control	[utf-8] (original)
+++ desktop/experimental/gdm3/debian/control	[utf-8] Sat Apr 26 20:43:48 2014
@@ -10,7 +10,8 @@
 Uploaders: Andreas Henriksson <andreas at fatal.se>, Emilio Pozuelo Monfort <pochu at debian.org>, Laurent Bigonville <bigon at debian.org>, Sjoerd Simons <sjoerd at debian.org>
 Build-Depends: gnome-pkg-tools (>= 0.16.3),
                debhelper (>= 8.1.3),
-               cdbs (>= 0.4.93~),
+               cdbs (>= 0.4.122~),
+               dh-systemd (>= 1.14),
                dh-autoreconf,
                dconf-cli (>= 0.19.90),
                intltool (>= 0.40.0),

Modified: desktop/experimental/gdm3/debian/control.in
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/experimental/gdm3/debian/control.in?rev=41531&op=diff
==============================================================================
--- desktop/experimental/gdm3/debian/control.in	[utf-8] (original)
+++ desktop/experimental/gdm3/debian/control.in	[utf-8] Sat Apr 26 20:43:48 2014
@@ -5,7 +5,8 @@
 Uploaders: @GNOME_TEAM@
 Build-Depends: gnome-pkg-tools (>= 0.16.3),
                debhelper (>= 8.1.3),
-               cdbs (>= 0.4.93~),
+               cdbs (>= 0.4.122~),
+               dh-systemd (>= 1.14),
                dh-autoreconf,
                dconf-cli (>= 0.19.90),
                intltool (>= 0.40.0),

Modified: desktop/experimental/gdm3/debian/gdm3.init
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/experimental/gdm3/debian/gdm3.init?rev=41531&op=diff
==============================================================================
--- desktop/experimental/gdm3/debian/gdm3.init	[utf-8] (original)
+++ desktop/experimental/gdm3/debian/gdm3.init	[utf-8] Sat Apr 26 20:43:48 2014
@@ -32,32 +32,6 @@
 HEED_DEFAULT_DISPLAY_MANAGER=true
 DEFAULT_DISPLAY_MANAGER_FILE=/etc/X11/default-display-manager
 
-DEFAULTS_GENERATED=/var/lib/gdm3/greeter-dconf-defaults
-DEFAULTS_DIR=/usr/share/gdm/dconf
-
-gen_config() {
-  # GSettings configuration uses dconf update to generate a gdm profile
-  if [ -d /var/lib/gdm3 ]; then
-    needed=no
-    if [ -f $DEFAULTS_GENERATED ]; then
-      for f in \
-          $DEFAULTS_DIR $DEFAULTS_DIR/*-settings \
-          $DEFAULTS_DIR/locks $DEFAULTS_DIR/locks/*-locks \
-          /etc/gdm3/greeter.dconf-defaults; do
-        if [ "$f" -nt $DEFAULTS_GENERATED ]; then
-          needed=yes
-          break
-        fi
-      done
-    else
-      needed=yes
-    fi
-    if [ "$needed" = yes ]; then
-      dconf compile $DEFAULTS_GENERATED $DEFAULTS_DIR
-    fi
-  fi
-}
-
 case "$1" in
   start)
         CONFIGURED_DAEMON=$(basename "$(cat $DEFAULT_DISPLAY_MANAGER_FILE 2> /dev/null)")
@@ -69,8 +43,7 @@
                 log_action_msg "Not starting GNOME Display Manager; it is not the default display manager"
         else
                 log_daemon_msg "Starting GNOME Display Manager" "gdm3"
-                gen_config
-                rm -f /var/lib/gdm/.ICEauthority
+                /usr/share/gdm/generate-config
                 start-stop-daemon --start --quiet --pidfile $PIDFILE \
 			--background --exec $DAEMON || log_end_msg 1
                 log_end_msg 0
@@ -86,12 +59,10 @@
   ;;
   reload)
         log_daemon_msg "Scheduling reload of GNOME Display Manager configuration" "gdm3"
+        /usr/share/gdm/generate-config
         set +e
-        gen_config
         start-stop-daemon --stop --signal HUP --quiet --pidfile $PIDFILE \
                 --name gdm3
-        start-stop-daemon --stop --signal HUP --quiet --name dconf-service \
-                --user Debian-gdm --oknodo
         set -e
         log_end_msg $?
   ;;

Modified: desktop/experimental/gdm3/debian/gdm3.install
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/experimental/gdm3/debian/gdm3.install?rev=41531&op=diff
==============================================================================
--- desktop/experimental/gdm3/debian/gdm3.install	[utf-8] (original)
+++ desktop/experimental/gdm3/debian/gdm3.install	[utf-8] Sat Apr 26 20:43:48 2014
@@ -1,4 +1,5 @@
 debian/tmp/etc/*
+debian/tmp/lib
 debian/tmp/usr/bin/gdm-screenshot
 debian/tmp/usr/lib/gdm3/gdm-*
 # gets renamed to gdm3 in binary-install
@@ -18,5 +19,6 @@
 debian/Xsession				etc/gdm3
 debian/greeter.dconf-defaults*		usr/share/gdm
 debian/default.desktop			usr/share/gdm/BuiltInSessions
+debian/generate-config			usr/share/gdm
 debian/insserv.conf.d			etc
 data/dconf/defaults/*			usr/share/gdm/dconf

Modified: desktop/experimental/gdm3/debian/gdm3.links
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/experimental/gdm3/debian/gdm3.links?rev=41531&op=diff
==============================================================================
--- desktop/experimental/gdm3/debian/gdm3.links	[utf-8] (original)
+++ desktop/experimental/gdm3/debian/gdm3.links	[utf-8] Sat Apr 26 20:43:48 2014
@@ -1 +1,2 @@
 etc/gdm3/greeter.dconf-defaults usr/share/gdm/dconf/90-debian-settings
+lib/systemd/system/gdm.service lib/systemd/system/gdm3.service

Modified: desktop/experimental/gdm3/debian/gdm3.postinst
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/experimental/gdm3/debian/gdm3.postinst?rev=41531&op=diff
==============================================================================
--- desktop/experimental/gdm3/debian/gdm3.postinst	[utf-8] (original)
+++ desktop/experimental/gdm3/debian/gdm3.postinst	[utf-8] Sat Apr 26 20:43:48 2014
@@ -36,6 +36,21 @@
     if db_get "$RET"/daemon_name; then
       echo "$RET" > $DEFAULT_DISPLAY_MANAGER_FILE
     fi
+  fi
+fi
+
+# set default-display-manager systemd service link according to our config
+if [ "$1" = configure ] && [ -d /etc/systemd/system/ ]; then
+  if [ -e "$DEFAULT_DISPLAY_MANAGER_FILE" ]; then
+    SERVICE=/lib/systemd/system/$(basename $(cat "$DEFAULT_DISPLAY_MANAGER_FILE")).service
+    if [ -e "$SERVICE" ]; then
+      ln -sf "$SERVICE" /etc/systemd/system/display-manager.service
+    else
+      echo "WARNING: $SERVICE is the selected default display manager but does not exist" >&2
+      rm -f /etc/systemd/system/display-manager.service
+    fi
+  else
+    rm -f /etc/systemd/system/display-manager.service
   fi
 fi
 

Modified: desktop/experimental/gdm3/debian/gdm3.prerm
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/experimental/gdm3/debian/gdm3.prerm?rev=41531&op=diff
==============================================================================
--- desktop/experimental/gdm3/debian/gdm3.prerm	[utf-8] (original)
+++ desktop/experimental/gdm3/debian/gdm3.prerm	[utf-8] Sat Apr 26 20:43:48 2014
@@ -43,7 +43,22 @@
       fi
     fi
   fi
+  # set default-display-manager systemd service link according to our config
+  if [ -d /etc/systemd/system/ ]; then
+    if [ -e "$DEFAULT_DISPLAY_MANAGER_FILE" ]; then
+      SERVICE=/lib/systemd/system/$(basename $(cat "$DEFAULT_DISPLAY_MANAGER_FILE")).service
+      if [ -e "$SERVICE" ]; then
+        ln -sf "$SERVICE" /etc/systemd/system/display-manager.service
+      else
+        echo "WARNING: $SERVICE is the selected default display manager but does not exist" >&2
+        rm -f /etc/systemd/system/display-manager.service
+      fi
+    else
+      rm -f /etc/systemd/system/display-manager.service
+    fi
+  fi
 fi
+
 
 if [ "$1" = "remove" ]; then
   if [ -x /etc/init.d/gdm3 ]; then

Added: desktop/experimental/gdm3/debian/generate-config
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/experimental/gdm3/debian/generate-config?rev=41531&op=file
==============================================================================
--- desktop/experimental/gdm3/debian/generate-config	(added)
+++ desktop/experimental/gdm3/debian/generate-config	[utf-8] Sat Apr 26 20:43:48 2014
@@ -0,0 +1,33 @@
+#! /bin/sh
+set -e
+
+DEFAULTS_GENERATED=/var/lib/gdm3/greeter-dconf-defaults
+DEFAULTS_DIR=/usr/share/gdm/dconf
+
+if [ -d /var/lib/gdm3 ]; then
+  needed=no
+  if [ -f $DEFAULTS_GENERATED ]; then
+    for f in \
+        $DEFAULTS_DIR $DEFAULTS_DIR/*-settings \
+        $DEFAULTS_DIR/locks $DEFAULTS_DIR/locks/*-locks \
+        /etc/gdm3/greeter.dconf-defaults; do
+      if [ "$f" -nt $DEFAULTS_GENERATED ]; then
+        needed=yes
+        break
+      fi
+    done
+  else
+    needed=yes
+  fi
+  if [ "$needed" = yes ]; then
+    dconf compile $DEFAULTS_GENERATED $DEFAULTS_DIR
+  fi
+fi
+
+for i in $(pidof dconf-service); do
+  if [ "$(stat -c %U /proc/$i)" = Debian-gdm ]; then
+    kill -HUP $i || true
+  fi
+done
+
+exit 0

Modified: desktop/experimental/gdm3/debian/patches/91_dconf_database_path.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/experimental/gdm3/debian/patches/91_dconf_database_path.patch?rev=41531&op=diff
==============================================================================
--- desktop/experimental/gdm3/debian/patches/91_dconf_database_path.patch	[utf-8] (original)
+++ desktop/experimental/gdm3/debian/patches/91_dconf_database_path.patch	[utf-8] Sat Apr 26 20:43:48 2014
@@ -1,7 +1,7 @@
 Index: gdm3-3.12.1/data/dconf/gdm.in
 ===================================================================
---- gdm3-3.12.1.orig/data/dconf/gdm.in	2014-04-10 18:58:02.000000000 +0200
-+++ gdm3-3.12.1/data/dconf/gdm.in	2014-04-26 18:44:47.549758440 +0200
+--- gdm3-3.12.1.orig/data/dconf/gdm.in	2014-04-26 21:57:26.655244579 +0200
++++ gdm3-3.12.1/data/dconf/gdm.in	2014-04-26 21:57:26.651244601 +0200
 @@ -1,2 +1,2 @@
  user-db:user
 -file-db:@DATADIR@/@PACKAGE@/greeter-dconf-defaults

Added: desktop/experimental/gdm3/debian/patches/92_systemd_unit.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/experimental/gdm3/debian/patches/92_systemd_unit.patch?rev=41531&op=file
==============================================================================
--- desktop/experimental/gdm3/debian/patches/92_systemd_unit.patch	(added)
+++ desktop/experimental/gdm3/debian/patches/92_systemd_unit.patch	[utf-8] Sat Apr 26 20:43:48 2014
@@ -0,0 +1,23 @@
+Index: gdm3-3.12.1/data/gdm.service.in
+===================================================================
+--- gdm3-3.12.1.orig/data/gdm.service.in	2014-04-26 22:33:02.131331403 +0200
++++ gdm3-3.12.1/data/gdm.service.in	2014-04-26 22:33:11.179339923 +0200
+@@ -4,12 +4,14 @@ Conflicts=getty at tty@GDM_INITIAL_VT at .serv
+ After=systemd-user-sessions.service getty at tty@GDM_INITIAL_VT at .service plymouth-quit.service
+ 
+ [Service]
+-ExecStart=@sbindir@/gdm
++ExecStartPre=/bin/sh -c '[ "$(cat /etc/X11/default-display-manager 2>/dev/null)" = "/usr/sbin/gdm3" ]'
++ExecStartPre=/usr/share/gdm/generate-config
++ExecStart=@sbindir@/gdm3
++ExecReload=/bin/kill -HUP $MAINPID
++ExecReload=/usr/share/gdm/generate-config
+ Restart=always
++RestartSec=1s
+ IgnoreSIGPIPE=no
+ BusName=org.gnome.DisplayManager
+ StandardOutput=syslog
+ StandardError=inherit
+-
+-[Install]
+-Alias=display-manager.service

Modified: desktop/experimental/gdm3/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/experimental/gdm3/debian/patches/series?rev=41531&op=diff
==============================================================================
--- desktop/experimental/gdm3/debian/patches/series	[utf-8] (original)
+++ desktop/experimental/gdm3/debian/patches/series	[utf-8] Sat Apr 26 20:43:48 2014
@@ -3,3 +3,4 @@
 16_xserver_path.patch
 90_config_comments.patch
 91_dconf_database_path.patch
+92_systemd_unit.patch

Modified: desktop/experimental/gdm3/debian/rules
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/experimental/gdm3/debian/rules?rev=41531&op=diff
==============================================================================
--- desktop/experimental/gdm3/debian/rules	[utf-8] (original)
+++ desktop/experimental/gdm3/debian/rules	[utf-8] Sat Apr 26 20:43:48 2014
@@ -63,6 +63,7 @@
 binary-install/gdm3::
 	mv debian/gdm3/usr/sbin/gdm debian/gdm3/usr/sbin/gdm3
 	chmod 755 debian/gdm3/etc/gdm3/Xsession
+	chmod 755 debian/gdm3/usr/share/gdm/generate-config
 	dh_installpam -pgdm3 --name=gdm-autologin
 	dh_installpam -pgdm3 --name=gdm-launch-environment
 	dh_installpam -pgdm3 --name=gdm-password
@@ -73,6 +74,13 @@
 # Not sure why the following files are still shipped (https://bugzilla.gnome.org/show_bug.cgi?id=710847)
 	rm -f debian/gdm3/usr/share/gdm/greeter/applications/gdm-simple-greeter.desktop
 	rm -f debian/gdm3/usr/share/gdm/greeter/applications/polkit-gnome-authentication-agent-1.desktop
+
+DEB_DH_SYSTEMD_ENABLE_ARGS_gdm3 := --no-act
+DEB_DH_SYSTEMD_START_ARGS_gdm3 := --no-act
+
+binary-post-install/gdm3::
+	dh_systemd_enable -pgdm3
+	dh_systemd_start -pgdm3 --no-start -r
 
 INFILES := $(wildcard debian/*.desktop.in)
 OUTFILES := $(INFILES:.desktop.in=.desktop)




More information about the pkg-gnome-commits mailing list