[pkg-nagios-changes] [Git][nagios-team/icingadb][master] Install and use sysusers.d/tmpfiles.d config files

Bas Couwenberg (@sebastic) gitlab at salsa.debian.org
Fri Jun 5 10:15:22 BST 2026



Bas Couwenberg pushed to branch master at Debian Nagios Maintainer Group / icingadb


Commits:
a4b7e015 by Luca Boccassi at 2026-06-05T09:51:44+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

- - - - -


4 changed files:

- debian/control
- + debian/icingadb.sysusers
- + debian/icingadb.tmpfiles
- − debian/postinst


Changes:

=====================================
debian/control
=====================================
@@ -6,6 +6,7 @@ Build-Depends: debhelper-compat (= 13),
                dh-exec,
                dh-golang,
                dh-sequence-golang,
+               dh-sequence-installsysusers,
                golang-any,
                docbook2x,
                docbook-xsl,
@@ -19,8 +20,7 @@ XS-Go-Import-Path: github.com/icinga/icingadb
 
 Package: icingadb
 Architecture: any
-Depends: adduser,
-         ${shlibs:Depends},
+Depends: ${shlibs:Depends},
          ${misc:Depends}
 Suggests: redis-server,
           postgresql | mariadb-server


=====================================
debian/icingadb.sysusers
=====================================
@@ -0,0 +1 @@
+u! icingadb - - /etc/icingadb


=====================================
debian/icingadb.tmpfiles
=====================================
@@ -0,0 +1,2 @@
+Z /etc/icingadb 0750 icingadb icingadb
+z /etc/icingadb/config.yml 0640 icingadb icingadb


=====================================
debian/postinst deleted
=====================================
@@ -1,41 +0,0 @@
-#!/bin/sh
-set -e
-
-setperm() {
-    user="$1"
-    group="$2"
-    mode="$3"
-    file="$4"
-    shift 4
-    # only do something when no setting exists
-    if ! dpkg-statoverride --list "$file" >/dev/null 2>&1; then
-      chown "$user":"$group" "$file"
-      chmod "$mode" "$file"
-    fi
-}
-
-case "$1" in
-    configure)
-
-    if ! getent passwd icingadb > /dev/null ; then
-        echo 'Adding system-user for icingadb' 1>&2
-        adduser --system --group --home /etc/icingadb \
-                --disabled-login --force-badname icingadb > /dev/null
-    fi
-
-    setperm icingadb icingadb 0750 /etc/icingadb
-    setperm icingadb icingadb 0640 /etc/icingadb/config.yml
-    ;;
-
-    abort-upgrade|abort-remove|abort-deconfigure)
-    ;;
-
-    *)
-        echo "postinst called with unknown argument \`$1'" >&2
-        exit 1
-    ;;
-esac
-
-#DEBHELPER#
-
-exit 0



View it on GitLab: https://salsa.debian.org/nagios-team/icingadb/-/commit/a4b7e015d343f6cf02cbe99e5bc49a1422a90986

-- 
View it on GitLab: https://salsa.debian.org/nagios-team/icingadb/-/commit/a4b7e015d343f6cf02cbe99e5bc49a1422a90986
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-nagios-changes/attachments/20260605/89e66026/attachment-0001.htm>


More information about the pkg-nagios-changes mailing list