summaryrefslogtreecommitdiffstats
path: root/meta/conf/bitbake.conf
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@arm.com>2022-04-26 13:07:20 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-04-27 11:21:04 +0100
commit5bca57859b280f73b23247aac7dec6b05f48fde8 (patch)
tree6ce5e30f03833ceeb47d3ebc577f7be732d5501d /meta/conf/bitbake.conf
parent5546a868b52400ed1487b2ac7149f3a9e7293bd2 (diff)
downloadpoky-5bca57859b280f73b23247aac7dec6b05f48fde8.tar.gz
bitbake.conf: mark all directories as safe for git to read
Recent git releases containing [1] have an ownership check when opening repositories, and refuse to open a repository if it is owned by a different user. This breaks any use of git in do_install, as that is executed by the (fake) root user. Whilst not common, this does happen. Setting the git configuration safe.directories=* disables this check, so that git is usable in fakeroot tasks. This can be set globally via the internal environment variable GIT_CONFIG_PARAMETERS, we can't use GIT_CONFIG_*_KEY/VALUE as that isn't present in all the releases which have the ownership check. We already set GIT_CEILING_DIRECTORIES to ensure that git doesn't recurse up out of the work directory, so this isn't a security issue. [1] https://github.com/git/git/commit/8959555cee7ec045958f9b6dd62e541affb7e7d9 (From OE-Core rev: 8bed8e6993e7297bdcd68940aa0d47ef47120117) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/conf/bitbake.conf')
-rw-r--r--meta/conf/bitbake.conf8
1 files changed, 8 insertions, 0 deletions
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 0e939aca4f..1deba8d910 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -776,10 +776,18 @@ export PKG_CONFIG_DISABLE_UNINSTALLED = "yes"
776export PKG_CONFIG_SYSTEM_LIBRARY_PATH = "${base_libdir}:${libdir}" 776export PKG_CONFIG_SYSTEM_LIBRARY_PATH = "${base_libdir}:${libdir}"
777export PKG_CONFIG_SYSTEM_INCLUDE_PATH = "${includedir}" 777export PKG_CONFIG_SYSTEM_INCLUDE_PATH = "${includedir}"
778 778
779# Git configuration
780
779# Don't allow git to chdir up past WORKDIR so that it doesn't detect the OE 781# Don't allow git to chdir up past WORKDIR so that it doesn't detect the OE
780# repository when building a recipe 782# repository when building a recipe
781export GIT_CEILING_DIRECTORIES = "${WORKDIR}" 783export GIT_CEILING_DIRECTORIES = "${WORKDIR}"
782 784
785# Treat all directories are safe, as during fakeroot tasks git will run as
786# root so recent git releases (eg 2.30.3) will refuse to work on repositories. See
787# https://github.com/git/git/commit/8959555cee7ec045958f9b6dd62e541affb7e7d9 for
788# further details.
789export GIT_CONFIG_PARAMETERS="'safe.directory=*'"
790
783### 791###
784### Config file processing 792### Config file processing
785### 793###