On 5/21/20 10:29 PM, karx via aur-general wrote:
> Hey,
> 
> An application I'm thinking about packaging for AUR requires its own user
> to run. Is it ok to be/How would I go about creating a "user" that will be
> created on the installer's system when they install the package?

Use sysusers.d(5) to install a description of the user you need. systemd
comes with a pacman hook to create users based on sysusers.d dropins
(and for non-systemd distros using e.g. OpenRC, there are
reimplementations like opensysusers, because this is generally portable
and beneficial to use).

You can usually specify the "-" placeholder instead of a reserved,
hardocded uid, and have one automatically assigned. This is preferable
whenever possible.

You can check the output of

$ pkgfile -vr '/usr/lib/sysusers.d/.*\.conf'

to see which packages in the repositories use sysusers.d files, and see
how they are using it for inspiration. (Or see which packages on your
system provide files in /usr/lib/sysusers.d/)

-- 
Eli Schwartz
Bug Wrangler and Trusted User

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to