Source: sane-backends Tags: patch Dear Maintainer(s),
sysusers.d config files allows 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 Please find a patch attached that ships sysusers.d files for libsane1 and sane-utils. Thanks!
From 733e4f1d94509459e4f9c9d2a634cb1a39a6a1a8 Mon Sep 17 00:00:00 2001 From: Luca Boccassi <[email protected]> Date: Sun, 19 Oct 2025 19:43:44 +0100 Subject: [PATCH] Install and use sysusers.d config files sysusers.d config files allows a package to use declarative configuration instead of manually written maintainer scripts. Install files for the packages using adduser, and switch over. 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 Leave the manual adduser/etc calls in sane-utils, as they do a more complex and dynamic setup based on debconf. --- debian/control | 2 +- debian/libsane1.preinst | 13 ------------- debian/libsane1.sysusers | 1 + debian/sane-utils.sysusers | 2 ++ 4 files changed, 4 insertions(+), 14 deletions(-) delete mode 100644 debian/libsane1.preinst create mode 100644 debian/libsane1.sysusers create mode 100644 debian/sane-utils.sysusers diff --git a/debian/control b/debian/control index 77fc0ce..b265932 100644 --- a/debian/control +++ b/debian/control @@ -8,6 +8,7 @@ Build-Depends: autoconf-archive, chrpath, debhelper-compat (= 13), + dh-sequence-installsysusers, gettext, libavahi-client-dev, libcam-dev [kfreebsd-any], @@ -89,7 +90,6 @@ Architecture: any Multi-Arch: same Depends: acl [linux-any], - adduser, libsane-common (= ${source:Version}), udev [linux-any], ${misc:Depends}, diff --git a/debian/libsane1.preinst b/debian/libsane1.preinst deleted file mode 100644 index a3a3fb9..0000000 --- a/debian/libsane1.preinst +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh - -set -e - -#if [ "$1" = "upgrade" ]; then - # Add the scanner system group if it doesn't exist - if ! getent group | grep -q "^scanner:"; then - echo "Adding scanner group..." - addgroup --quiet --system scanner || true - fi -#fi -#DEBHELPER# - diff --git a/debian/libsane1.sysusers b/debian/libsane1.sysusers new file mode 100644 index 0000000..371f0ff --- /dev/null +++ b/debian/libsane1.sysusers @@ -0,0 +1 @@ +g scanner diff --git a/debian/sane-utils.sysusers b/debian/sane-utils.sysusers new file mode 100644 index 0000000..b41f6f6 --- /dev/null +++ b/debian/sane-utils.sysusers @@ -0,0 +1,2 @@ +g scanner +u! saned - - /var/lib/saned -- 2.47.3

