Am 10.01.2015 um 11:49 schrieb Adrian Immanuel Kiess:
> Package: gdm3
> Version: 3.14.1-3
> Followup-For: Bug #771762
> 
> Dear Maintainer,
> 
>    * What led up to the situation?
>      Trying to run GDM3 at startup or with service gdm3 restart
>    * What exactly did you do (or not do) that was effective (or
>      ineffective)?
>      service kdm stop; dpkg-reconfigure gdm3; service gdm3 start
>    * What was the outcome of this action?
>      GDM3 does not work in Debian/testing
>    * What outcome did you expect instead?
>      Running and working GDM3
> 
> currently in Debian/testing GDM3 is broken for me.
> 
> It seems it tries to spawn a Xorg instance but fails with that.
> 
> I'll give the system logs below:
> 
> adrian@g6 (~) % systemctl status gdm3.service
> ● gdm.service - GNOME Display Manager
>    Loaded: loaded (/lib/systemd/system/gdm.service; static)
>   Drop-In: /run/systemd/generator/gdm3.service.d
>            └─50-gdm3-$x-display-manager.conf
>    Active: failed (Result: start-limit) since Sat 2015-01-10 11:38:47 CET; 
> 6min
> ago
>   Process: 7364 ExecStartPre=/bin/sh -c [ "$(cat /etc/X11/default-display-
> manager 2>/dev/null)" = "/usr/sbin/gdm3" ] (code=exited, status=1/FAILURE)
> 

I think we can consider that a systemd bug and how it implements the LSB
$x-display-manager facility

Currently, this is a target, where every display manager can hook into
via a insserv override snippet.

Whenever another service requests the start of $x-display-manager, all
display managers hooked up into x-display-manager.target will be started.

Since gdm is not your default display-manager (but kdm), the
ExecStartPre= check will fail and thus the unit as a whole will be
marked as failed.

That's obviously not really the behaviour we want.

After careful consideration, I think it's better, to map
$x-display-manager to display-manager.service, which will be a symlink
to the default display manager.

With Didier's systemd-default-display-manager-generator, it should be
guaranteed, that /etc/systemd/system/display-manager.service points to
something sensible.

I'd propose something like the attached patch.

CCing the pkg-systemd-maintainers mailing list for input/review.






-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?
diff --git a/debian/patches/Add-targets-for-compatibility-with-Debian-insserv-sy.patch b/debian/patches/Add-targets-for-compatibility-with-Debian-insserv-sy.patch
index 9c182ab..45a2b96 100644
--- a/debian/patches/Add-targets-for-compatibility-with-Debian-insserv-sy.patch
+++ b/debian/patches/Add-targets-for-compatibility-with-Debian-insserv-sy.patch
@@ -3,24 +3,21 @@ Date: Sat, 26 Apr 2014 14:25:41 +0200
 Subject: Add targets for compatibility with Debian insserv system facilities
 
 ---
- Makefile.am                       |  6 ++++++
+ Makefile.am                       |  5 +++++
  units/mail-transport-agent.target | 12 ++++++++++++
- units/x-display-manager.target    | 12 ++++++++++++
- 3 files changed, 30 insertions(+)
+ 2 files changed, 17 insertions(+)
  create mode 100644 units/mail-transport-agent.target
- create mode 100644 units/x-display-manager.target
 
 diff --git a/Makefile.am b/Makefile.am
-index ce93c8c..6f4df22 100644
+index ce93c8c..31c86de 100644
 --- a/Makefile.am
 +++ b/Makefile.am
-@@ -539,6 +539,12 @@ nodist_systemunit_DATA = \
+@@ -539,6 +539,11 @@ nodist_systemunit_DATA = \
  	units/systemd-nspawn@.service \
  	units/systemd-update-done.service
  
 +if HAVE_SYSV_COMPAT
 +nodist_systemunit_DATA += \
-+	units/x-display-manager.target \
 +	units/mail-transport-agent.target
 +endif
 +
@@ -45,21 +42,3 @@ index 0000000..4d74ec7
 +[Unit]
 +Description=Mail Transport Agent
 +RefuseManualStart=yes
-diff --git a/units/x-display-manager.target b/units/x-display-manager.target
-new file mode 100644
-index 0000000..a528dff
---- /dev/null
-+++ b/units/x-display-manager.target
-@@ -0,0 +1,12 @@
-+#  This file is part of systemd.
-+#
-+#  systemd is free software; you can redistribute it and/or modify it
-+#  under the terms of the GNU Lesser General Public License as published by
-+#  the Free Software Foundation; either version 2.1 of the License, or
-+#  (at your option) any later version.
-+
-+#  This exists mostly for compatibility with SysV/LSB units
-+#  depending on the $x-display-manager system facility.
-+[Unit]
-+Description=X11 Display Manager
-+RefuseManualStart=yes
diff --git a/debian/patches/Map-LSB-x-display-manager-facility-to-display-manage.patch b/debian/patches/Map-LSB-x-display-manager-facility-to-display-manage.patch
new file mode 100644
index 0000000..05bae32
--- /dev/null
+++ b/debian/patches/Map-LSB-x-display-manager-facility-to-display-manage.patch
@@ -0,0 +1,21 @@
+From: Michael Biebl <bi...@debian.org>
+Date: Sat, 10 Jan 2015 14:22:51 +0100
+Subject: Map LSB $x-display-manager facility to display-manager.service
+
+---
+ src/sysv-generator/sysv-generator.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/sysv-generator/sysv-generator.c b/src/sysv-generator/sysv-generator.c
+index da6b4f6..8ee1125 100644
+--- a/src/sysv-generator/sysv-generator.c
++++ b/src/sysv-generator/sysv-generator.c
+@@ -250,6 +250,8 @@ static int sysv_translate_facility(const char *name, const char *filename, char
+                 "remote_fs",            SPECIAL_REMOTE_FS_TARGET,
+                 "syslog",               "systemd-journald-dev-log.socket",
+                 "time",                 SPECIAL_TIME_SYNC_TARGET,
++                /* Debian defined facilities */
++                "x-display-manager"     display-manager.service,
+                 /* special rcS init scripts */
+                 "cryptdisks",           "cryptsetup.target",
+                 "mountall",             SPECIAL_LOCAL_FS_TARGET,

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to