From owner-svn-src-head@FreeBSD.ORG Tue Sep 23 14:46:04 2014 Return-Path: Delivered-To: svn-src-head@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 ESMTPS id B8634F53; Tue, 23 Sep 2014 14:46:04 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 685E08A5; Tue, 23 Sep 2014 14:46:01 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id D7250B988; Tue, 23 Sep 2014 10:46:00 -0400 (EDT) From: John Baldwin To: Bruce Evans Subject: Re: svn commit: r271771 - in head: bin/csh etc/mail lib/libc usr.bin/grep usr.sbin/mtree Date: Tue, 23 Sep 2014 10:19:37 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20140415; KDE/4.5.5; amd64; ; ) References: <201409181441.s8IEfvR1075223@svn.freebsd.org> <541D2356.8040403@freebsd.org> <20140920172111.Q4941@besplex.bde.org> In-Reply-To: <20140920172111.Q4941@besplex.bde.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201409231019.38023.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 23 Sep 2014 10:46:00 -0400 (EDT) Cc: src-committers@freebsd.org, Will Andrews , svn-src-all@freebsd.org, Navdeep Parhar , svn-src-head@freebsd.org, Julian Elischer X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Sep 2014 14:46:04 -0000 On Saturday, September 20, 2014 3:38:03 am Bruce Evans wrote: > On Sat, 20 Sep 2014, Julian Elischer wrote: > > > On 9/18/14, 10:41 PM, Will Andrews wrote: > >> Author: will > >> Date: Thu Sep 18 14:41:57 2014 > >> New Revision: 271771 > >> URL: http://svnweb.freebsd.org/changeset/base/271771 > >> > >> Log: > >> Fix incremental builds involving non-root users with read-only source > >> files. > >> Makefiles should not assume that source files can be overwritten. > >> This is the > >> common case for Perforce source trees. > > > > I'm concerned that just adding -f may not really be fixing the problem.. > > why are the files getting overwritten? I'm not sure forcing an overwrite is > > teh right answer to read-only sources. > > The log message is confused. Source files are not being overwritten. > They are being copied to object directories using cp. Then if they > are read-only in the source directory, they are read-only in the object > directory, even if they are copied without -p so as to clobber their > timestamps (their mode is still preserved). Then if the source file's > mtime is changed, either by actually changing the file or just by > clobbering its mtime, the copy in the object directory becomes out of > date. Then the cp to make it up to date fails because it is read-only. I ran into this the other day with the cxgbe firmware config files during a kernel build due to the same issue. That is due to entries in sys/conf/files like this: t4fw_cfg.fw optional cxgbe \ dependency "$S/dev/cxgbe/firmware/t4fw_cfg.txt" \ compile-with "${CP} ${.ALLSRC} ${.TARGET}" \ no-obj no-implicit-rule \ clean "t4fw_cfg.fw" Not sure if the correct solution there is to force -f for all of these or if ${CP} should be 'cp -f' for kernel builds. -- John Baldwin