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