Source: swupdate
Version: 2023.12.1+dfsg-1
Severity: wishlist
Tags: patch

Hi,

dh-sysuser is in operation for 7 years now and has gotten 9 users -
swupdate being one of them. In that time, it didn't quite mature and
still has a number of deficiencies such as using useradd instead of
policy-recommended adduser or removing users on package removal against
project consensus for keeping users. I think it is time to call
dh-sysuser a failed experiment and move to the standard sysusers.d
mechanism used by many more packages. It has multiple implementations
now such that it does not force systemd onto installations anymore. Do
you agree with my reasoning? I'm attaching a patch for your convenience.

Helmut
diff --minimal -Nru swupdate-2023.12.1+dfsg/debian/changelog 
swupdate-2023.12.1+dfsg/debian/changelog
--- swupdate-2023.12.1+dfsg/debian/changelog    2024-02-13 00:12:48.000000000 
+0100
+++ swupdate-2023.12.1+dfsg/debian/changelog    2024-04-27 10:00:05.000000000 
+0200
@@ -1,3 +1,10 @@
+swupdate (2023.12.1+dfsg-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Move from dh-sysuser to standard dh_installsysusers (Closes: #-1)
+
+ -- Helmut Grohne <[email protected]>  Sat, 27 Apr 2024 10:00:05 +0200
+
 swupdate (2023.12.1+dfsg-1) unstable; urgency=medium
 
   * Enable new options, primarily docker support
diff --minimal -Nru swupdate-2023.12.1+dfsg/debian/control 
swupdate-2023.12.1+dfsg/debian/control
--- swupdate-2023.12.1+dfsg/debian/control      2024-02-13 00:10:23.000000000 
+0100
+++ swupdate-2023.12.1+dfsg/debian/control      2024-04-27 09:58:25.000000000 
+0200
@@ -4,10 +4,10 @@
 Maintainer: Bastian Germann <[email protected]>
 Uploaders: SZ Lin (林上智) <[email protected]>,
            Nobuhiro Iwamatsu <[email protected]>
-Build-Depends: debhelper-compat (= 13),
-               dh-lua:native <!nolua>,
+Build-Depends: debhelper (>= 13.3),
+               debhelper-compat (= 13),
+               dh-sequence-lua:native <!nolua>,
                dh-nodejs | dh-nodejs:any,
-               dh-sysuser,
                graphviz <!nodoc>,
                liblua5.4-dev <!nolua>,
                libfdisk-dev,
diff --minimal -Nru swupdate-2023.12.1+dfsg/debian/rules 
swupdate-2023.12.1+dfsg/debian/rules
--- swupdate-2023.12.1+dfsg/debian/rules        2024-02-13 00:10:23.000000000 
+0100
+++ swupdate-2023.12.1+dfsg/debian/rules        2024-04-27 09:59:54.000000000 
+0200
@@ -13,7 +13,6 @@
 export LUA_VERSION=5.4
 export LUA_MODNAME=lua_swupdate
 export PKG_NAME=swupdate
-export DH_WITH=,lua
 export HAVE_LUA=y
 endif
 
@@ -95,6 +94,10 @@
 override_dh_auto_install:
        dh_auto_install -- V=1
 
+# Can be dropped in compat level 14
+execute_after_dh_installinit:
+       dh_installsysusers
+
 override_dh_installsystemd:
        dh_installsystemd --no-start
        dh_installsystemd --name=swupdate-progress
@@ -110,4 +113,4 @@
        dh_missing --fail-missing
 
 %:
-       dh $@ --with sysuser$(DH_WITH)
+       dh $@
diff --minimal -Nru swupdate-2023.12.1+dfsg/debian/swupdate.sysuser 
swupdate-2023.12.1+dfsg/debian/swupdate.sysuser
--- swupdate-2023.12.1+dfsg/debian/swupdate.sysuser     2024-02-13 
00:10:23.000000000 +0100
+++ swupdate-2023.12.1+dfsg/debian/swupdate.sysuser     1970-01-01 
01:00:00.000000000 +0100
@@ -1 +0,0 @@
-swupdate defaults
diff --minimal -Nru swupdate-2023.12.1+dfsg/debian/swupdate.sysusers 
swupdate-2023.12.1+dfsg/debian/swupdate.sysusers
--- swupdate-2023.12.1+dfsg/debian/swupdate.sysusers    1970-01-01 
01:00:00.000000000 +0100
+++ swupdate-2023.12.1+dfsg/debian/swupdate.sysusers    2024-04-27 
09:56:56.000000000 +0200
@@ -0,0 +1 @@
+u      swupdate        -       "swupdate system user"  /nonexistent    
/usr/sbin/nologin

Reply via email to