Bug#733220: Add systemd service file
Hello all, Arto Jantunen [2013-12-27 12:57 +0200]: +[Install] +Alias=display-manager.service We should not do that, as systemctl enable will make the package that was installed last win the symlink. But we don't want that, /etc/X11/default-display-manager should define what the default DM should be. So we can't use the Alias= handling but have to maintain the /etc/systemd/system/display-manager.service symlink ourselves. Josselin Mouette, Michael Biebl, and I discussed that on the current systemd/GNOME sprint and we came up with a plan like in http://titanpad.com/s-gsprintchangelog how to handle these. This is implemented for lightdm with the attached patch; Joss is working on the corresponding patch for gdm. I also just pushed that upstream: http://bazaar.launchpad.net/~lightdm-team/lightdm/trunk/revision/1965 Thanks for considering, Martin -- Martin Pitt| http://www.piware.de Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org) diff -Nru lightdm-1.10.0/debian/changelog lightdm-1.10.0/debian/changelog --- lightdm-1.10.0/debian/changelog 2014-04-11 16:25:01.0 +0200 +++ lightdm-1.10.0/debian/changelog 2014-04-26 18:41:59.0 +0200 @@ -1,3 +1,12 @@ +lightdm (1.10.0-0ubuntu4) utopic; urgency=medium + + * Add debian/lightdm.service: Add systemd unit. + * debian/lightdm.postinst: Set /etc/systemd/system/display-manager.service +symlink according to /etc/X11/default-display-manager. + * Build-depend on and enable dh-systemd. + + -- Martin Pitt martin.p...@ubuntu.com Tue, 22 Apr 2014 17:29:48 +0200 + lightdm (1.10.0-0ubuntu3) trusty; urgency=medium * debian/patches/06_apparmor_chromium_updates.patch: allow oxide based diff -Nru lightdm-1.10.0/debian/control lightdm-1.10.0/debian/control --- lightdm-1.10.0/debian/control 2014-02-05 11:16:51.0 +0100 +++ lightdm-1.10.0/debian/control 2014-04-22 17:28:48.0 +0200 @@ -21,6 +21,7 @@ qtbase5-dev, dh-autoreconf, dh-translations, + dh-systemd (= 1.14), gtk-doc-tools, yelp-tools, dbus, diff -Nru lightdm-1.10.0/debian/lightdm.postinst lightdm-1.10.0/debian/lightdm.postinst --- lightdm-1.10.0/debian/lightdm.postinst 2014-02-12 23:08:14.0 +0100 +++ lightdm-1.10.0/debian/lightdm.postinst 2014-04-26 18:38:46.0 +0200 @@ -80,6 +80,16 @@ chmod 0644 /etc/apparmor.d/abstractions/lightdm_chromium-browser || true fi fi + +# 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 ;; esac diff -Nru lightdm-1.10.0/debian/lightdm.service lightdm-1.10.0/debian/lightdm.service --- lightdm-1.10.0/debian/lightdm.service 1970-01-01 01:00:00.0 +0100 +++ lightdm-1.10.0/debian/lightdm.service 2014-04-26 18:40:57.0 +0200 @@ -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 '[ ! -f /etc/X11/default-display-manager -o $(cat /etc/X11/default-display-manager 2/dev/null) = /usr/sbin/lightdm ]' +ExecStart=/usr/sbin/lightdm +Restart=always +BusName=org.freedesktop.DisplayManager diff -Nru lightdm-1.10.0/debian/rules lightdm-1.10.0/debian/rules --- lightdm-1.10.0/debian/rules 2014-02-05 11:16:51.0 +0100 +++ lightdm-1.10.0/debian/rules 2014-04-22 17:32:27.0 +0200 @@ -3,7 +3,7 @@ LDFLAGS+=-Wl,--as-needed %: - dh $@ --with quilt,autoreconf,translations --parallel + dh $@ --with quilt,autoreconf,translations,systemd --parallel override_dh_autoreconf: NOCONFIGURE=1 dh_autoreconf ./autogen.sh @@ -27,6 +27,9 @@ override_dh_installinit: dh_installinit --no-start +override_dh_systemd_start: + dh_systemd_start -plightdm --no-start -r lightdm.service + override_dh_installpam: dh_installpam dh_installpam --name=lightdm-autologin signature.asc Description: Digital signature
Bug#733220: Add systemd service file
Martin Pitt [2014-04-26 19:14 +0200]: +# temporary safety check until all DMs are converted to correct +# display-manager.service symlink handling +ExecStartPre=/bin/sh -c '[ ! -f /etc/X11/default-display-manager -o $(cat /etc/X11/default-display-manager 2/dev/null) = /usr/sbin/lightdm ]' Joss pointed out that the semantics should be so that if /etc/X11/default-display-manager does not exist, no DM should start up. Fixed in http://bazaar.launchpad.net/~lightdm-team/lightdm/trunk/revision/1966 So please, if you apply this patch, apply this followup fix as well. Thanks! -- Martin Pitt| http://www.piware.de Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org) signature.asc Description: Digital signature
Bug#733220: [Pkg-xfce-devel] Bug#733220: Add systemd service file for lightdm
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 On Mon, Dec 30, 2013 at 12:03:17PM +0200, Arto Jantunen wrote: Yves-Alexis Perez cor...@debian.org writes: On Fri, Dec 27, 2013 at 12:57:51PM +0200, Arto Jantunen wrote: Attached is a patch to add native systemd support to lightdm. I have been using the service file locally for some time now and haven't noticed any problems. Does it handle correctly the case where multiple display managers are installed? Has a service file that handles this case been made for one of the other display managers in Debian, could the solution be copied to lightdm as well? Do any of the other display managers have native systemd service config? Also, I've been made aware of https://fedoraproject.org/wiki/Features/DisplayManagerRework Regards, - -- Yves-Alexis Perez -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.22 (GNU/Linux) iQEcBAEBCgAGBQJSyCCdAAoJEG3bU/KmdcClzmEIAKhQ0faX/PgqPsc/vUhoehB4 1R9H0r7kylPQ2gyqpbdxy4JGHx11DirUxG559SNRF1VaZa/ulY/nCbz8w3D5EZ46 BZpR3cDjniPLO7YYmCfYDw5M7dhISgbTQ4bs/UAKo/tEX7yn2qA0kN4Ta0SHIalQ QQy3P3ufXOi4s/3GJBFYkm5JSuirbRfQwIE9mexbqNuzb0ZTD5TupIceKJBgCPus oe0K6VAtD+duC1I9Q4X6XHv6iIwv/vrplHNQXOwsm/u0QuW8GzHvh6zgIkThqI0q zhLS0JeAIB6URh77UeHac/IHBrhlkrGZUi7AaICTAYM9zk6kMt5Idw291I5U1Cw= =fuBv -END PGP SIGNATURE- -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#733220: Add systemd service file for lightdm
Yves-Alexis Perez cor...@debian.org writes: On Fri, Dec 27, 2013 at 12:57:51PM +0200, Arto Jantunen wrote: Attached is a patch to add native systemd support to lightdm. I have been using the service file locally for some time now and haven't noticed any problems. Does it handle correctly the case where multiple display managers are installed? Has a service file that handles this case been made for one of the other display managers in Debian, could the solution be copied to lightdm as well? Do any of the other display managers have native systemd service config? -- Arto Jantunen -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#733220: [Pkg-xfce-devel] Bug#733220: Add systemd service file
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 On Fri, Dec 27, 2013 at 12:57:51PM +0200, Arto Jantunen wrote: Package: lightdm Version: 1.8.5-2 Severity: wishlist Tags: patch User: pkg-systemd-maintain...@lists.alioth.debian.org Usertags: systemd-units X-Debbugs-CC: pkg-systemd-maintain...@lists.alioth.debian.org Attached is a patch to add native systemd support to lightdm. I have been using the service file locally for some time now and haven't noticed any problems. Does it handle correctly the case where multiple display managers are installed? Regards, - -- Yves-Alexis Perez -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.22 (GNU/Linux) iQEcBAEBCgAGBQJSv1WsAAoJEG3bU/KmdcClD8QH/jWfAKkd5kfGTghZrrtDFe8/ s0zCHwGpqgoCUy6bjmd452XiKP01gSZDH2VSigZxSL7SFRi1PuKn/ivYT7BgrB+j SlYto+5fjIU5N8/aVVIiuz4KJwIFbvQaMExFe11K0o8nU2htrdZPjQfhOtgBq3GZ n1ulbFqWm0Jx0ocOXBJhE4Vc7NmO3evzaW6HFJQUSb29Z8k7AKDaptGHRDNOHNQJ A1UV07RsBFvJAzlAxXoDubeEN/rV4hMFSP70g0saKfuuXPNcW3tOC06nH1GcHv7y mMuXHVGu++RqdARX6yrOOz+SlDod3qo+UiA+m14oKwQd9BfIHQHX0GM6veMx20c= =twD0 -END PGP SIGNATURE- -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#733220: Add systemd service file
Package: lightdm Version: 1.8.5-2 Severity: wishlist Tags: patch User: pkg-systemd-maintain...@lists.alioth.debian.org Usertags: systemd-units X-Debbugs-CC: pkg-systemd-maintain...@lists.alioth.debian.org Attached is a patch to add native systemd support to lightdm. I have been using the service file locally for some time now and haven't noticed any problems. -- Arto Jantunen diff -urN lightdm-1.8.5/debian/control lightdm/debian/control --- lightdm-1.8.5/debian/control 2013-10-12 10:49:28.0 +0300 +++ lightdm/debian/control 2013-12-27 12:13:35.899300557 +0200 @@ -9,7 +9,7 @@ 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 Standards-Version: 3.9.4 Homepage: https://launchpad.net/lightdm Vcs-Svn: svn://anonscm.debian.org/pkg-xfce/goodies/trunk/lightdm diff -urN lightdm-1.8.5/debian/lightdm.service lightdm/debian/lightdm.service --- lightdm-1.8.5/debian/lightdm.service 1970-01-01 02:00:00.0 +0200 +++ lightdm/debian/lightdm.service 2013-12-27 12:04:08.414121279 +0200 @@ -0,0 +1,13 @@ +[Unit] +Description=Light Display Manager +Documentation=man:lightdm(1) +After=systemd-user-sessions.service + +[Service] +ExecStart=/usr/sbin/lightdm +Restart=always +IgnoreSIGPIPE=no +BusName=org.freedesktop.DisplayManager + +[Install] +Alias=display-manager.service diff -urN lightdm-1.8.5/debian/rules lightdm/debian/rules --- lightdm-1.8.5/debian/rules 2013-10-31 10:31:09.0 +0200 +++ lightdm/debian/rules 2013-12-27 12:14:18.236469787 +0200 @@ -14,6 +14,9 @@ override_dh_installinit: dh_installinit --noscripts +override_dh_systemd_start: + dh_systemd_start --no-restart-on-upgrade + override_dh_install: find debian/tmp -name '*.la' -delete find debian/tmp/usr/lib/ -name gdmflexiserver -delete @@ -21,6 +24,6 @@ dh_install --fail-missing -X etc/init/lightdm.conf %: - dh $@ --parallel + dh $@ --parallel --with systemd override_dh_auto_test: