[Pkg-xfce-commits] [Git][xfce-extras-team/lightdm][debian/master] 3 commits: Stop deleting system user on remove/purge
Yves-Alexis Perez (@corsac)
gitlab at salsa.debian.org
Sun Sep 13 12:55:48 BST 2026
Yves-Alexis Perez pushed to branch debian/master at Xfce external packages / lightdm
Commits:
523dde36 by Luca Boccassi at 2026-07-09T14:28:23+01:00
Stop deleting system user on remove/purge
This is widely considered bad practice, as the kernel recycles UIDs/GIDs. So any potential leftover file/directory can then become owned by the next user/group that gets added, with unpredictable consequences.
- - - - -
d3d15677 by Luca Boccassi at 2026-07-09T14:28:49+01:00
Install and use sysusers.d/tmpfiles.d config files
sysusers.d config files allow a package to use declarative configuration instead of manually written maintainer scripts. This also allows image-based systems to be created with /usr/ only, and also allows for factory resetting a system and recreating /etc/ on boot.
https://www.freedesktop.org/software/systemd/man/latest/sysusers.d.html
- - - - -
237a91bb by Yves-Alexis Perez at 2026-09-13T11:55:39+00:00
Merge branch 'sysusers' into 'debian/master'
Migrate from adduser to sysusers.d/tmpfiles.d
See merge request xfce-extras-team/lightdm!20
- - - - -
5 changed files:
- debian/control
- debian/lightdm.postinst
- debian/lightdm.postrm
- + debian/lightdm.sysusers
- + debian/lightdm.tmpfiles
Changes:
=====================================
debian/control
=====================================
@@ -4,6 +4,7 @@ Priority: optional
Maintainer: Debian Xfce Maintainers <debian-xfce at lists.debian.org>
Uploaders: Yves-Alexis Perez <corsac at debian.org>
Build-Depends: debhelper-compat (= 13),
+ dh-sequence-installsysusers,
gobject-introspection,
gtk-doc-tools,
intltool,
@@ -29,8 +30,7 @@ Vcs-Browser: https://salsa.debian.org/xfce-extras-team/lightdm
Package: lightdm
Architecture: any
-Depends: adduser,
- default-dbus-system-bus | dbus-system-bus,
+Depends: default-dbus-system-bus | dbus-system-bus,
default-logind [linux-any] | logind [linux-any],
lightdm-gtk-greeter | lightdm-greeter,
${misc:Depends},
=====================================
debian/lightdm.postinst
=====================================
@@ -7,24 +7,6 @@ set -e
THIS_PACKAGE=lightdm
DEFAULT_DISPLAY_MANAGER_FILE=/etc/X11/default-display-manager
-# creating lightdm group if he isn't already there
-if ! getent group lightdm >/dev/null; then
- addgroup --system lightdm
-fi
-
-# creating lightdm user if he isn't already there
-if ! getent passwd lightdm >/dev/null; then
- adduser --system --ingroup lightdm --home /var/lib/lightdm lightdm
- usermod -c "Light Display Manager" lightdm
- usermod -d "/var/lib/lightdm" lightdm
- usermod -g "lightdm" lightdm
- usermod -s "/bin/false" lightdm
-fi
-
-mkdir -p /var/lib/lightdm
-chown lightdm:lightdm /var/lib/lightdm
-chmod 0750 /var/lib/lightdm
-
# debconf is not a registry, so we only fiddle with the default file if it
# does not exist
if [ ! -e "$DEFAULT_DISPLAY_MANAGER_FILE" ]; then
=====================================
debian/lightdm.postrm
=====================================
@@ -18,18 +18,6 @@ if [ "$1" = "purge" ] ; then
if [ -d /var/log/lightdm ]; then
rm -r /var/log/lightdm
fi
- error() { echo >&2 "Could not remove lightdm $1.
-Please make sure lightdm is not running before attempting to purge lightdm"; }
- if getent passwd lightdm >/dev/null; then
- if which deluser >/dev/null; then
- deluser --system lightdm || error user
- fi
- fi
- if getent group lightdm >/dev/null; then
- if which delgroup >/dev/null; then
- delgroup --system lightdm || error group
- fi
- fi
fi
#DEBHELPER#
exit 0
=====================================
debian/lightdm.sysusers
=====================================
@@ -0,0 +1 @@
+u! lightdm - "Light Display Manager" /var/lib/lightdm /bin/false
=====================================
debian/lightdm.tmpfiles
=====================================
@@ -0,0 +1 @@
+d /var/lib/lightdm 0750 lightdm lightdm - -
View it on GitLab: https://salsa.debian.org/xfce-extras-team/lightdm/-/compare/07a0afa99545578b18ffc4be967b32ba41ddcae8...237a91bb351737f16aa58413eb03b6730b1e179d
--
View it on GitLab: https://salsa.debian.org/xfce-extras-team/lightdm/-/compare/07a0afa99545578b18ffc4be967b32ba41ddcae8...237a91bb351737f16aa58413eb03b6730b1e179d
You're receiving this email because of your account on salsa.debian.org. Manage all notifications: https://salsa.debian.org/-/profile/notifications | Help: https://salsa.debian.org/help
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-xfce-commits/attachments/20260913/7dbab0c3/attachment-0001.htm>
More information about the Pkg-xfce-commits
mailing list