From owner-freebsd-current@FreeBSD.ORG Mon Sep 30 17:54:16 2013 Return-Path: Delivered-To: current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C529367B; Mon, 30 Sep 2013 17:54:16 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mho-02-ewr.mailhop.org (mho-02-ewr.mailhop.org [204.13.248.72]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 984042894; Mon, 30 Sep 2013 17:54:16 +0000 (UTC) Received: from c-24-8-230-52.hsd1.co.comcast.net ([24.8.230.52] helo=damnhippie.dyndns.org) by mho-02-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1VQhfj-000Bg6-Ds; Mon, 30 Sep 2013 17:54:15 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by damnhippie.dyndns.org (8.14.3/8.14.3) with ESMTP id r8UHsC2A009734; Mon, 30 Sep 2013 11:54:12 -0600 (MDT) (envelope-from ian@FreeBSD.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 24.8.230.52 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX18ynfmj3fbxdR1/UR42/swc Subject: Re: installworld broken - osreldate.h: permission denied From: Ian Lepore To: Jilles Tjoelker In-Reply-To: <20130930170243.GA1570@stack.nl> References: <20130928130920.GA1318@devbox.vnode.local> <1380388791.1197.335.camel@revolution.hippie.lan> <20130929081329.GA19015@devbox.vnode.local> <20130930170243.GA1570@stack.nl> Content-Type: text/plain; charset="us-ascii" Date: Mon, 30 Sep 2013 11:54:12 -0600 Message-ID: <1380563652.1197.383.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: current@FreeBSD.org, Joel Dahl X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Sep 2013 17:54:16 -0000 On Mon, 2013-09-30 at 19:02 +0200, Jilles Tjoelker wrote: > 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 > Thank you Jilles. I was never that fond of the timestamp theory, it was just the only one I could come up without any data. I think I was unable to reproduce the problem because all my in-house nfs shares use -maproot 0. Joel, please test Jilles' patch, and I'll get the ball rolling for approval to commit it. -- Ian