Bug#1035435: webdis: fails to purge - command (deluser|adduser) in postrm not found

2023-05-17 Thread Johannes Schauer Marin Rodrigues
Hi,

Quoting Johannes Schauer Marin Rodrigues (2023-05-16 23:35:38)
> On Wed, 03 May 2023 14:45:01 +0200 Andreas Beckmann  wrote:
> > There is ongoing discussion how to handle system users on package
> > removal, see https://bugs.debian.org/621833
> > Consensus seems to be not to remove system users (to avoid reusing UIDs
> > which could grant access to the wrong files) but to "lock" them (where
> > "locking"/"unlocking" is not yet precisely defined). Until that has
> > been decided it should be sufficient to have the postrm script ignore
> > any errors from deluser:
> >   deluser ...

diff -Nru webdis-0.1.9+dfsg/debian/changelog webdis-0.1.9+dfsg/debian/changelog
--- webdis-0.1.9+dfsg/debian/changelog  2020-04-23 01:04:04.0 +0200
+++ webdis-0.1.9+dfsg/debian/changelog  2023-05-17 23:56:13.0 +0200
@@ -1,3 +1,10 @@
+webdis (0.1.9+dfsg-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * ignore deluser not being available in postrm purge (closes: #1035435)
+
+ -- Johannes Schauer Marin Rodrigues   Wed, 17 May 2023 
23:56:13 +0200
+
 webdis (0.1.9+dfsg-1) unstable; urgency=medium
 
   * d/copyright: acknowledge upstream files relocation
diff -Nru webdis-0.1.9+dfsg/debian/webdis.postrm 
webdis-0.1.9+dfsg/debian/webdis.postrm
--- webdis-0.1.9+dfsg/debian/webdis.postrm  2018-08-25 09:53:40.0 
+0200
+++ webdis-0.1.9+dfsg/debian/webdis.postrm  2023-05-17 23:56:13.0 
+0200
@@ -15,7 +15,7 @@
 fi
 rm -rf $WEBDIS_LOG
 
-deluser --system webdis
+deluser --system webdis || true
 ;;
 
 *)

signature.asc
Description: signature


Bug#1035435: webdis: fails to purge - command (deluser|adduser) in postrm not found

2023-05-16 Thread Johannes Schauer Marin Rodrigues
On Wed, 03 May 2023 14:45:01 +0200 Andreas Beckmann  wrote:
> There is ongoing discussion how to handle system users on package
> removal, see https://bugs.debian.org/621833
> Consensus seems to be not to remove system users (to avoid reusing UIDs
> which could grant access to the wrong files) but to "lock" them (where
> "locking"/"unlocking" is not yet precisely defined). Until that has
> been decided it should be sufficient to have the postrm script ignore
> any errors from deluser:
>   deluser ... || true

since time is running short, I am going to NMU webdis on Thursday with a delay
of 2 days unless you disagree and/or want to do this yourself.

Thanks!

cheers, josch

signature.asc
Description: signature


Bug#1035435: webdis: fails to purge - command (deluser|adduser) in postrm not found

2023-05-03 Thread Andreas Beckmann
Package: webdis
Version: 0.1.9+dfsg-1
Severity: serious
User: debian...@lists.debian.org
Usertags: piuparts

Hi,

during a test with piuparts I noticed your package failed to purge due
to a command not found. According to policy 7.2 you cannot rely on the
depends being available during purge, only the essential packages are
available for sure.

The fix should be easy: your package is using adduser or deluser from
the adduser package, which is only priority important. Using useradd or
userdel from the passwd package (priority required) should fix this
problem.

There is ongoing discussion how to handle system users on package
removal, see https://bugs.debian.org/621833
Consensus seems to be not to remove system users (to avoid reusing UIDs
which could grant access to the wrong files) but to "lock" them (where
"locking"/"unlocking" is not yet precisely defined). Until that has
been decided it should be sufficient to have the postrm script ignore
any errors from deluser:
  deluser ... || true

>From the attached log (scroll to the bottom...):

0m21.8s DEBUG: Starting command: ['chroot', 
'/srv/piuparts.debian.org/tmp/tmp5y5zl6x8', 'dpkg', '--purge', 'webdis']
0m21.9s DUMP: 
  (Reading database ... 8071 files and directories currently installed.)
  Purging configuration files for webdis (0.1.9+dfsg-1+b1) ...
  /var/lib/dpkg/info/webdis.postrm: 18: deluser: not found
  dpkg: error processing package webdis (--purge):
   installed webdis package post-removal script subprocess returned error exit 
status 127
  Errors were encountered while processing:
   webdis
0m21.9s ERROR: Command failed (status=1): ['chroot', 
'/srv/piuparts.debian.org/tmp/tmp5y5zl6x8', 'dpkg', '--purge', 'webdis']


cheers,

Andreas


webdis_0.1.9+dfsg-1+b1.log.gz
Description: application/gzip