[med-svn] [Git][med-team/gnumed-client][master] 2 commits: Stop deleting system users on purge
Andreas Tille (@tille)
gitlab at salsa.debian.org
Fri Jun 26 23:10:47 BST 2026
Andreas Tille pushed to branch master at Debian Med / gnumed-client
Commits:
c855c160 by Luca Boccassi at 2026-06-26T20:08:58+01:00
Stop deleting system users on 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.
- - - - -
f4304382 by Luca Boccassi at 2026-06-26T20:43:24+01:00
Install and use sysusers.d/tmpfiles.d config files
sysusers.d/tmpfiles.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
https://www.freedesktop.org/software/systemd/man/latest/tmpfiles.d.html
Note that this does not require a hard dependency on systemd,
debhelper generates depetencies correctly so that they work out
of the box on non-systemd and non-linux Debian builds seamlessly.
- - - - -
5 changed files:
- debian/control
- − debian/gnumed-client-de.postinst
- − debian/gnumed-client-de.prerm
- + debian/gnumed-client-de.sysusers
- + debian/gnumed-client-de.tmpfiles
Changes:
=====================================
debian/control
=====================================
@@ -9,6 +9,7 @@ Section: misc
Build-Depends:
debhelper-compat (= 13),
dh-sequence-cruft,
+ dh-sequence-installsysusers,
po-debconf,
python3,
dh-sequence-python3,
@@ -107,7 +108,6 @@ Architecture: all
Depends:
gnumed-client (= ${source:Version}),
${misc:Depends},
- adduser,
Recommends:
wgerman-medical,
hunspell-de-med,
=====================================
debian/gnumed-client-de.postinst deleted
=====================================
@@ -1,20 +0,0 @@
-#!/bin/sh
-set -e
-
-PROG=gnumed
-GROUP=${PROG}
-
-KVKDIR=/var/spool/kvkd/
-
-TESTGROUP=`getent group ${GROUP}` || true
-if [ -z "${TESTGROUP}" ] ; then
- addgroup --system "${GROUP}" >/dev/null
-fi
-
-if [ ! -d "$KVKDIR" ] ; then
- mkdir -p "$KVKDIR"
- chgrp $GROUP "$KVKDIR"
- chmod 2774 "$KVKDIR"
-fi
-
-#DEBHELPER#
=====================================
debian/gnumed-client-de.prerm deleted
=====================================
@@ -1,39 +0,0 @@
-#!/bin/sh
-# prerm script for gnumed-client-de
-#
-# see: dh_installdeb(1)
-
-set -e
-
-PROG=gnumed
-GROUP=${PROG}
-
-KVKDIR=/var/spool/kvkd/
-
-case "$1" in
- remove|purge)
- if [ "$1" = "purge" ] ; then
- TESTGROUP=`getent group ${GROUP}` || true
- if [ ! -z "${TESTGROUP}" ] ; then
- delgroup "${GROUP}" >/dev/null
- fi
- fi
- if [ -d "$KVKDIR" ] ; then
- rm -rf "$KVKDIR"
- fi
- ;;
- upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
- ;;
-
- *)
- echo "prerm called with unknown argument \`$1'" >&2
- exit 1
- ;;
-esac
-
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
-
-#DEBHELPER#
-
-exit 0
=====================================
debian/gnumed-client-de.sysusers
=====================================
@@ -0,0 +1 @@
+g gnumed
=====================================
debian/gnumed-client-de.tmpfiles
=====================================
@@ -0,0 +1 @@
+d /var/spool/kvkd 2774 root gnumed
View it on GitLab: https://salsa.debian.org/med-team/gnumed-client/-/compare/dc263519c78ac6fd897ef35162a28a383f4ef78f...f43043825add4ccf56befdf97d06d508c5177994
--
View it on GitLab: https://salsa.debian.org/med-team/gnumed-client/-/compare/dc263519c78ac6fd897ef35162a28a383f4ef78f...f43043825add4ccf56befdf97d06d508c5177994
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/debian-med-commit/attachments/20260626/f1ea7c4b/attachment-0001.htm>
More information about the debian-med-commit
mailing list