Allow user install

Peter Wemm peter at wemm.org
Tue Jun 26 17:36:42 UTC 2012


On Tue, Jun 26, 2012 at 10:27 AM, Peter Wemm <peter at wemm.org> wrote:
> On Tue, Jun 26, 2012 at 3:54 AM, Dag-Erling Smørgrav <des at des.no> wrote:
>> Simon Gerraty <sjg at juniper.net> writes:
>>> The patch below is a step towards supporting unprivileged buildworld
>>> etc.  Eg.
>>
>> Wow, this is really cool - and long overdue.
>
> Yep.  I've been doing this on the command line for user installs for a
> while..  There's only so many times you can type things like:
>
> make BINOWN=`id -u` BINGRP=`id -g` SHAREOWN=`id -u` ... NO_FSCHG=y
> .... .... installworld
>
> .. before going crazy.  Having a single knob to do it would be much
> more convenient.

For what its worth, the footprint of the diff can be reduced
considerably if you take advantage of the fact that "install -o $you
-g $you ..." works and is a no-op.

In the attached patch, things like this wouldn't strictly be needed if
it was done that way.
-           ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
+           ${INSTALL} ${BIN_INSTALL_OWN} -m ${BINMODE} \

It works either way for me, of course.

I'm probably mistaken but I had a vague recollection that install(8)
used to default to "-o root -g wheel" if you didn't specify something.
 And it did something obnoxious like delete the original file...
-- 
Peter Wemm - peter at wemm.org; peter at FreeBSD.org; peter at yahoo-inc.com; KI6FJV
"All of this is for nothing if we don't go to the stars" - JMS/B5
"If Java had true garbage collection, most programs would delete
themselves upon execution." -- Robert Sewell


More information about the freebsd-arch mailing list