It was <2014-12-12 pią 11:53>, when Patrick Ohly wrote: > On Fri, 2014-12-12 at 10:09 +0100, José Bollo wrote: [...]
(I feel stupid, writing about this for yet another time, but I didn't get any feedback, so let me try again). > It's the same issue that all developers face at the moment: is it okay > to put calls to [user|group]/[add|del] into .spec files? > > And if yes, do we need an explicit runtime dependency to ensure that the > commands are actually available? Dependency on what? How about using systemd-sysusers[1]. If you/we don't want to use the binary from systemd (why not?) then let's at least consider it's file format[2]. The whole thing has several advantages. + No customised code in %post scripts. You only need to run systemd-sysuser without any parameters. + All the information about users is stored in files in a well defined format. The files can be used at any time to re-create the users (think: factory reset) + Refering to files in /usr/lib/sysusers.d/ allows to determine which package creates which user. I am not sure systemd-sysusers supports removing users (I don't know if it should) but it won't be hard to add such function for use in %(pre|post)un. [1] http://www.freedesktop.org/software/systemd/man/systemd-sysusers.html [2] http://www.freedesktop.org/software/systemd/man/sysusers.d.html -- Łukasz Stelmach Samsung R&D Institute Poland Samsung Electronics
pgpU5AkFMP6Zj.pgp
Description: PGP signature
_______________________________________________ Dev mailing list [email protected] https://lists.tizen.org/listinfo/dev
