diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-03-09 00:14:38 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-03-11 16:09:14 +0000 |
commit | 94790a8254d63d63759ca3598b42f3f67bc97d02 (patch) | |
tree | b3df3f28c12a6e9270a6763affabc14052c594fd /meta/conf | |
parent | 6df0da0aa1aa8f5f3bbb16bc3af03d14007f2791 (diff) | |
download | poky-94790a8254d63d63759ca3598b42f3f67bc97d02.tar.gz |
base/bitbake.conf: Filter contents of PATH to only allow whitelisted tools
We currently have a determinism problem in that the host tools present
in PATH can influence the build. In particular, the presence of pkg-config
on the build host can mask missing pkgconfig class dependencies.
This adds in a new HOSTTOOLS variable and then uses it to set up a directory
of symlinks to the whitelisted host tools. This directory is placed as PATH
instead of the usual /usr/bin:/bin and so on.
This should improve determinism of builds and avoid the issues which have
been particularly obvious since the introduction of recipe specific sysroots.
If users find there is a tool missing, they can extend HOSTTOOLS from a global
class or global conf file.
Right now the settings should be enough to build everything in OE-Core.
(From OE-Core rev: fa764a403da34bb0ca9fa3767a9e9dba8d685965)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/conf')
-rw-r--r-- | meta/conf/bitbake.conf | 18 | ||||
-rw-r--r-- | meta/conf/layer.conf | 2 |
2 files changed, 20 insertions, 0 deletions
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf index f9df7cacd1..bc115117c9 100644 --- a/meta/conf/bitbake.conf +++ b/meta/conf/bitbake.conf | |||
@@ -453,6 +453,24 @@ export PATH | |||
453 | # Build utility info. | 453 | # Build utility info. |
454 | ################################################################## | 454 | ################################################################## |
455 | 455 | ||
456 | # Tools needed to run builds with OE-Core | ||
457 | HOSTTOOLS += " \ | ||
458 | bash sh cut sed gcc ld git rm install which find xargs cat true mktemp \ | ||
459 | grep tar gzip touch cp mv basename dirname tr getopt sort awk head tail \ | ||
460 | mkdir patch uniq perl python chmod python3 ar strip expr ls make as \ | ||
461 | ranlib egrep echo chown cpio tee wc wget bzip2 stat date rmdir od diff \ | ||
462 | md5sum dd chrpath file pod2man gunzip python2.7 ln g++ [ false true \ | ||
463 | uname test hostname nm objdump objcopy cmp printf env readlink gawk fgrep \ | ||
464 | expand pwd sleep diffstat chgrp flock ldd strings rpcgen du makeinfo \ | ||
465 | getconf mknod cpp readelf split \ | ||
466 | " | ||
467 | |||
468 | # Tools needed to run testimage runtime image testing | ||
469 | HOSTTOOLS += "ps stty ip ssh scp ping vi" | ||
470 | |||
471 | # Link to these if present | ||
472 | HOSTTOOLS_NONFATAL += "ccache pip3 ld.bfd ld.gold gcc-ar gpg sftp" | ||
473 | |||
456 | CCACHE ??= "" | 474 | CCACHE ??= "" |
457 | # Disable ccache explicitly if CCACHE is null since gcc may be a symlink | 475 | # Disable ccache explicitly if CCACHE is null since gcc may be a symlink |
458 | # of ccache some distributions (e.g., Fedora 17). | 476 | # of ccache some distributions (e.g., Fedora 17). |
diff --git a/meta/conf/layer.conf b/meta/conf/layer.conf index 87c235fe12..739d82ea56 100644 --- a/meta/conf/layer.conf +++ b/meta/conf/layer.conf | |||
@@ -59,3 +59,5 @@ SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += " \ | |||
59 | oprofile->virtual/kernel \ | 59 | oprofile->virtual/kernel \ |
60 | " | 60 | " |
61 | 61 | ||
62 | # We need to keep bitbake tools in PATH | ||
63 | PATH := "${@os.path.dirname(bb.utils.which(d.getVar('PATH'),'bitbake'))}:${TMPDIR}/hosttools" | ||