Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: non-root build failure + correct permissions for /usr/obj?

On Tue, 25 May 2010, Robert Elz wrote:
>     Date:        Tue, 25 May 2010 12:08:52 +0200
>     From:        Alan Barrett <>
>     Message-ID:  <>
>   | I prefer to complain if option don't make sense, rather than guessing
>   | how to fix them.
> It isn't really guessing, other than expert mode, which as its name
> suggests, should not be considered by almost anyone, it is the only
> way that works if you're not root.   Requiring users to give an option
> every time is just plain silly.

If encounters the situation "non-root user ran without
'-U'", then I think it requires guessing for the script to choose
between "the problem is that the user should have specified '-U'" and
"the problem is that the user should have run the script as root".  For
example, a user who is in the habit of running privileged builds may
forget to prefix a command with "sudo", just as easily as a user who is
in the habit of running unprivileged builds may forget to add "-U".

> Or, consider it the other way - a reasonable choice might be to make
> unpriv'd builds the default (always) and add another option, that
> would work only for root, that makes an "old style" build (storing
> owner and mode in the inodes instead of the log).

I would love to see MKUNPRIVED=yes as the default at the
level (even when run by root).  I am less sure about what the default
MKUNPRIVED should be at the Makefile or bsd.*.mk level.

>   | already has this code, to bomb if you try to
>   | build as an unprivileged user without setting either -U (unprivileged)
>   | or -E (expert mode):
> Assuming the lack of the -U was the cause of the reported problem that
> started this exchange (which was also my first thought when I saw the
> request for assistance), then that appears to have not worked the way it
> was intended....  (but of course that's a different issue).

Hmm, yes, I think you are right.  I'll try to fix at least that part.

--apb (Alan Barrett)

Home | Main Index | Thread Index | Old Index