aboutsummaryrefslogtreecommitdiffstats
path: root/meta/conf/bitbake.conf
AgeCommit message (Collapse)Author
2018-02-06bitbake.conf: Add xattr to DISTRO_FEATURES_NATIVENiko Mauno
Commit db1f1adace58763c35774e3fdfeaac5c3ca646fd disabled 'xattr' from DISTRO_FEATURES when native packages are built, whereas for target packages it was retained. This changed eg. mtd-utils-native to build without extended attributes (capabilities) support from there on. Thus even setcap was called succesfully for a binary during pkg_postinst on build host, the capabilities did not exist on target rootfs due to now xattr-less host-side mkfs utility. Adding xattr to DISTRO_FEATURES_NATIVE restores previous behaviour, fixing the discontinuity in capability propagation to target device rootfs. Signed-off-by: Niko Mauno <niko.mauno@vaisala.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-01-29bitbake.conf: Add comm to HOSTTOOLSNiko Mauno
This mitigates following issues during u-boot do_compile() step -- otherwise, if comm is not available, they are quietly ignored: .../scripts/check-config.sh: line 33: comm: command not found .../scripts/check-config.sh: line 39: comm: command not found Since 'comm' is provided by coreutils package, adding it to HOSTTOOLS was considered a lower impact fix compared to adding coreutils-native buildtime dependency to u-boot recipe. Signed-off-by: Niko Mauno <niko.mauno@vaisala.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-01-29meta: don't use deprecated functions from utils.bbclassRoss Burton
These functions were moved to meta/lib/oe in 2010 and the base_* functions in utils.bbclass were intended to be a short-term compatibility layer. They're still used in a few places, so update the callers to use the new functions. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-01-29bitbake.conf: add STAMPS_DIR to BB_HASHBASE_WHITELISTMing Liu
This allows scripts/bitbake-whatchanged to calculate the dependency changes correctly since it needs to set different STAMPS_DIR during the comparation. Signed-off-by: Ming Liu <liu.ming50@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-01-06bitbake.conf: Set AUTOREV to have a vardepvalueRichard Purdie
If you have a recipe which does not include SRCPV in PV but does set SRCREV = "${AUTOREV}" and you run do_fetch, then change the repo to a new commit then run do_unpack, do_unpack will fail since the new commit doesn't exist in the repo that was fetched. The problem is the revision chosen is not represented in the do_fetch task hash. It if were, the fetch would rerun first and the commit would be present. It works when PV includes SRCPV since that does contain the chosen commit from the AUTOREV. The solution is to include the SRCPV value into the representation of AUTOREV used for checksum calculation purposes. Add a selftest for this issue. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-10bitbake.conf: set more conservative default for IMAGE_FSTYPES_DEBUGFSAndre McCurdy
Setting IMAGE_FSTYPES_DEBUGFS to the same value as IMAGE_FSTYPES can lead to creating a large number of DEBUGFS filesystem images, many of which may not make much sense (or may not even be buildable). Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-10-16bitbake.conf: Adds ipv6 to DISTRO_FEATURES_NATIVEAlejandro Hernandez
Before we introduced DISTRO_FEATURES_NATIVE on commit: db1f1adace58763c35774e3fdfeaac5c3ca646fd ipv6 was enabled by default on DISTRO_FEATURES via DISTRO_FEATURES_LIBC hence for example python-native was built with ipv6 support. After this, ipv6 was automatically disabled on DISTRO_FEATURES. On some packages (python) this may cause errors when they try to download something on their do_compile stage. This patch adds ipv6 to DISTRO_FEATURES_NATIVE leaving it as it was before, to avoid errors like the one mentioned above [YOCTO #11978] Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-10-16bitbake.conf: add ssh to HOSTTOOLS_NONFATALChen Qi
We changed to make tools required by testimage to be included conditionally. This resulted in users who use ssh for git fetching having failures. Add ssh to HOSTTOOLS_NONFATAL to make things work for the above situation. [YOCTO #12227] Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-10-09bitbake.conf: add tools required by testimage to HOSTTOOLS conditionallyChen Qi
Add tools required by testimage to HOSTTOOLS only when testimage is inherited. These tools, as described in the comment, are only required by the testimage task. So this change should not have negtive effect. This would also solve build error on hosts which miss some tool such as scp. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-10-06bitbake.conf: Add 'id' to HOSTTOOLSOtavio Salvador
The 'id' utility is used in 'rootfs_check_host_user_contaminated' rootfs-postcommand so it must be available. Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-09-25meta: drop True option to getVar callsMing Liu
Search made with the following regex: getVar ?\((.*), True\). Signed-off-by: Ming Liu <liu.ming50@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-18gawk: Enable native buildingNathan Rossi
Also update the ASSUME_PROVIDED in bitbake.conf to contain gawk-native as the dependency is passed in via HOSTTOOLS for native builds. This allows for recipes to depend on gawk-native, and have the dependency met if not already provided by the host tools. Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-09-18bitbake.conf: Add default FILESYSTEM_PERMS_TABLESMark Hatle
If FILESYSTEM_PERMS_TABLES was not defined, the default was selected by the packages.bbclass. This made it difficult for a recipe or layer to 'append' to the default. Copy the default into the bitbake.conf, allowing future _append and += style actions. Default was remove from package.bbclass. If a value is not set, only the built-in perms fixes will be used. Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-09-12bitbake.conf: add bzr to HOSTTOOLS_NONFATALMartin Jansa
* it's used by bzr fetcher: meta/conf/bitbake.conf:FETCHCMD_bzr = "/usr/bin/env bzr" and when it isn't available in PATH do_fetch tasks fail with: /usr/bin/env: ‘bzr’: No such file or directory * it was also added in: https://patchwork.openembedded.org/patch/140107/ but this change wasn't merged (nor rejected AFAIS) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-30bitbake.conf: add definition for BUILDSDK_CXXFLAGSChang Rebecca Swee Fun
${BUILDSDK_CXXFLAGS} was introduced since commit 55c83cb239df5faf5e2143fffca47f2f16931cb3 cross.bbclass: override TARGET_* flags bitbake.conf has definitions for both ${BUILDSDK_CPPFLAGS} and ${BUILDSDK_CFLAGS} but there is none for ${BUILDSDK_CXXFLAGS}. This was a regression as in the past, CXXFLAGS is the same as CFLAGS in SDK environment. Adding definition for ${BUILDSDK_CXXFLAGS} will resolve CXXFLAGS being set wrongly in SDK environment. [YOCTO #11769] Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-27bitbake.conf: Drop usage of build/BUILD_SYS and target/TARGET_SYS conf filesRichard Purdie
Its been highlighted that TARGET_SYS can be changed by MACHINE and DISTRO files so this doesn't work at all today. build/ configuration files also don't see to be used. Drop these forms of include files for those reasons and simplfy the code slightly. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-17bitbake.conf: add VOLATILE_LOG_DIR variableChen Qi
The default value is "yes" which results in the /var/log being a link pointing to /var/volatile/log which is on tmpfs. Setting valid boolean false value ('no', 'n', 'false', 'f', '0') would make /var/log to be a directory on persistent storage. [YOCTO #6132] Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-08bitbake.conf: whitelist BB_SERVER_TIMEOUT from config hashPaul Eggleton
We don't need to reparse recipes just because BB_SERVER_TIMEOUT changed, so exclude it from the config hash. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-17bitbake.conf: add CCACHE_NOHASHDIR to hash whitelistRoss Burton
2017-07-17ccache: don't export CCACHE_DISABLE globallyRoss Burton
CCACHE_DISABLE was added to bitbake.conf in oe-core dd2bab (June 2012) because autogen-native exports HOME=/dev/null during the build, which is then used by a host ccache to construct the path to it's cache (/dev/null/.ccache) and this fails. However we now always export CCACHE_DIR to solve the same problem in a more efficient way so CCACHE_DISABLE can be deleted. Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-07-06bitbake.conf: support for merged usr with DISTRO_FEATURE usrmergeAmarnath Valluri
A new configuration variable ${root_prefix} added, which shall be used by all base_{lib,bin,sbin}dir variables. When usrmerge DISTRO_FEATURE is enabled ${root_prefix} points to ${exec_prefix} otherwise to ${base_prefix} Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-27Revert "bitbake.conf: Add sdl-config to HOSTTOOLS if using host SDL"Richard Purdie
This clearly wasn't tested as the correct variable is ASSUME_PROVIDED. This reverts commit 91cee064332969207334cd1ee5c31d02610281fc.
2017-06-14Revert "bitbake.conf: DISTRO_FEATURES as overrides"Patrick Ohly
This reverts commit 3b3ae91a22d6f685e804df4f32cdeebe1bd6bd88. It turned out that the code which expands DISTRO_FEATURES early during base config parsing can fail because some entries in DISTRO_FEATURES might call Python functions like base_conditional() from base.bbclass which aren't defined yet. A different solution will be needed. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-14bitbake.conf: Don't exclude MACHINE/MACHINEOVERRIDES from hashesRichard Purdie
A long time ago (6 years), this seemed like a good idea. The reality is that OVERRIDES should not be being added to hashes and if it is, it likely needs excluding in its own right. This was a nice workaround but we need to fix the real underlying issues now. In some cases this means excluding OVERRIDES from the variables dependency using the vardepsexclude flag however caution is needed to ensure this is safe. Variable values used to construct hashes are unexpanded but the values used are computed after the application of OVERRIDES. The important detail is if the end resulting unexpanded value changes, not the value of the OVERRIDES used in the construction of that unexpanded value. This is why dependencies on OVERRIDES itself shouldn't be in the hashes in general. The recent DISTRO_FEATURES changes adding in override mappings for them highlighted this issue. We have some good sstate tests which are effective at highlighting where potential issues arrive with OVERRIDES contamination (oe-selftest -r sstatetests.SStateTests). Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-12bitbake.conf: DISTRO_FEATURES as overridesPatrick Ohly
As discussed in "[Openembedded-architecture] Yocto Compatible 2.0 + signature changes", changes in .bbappend must depend on some explicit configuration change, typically selecting a distro feature. For _append and _remove, adding an override that is set only when the corresponding entry is in DISTRO_FEATURES achieves that: In local.conf: DISTRO_FEATURES_append = " my-distro-feature" In layer.conf: DISTRO_FEATURES_OVERRIDES += "my-distro-feature" In a .bbappend: do_install_append_df-my-distro-feature () { ... } The subset of DISTRO_FEATURES that are made available as overrides must be configured explicitly because using them this way should be a conscious decision. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-12bitbake.conf: add BB_CMDLINE to BB_HASHCONFIG_WHITELISTPaul Eggleton
We really don't want the just-introduced BB_CMDLINE influencing the config hash. Part of the fix for [YOCTO #11634]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-06-03bitbake.conf: Add sdl-config to HOSTTOOLS if using host SDLJonathan Liu
If ASSUME_PROVIDES contains libsdl-native, we need to add sdl-config to HOSTTOOLS to allow access to the host sdl-config. Signed-off-by: Jonathan Liu <net147@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-05-10DEBIAN_MIRROR: switch from ftp to httpMaxin B. John
All public-facing debian.org FTP services will be shut down on November 1, 2017 The mirrors should just be accessed using HTTP instead. https://www.debian.org/News/2017/20170425 Fixes [YOCTO #11413] Signed-off-by: Maxin B. John <maxin.john@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-05-10bitbake.conf: Add COMPONENTS_DIR for ${STAGING_DIR}-componentsPeter Kjellerstedt
The path to where to install and find the sysroot components is used in many places. This warrants it to get its own variable. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-05-01bitbake.conf: Add HOSTTOOLS_DIR for ${TMPDIR}/hosttoolsPeter Kjellerstedt
The path to where to install and find the tools copied from the host environment is already used in a couple of places. This warrants it to get its own variable. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-28bitbake.conf: Add python2 to HOSTTOOLSDiego Rondini
Add python2 to HOSTTOOLS as, according to https://www.python.org/dev/peps/pep-0394/, the command "python2" should be the one used in scripts that are not yet ported to Python 3. Signed-off-by: Diego Rondini <diego.rondini@kynetics.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-28bitbake.conf: Add pr to list of hosttoolsKhem Raj
pr is used by gstreamer1.0-libav during configure Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-04-20bitbake.conf: add sha256sum to HOSTTOOLSRichard Leitner
icedtea-native from meta-java needs sha256sum for checksum validation. Therefore add sha256sum to HOSTTOOLS (as md5sum is already in there). Without it the icedtea-native build will fail during configuration at current master. Signed-off-by: Richard Leitner <richard.leitner@skidata.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-12native/nativesdk: Use fixed DISTRO_FEATURESJussi Kukkonen
There seems to be little advantage to letting distro features affect native builds. There is a significant disadvantage: a change to DISTRO_FEATURES will trigger a lot of unnecessary native tasks. In a test like this: $ bitbake core-image-minimal # append " systemd" to DISTRO_FEATURES $ bitbake core-image-minimal The latter build takes 44 minutes (28%) of cpu-time less with this patch (skipping 135 native tasks). Sadly wall clock time was not affected as glibc remains the bottleneck. Set native distro features to DISTRO_FEATURES_NATIVE appended with an intersection of DISTRO_FEATURES and DISTRO_FEATURES_FILTER_NATIVE. Current default values (baitbake.conf) are * DISTRO_FEATURES_FILTER_NATIVE ?= "api-documentation" (as gtk-doc-native has much less dependencies when built without it) * DISTRO_FEATURES_NATIVE ?= "x11" (to enable native UIs even if target does not containe them) Do the variable setting in native_virtclass_handler() because otherwise it could still be overridden by appends and the feature backfilling. Shuffle the early returns so DISTRO_FEATURES gets set as long as the packagename ends with "-native". Add similar variables for nativesdk. To make nativesdk work we need to enable the locale options so nativesdk-glibc-locales can build and to avoid the init manager check in the nativesdk case so add those fixes. Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-30bitbake.conf: Drop MULTIMACH_HOST_SYSRichard Purdie
There are no users of this left after recipe specfic sysroots was implemented, drop the variable as it no longer makes sense or is useful. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-30bitbake.conf: Add DEPLOY_DIR to BB_HASHBASE_WHITELISTRichard Purdie
Users should be able to locally choose DEPLOY_DIR without impacting the reuse of sstate, this change allows that. [YOCTO #11110] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-30bitbake.conf: Add aws to HOSTTOOLS_NONFATALElizabeth 'pidge' Flanagan
This adds aws to HOSTTOOLS_NONFATAL in order to get the s3 fetcher working again. Signed-off-by: Elizabeth 'pidge' Flanagan <pidge@toganlabs.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-28bitbake.conf: sort HOSTTOOLS and remove duplicatesAndre McCurdy
Cleanup only, no functional changes. Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-21bitbake.conf: remove vi from HOSTTOOLS listbrian avery
Having changes the sdk test to cpio from cvs, we no longer require an editor to be present. This patch removes vi from the list of required tools. Signed-off-by: brian avery <brian.avery@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-03-21bitbake.conf: add sudo to HOSTTOOLS_NONFATALEd Bartosh
runqemu is using sudo to configure tap networking. Without sudo in HOSTTOOLS_NONFATAL it may cause bitbake -c testimage to fail with this error: runqemu - INFO - Setting up tap interface under sudo /bin/sh: sudo: command not found Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-17bitbake.conf: Add few more binaries to HOSTTOOLS_NONFATALMartin Jansa
* add: join nl size yes zcat join - netcf - http://errors.yoctoproject.org/Errors/Details/135208/ join - fontforge - http://errors.yoctoproject.org/Errors/Details/135209/ nl - dash - http://errors.yoctoproject.org/Errors/Details/135215/ nl - klibc - http://errors.yoctoproject.org/Errors/Details/135198/ size - iptraf - http://errors.yoctoproject.org/Errors/Details/135204/ yes - libnet-ssleay-perl - http://errors.yoctoproject.org/Errors/Details/135197/ zcat - scsirastools - http://errors.yoctoproject.org/Errors/Details/135205/ Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-16bitbake.conf: Drop pip3 from HOSTTOOLS_NONFATALRichard Purdie
Now that pip3-native is used by build-appliance, we should no longer need this host tool. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-16bitbake.conf: whitelist socat as non-fatal host toolMikko Ylinen
oe-git-proxy depends on socat host tool but it's not whitelisted and triggers a 'binary not in PATH' error. Whitelist socat but make it a HOSTTOOLS_NONFATAL since it's not a hard dependency. Signed-off-by: Mikko Ylinen <mikko.ylinen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-14bitbake.conf: Add nc to HOSTTOOLS_NONFATALRichard Purdie
This is used by some of our proxy scripts but isn't required for all builds so add to HOSTTOOLS_NONFATAL. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-11base/bitbake.conf: Filter contents of PATH to only allow whitelisted toolsRichard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-04bitbake.conf: replace USE_LDCONFIG with new "ldconfig" distro featureAndre McCurdy
USE_LDCONFIG could previously be set to 0 by distros which do not require ldconfig or ld.so.conf on the target. Since more and more recipes may need to respect that option, replace the ad-hoc variable with a distro feature. Distros which previously set: USE_LDCONFIG = "0" Should now instead use: DISTRO_FEATURES_BACKFILL_CONSIDERED_append = " ldconfig" Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-03-01bitbake.conf: fix ineffective include conf/target/${TARGET_SYS}.confAndre McCurdy
TARGET_SYS is defined in terms of TARGET_ARCH, so it's not valid until after TUNE_ARCH has been set by the machine config. The original order of includes resulted in an attempt to include non-existent files such as: conf/target/INVALID-oe-linux.conf Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-02-23bitbake.conf: Point KERNELORG_MIRROR to cdn.kernel.orgDominic Sacré
Use cdn.kernel.org to distribute the server load and improve download speeds. Leave www.kernel.org in MIRRORS as a fallback. See https://www.kernel.org/introducing-fastly-cdn.html (From OE-Core rev: 7c81b680a3cc4602c9c153398103d5477d7fd894) Signed-off-by: Dominic Sacré <dominic.sacre@gmx.de> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-23bitbake.conf: Exclude extend_recipe_sysroot function from sstate checksumsRichard Purdie
The extend_recipe_sysroot itself is excluded from the task hashes. This is because it only ever acts upon the contents of the task dependencies and hence those checksums accurately relfect what its doing. It does mean sysroots don't repopulate if this function changes but there are other easy ways to achieve that if needed. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-23Switch to Recipe Specific SysrootsRichard Purdie
This patch is comparatively large and invasive. It does only do one thing, switching the system to build using recipe specific sysroots and where changes could be isolated from it, that has been done. With the current single sysroot approach, its possible for software to find things which aren't in their dependencies. This leads to a determinism problem and is a growing issue in several of the market segments where OE makes sense. The way to solve this problem for OE is to have seperate sysroots for each recipe and these will only contain the dependencies for that recipe. Its worth noting that this is not task specific sysroots and that OE's dependencies do vary enormously by task. This did result in some implementation challenges. There is nothing stopping the implementation of task specific sysroots at some later point based on this work but that as deemed a bridge too far right now. Implementation details: * Rather than installing the sysroot artefacts into a combined sysroots, they are now placed in TMPDIR/sysroot-components/PACKAGE_ARCH/PN. * WORKDIR/recipe-sysroot and WORKDIR/recipe-sysroot-native are built by hardlinking in files from the sysroot-component trees. These new directories are known as RECIPE_SYSROOT and RECIPE_SYSROOT_NATIVE. * This construction is primarily done by a new do_prepare_recipe_sysroot task which runs before do_configure and consists of a call to the extend_recipe_sysroot function. * Other tasks need things in the sysroot before/after this, e.g. do_patch needs quilt-native and do_package_write_deb needs dpkg-native. The code therefore inspects the dependencies for each task and adds extend_recipe_sysroot as a prefunc if it has populate_sysroot dependencies. * We have to do a search/replace 'fixme' operation on the files installed into the sysroot to change hardcoded paths into the correct ones. We create a fixmepath file in the component directory which lists the files which need this operation. * Some files have "postinstall" commands which need to run against them, e.g. gdk-pixbuf each time a new loader is added. These are handled by adding files in bindir with the name prefixed by "postinst-" and are run in each sysroot as its created if they're present. This did mean most sstate postinstalls have to be rewritten but there shouldn't be many of them. * Since a recipe can have multiple tasks and these tasks can run against each other at the same time we have to have a lock when we perform write operations against the sysroot. We also have to maintain manifests of what we install against a task checksum of the dependency. If the checksum changes, we remove its files and then add the new ones. * The autotools logic for filtering the view of m4 files is no longer needed (and was the model for the way extend_recipe_sysroot works). * For autotools, we used to build a combined m4 macros directory which had both the native and target m4 files. We can no longer do this so we use the target sysroot as the default and add the native sysroot as an extra backup include path. If we don't do this, we'd have to build target pkg-config before we could built anything using pkg-config for example (ditto gettext). Such dependencies would be painful so we haven't required that. * PKDDATA_DIR was moved out the sysroot and works as before using sstate to build a hybrid copy for each machine. The paths therefore changed, the behaviour did not. * The ccache class had to be reworked to function with rss. * The TCBOOTSTRAP sysroot for compiler bootstrap is no longer needed but the -initial data does have to be filtered out from the main recipe sysroots. Putting "-initial" in a normal recipe name therefore remains a bad idea. * The logic in insane needed tweaks to deal with the new path layout, as did the debug source file extraction code in package.bbclass. * The logic in sstate.bbclass had to be rewritten since it previously only performed search and replace on extracted sstate and we now need this to happen even if the compiled path was "correct". This in theory could cause a mild performance issue but since the sysroot data was the main data that needed this and we'd have to do it there regardless with rss, I've opted just to change the way the class for everything. The built output used to build the sstate output is now retained and installed rather than deleted. * The search and replace logic used in sstate objects also seemed weak/incorrect and didn't hold up against testing. This has been rewritten too. There are some assumptions made about paths, we save the 'proper' search and replace operations to fixmepath.cmd but then ignore this. What is here works but is a little hardcoded and an area for future improvement. * In order to work with eSDK we need a way to build something that looks like the old style sysroot. "bitbake build-sysroots" will construct such a sysroot based on everything in the components directory that matches the current MACHINE. It will allow transition of external tools and can built target or native variants or both. It also supports a clean task. I'd suggest not relying on this for anything other than transitional purposes though. To see XXX in that sysroot, you'd have to have built that in a previous bitbake invocation. * pseudo is run out of its components directory. This is fine as its statically linked. * The hacks for wayland to see allarch dependencies in the multilib case are no longer needed and can be dropped. * wic needed more extensive changes to work with rss and the fixes are in a separate commit series * Various oe-selftest tweaks were needed since tests did assume the location to binaries and the combined sysroot in several cases. * Most missing dependencies this work found have been sent out as separate patches as they were found but a few tweaks are still included here. * A late addition is that extend_recipe_sysroot became multilib aware and able to populate multilib sysroots. I had hoped not to have to add that complexity but the meta-environment recipe forced my hand. That implementation can probably be neater but this is on the list of things to cleanup later at this point. In summary, the impact people will likely see after this change: * Recipes may fail with missing dependencies, particularly native tools like gettext-native, glib-2.0-native and libxml2.0-native. Some hosts have these installed and will mask these errors * Any recipe/class using SSTATEPOSTINSTFUNCS will need that code rewriting into a postinst * There was a separate patch series dealing with roots postinst native dependency issues. Any postinst which expects native tools at rootfs time will need to mark that dependency with PACKAGE_WRITE_DEPS. There could well be other issues. This has been tested repeatedly against our autobuilders and oe-selftest and issues found have been fixed. We believe at least OE-Core is in good shape but that doesn't mean we've found all the issues. Also, the logging is a bit chatty at the moment. It does help if something goes wrong and goes to the task logfiles, not the console so I've intentionally left this like that for now. We can turn it down easily enough in due course. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>