Bug#755359: [kdm] systemd seem to fail to start display-manager.service
- To: Francesco Muzio <muziofg@gmail.com>
- Cc: 755359@bugs.debian.org
- Subject: Bug#755359: [kdm] systemd seem to fail to start display-manager.service
- From: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
- Date: Thu, 02 Apr 2015 12:57:55 +0200
- Message-id: <[🔎] 551D20B3.6050300@physik.fu-berlin.de>
- Reply-to: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>, 755359@bugs.debian.org
- In-reply-to: <54B13683.1050804@physik.fu-berlin.de>
- References: <54AF025E.4080705@gmail.com> <54AF043B.10303@physik.fu-berlin.de> <54AF0975.8030808@gmail.com> <54AFE97F.1010009@physik.fu-berlin.de> <54B0288F.2080500@gmail.com> <54B04C11.5070904@physik.fu-berlin.de> <54B05769.8050609@gmail.com> <54B05861.4020505@physik.fu-berlin.de> <54B06799.4000103@physik.fu-berlin.de> <54B06FF3.1040008@gmail.com> <20150110011807.GA29017@physik.fu-berlin.de> <54B132FB.3040503@gmail.com> <54B13683.1050804@physik.fu-berlin.de>
On 01/10/2015 03:26 PM, John Paul Adrian Glaubitz wrote:
> In any case, I will hopefully provide an updated kdm package
> in the following week that you can try at your desire.
Attaching a debdiff with the proposed changes to the kde-workspace
source package which will add systemd support to kdm.
These changes were inspired by the lightdm package in Debian as well
as the kdm package in Fedora. I haven't fully tested my changes yet.
Cheers,
Adrian
--
.''`. John Paul Adrian Glaubitz
: :' : Debian Developer - glaubitz@debian.org
`. `' Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
diff -Nru kde-workspace-4.11.13/debian/changelog kde-workspace-4.11.13/debian/changelog
--- kde-workspace-4.11.13/debian/changelog 2014-11-07 10:11:29.000000000 +0100
+++ kde-workspace-4.11.13/debian/changelog 2015-04-02 11:17:10.000000000 +0200
@@ -1,3 +1,16 @@
+kde-workspace (4:4.11.13-2.1) unstable; urgency=medium
+
+ * Non-maintainer upload.
+ * Add systemd support: (Closes: #755359)
+ - debian/control:
+ + Add dh_systemd (>= 1.14) to Build-Depends.
+ - debian/kdm.postinst:
+ + Create symbolic link to systemd service file of default display manager.
+ - debian/rules:
+ + Install kdm systemd service file using dh_system_start.
+
+ -- John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> Thu, 02 Apr 2015 11:16:43 +0200
+
kde-workspace (4:4.11.13-2) unstable; urgency=medium
* New patch: upstream_do_not_pass_ntpUtility_as_an_argument.patch fix
diff -Nru kde-workspace-4.11.13/debian/control kde-workspace-4.11.13/debian/control
--- kde-workspace-4.11.13/debian/control 2014-11-07 10:11:29.000000000 +0100
+++ kde-workspace-4.11.13/debian/control 2015-04-02 11:08:32.000000000 +0200
@@ -75,7 +75,8 @@
python-dev (>= 2.6.6-3~),
shared-desktop-ontologies (>= 0.8),
udev [linux-any],
- zlib1g-dev
+ zlib1g-dev,
+ dh-systemd (>= 1.14)
Standards-Version: 3.9.5
X-Python-Version: >= 2.5
XS-Testsuite: autopkgtest
diff -Nru kde-workspace-4.11.13/debian/kdm.postinst kde-workspace-4.11.13/debian/kdm.postinst
--- kde-workspace-4.11.13/debian/kdm.postinst 2014-11-07 10:11:29.000000000 +0100
+++ kde-workspace-4.11.13/debian/kdm.postinst 2015-04-02 11:10:01.000000000 +0200
@@ -78,6 +78,15 @@
if [ -d /var/lib/kdm ]; then
chown -R kdm /var/lib/kdm
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
;;
abort-upgrade|abort-remove|abort-deconfigure)
diff -Nru kde-workspace-4.11.13/debian/kdm.service kde-workspace-4.11.13/debian/kdm.service
--- kde-workspace-4.11.13/debian/kdm.service 1970-01-01 01:00:00.000000000 +0100
+++ kde-workspace-4.11.13/debian/kdm.service 2015-04-02 11:10:27.000000000 +0200
@@ -0,0 +1,10 @@
+[Unit]
+Description=KDE Display Manager
+Documentation=man:kdm(1)
+After=systemd-user-sessions.service
+
+[Service]
+ExecStartPre=/bin/sh -c '[ "$(cat /etc/X11/default-display-manager 2>/dev/null)" = "/usr/bin/kdm" ]'
+ExecStart=/usr/bin/kdm
+Restart=always
+IgnoreSIGPIPE=no
diff -Nru kde-workspace-4.11.13/debian/rules kde-workspace-4.11.13/debian/rules
--- kde-workspace-4.11.13/debian/rules 2014-11-07 10:11:29.000000000 +0100
+++ kde-workspace-4.11.13/debian/rules 2015-04-02 11:07:34.000000000 +0200
@@ -1,6 +1,6 @@
#!/usr/bin/make -f
-dh = --with=python2
+dh = --with=python2 --with=systemd
include /usr/share/pkg-kde-tools/qt-kde-team/2/debian-qt-kde.mk
libpkgs_addsubst_allLibraries = kde-workspace-dev
@@ -39,6 +39,9 @@
$(overridden_command) -pkdm --noscripts
$(overridden_command) --remaining-packages
+override_dh_systemd_start:
+ $(overriden_command) -pkdm --no-start -r kdm.service
+
pkgs_with_install_linux = $(patsubst debian/%.install.linux,%,$(wildcard debian/*.install.linux))
override_dh_install:
$(overridden_command)
Reply to: