about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLuca Boccassi <luca.boccassi@gmail.com>2026-02-16 22:46:34 +0000
committerMichael Biebl <biebl@debian.org>2026-02-27 16:32:21 +0000
commitb28169c8cc0d8c93ccfb43700e5a76fd3013edd9 (patch)
tree1378ad4507cf6a6b5ef70d981baaa8c1fc5af8cd
parent7eb5f6555ea49785f685caccbaeeba733b8d3a29 (diff)
Install and use sysusers.d config file
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
-rw-r--r--debian/control2
-rw-r--r--debian/network-manager.postinst4
-rw-r--r--debian/network-manager.sysusers3
3 files changed, 4 insertions, 5 deletions
diff --git a/debian/control b/debian/control
index cfea4a1e..7aff173a 100644
--- a/debian/control
+++ b/debian/control
@@ -5,6 +5,7 @@ Uploaders: Michael Biebl <biebl@debian.org>
 Build-Depends: debhelper-compat (= 13),
                debhelper (>= 13.11.6),
                dh-sequence-gir,
+               dh-sequence-installsysusers,
                meson (>= 0.51.0),
                pkgconf,
                gettext (>= 0.19.8),
@@ -52,7 +53,6 @@ Depends: ${shlibs:Depends},
          ${misc:Depends},
          libnm0 (= ${binary:Version}),
          default-dbus-system-bus | dbus-system-bus,
-         adduser,
 Recommends: ppp,
             dnsmasq-base,
             modemmanager,
diff --git a/debian/network-manager.postinst b/debian/network-manager.postinst
index 1b99b24c..0bbfe41b 100644
--- a/debian/network-manager.postinst
+++ b/debian/network-manager.postinst
@@ -20,10 +20,6 @@ set -e
 
 case "$1" in
     configure)
-        # Create netdev group. Members of group netdev get access to the PolicyKit action
-        # org.freedesktop.NetworkManager.settings.modify.system without prior authentication
-        addgroup --quiet --system netdev
-
         # This directory can contain sensitive data and should not be world-readable
         chmod 0700 /var/lib/NetworkManager
 
diff --git a/debian/network-manager.sysusers b/debian/network-manager.sysusers
new file mode 100644
index 00000000..954bd815
--- /dev/null
+++ b/debian/network-manager.sysusers
@@ -0,0 +1,3 @@
+# Members of group netdev get access to the PolicyKit action
+# org.freedesktop.NetworkManager.settings.modify.system without prior authentication
+g netdev