Hey,
What is the prefered way of creating users/groups and handling files
ownership for AUR packages?
My take is to change the file ownership (`chown`) in .install script.
That's what I do in the PKGBUILDs I write myself.
However, inspircd, which I adopted a few months ago takes a different
approach. The previous maintainer hardcoded a UID and GID directly in
the package:
PKGBUILD:
install -o141 -g141 -dm750 "${pkgdir}/var/log/inspircd"
.install:
getent group inspircd &>/dev/null || groupadd -r -g 141 inspircd
getent passwd inspircd &>/dev/null || useradd -r -u 141 -g inspircd -d
/var/lib/inspircd -s /bin/false inspircdl
I don't like this approach - what if the user has already assigned UID
141 to other user? Then effectively inspircd and, say, Apache, are
running under the same user. But maybe there is some reason behind this
approach that I'm not aware of.
Thanks for your help.
--
Kind regards,
Damian Nowak
StratusHost
www.AtlasHost.eu