Package: debhelper Severity: wishlist It would be great if debhelper would support adding system users via systemd-sysusers in a simple, DRY-avoiding manner. System users seem like a common enough feature to be part of standard debhelper I suppose.
A system user is defined in a short config shipped in /usr/lib/sysusers.d/*.conf, the format of such a user definition is documented in sysusers.d(5). The user(s) are created by running systemd-sysusers. One package currently in the archive which does that manually is tomcat9. One possible debhelper interface could be that a sysuser definition in debian/sysuser or debian/BINARYPACKAGE.sysuser gets installed into /usr/lib/sysusers.d/BINARYPACKAGE.conf along with a dh snippet which generates/amends the package's postinst to execute systemd-sysusers and adds a dependency on systemd (there's also #946456 which might lead to a standalone systemd-sysusers package later on). Cheers, Moritz