Bug#755359: [kdm] systemd seem to fail to start display-manager.service
On 04/02/2015 04:20 PM, John Paul Adrian Glaubitz wrote:
> Attaching a cleaned up revision the patch where I fixed the tab stops
> and added an additional line in the debian/changelog to indicate that
> the file debian/kdm.service was added to the source package.
While reviewing my patch again I stumbled across a typo I made in the
rules file (overriden_command -> overridden_command). I have fixed that
now and also slightly made the changelog entry more accurate.
Apologies for the noise.
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 16:50:58.000000000 +0200
@@ -1,3 +1,18 @@
+kde-workspace (4:4.11.13-2.1) unstable; urgency=medium
+
+ * Non-maintainer upload.
+ * Add systemd support for kdm: (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/kdm.service:
+ + Add new systemd service file for kdm.
+ - debian/rules:
+ + Install kdm systemd service file using dh_system_start.
+
+ -- John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> Thu, 02 Apr 2015 16:50:40 +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 13:59:35.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 14:09:04.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 16:50:17.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:
+ $(overridden_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: