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

Bas Couwenberg (@sebastic) gitlab at salsa.debian.org
Fri Jun 19 04:23:39 BST 2026



Bas Couwenberg pushed to branch master at Debian Nagios Maintainer Group / nsca-ng


Commits:
200cabdf by Luca Boccassi at 2026-06-18T23:04:00+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/nsca-ng-server.postinst
- + debian/nsca-ng-server.sysusers
- + debian/nsca-ng-server.tmpfiles


Changes:

=====================================
debian/control
=====================================
@@ -3,6 +3,7 @@ Maintainer: Debian Nagios Maintainer Group <pkg-nagios-devel at lists.alioth.debian
 Uploaders: Alexander Wirt <formorer at debian.org>
 Section: net
 Build-Depends: debhelper-compat (= 13),
+               dh-sequence-installsysusers,
                libconfuse-dev,
                libev-dev,
                libbsd-dev,
@@ -27,8 +28,7 @@ Description: Send monitoring commands to NSCA-ng server
 
 Package: nsca-ng-server
 Architecture: any
-Depends: adduser,
-         sysvinit-utils (>= 3.05-4~),
+Depends: sysvinit-utils (>= 3.05-4~),
          ${misc:Depends},
          ${shlibs:Depends}
 Pre-Depends: ${misc:Pre-Depends}


=====================================
debian/nsca-ng-server.postinst deleted
=====================================
@@ -1,41 +0,0 @@
-#!/bin/bash
-
-set -e
-
-setperm() {
-    local user="$1"
-        local group="$2"
-        local mode="$3"
-        local 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 nagios > /dev/null ; then
-            echo 'Adding system-user for nagios' 1>&2
-            adduser --system --group --home /var/lib/nagios \
-                --disabled-login --force-badname nagios > /dev/null
-        fi
-
-        # explicitly set some permissions
-        setperm root root 0600 /etc/nsca-ng/nsca-ng.cfg
-
-        test -d /var/run/nsca-ng || mkdir -p /var/run/nsca-ng
-        setperm nagios nagios 0700 /var/run/nsca-ng
-
-    ;;
-    abort-upgrade|abort-remove|abort-deconfigure)
-    ;;
-    *)
-    echo "postinst called with unknown argument \$1'" >&2
-    exit 1
-    ;;
-esac
-
-#DEBHELPER#


=====================================
debian/nsca-ng-server.sysusers
=====================================
@@ -0,0 +1 @@
+u! nagios - - /var/lib/nagios


=====================================
debian/nsca-ng-server.tmpfiles
=====================================
@@ -0,0 +1 @@
+z /etc/nsca-ng/nsca-ng.cfg 0600 root root



View it on GitLab: https://salsa.debian.org/nagios-team/nsca-ng/-/commit/200cabdf0447bd21d2c480a17d940106627b0208

-- 
View it on GitLab: https://salsa.debian.org/nagios-team/nsca-ng/-/commit/200cabdf0447bd21d2c480a17d940106627b0208
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/20260619/c91a11f3/attachment-0001.htm>


More information about the pkg-nagios-changes mailing list