[Git][debian-gis-team/tirex][master] 2 commits: Stop deleting system users on purge
Bas Couwenberg (@sebastic)
gitlab at salsa.debian.org
Sat Jul 25 05:05:02 BST 2026
Bas Couwenberg pushed to branch master at Debian GIS Project / tirex
Commits:
37785cd4 by Luca Boccassi at 2026-07-25T00:04:52+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.
- - - - -
f975d7f9 by Luca Boccassi at 2026-07-25T00:07:33+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.
- - - - -
11 changed files:
- debian/control
- − debian/tirex-example-map.dirs
- debian/tirex-example-map.postinst
- + debian/tirex-example-map.tmpfiles
- debian/tirex.dirs
- debian/tirex.install
- − debian/tirex.postinst
- − debian/tirex.postrm
- + debian/tirex.sysusers
- + debian/tirex.tmpfiles
- − debian/tmpfiles.d/tirex.conf
Changes:
=====================================
debian/control
=====================================
@@ -6,6 +6,7 @@ Build-Depends: architecture-is-64-bit,
debhelper-compat (= 13),
dh-apache2,
dh-sequence-apache2,
+ dh-sequence-installsysusers,
libboost-filesystem-dev,
libipc-sharelite-perl,
libjson-perl,
@@ -18,8 +19,7 @@ Homepage: https://wiki.openstreetmap.org/wiki/Tirex
Package: tirex
Section: utils
Architecture: any
-Depends: adduser,
- libapache2-mod-tile,
+Depends: libapache2-mod-tile,
libgd-perl,
libjson-perl,
libipc-sharelite-perl,
=====================================
debian/tirex-example-map.dirs deleted
=====================================
@@ -1 +0,0 @@
-var/cache/tirex/tiles/tirex-example
=====================================
debian/tirex-example-map.postinst
=====================================
@@ -5,6 +5,4 @@ set -e
echo "Check out the tirex example map by visiting:"
echo " http://localhost/tirex-example-map"
-chown _tirex:_tirex /var/cache/tirex/tiles/tirex-example
-
#DEBHELPER#
=====================================
debian/tirex-example-map.tmpfiles
=====================================
@@ -0,0 +1 @@
+d /var/cache/tirex/tiles/tirex-example 0755 _tirex _tirex
=====================================
debian/tirex.dirs
=====================================
@@ -1,4 +1 @@
var/cache/tirex/tiles
-var/cache/tirex/tiles/test
-var/cache/tirex/stats
-var/log/tirex
=====================================
debian/tirex.install
=====================================
@@ -23,6 +23,5 @@ debian/etc/tirex/renderer/test.conf etc/tirex/renderer
debian/etc/tirex/renderer/test/checkerboard.conf etc/tirex/renderer/test
debian/etc/tirex/tirex.conf etc/tirex
debian/etc/tirex/renderer/mapnik.conf etc/tirex/renderer
-debian/tmpfiles.d/tirex.conf usr/lib/tmpfiles.d
usr/libexec/tirex-backend-mapnik
usr/libexec/tirex-backend-test
=====================================
debian/tirex.postinst deleted
=====================================
@@ -1,27 +0,0 @@
-#! /bin/sh
-
-set -e
-
-case "$1" in
- configure)
- if ! getent group _tirex > /dev/null; then
- addgroup --force-badname --quiet --system _tirex
- fi
-
- if ! getent passwd _tirex > /dev/null; then
- adduser --force-badname --gecos "tirex daemon" \
- --home /nonexistent --ingroup _tirex \
- --no-create-home --quiet --system _tirex
- fi
- ;;
- abort-upgrade|abort-remove|abort-deconfigure)
- ;;
- *)
- echo "postinst called with unknown argument \`$1'" >&2
- exit 1
- ;;
-esac
-
-chown _tirex:_tirex /var/cache/tirex/tiles/test /var/cache/tirex/stats /var/log/tirex
-
-#DEBHELPER#
=====================================
debian/tirex.postrm deleted
=====================================
@@ -1,10 +0,0 @@
-#!/bin/sh
-
-set -e
-
-#DEBHELPER#
-
-if [ "$1" = "purge" ] ; then
- deluser --quiet --system _tirex > /dev/null || true
- delgroup --quiet --system _tirex > /dev/null || true
-fi
=====================================
debian/tirex.sysusers
=====================================
@@ -0,0 +1 @@
+u! _tirex - "tirex daemon" /nonexistent
=====================================
debian/tirex.tmpfiles
=====================================
@@ -0,0 +1,4 @@
+d /run/tirex 0755 _tirex _tirex
+d /var/cache/tirex/tiles/test 0755 _tirex _tirex
+d /var/cache/tirex/stats 0755 _tirex _tirex
+d /var/log/tirex 0755 _tirex _tirex
=====================================
debian/tmpfiles.d/tirex.conf deleted
=====================================
@@ -1 +0,0 @@
-d /run/tirex 0755 _tirex _tirex - -
View it on GitLab: https://salsa.debian.org/debian-gis-team/tirex/-/compare/468f359684d3f5df6bad58c06487f6de356d3749...f975d7f9fd9af8fa4eac3ccb4b18660638b4f4fa
--
View it on GitLab: https://salsa.debian.org/debian-gis-team/tirex/-/compare/468f359684d3f5df6bad58c06487f6de356d3749...f975d7f9fd9af8fa4eac3ccb4b18660638b4f4fa
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-grass-devel/attachments/20260725/842c7150/attachment-0001.htm>
More information about the Pkg-grass-devel
mailing list