• Re: Bug#1108458: unblock: slurm-wlm/24.11.5-3

    From Paul Gevers@21:1/5 to Gennaro Oliva on Sat Jul 5 17:00:01 2025
    XPost: linux.debian.devel.release
    To: [email protected]

    This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --------------ofr8fMLQM9fD7PVJ8qU5QvSK
    Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: base64

    Q29udHJvbDogdGFncyAtMSBtb3JlaW5mbw0KDQpIaSwNCg0KT24gMjktMDYtMjAyNSAxMDox OSwgR2VubmFybyBPbGl2YSB3cm90ZToNCj4gWyBSZWFzb24gXQ0KPiBGaXggIzExMDQ1NzMN Cg0KDQpJJ20gbm90IHdlbGwgdmVyc2VkIGluIHRoaXMgc3lzdGVtZCBzdHVmZiwgYnV0IGRv bid0IHlvdSBub3cgaGF2ZSB0d28gDQpjb21wZXRpbmcgbWV0aG9kcz8gSSBtZWFuLCBpZiBi b3RoIGFkZHVzZXIgYW5kIHN5c3RlbWQtc3lzdXNlcnMgYXJlIA0KaW5zdGFsbGVkIGFuZCBj b25maWd1cmVkLCB3aGF0IHdpbGwgaGFwcGVuPyBBbmQgSSBndWVzcyBhZGR1c2VyIGNhbiBi ZSANCm5vdCB5ZXQgY29uZmlndXJlZCBpZiBzeXN0ZW1kLXN5c3VzZXJzIGlzIGFscmVhZHkg Y29uZmlndXJlZCwgd2lsbCB0aGUgDQpsb2dpYyBpbiB5b3VyIHByZWluc3QgdGhlbiBkbyB0 aGUgcmlnaHQgdGhpbmc/DQoNClBhdWwNCg0K

    --------------ofr8fMLQM9fD7PVJ8qU5QvSK--

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

    wsC7BAABCABvBYJoaTvqCRCcXJnrBb11CkcUAAAAAAAeACBzYWx0QG5vdGF0aW9u cy5zZXF1b2lhLXBncC5vcmdK+KyeXOvxFuP1s12FWzbA4TYg0NwvE6q3eYBFXc5I nxYhBFi2bUhza+k7BS3mcpxcmesFvXUKAADvPggAmeFaChBKhbPdOsmjdevF6U4P qFkaqQanmPtSlDKejtOXZKz/Tm9EMtUFeTE4qHz+Pa7Xb/l9+Ek/NfWURzyxvTlk lj9pjzLfsVBPssoR2tl+ElFvZQ9tyOBYMAgfNLW+qivUkvIO1L8ISqYQJkB8aNDa Gw0y2Yvr1pCjlyExQGziFiNcqp//2QZdx3aKHen/4LsJmZXKEiNIkRC+XpD6OHun SeecKm9TsZK5joAJwgwf39H3PUiJNQxzgSHzEuNhGJp5byVvKIHRJrdOGS9CwluH 0fz3LiKkAdwFjfLmX+TBVCKYB4WG6R9SvxVY7NioN/CgtDUQtS21/KaXEyExcg==
    =QjZ9
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?B?R8OhYm9yIE7DqW1ldGg=?=@21:1/5 to [email protected] on Tue Jul 8 10:30:01 2025
    XPost: linux.debian.devel.release

    Hi,

    On Sat, 5 Jul 2025 16:51:22 +0200 Paul Gevers <[email protected]> wrote:
    I'm not well versed in this systemd stuff, but don't you now have two competing methods? I mean, if both adduser and systemd-sysusers are
    installed and configured, what will happen? And I guess adduser can be
    not yet configured if systemd-sysusers is already configured, will the
    logic in your preinst then do the right thing?

    In short, yes, it works* in any combination of the two prerequisites.

    What is expected is that both `adduser` and `systemd-sysusers` only kick
    in if the UID/GID doesn't yet exists, so there is no double creation of
    the same IDs. I've tested with all combinations of adduser is
    preinstalled, systemd-sysuser is preinstalled, both, neither; all finish installation fine.

    *: One minor thing is that systemd-sysuser is actually a virtual
    package, and one of the providers is `opensysusers` which doesn't parse
    the "u!" syntax recommended by `man sysusers.d` [1]:

    Type u may be suffixed with an exclamation mark ("u!") to
    create a fully locked account. This is recommended [..]

    Changing it to "u" makes it work on systems that *only* have
    opensysusers (on other systems the adduser variant will create the IDs
    anyhow).

    So questions is whether we should change the syntax (although that goes
    against the recommendation) or disallow opensysusers as a prereq (and/or
    file a bug against that package?).

    BR,
    --
    Gábor (original author of the fix)

    [1] https://www.man7.org/linux/man-pages/man5/sysusers.d.5.html

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Gennaro Oliva@21:1/5 to Paul Gevers on Wed Jul 9 23:50:01 2025
    XPost: linux.debian.devel.release

    Hi Paul,
    thanks for checking.

    On Sat, Jul 05, 2025 at 04:51:22PM +0200, Paul Gevers wrote:
    I'm not well versed in this systemd stuff, but don't you now have two competing methods? I mean, if both adduser and systemd-sysusers are
    installed and configured, what will happen? And I guess adduser can be not yet configured if systemd-sysusers is already configured, will the logic in your preinst then do the right thing?

    I tested the installation on a system with both adduser and
    systemd-sysusers installed, and encountered no issues. The preinst
    includes a conditional check that prevents adduser from running if the
    user already exists. On the other hand, systemd-sysusers can safely be
    executed even if the user is already present. When the user does not
    exist, adduser runs first since it is executed in the preinst phase.
    I hope this explanation addresses your question, but I'm available for
    any further comments or clarifications.
    Best regards,
    --
    Gennaro Oliva

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marc Haber@21:1/5 to All on Thu Jul 10 16:30:01 2025
    XPost: linux.debian.devel.release

    On Tue, Jul 08, 2025 at 10:19:59AM +0200, Gábor Németh wrote:
    In short, yes, it works* in any combination of the two prerequisites.

    What is expected is that both `adduser` and `systemd-sysusers` only kick in if the UID/GID doesn't yet exists, so there is no double creation of the
    same IDs. I've tested with all combinations of adduser is preinstalled, systemd-sysuser is preinstalled, both, neither; all finish installation
    fine.

    Pardon me for jumping in. I am the adduser maintainer. slurm-wlm is
    actually one of a low one digit number of packages that have adduser in
    their pre inst. May I ask for the reason you have to create your users
    in pre-inst and therefore need a pre-depends on adduser?

    Would it be possible that you don't need that and just create your users
    in postinst and just need a regular dependency on adduser?

    Using one method or the other seems to be unusual and sounds like asking
    for trouble intentionally. I would like to know what led you to this
    solution

    Greetings from Brest
    Marc

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ivo De Decker@21:1/5 to Marc Haber on Thu Jul 10 17:50:01 2025
    XPost: linux.debian.devel.release

    Control: reopen -1

    Hi,

    On Thu, Jul 10, 2025 at 04:28:04PM +0200, Marc Haber wrote:
    On Tue, Jul 08, 2025 at 10:19:59AM +0200, G�bor N�meth wrote:
    In short, yes, it works* in any combination of the two prerequisites.

    What is expected is that both `adduser` and `systemd-sysusers` only kick in if the UID/GID doesn't yet exists, so there is no double creation of the same IDs. I've tested with all combinations of adduser is preinstalled, systemd-sysuser is preinstalled, both, neither; all finish installation fine.

    Pardon me for jumping in. I am the adduser maintainer. slurm-wlm is
    actually one of a low one digit number of packages that have adduser in
    their pre inst. May I ask for the reason you have to create your users
    in pre-inst and therefore need a pre-depends on adduser?

    Would it be possible that you don't need that and just create your users
    in postinst and just need a regular dependency on adduser?

    Using one method or the other seems to be unusual and sounds like asking
    for trouble intentionally. I would like to know what led you to this
    solution

    As the package hasn't migrated yet, I removed my unblock to get this sorted
    out first.

    Cheers,

    Ivo

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Gennaro Oliva@21:1/5 to All on Tue Jul 15 03:00:01 2025
    XPost: linux.debian.devel.release

    Hi Marc,
    thanks for your comments.

    Pardon me for jumping in. I am the adduser maintainer. slurm-wlm is actually one of a low one digit number of packages that have adduser in their pre inst. May I ask for the reason you have to create your users
    in pre-inst and therefore need a pre-depends on adduser?

    The slurm user is not actually used in the package where it is created,
    but only in three other packages that depend on it. It is included there
    to simplify the process of removing one of them while keeping the other.
    It was placed in the preinst script out of an abundance of caution.

    Would it be possible that you don't need that and just create your users
    in postinst and just need a regular dependency on adduser?

    I wasn't aware that having adduser as a Pre-Depends could be such a
    significant issue. I created a new version of the packagte with adduser
    in postinst that looks fine in my testing environment.

    Using one method or the other seems to be unusual and sounds like asking for trouble intentionally. I would like to know what led you to this solution

    Regarding the coexistence of the two methods for adding the user, I
    accepted the merge request as submitted because I assumed there might be systems not using systemd.

    Best regards,
    --
    Gennaro Oliva

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marc Haber@21:1/5 to Gennaro Oliva on Tue Jul 15 10:20:01 2025
    XPost: linux.debian.devel.release

    Hello,

    thanks for your answers.

    On Tue, Jul 15, 2025 at 02:57:27AM +0200, Gennaro Oliva wrote:
    Pardon me for jumping in. I am the adduser maintainer. slurm-wlm is
    actually one of a low one digit number of packages that have adduser in
    their pre inst. May I ask for the reason you have to create your users
    in pre-inst and therefore need a pre-depends on adduser?

    The slurm user is not actually used in the package where it is created,
    but only in three other packages that depend on it. It is included there
    to simplify the process of removing one of them while keeping the other.
    It was placed in the preinst script out of an abundance of caution.

    I would recommend to have the adduser call (it SHOULD really just be one
    single line) in the postinst of every pakage needing the user. If you
    need scaffolding around adduser in postinst, it is likly that I would
    consider that a bug in adduser and act appropriately (but we're frozen
    at the moment).

    I would also recommend to not remove your user on package
    deinstallation.

    Would it be possible that you don't need that and just create your users >> > in postinst and just need a regular dependency on adduser?

    I wasn't aware that having adduser as a Pre-Depends could be such a >significant issue. I created a new version of the packagte with adduser
    in postinst that looks fine in my testing environment.

    Thank you. It is usually fine to have adduser in preinst but then your
    package must be prepared to be able to run with the adduser from
    oldstable during upgrade. This is kind of a challenge to test, and
    that's the reason I recommend not to do this without having a VERY good
    reason.

    Using one method or the other seems to be unusual and sounds like asking >> > for trouble intentionally. I would like to know what led you to this
    solution

    Regarding the coexistence of the two methods for adding the user, I
    accepted the merge request as submitted because I assumed there might be >systems not using systemd.

    I haven't really thought about whether this might make sense, but just
    be aware that this is an unusual pattern that has been seldomly tried.

    Greetings
    Marc

    -- ----------------------------------------------------------------------------- Marc Haber | "I don't trust Computers. They | Mailadresse im Header Leimen, Germany | lose things." Winona Ryder | Fon: *49 6224 1600402 Nordisch by Nature | How to make an American Quilt | Fax: *49 6224 1600421

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Gennaro Oliva@21:1/5 to Marc Haber on Thu Jul 17 14:10:01 2025
    XPost: linux.debian.devel.release

    Hi Marc,

    On Tue, Jul 15, 2025 at 10:11:22AM +0200, Marc Haber wrote:
    The slurm user is not actually used in the package where it is created,
    but only in three other packages that depend on it. It is included there
    to simplify the process of removing one of them while keeping the other.
    It was placed in the preinst script out of an abundance of caution.

    I would recommend to have the adduser call (it SHOULD really just be one single line) in the postinst of every pakage needing the user. If you need scaffolding around adduser in postinst, it is likly that I would consider that a bug in adduser and act appropriately (but we're frozen at the
    moment).

    The only check I perform before calling adduser is verifying whether the
    user already exists. This allows the flexibility to use Slurm with a
    different UID in case our fixed UID conflicts with the site's policy.

    I would also recommend to not remove your user on package deinstallation.

    This would greatly simplify things. Is this a common practice?

    Thank you. It is usually fine to have adduser in preinst but then your package must be prepared to be able to run with the adduser from oldstable during upgrade. This is kind of a challenge to test, and that's the reason I recommend not to do this without having a VERY good reason.

    I haven’t noticed any changes affecting the command-line options I use,
    and my invocation of adduser has remained more or less the same for
    years. Am I underestimating any potential pitfalls?

    Regarding the coexistence of the two methods for adding the user, I accepted the merge request as submitted because I assumed there might be systems not using systemd.

    I haven't really thought about whether this might make sense, but just be aware that this is an unusual pattern that has been seldomly tried.

    Thanks for the advice and for all your comments in general.
    Best regards,
    --
    Gennaro Oliva

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marc Haber@21:1/5 to Gennaro Oliva on Thu Jul 17 14:20:02 2025
    XPost: linux.debian.devel.release

    On Thu, Jul 17, 2025 at 07:53:02AM +0200, Gennaro Oliva wrote:
    On Tue, Jul 15, 2025 at 10:11:22AM +0200, Marc Haber wrote:
    The slurm user is not actually used in the package where it is created,
    but only in three other packages that depend on it. It is included there >> > to simplify the process of removing one of them while keeping the other. >> > It was placed in the preinst script out of an abundance of caution.

    I would recommend to have the adduser call (it SHOULD really just be one
    single line) in the postinst of every pakage needing the user. If you need >> scaffolding around adduser in postinst, it is likly that I would consider
    that a bug in adduser and act appropriately (but we're frozen at the
    moment).

    The only check I perform before calling adduser is verifying whether the
    user already exists. This allows the flexibility to use Slurm with a >different UID in case our fixed UID conflicts with the site's policy.

    Please try what your adduser call does when the user already exists or
    when it exists with a different UID. Please consider sending the
    typescript of that session to me, maybe there is some behavior that
    aduser can improve in forky.

    I would also recommend to not remove your user on package deinstallation.

    This would greatly simplify things. Is this a common practice?

    It is a rather common practice. Justification is that you cannot make
    sure on deletion that the local admin didn't give any files to your user
    that your package doesn't know about and we should not leave "unowned"
    files laying around. Sadly, policy has not adapted to that in over a
    decade.

    Thank you. It is usually fine to have adduser in preinst but then your
    package must be prepared to be able to run with the adduser from oldstable >> during upgrade. This is kind of a challenge to test, and that's the reason I >> recommend not to do this without having a VERY good reason.

    I haven’t noticed any changes affecting the command-line options I use,
    and my invocation of adduser has remained more or less the same for
    years. Am I underestimating any potential pitfalls?

    I tink so. Frankly, I don't know. I didn't have that usecase on my radar
    during the last two cycles.

    Regarding the coexistence of the two methods for adding the user, I
    accepted the merge request as submitted because I assumed there might be >> > systems not using systemd.

    I haven't really thought about whether this might make sense, but just be
    aware that this is an unusual pattern that has been seldomly tried.

    Thanks for the advice and for all your comments in general.

    You're welcome.

    Greetings
    Marc

    -- ----------------------------------------------------------------------------- Marc Haber | "I don't trust Computers. They | Mailadresse im Header Leimen, Germany | lose things." Winona Ryder | Fon: *49 6224 1600402 Nordisch by Nature | How to make an American Quilt | Fax: *49 6224 1600421

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