]> rtime.felk.cvut.cz Git - sojka/debian/lightdm.git/commitdiff
* debian/control:
authorcorsac <corsac@0c9b3bff-18ee-0310-b944-d1aa2700132f>
Sun, 27 Apr 2014 09:12:30 +0000 (09:12 +0000)
committercorsac <corsac@0c9b3bff-18ee-0310-b944-d1aa2700132f>
Sun, 27 Apr 2014 09:12:30 +0000 (09:12 +0000)
  - add build-dep on dh-systemd.
* debian/lightdm.postinst:
  - handle symlinks for systemd service files according to the currently
    selected display manager.
* debian/lightdm.service:
  - add systemd service file, thanks Martin Pitt for the work.closes: #733220
* debian/rules:
  - use dh systemd addon and configure it to not start the lightdm service
    at once.

git-svn-id: svn://anonscm.debian.org/pkg-xfce/goodies/trunk/lightdm@8416 0c9b3bff-18ee-0310-b944-d1aa2700132f

debian/changelog
debian/control
debian/lightdm.postinst
debian/lightdm.service [new file with mode: 0644]
debian/rules

index aac2cccc48fec038738327f374a503a3810574f2..846b77d88b4623c880be530fc46c5c72ffe97409 100644 (file)
@@ -1,3 +1,18 @@
+lightdm (1.10.0-3) UNRELEASED; urgency=medium
+
+  * debian/control:
+    - add build-dep on dh-systemd.
+  * debian/lightdm.postinst:
+    - handle symlinks for systemd service files according to the currently
+      selected display manager.
+  * debian/lightdm.service:
+    - add systemd service file, thanks Martin Pitt for the work.closes: #733220
+  * debian/rules:
+    - use dh systemd addon and configure it to not start the lightdm service
+      at once.
+
+ -- Yves-Alexis Perez <corsac@debian.org>  Sun, 27 Apr 2014 00:09:13 +0200
+
 lightdm (1.10.0-2) unstable; urgency=medium
 
   * Upload to unstable.
index 5844feec52c78c3913ac5fcf12168ffd96cd1cbd..32e3cf5cc19f80a73a46a3f7501693dd65b13353 100644 (file)
@@ -9,7 +9,8 @@ Build-Depends: debhelper (>= 9), intltool, pkg-config, libglib2.0-dev,
  libdbus-glib-1-dev, libxcb1-dev, libxdmcp-dev, libpam-dev, libxklavier-dev, 
  libgtk-3-dev, libck-connector-dev, gnome-doc-utils, libqt4-dev,
  valac, gobject-introspection, dpkg-dev (>= 1.16.1),
- gtk-doc-tools, itstool, libgcrypt11-dev, libgirepository1.0-dev
+ gtk-doc-tools, itstool, libgcrypt11-dev, libgirepository1.0-dev,
+ dh-systemd (>= 1.14)
 Standards-Version: 3.9.5
 Homepage: https://launchpad.net/lightdm
 Vcs-Svn: svn://anonscm.debian.org/pkg-xfce/goodies/trunk/lightdm
index 550d1aa8ce23c65a72c6cf8f66e5f205ebe9c994..cc315efce9e4da947713063757c9d03daac71f59 100644 (file)
@@ -62,6 +62,16 @@ fi
 if [ "$1" = "configure" ];
 then
   invoke-rc.d dbus reload || true
+
+  # set default-display-manager systemd service link according to our config
+  if [ -e "$DEFAULT_DISPLAY_MANAGER_FILE" -a -d /etc/systemd/system/ ]; 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 "ERROR: $SERVICE is the selected default display manager but does not exist" >&2
+    fi
+  fi
 fi
 
 #DEBHELPER#
diff --git a/debian/lightdm.service b/debian/lightdm.service
new file mode 100644 (file)
index 0000000..82b885c
--- /dev/null
@@ -0,0 +1,12 @@
+[Unit]
+Description=Light Display Manager
+Documentation=man:lightdm(1)
+After=systemd-user-sessions.service
+
+[Service]
+# temporary safety check until all DMs are converted to correct
+# display-manager.service symlink handling
+ExecStartPre=/bin/sh -c '[ "$(cat /etc/X11/default-display-manager 2>/dev/null)" = "/usr/sbin/lightdm" ]'
+ExecStart=/usr/sbin/lightdm
+Restart=always
+BusName=org.freedesktop.DisplayManager
index 38831bfed886d37918a6117e746957cdd134496e..67fbd9e552703185e323c90ab137070e9641520f 100755 (executable)
@@ -21,6 +21,9 @@ override_dh_install:
        dh_install --fail-missing -X etc/init/lightdm.conf
 
 %:
-       dh $@ --parallel
+       dh $@ --with systemd --parallel
 
 override_dh_auto_test:
+
+override_dh_systemd_start:
+       dh_systemd_start -plightdm --no-start -r lightdm.service