Date: Mon, 30 Sep 2013 19:02:43 +0200 From: Jilles Tjoelker <jilles@stack.nl> To: Joel Dahl <joel@freebsd.org> Cc: current@FreeBSD.org, Ian Lepore <ian@FreeBSD.org> Subject: Re: installworld broken - osreldate.h: permission denied Message-ID: <20130930170243.GA1570@stack.nl> In-Reply-To: <20130929081329.GA19015@devbox.vnode.local> References: <20130928130920.GA1318@devbox.vnode.local> <1380388791.1197.335.camel@revolution.hippie.lan> <20130929081329.GA19015@devbox.vnode.local>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Sep 29, 2013 at 10:13:29AM +0200, Joel Dahl wrote: > On Sat, Sep 28, 2013 at 11:19:51AM -0600, Ian Lepore wrote: > > On Sat, 2013-09-28 at 15:09 +0200, Joel Dahl wrote: > > > Fresh HEAD. installworld from read-only /usr/obj and /usr/src: > > > /usr/src/include/iconv.h osreldate.h /usr/include > > > install: osreldate.h: Permission denied > > > *** Error code 71 > > > Stop. > > > make[4]: stopped in /usr/src/include > > > *** Error code 1 > > > Everything was working fine 2 weeks ago, so it's a recent breakage. > > Okay, I just accidentally created conditions for this error on my > > system... I checked in a change to newvers.sh while a buildworld was > > running, which led to a situation where newvers.sh was newer than > > osreldate.h at the end of the buildworld. Then an installworld tried to > > regenerate osreldate.h due to its dependency on newvers.sh, which would > > fail if the obj was readonly at that point. > > I think we could see if something similar applies for you if you use > > this command: > > make -dm installworld SUBDIR_OVERRIDE=include > I tried this with a fresh HEAD but the error message is still the same. > /usr/src and /usr/obj are NFS mounted, FYI. I had the same problem as Joel. It has nothing to do with timestamps, but with the default -maproot -2:-2. The include/mk-osreldate.sh script creates osreldate.h from mktemp(1), so with mode 600. The squashed root (nobody) is then not allowed to read it. The below patch should fix it. Index: include/mk-osreldate.sh =================================================================== --- include/mk-osreldate.sh (revision 255946) +++ include/mk-osreldate.sh (working copy) @@ -48,4 +48,5 @@ #define __FreeBSD_version $RELDATE #endif EOF +chmod 644 $tmpfile mv $tmpfile osreldate.h -- Jilles Tjoelker
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130930170243.GA1570>