Re: Unprivileged build user
Greg Troxel <[email protected]>
| Newsgroups | gmane.os.netbsd.devel.packages |
|---|---|
| Message-ID | <[email protected]> |
Jonathan Perkin <[email protected]> writes: > Greg requested that bob use PKG_USERS to create an unprivileged > builder user by default, which seems entirely reasonable. > > I'd like to go one step further and settle on a standard unprivileged > build user that bob, pbulk, and potentially others in the future can > all use. pbulk has shipped this: > > # Account used for user-destdir builds. This account should have > # no special permissions. > # > unprivileged_user=pbulk > > in its default pbulk.conf for many years, without creating PKG_USERS, > and so I expect others may be like me and currently re-use the pbulk > user or similar that they've previously created for pbulk, for bob. Probably you are right, but the people that have never gotten to setting up pbulk are likely to have used builder:builder as instructed. > What I propose is that we add a standard: > > PKGBUILD_USER?= pkgbuild > PKGBUILD_GROUP?= pkgbuild > > to mk/defaults/mk.conf, and then update both pbulk and bob to use this > for their default PKG_USERS/PKG_GROUPS. > > I would then add a small bit of SUBST in bob to correctly populate > this in the generated config.lua so that unprivileged builds work out > of the box for new users. As an existing user I'd be happy to modify > my existing host setups to match this. > > Any particular grievances about this before I go ahead? This seems entirely reasonable. It's parallel to having a www for nginx/apache, which we perhaps don't quite have but should :-) It's a bit more work than I was proposing -- my theory was that there's no reason to care about the name, but I see the point that this theory is wrong. I'm assuming the default config will do builds unprivileged. I think that might require the sandbox config to be adapted, but my own setup is so non-standard that I really don't know.