#832351 xdm: purging leaves leaves dangling /etc/systemd/system/display-manager.service symlink

Package:
xdm
Source:
xdm
Description:
X display manager
Submitter:
Andreas Beckmann
Date:
2026-10-02 17:41:03 UTC
Severity:
important
#832351#5
Date:
2016-07-24 13:49:32 UTC
From:
To:
Hi,

during tests with piuparts I noticed the same behavior in 4 packages
providing a display-manager service: a dangling symlink is left after
purge. Some have individual bugs filed (lightdm: #775385, gdm3:
#771085), but this is more likely a bug somewhere in the helpers being
used. Notice, that after purge no other package providing a
display-manager service was installed any more.


1m16.3s ERROR: FAIL: Package purging left files on system:
  /etc/systemd/system/display-manager.service -> /lib/systemd/system/xdm.service	 not owned

3m8.3s ERROR: FAIL: Package purging left files on system:
  /etc/systemd/system/display-manager.service -> /lib/systemd/system/sddm.service	 not owned

2m46.0s ERROR: FAIL: Package purging left files on system:
  /etc/systemd/system/display-manager.service -> /lib/systemd/system/gdm3.service	 not owned

1m23.3s ERROR: FAIL: Package purging left files on system:
  /etc/systemd/system/display-manager.service -> /lib/systemd/system/lightdm.service	 not owned


Andreas

#832351#16
Date:
2016-07-24 13:54:55 UTC
From:
To:
Am 24.07.2016 um 15:49 schrieb Andreas Beckmann:

Those links are not created by init-system-helpers, so it's probably the
wrong package to assign this bug too.
The display-manager.service symlink has some custom code in the
maintainer scripts of the individual packages.

We can use this bug report though, to come up with a scheme, how to do
that properly.
Then again, we already have
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=764607 which is sort
of related.

#832351#27
Date:
2016-12-20 23:30:47 UTC
From:
To:
Control: clone -1 -2
Control: reassign -1 xdm 1:1.1.11-3
Control: reassign -2 sddm 0.13.0-1

And indeed Didier Roche proposed a solution (in the form of a patch to
gdm3)[1]. I'm cloning and reassigning this bug to the two display
managers that do not have a bug already. The TLDR of the solution is:

1. Have your systemd unit Alias=display-manager.service
2. Use the --no-enable flag to dh_systemd_enable
3. Use `systemctl enable $DEFAULT_SERVICE` in the postinst

Step 1 and 2 should ensure the symlinks are removed on purge.

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?att=1;bug=764607;filename=use-systemd-alias.debdiff;msg=19

#832351#46
Date:
2018-12-15 13:31:43 UTC
From:
To:
Hello Felipe,
…

I'm doing some updates for nodm and had a look at this bug, too.

Is this bug still relevant? I do not see any indications on
tracker.debian.org nor any related lintian problem.

Further the patch in [1] is only partially applied to gdm3 (no
relevant change in postinst compared to nodm) and it contradicts at
least 1. of the list above (it *removes* the systemd unit
Alias=display-manager.service).

I compared the postints of gdm3 and nodem and they are the same in
this regard. Further the systemd unit file of nodm does not contain
Alias=display-manager.service (so no patch needed here?).

Greetings

     Helge

#832351#51
Date:
2026-10-02 17:38:07 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
xdm, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 832351@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Boyuan Yang <byang@debian.org> (supplier of updated xdm package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Fri, 02 Oct 2026 13:10:50 -0400
Source: xdm
Architecture: source
Version: 1:1.1.17-3
Distribution: unstable
Urgency: medium
Maintainer: Debian X Strike Force <debian-x@lists.debian.org>
Changed-By: Boyuan Yang <byang@debian.org>
Closes: 832351 1068378
Changes:
 xdm (1:1.1.17-3) unstable; urgency=medium
 .
   * debian/xdm.postrm.in: On purge, remove the
     /etc/systemd/system/display-manager.service symlink if it still
     points at xdm.service; fixes piuparts failure in sid-strict.
     (Closes: #832351)
   * debian/xdm.pam: Add pam_keyinit session module (force revoke) so
     that a fresh session keyring is created on login, as sshd and other
     display managers do. Thanks to Łukasz Stelmach. (Closes: #1068378)
   * debian/gbp.conf: Set compression = xz to match the tarballs stored
     in the pristine-tar branch.
   * debian/control: Bump debhelper compat to v14.
   * debian/control: Drop Priority: optional.
   * debian/control: Use non-obsolete build-dep package name libselinux-dev.
   * debian/control: Drop unused build-dep quilt.
   * debian/rules: Stop using the xsfbs patch/unpatch targets. With source
     format 3.0 (quilt), dpkg-source applies the patches already, and the
     xsfbs targets required quilt at build and clean time.
Checksums-Sha1:
 c65f65dd17cfb486c62931a788eb80b815831e18 2629 xdm_1.1.17-3.dsc
 cd79d094a2002659fb2de5e8f94592783b23f391 425804 xdm_1.1.17.orig.tar.xz
 364e388e955d56dece3a405feb9486d32f99bf16 58712 xdm_1.1.17-3.debian.tar.xz
 201389de30f953621f175f9e9153b16d3e4be59c 7686 xdm_1.1.17-3_amd64.buildinfo
Checksums-Sha256:
 b9cc570534d1b4f4e622df06f30debf76dc852e421445a1ddd856ef501dcb76d 2629 xdm_1.1.17-3.dsc
 9494aef0911a031c53670725b5c8c9bb9d3f7c5ea7318b1f72ddd9dcbbeceb6a 425804 xdm_1.1.17.orig.tar.xz
 7682fd7eb2308cc0a4dd4ce0737148768de69116d28bc0e884cd9be285d37b54 58712 xdm_1.1.17-3.debian.tar.xz
 32f801156bfd093c540d5fab7d5e620abcaa8e2564572ab5732415993eeaf4c7 7686 xdm_1.1.17-3_amd64.buildinfo
Files:
 c907857bff6c4dd249b6196c7c5bfd45 2629 x11 optional xdm_1.1.17-3.dsc
 e918d273f714098fb409457e37d328ce 425804 x11 optional xdm_1.1.17.orig.tar.xz
 60b1e0820d37bc0ebe93f3bff840b6b6 58712 x11 optional xdm_1.1.17-3.debian.tar.xz
 6443d492031a340bc9fafd0c5664083d 7686 x11 optional xdm_1.1.17-3_amd64.buildinfo
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEfncpR22H1vEdkazLwpPntGGCWs4FAmq/5fQACgkQwpPntGGC
Ws4WdQ//e47JOEY7+8GmWeOQKPD7Z3PAQMUs57ksyZoR7ciYmBu9ikdcE8R1R2Fs
xOpGebYjmd501ftukCOeaLUrAxK0hoJ/0eMxXmlqoAkMVqCFsW004SPMl3d/GOE8
yCUWHoiN08trZLeoF6uXJAxEizuq5OZMHkh6IuhXuiFz+WQo0UTz+WJ1Tk7VeI64
kLSy3+dn5PztI1ZqOlnVP3IzmP73vUp17JXkdkVtsRHluCGnAsl5Ih64MLPyIRQD
d4Shm6NPTkPTu5sTCG9vJIZWjLeE/6R3N73WuspaVtebkP5ybZEtm/fX/C9I1vXH
grmNh5WkAuY8L9j3IsbgxCR91Ld7cxZjrFPgV3w+24TIzg2NxA6p/88eCSIIMgaj
i/Wcaj6mB0WZfVvkA8fMSCrkV3YWMDJPjhSPcQyqxbsHzTmreLAu2VrK+qAMqIMW
hRXFH4LQjLMJ8zBzbP/HaQyTAYXCIQ8+ZyY4hfRda2T3Bs3d1nQS7QEBj84eUo/m
+9WW/6p/x1BfppMm2sFbjfUesYGtpJPZjHH1EpPt/1aA+7Q4dpw5zXVrQJX+TJYU
45cmKJjewbwLiJHA6JVRxIQBMzLf+U7A2B4M3nIxAXIPzF03S4jpHJPjAqgOrQzk
TcwHQyMO7OHzaHFtCBQOW3LpANPP1oFCjy4QBtoSEmcS6IKX0FI=
=o4PJ
-----END PGP SIGNATURE-----