Package: tcpcryptd Version: 0.5-1+b3 Severity: serious User: jo...@debian.org Usertags: adduserpurge Control: tag -1 + patch X-Debbugs-CC: jo...@debian.org
Hi, the packages passwd and adduser are not part of the Essential:yes set. According to policy §7.2 maintainer scripts cannot assume them being installed when purging a package. If one tries to remove this package without adduser (which depends on passwd) installed, one gets: --%<------------------------------------------------------------------------- Purging configuration files for tcpcryptd (0.5-1+b3) ... /var/lib/dpkg/info/tcpcryptd.postrm: 9: deluser: not found dpkg: error processing package tcpcryptd (--purge): installed tcpcryptd package post-removal script subprocess returned error exit status 127 Errors were encountered while processing: tcpcryptd -->%------------------------------------------------------------------------- There is ongoing discussion how to handle system users on package removal, see https://bugs.debian.org/621833 For a discussion about use of adduser during purge, see #1035654. To work around this problem, at least 125 source packages [codesearch] simply ignore failures of calling the passwd or adduser tools during purge. The following patch should fix this package by doing the same: --%<------------------------------------------------------------------------- diff -Nru tcpcrypt-0.5/debian/tcpcryptd.postrm tcpcrypt-0.5/debian/tcpcryptd.postrm --- tcpcrypt-0.5/debian/tcpcryptd.postrm 2016-04-01 23:45:55.000000000 +0200 +++ tcpcrypt-0.5/debian/tcpcryptd.postrm 2023-05-10 07:54:45.000000000 +0200 @@ -6,7 +6,7 @@ purge) # add a debian-tcpcryptd user if one does not already exist if getent passwd "$TCPCRYPT_USER" >/dev/null ; then - deluser "$TCPCRYPT_USER" + deluser "$TCPCRYPT_USER" || true fi ;; esac -->%------------------------------------------------------------------------- If you prefer I can fix this via an NMU. Thanks! cheers, josch [codesearch] https://codesearch.debian.net/search?q=del%28user%7Cgroup%29.*%5C%7C%5C%7C+true+path%3Adebian%2F.*%5C.%28pre%7Cpost%29rm%24&literal=0