• questions related to one piuparts (tag) case

    From Patrice Duroux@21:1/5 to All on Tue Apr 18 20:50:01 2023
    Hi,

    After considering https://piuparts.debian.org/sid/fail/mrtg_2.17.10-4+b1.log and reporting #1034530, I would like to be sure that another case
    like: https://piuparts.debian.org/sid/pass/pipewire_0.3.65-3.log is
    more tricky due to that pipewire may be purged after both with adduser
    have been already removed. Isn't it?

    Is somehow a kind of Purge-Depends missing in the Debian packaging system?
    Or does using groupdel (from the passwd package) in the .postrm script
    may solve this here?
    Or does the condition have to be changed so this task is already done
    at the remove stage?

    Should it be then an issue addressed to such packages (here: pipewire)?
    Because piuparts consider it to pass, so PTS does not notify anything.

    Regards,
    Patrice

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andreas Beckmann@21:1/5 to Patrice Duroux on Tue Apr 18 22:00:01 2023
    On 18/04/2023 20.30, Patrice Duroux wrote:
    Hi,

    After considering https://piuparts.debian.org/sid/fail/mrtg_2.17.10-4+b1.log and reporting #1034530, I would like to be sure that another case
    like: https://piuparts.debian.org/sid/pass/pipewire_0.3.65-3.log is
    more tricky due to that pipewire may be purged after both with adduser
    have been already removed. Isn't it?

    I'm pasting here the piuparts bug template for this specific error, that
    should have sufficient information for fixing this issue:

    Subject: fails to purge - command (deluser|adduser) in postrm not found

    Package:
    Version:
    Severity: serious
    User: debian-qa@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...):


    cheers,

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Paul Wise@21:1/5 to Andreas Beckmann on Wed Apr 19 07:10:01 2023
    On Tue, 2023-04-18 at 21:55 +0200, Andreas Beckmann wrote:

    I'm pasting here the piuparts bug template for this specific error

    For future reference, here are the bug templates:

    https://piuparts.debian.org/templates/mail/ https://piuparts.debian.org/templates/mail/fails_to_purge_-_command_deluser_adduser_in_postrm_not_found.mail

    --
    bye,
    pabs

    https://wiki.debian.org/PaulWise

    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCgAdFiEEYQsotVz8/kXqG1Y7MRa6Xp/6aaMFAmQ/dcsACgkQMRa6Xp/6 aaOUsQ/+IJFUONQpCl9zVV/QLxKT5ZApPt+ObqsrspZtMQlw414ughERsHItz66m 5uHBjWD4PESPrFVLr7AYRplTBJR/t8RBfG6TxKADHI2/mBhjhGD2aYDOlIVtlkOz F1zNLuVWXxZGA/nFRv5uHaN9pGmlOVtsMm94eRoWzWrCzpejwkq9WmwKhf14SoXW 6Zjco80Gm0ByM8e/Crxn9g+TwCbJ72ZfgBWYZp27JsLK4N+tx0yKz4+JTClNtBJq ASniWl6aeB0mxksW9dCmiHNiwQ9Ovy8pwac60l33EFGiYosDBGxTCW1qvwIx7/rg 4SsazH2uCz0aFbyE0ZOgD5TPNrLW35XaEs3+A8FP2lgAxjb909oUWI4nZiuwotaA 2PdcxT/yIXfgDjmc0N6Es/RVrHf27F3KbRQVg3bcYDcWC4pO9JuP1+FfWdQmLnxX ZAOna83win5BIxuwni3jCQK+Sb7YCzU2RXCIYKkBz4lLZ4NjNX7DcdK2O/RRlKLL A1kRTbfaz6+LYwqXN9drEmo4vCgQv1Y+9RMM5lgdgP/kCsJjbefSHGpB084zsLeY ++j0daZtRNySpgvxPXWv8DSwj/qrKR3/hshs+R120GoyUgp1p55ctoSsVKUthiqr BDgEtPOPP/5Dg3kbukBavviLzBVhzztqlwgklnI1Y6HE4+3MJQA=
    =SnOg
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Patrice Duroux@21:1/5 to All on Mon Apr 24 20:10:01 2023
    Hi,

    Thanks for all your replies.

    I built a small script that based on codesearch-cli tries to
    approximate(*) the current state and
    here is its current output:

    [preinst]
    adduser: 1 useradd: 5 both: 0 ()
    deluser: 0 userdel: 0 both: 0 ()
    addgroup: 12 groupadd: 3 both: 0 ()
    delgroup: 0 groupdel: 0 both: 0 ()

    [postinst]
    adduser: 16 useradd: 20 both: 0 ()
    deluser: 4 userdel: 1 both: 0 ()
    addgroup: 131 groupadd: 23 both: 1 (x2gothinclient_1.5.0.1-8.1/debian/x2gothinclient-common.postinst )
    delgroup: 3 groupdel: 3 both: 0 ()

    [prerm]
    adduser: 0 useradd: 0 both: 0 ()
    deluser: 0 userdel: 2 both: 0 ()
    addgroup: 0 groupadd: 0 both: 0 ()
    delgroup: 3 groupdel: 0 both: 0 ()

    [postrm]
    adduser: 0 useradd: 0 both: 0 ()
    deluser: 69 userdel: 78 both: 0 ()
    addgroup: 0 groupadd: 0 both: 0 ()
    delgroup: 116 groupdel: 29 both: 7 (apt-cacher-ng_3.7.4-1/debian/apt-cacher-ng.postrm gophernicus_3.1.1-3/debian/postrm mrtg_2.17.10-5/debian/mrtg.postrm openiked_7.2-1/debian/postrm opensmtpd_6.8.0p2-4/debian/postrm opensmtpd-filter-dkimsign_0.5-2/debian/postrm
    zoph_1.0.1-4/debian/postrm )

    I already checked x2gothinclient that was interesting and reported in
    #1034755: x2gothinclient-common: about .postinst and .postrm scripts
    I also reported to x2goserver-common (#1034758) due to piuparts.

    I am facing so many different approaches, that's funny!
    But for sure I did not encounter yet something like the following:

    if ! getent passwd XXXXX >/dev/null; then
    if command -v deluser >/dev/null 2>&1; then
    deluser --quiet XXXXX || true
    elif command -v userdel >/dev/null 2>&1 ; then
    userdel XXXXX || true
    else
    echo "warning: user XXXXX may still exist."
    fi
    fi

    or what could be a nicer solution.

    One of my main points here is that a sysadmin may not be notified by
    the remaining user/group
    when just a 'command not found' was avoided by (deluser/delgroup ... || true)

    Cheers,
    Patrice

    (*) there may still be few over estimated numbers due to the search
    string not matching a command but a comment or something else (I tried
    to exclude a match to adduser.conf file).

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Paul Wise@21:1/5 to Patrice Duroux on Tue Apr 25 06:10:01 2023
    On Mon, 2023-04-24 at 19:53 +0200, Patrice Duroux wrote:

    codesearch-cli

    For those like me who haven't heard of it:

    https://salsa.debian.org/debian/codesearch-cli

    It isn't in Debian as far as I can tell.

    --
    bye,
    pabs

    https://wiki.debian.org/PaulWise

    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCgAdFiEEYQsotVz8/kXqG1Y7MRa6Xp/6aaMFAmRHUVAACgkQMRa6Xp/6 aaM+shAAtGY7VDb0AuPV/h8qvTvwgkXYcQDswgYJJCku3EaSOJhIisluZpsllAw0 Cgf4NiDgvfNfzYBsEIgml4KfYiZLS1N1GswKD0t1C9Bu2o4O3Wp4sQHz29+GL7np Rb494ddf5inqIB6QOJsy3aNkA2C90PxxufMcrwzxx++9eWCSOLrLy0FrIN9Qnyw2 9fVNEXOiy0vHx/irlKsQHOOtc/5b79BwEmJ2T8Rmnj6c1gyAqncuTHbBOwMVliFF J49nSrRBI+nIM3Y5FDp7a410Mv4R9R9APKkbqUWySe0XgNnr52BlltpDtpIcp/Cp eK+VqaCBVF/dTcjyPP//QJGxoOJDSKJeqBNioAEueM2aY8IRi65Iy+qLlVvKKDtF HSGIRqLtjoHd4kSimWXcrlUlDWYzYL9tfIzJck8WtufI+Ywo6bBC00Nb4uTdRNJD CG2QjgcGHMRESTsRF/vu8R6g6L+GQyJG5AxpC6gz5lXmR2SoCPwNQFZI77TTGVwt qnv5f4QkuV9jE0arwiAokAxUL21KzqYainV7024FmAtOzSxPqFA8c3rE0RS5ugbh qvmb47QYObdq0pKJysJOMTMmtiGBEh4qiPqTdLNz2rIQgVXf8Jrdyw5asPZ7iyU6 9E2oOxqYBssWU1bXSO1pBONH2DudrVCGYpsdjp5GytIwao6b410=
    =odgU
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Paul Wise@21:1/5 to Paul Wise on Wed Apr 26 04:10:01 2023
    On Tue, 2023-04-25 at 12:04 +0800, Paul Wise wrote:

    For those like me who haven't heard of it:

    https://salsa.debian.org/debian/codesearch-cli

    An alternative is apparently dcs-cli by Jakub Wilk:

    https://github.com/jwilk/dcs-cli

    --
    bye,
    pabs

    https://wiki.debian.org/PaulWise

    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCgAdFiEEYQsotVz8/kXqG1Y7MRa6Xp/6aaMFAmRIhegACgkQMRa6Xp/6 aaOEMg/+LMZa8OSMuRlO7yuxD0a5z86n/x4+TL0ocOXnQH0/DxiSzlpRQsUvpvPZ dVPMXLEwjb2TeiQBmkQEE00GYRUgVT5Vv/TQbASg8g7OczVL8IbxwfRIPe0qk+YE exoITUpJbDh2vfg1Y2/W5gkjDfaJkA9A/J2IB4fawc09USBm8mw8ERTARm1pCEB3 GUmWKstCK0Neu64i7HaCG4Np7Ji4EaU3Zck92h+XwFmiUBXnl7ISoxScqlBg6XFM o5hl1jgc852s6Fbizgqm3k2IfFBP0GEyN7GyVlu6HdVOOeMUGCVAFiXeJu3IVqrF ZKYv5ipvfrowMO+cNod3w9Wr0kLxl0ykDYniToI/hKZ+hxot2JvGFVFpoZbTRK1m 64q9ST2b1AUzF76fy97ZcJj6K11WYFXdGdmuvFqrBA+6HK0GeJzZ2bOnOwLHzzo/ NNEPxZAqZcoTgMDj0Nv+LLbYLzhdscB/iPp/ui9zm6Mzj47MIqJs/anO7B3B6DXv vCwz9CPeWVDveYLi/BnLzuf/PYWJPAarAyZGdeOhlXxDnCZvdGXwGWvupexhh/rn jl+os2I6JxE+yVkkZaMpeQ7CLyvXsZZm0RQ/4+xc18s/PQOsA09EcKGJODmKfhE6 npy6TB0FTwQ7KcdGGkvTcbpKV8n61/YPPL4QtWD4ruUR21XWu4A=
    =S1l6
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Patrice Duroux@21:1/5 to All on Wed Apr 26 19:50:01 2023
    Nice catch!
    Even if it is also not available in a Debian package.
    Let see if this one is less runtime sensitive and not suffering from the lack of
    an installation procedure. Using codesearch-cli.py as is (and without modifying the Python env by anyway) outside its own directory will throw a Python error.

    Regards,
    Patrice

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)