Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 5 Jun 2016 23:05:01 +0000 (UTC)
From:      Bryan Drewery <bdrewery@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r301467 - head/share/mk
Message-ID:  <201606052305.u55N51KI024032@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bdrewery
Date: Sun Jun  5 23:05:01 2016
New Revision: 301467
URL: https://svnweb.freebsd.org/changeset/base/301467

Log:
  WITH_META_MODE: Avoid host tool timestamps causing a rebuild.
  
  Using buildworld, installworld, buildworld.  It is expected that nothing
  should rebuild.  However any host tool used could have its timestamp
  updated.  Any library used by dynamic tools could have its timestamp
  updated.  The filemon(4) data in the .meta files captures all reads to
  these files.  This causes the 2nd buildworld to rebuild everything since
  host tools and files have been updated.
  
  Because the build is self-reliant and bootstraps itself, it should be
  safe to ignore mtime changes on host files used during the build.  Host
  files should only impact the build of legacy, build-tools, bootstrap-tools,
  cross-tools, but those are already intended to be reproducible from its
  own bootstrapping.  It is possible in a rare case that a bug in a host
  file does produce a broken build tool.  If that happens it will just
  have to be communicated properly.
  
  An alternative solution would be to update the mtime of all files in the
  object directory after installworld so that the host files are not newer
  than the object files.  That also requires special care for read-only
  obj directories and special care to not mess with any intended timestamps in
  the build, such as done for reproducibility.
  
  Reported by:	many
  Sponsored by:	EMC / Isilon Storage Division

Modified:
  head/share/mk/sys.mk

Modified: head/share/mk/sys.mk
==============================================================================
--- head/share/mk/sys.mk	Sun Jun  5 23:04:42 2016	(r301466)
+++ head/share/mk/sys.mk	Sun Jun  5 23:05:01 2016	(r301467)
@@ -68,6 +68,26 @@ META_MODE+= missing-filemon=yes
 META_MODE?= normal
 .export META_MODE
 .MAKE.MODE?= ${META_MODE}
+.if !empty(.MAKE.MODE:Mmeta) && !defined(NO_META_IGNORE_HOST)
+# Ignore host file changes that will otherwise cause
+# buildworld -> installworld -> buildworld to rebuild everything.
+# Since the build is self-reliant and bootstraps everything it needs,
+# this should not be a real problem for incremental builds.
+# Note that these are prefix matching, so /lib matches /libexec.
+.MAKE.META.IGNORE_PATHS+= \
+	${__MAKE_SHELL} \
+	/bin \
+	/lib \
+	/rescue \
+	/sbin \
+	/usr/bin \
+	/usr/include \
+	/usr/lib \
+	/usr/sbin \
+	/usr/share \
+
+.endif
+
 
 .if ${MK_AUTO_OBJ} == "yes"
 # This needs to be done early - before .PATH is computed



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201606052305.u55N51KI024032>