Subject: Re: how to deal with package users/groups when installing in unprivileged mode?
To: NetBSD Packages Technical Discussion List <tech-pkg@NetBSD.org>
From: Georg Schwarz <georg.schwarz@freenet.de>
List: tech-pkg
Date: 04/21/2006 00:44:56
Am 21.04.2006 um 00:40 schrieb Jeremy C. Reed:

> I have been just been setting them in my mk.conf on an as-needed  
> basis.
>
> I also tried using:
> MAILMAN_USER=  ${UNPRIVILEGED_USER}
> MAILMAN_GROUP= ${UNPRIVILEGED_GROUP}
>
> But it caused
> bmake: "../../mk/../../mk/bsd.pkg.check.mk" line 93: Not enough  
> words in
> for substitution list

I tried the same for cups, but came across the very same error message.

>
> So used
> MAILMAN_USER=   reed
> MAILMAN_GROUP=  2022
> instead
>
> I didn't look into the error yet (and maybe doesn't exist anymore).

I'm afraid it does.

>
> It would be good if this was automated. (I think that is what you are
> suggesting.)

yes, exactly.


>
> To do this we would need to know what users and groups are being used.
> Maybe something like:
> _USERS+=	CUPS_USER
> _GROUPS+=	CUPS_GROUP
>
> And then mk/unprivileged.mk could set these.

So you don't want to set these in the respective Makefile?
Of course doing so centrally would be much more elegant, for sure.

We have PKG_GROUPS and PKG_USERS; does that help here?



-- 
Georg Schwarz    http://home.pages.de/~schwarz/
georg.schwarz@freenet.de  +49 178 8545053