public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
* [OE-core][PATCH] bitbake.conf: Prevent git from detecting parent repo in recipe
@ 2020-05-05 16:39 Joshua Watt
  0 siblings, 0 replies; only message in thread
From: Joshua Watt @ 2020-05-05 16:39 UTC (permalink / raw)
  To: openembedded-core; +Cc: Joshua Watt

Prevents git commands run in a recipe from moving up past ${WORKDIR}
when searching for a .git directory, and thus prevents them from
detecting the parent OE-core .git directory. Fixes several
reproducibility issues where recipes would use the OE-core version as
the recipe version due to git walking up the tree.

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
---
 meta/conf/bitbake.conf | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 4b544a22cd..bdade79abe 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -718,6 +718,10 @@ export PKG_CONFIG_DISABLE_UNINSTALLED = "yes"
 export PKG_CONFIG_SYSTEM_LIBRARY_PATH = "${base_libdir}:${libdir}"
 export PKG_CONFIG_SYSTEM_INCLUDE_PATH = "${includedir}"
 
+# Don't allow git to chdir up past WORKDIR so that it doesn't detect the OE
+# repository when building a recipe
+export GIT_CEILING_DIRECTORIES = "${WORKDIR}"
+
 ###
 ### Config file processing
 ###
@@ -878,7 +882,7 @@ BB_HASHBASE_WHITELIST ?= "TMPDIR FILE PATH PWD BB_TASKHASH BBPATH BBSERVER DL_DI
     WARN_QA ERROR_QA WORKDIR STAMPCLEAN PKGDATA_DIR BUILD_ARCH SSTATE_PKGARCH \
     BB_WORKERCONTEXT BB_LIMITEDDEPS BB_UNIHASH extend_recipe_sysroot DEPLOY_DIR \
     SSTATE_HASHEQUIV_METHOD SSTATE_HASHEQUIV_REPORT_TASKDATA \
-    SSTATE_HASHEQUIV_OWNER CCACHE_TOP_DIR BB_HASHSERVE"
+    SSTATE_HASHEQUIV_OWNER CCACHE_TOP_DIR BB_HASHSERVE GIT_CEILING_DIRECTORIES"
 BB_HASHCONFIG_WHITELIST ?= "${BB_HASHBASE_WHITELIST} DATE TIME SSH_AGENT_PID \
     SSH_AUTH_SOCK PSEUDO_BUILD BB_ENV_EXTRAWHITE DISABLE_SANITY_CHECKS \
     PARALLEL_MAKE BB_NUMBER_THREADS BB_ORIGENV BB_INVALIDCONF BBINCLUDED \
-- 
2.17.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-05-05 16:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-05 16:39 [OE-core][PATCH] bitbake.conf: Prevent git from detecting parent repo in recipe Joshua Watt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox