summaryrefslogtreecommitdiffstats
path: root/meta/classes/base.bbclass
AgeCommit message (Collapse)Author
2020-10-10base.bbclass: warn when there is trailing slash in S or B variablesMartin Jansa
* to make sure we won't hit such corner cases in future add a warning to prevent trailing slashes and duplicated slashes even when they in most cases don't cause harm * only a few cases were found in layers included in my world builds: oe-core: 1 meta-oe: 7 meta-python2: 1 meta-qt5: 1 meta-aws: 1 will send patches for these once this warning is approved for oe-core Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-10-10base.bbclass: use os.path.normpath instead of just comparing WORKDIR and S ↵Martin Jansa
as strings * cannot use os.path.samefile, because S/B might not exist at this time yet * there is issue with PSEUDO_IGNORE_PATHS when some recipe sets e.g. S = "${WORKDIR}/" whole WORKDIR gets added to PSEUDO_IGNORE_PATHS and then the build can fail with various strange errors, in my case do_package was failing when do_package calls: fix_perms(.../1.0-r0/package/etc, 755, 0, 0, /etc) and fails with "[Errno 1] Operation not permitted:" Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-10-07base/bitbake.conf: Enable pseudo path filteringRichard Purdie
This is a pretty big change to the way pseudo operates when used in OpenEmbedded. Normally, pseudo monitors and logs (adds to its database) any file created or modified whilst in a fakeroot environment. There are large numbers of files we simply don't care about the permissions of whilst in that fakeroot context, for example ${S}, ${B}, ${T}, ${SSTATE_DIR}, the central sstate control directories, This change uses new functionality in pseudo to ignore these directory trees, resulting in a cleaner database with less chance of "stray" mismatches if files are modified outside pseudo context. It also should reduce some overhead from pseudo as the interprocess round trip to the server is avoided. There is a possible complication where some existing recipe may break, for example, we found a recipe which was writing to "${B}/install" for "make install" in do_install and since we listed ${B} as not to be tracked, there were errors trying to chown root for files in this location. This patch fixes a few corner cases in OE-Core when used with this new ignore list: * The archiver directory matched a "${WORKDIR}/deploy*" pattern so was renamed to something else since that directory does need its root permissions * The ${S} and ${B} ignoring is conditional on them being different to ${WORKDIR} * package_write_* task output (the debs/rpms/ipks) are now owned by the build user so we don't want the file ownership information in the hashequiv outhash calculation even if they are built under pseudo. * The fontcache postinstall intercept is run under qemu outside of pseudo context so delete files it may delete up front where pseudo can see this. * SSTATE_DIR is in PSEUDO_PATHS_IGNORE, which is in FAKEROOTENV which is cached by bitbake. We therefore need to trigger reparsing if this changes, which means SSTATE_DIR can be in BB_HASHBASE_WHITELIST but not BB_HASHCONFIG_WHITELIST. Rework the variables to handle this. This otherwise breaks some of our sstate tests in oe-selftest. * Ignore the temp directory wic uses for rebuilding rootfs. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-05-27multilib/recipes: Use new RecipePostKeyExpansion eventRichard Purdie
There are issues with multilib due to the ordering of events where some functions see the remapped multilib dependencies and some do not. A significant problem is that the multilib class needs to make some changes before key expansion and some afterwards but by using existing event handlers, some code sees things in a partially translated state, leading to bugs. This patch changes things to use a new event handler from bitbake which makes the ordering of the changes explcit. The challenge in doing this is that it breaks some existing anonymous python and dyanmic assignments. In some cases these used to be translated and no longer are, meaning MLPREFIX has to be added. In some cases these are now translated and the MLPREFIX can be removed. This change does now make it very clear when MLPREFIX is required and when it is not, its just the migration path which is harder. The patch changes the small number of cases where fixes are needed. In particular, where a variable like RDEPENDS is conditionally extended (e.g. with an override), MLPREFIX is now required. This patch also reverts: base: Revert 'base.bbclass: considering multilib when setting LICENSE_EXCLUSION' This reverts 6597130256a1609c3e05ec5891aceaf549c37985 as the changes to multilib datastore handling mean its no longer necessary. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-05-21base/insane: Check pkgs lics are subset of recipe lics only onceQuentin Schulz
Move logic checking that all packages licenses are only a subset of recipe licenses from base.bbclass to the insane.bbclass so that it's evaluated only once, during do_package_qa. As explained in the linked bugzilla entry, if a package license is not part of the recipe license, the warning message gets shown an unreasonable amount of time because it's evaluated every time a recipe is parsed. [YOCTO #10130] This also makes it possible to silence this error with INSANE_SKIP. Signed-off-by: Quentin Schulz <quentin.schulz@streamunlimited.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-03-11base.bbclass: extend PACKAGECONFIG for conflict package configsKai Kang
There are mutually exclusive PACKAGECONFIGs in recipes. Though it declares that package configs are exclusive, it can't prevent users to set them at same time. Extend PACKAGECONFIG to support specifying conflicted package configs. Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-01-27distrodata/maintainers: Add PARSE_ALL_RECIPES flag to fix test issuesRichard Purdie
Currently the test depends on which DISTRO_FEATURES and targets are selected. Similar to SOURCE_MIRROR_FETCH, add PARSE_ALL_RECIPES to allow the test to see a much wider range of them. This avoids issues added by the new ucontext musl specific recipe and allows the current whitelist to be cleared out a bit (more cleanup can follow). Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-12-30base.bbclass: clean up dead symlink when handling hosttoolsChen Qi
When some hosttool is a dead symlink, bitbake any recipe will fail with error like below. FileExistsError: [Errno 17] File exists: '/usr/bin/chrpath' -> '/path/to/builddir/tmp-glibc/hosttools/chrpath' So we remove dead symlink under hostools/ directory to avoid such error. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-12-16base.bbclass: Report only the licenses that are incompatible for a packagePeter Kjellerstedt
Instead of reporting ${LICENSE} when a package is identified as using an incompatible license, report the license(s) that are actually incompatible. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-12-16base.bbclass: Simplify the check for whitelisted licensesPeter Kjellerstedt
After a number of rewrites, the code checking if a package has been whitelisted for an incompatible license was calculating the whitelisted packages twice (as 'whitelist' and as 'incompatwl'). Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-12-06hosttools: no longer check for or provide host python 2 to buildsAlexander Kanavin
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-12-05base.bbclass: Add python3-native to native paths for hg fetcherKhem Raj
This helps fix an issue where python interpreter in hg script could overflow the BINPRM_BUF_SIZE which is 128 on most of systems, because interpreter is hardcoded and build paths can be deep. This patch helps, because now the absolute python interp path in hg can be replaced with '/usr/bin/env python3' and it will ensure that python3 from native install is used instead of the one on host. Signed-off-by: Khem Raj <raj.khem@gmail.com> Cc: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-15base.bbclass: add dependency on pseudo from do_prepare_recipe_sysrootMattias Hansson
do_prepare_recipe_sysroot may perform groupadd, which requires pseudo. However, do_prepare_recipe_sysroot does not depend on pseudo explicitly, which sometimes causes a build error when building a recipe that adds groups. This issue only occurs when executing do_prepare_recipe_sysroot for a recipe that adds groups before finishing a task that depends on pseudo for a recipe that doesn't add groups. Signed-off-by: Mattias Hansson <mattihn@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-02base: Improve module import error messageRichard Purdie
Turn: ERROR: Unable to parse Var <OE_IMPORTED[:=]> Traceback (most recent call last): File "Var <OE_IMPORTED[:=]>", line 1, in <module> File "/media/build1/poky/meta/classes/base.bbclass", line 35, in oe_import(d=<bb.data_smart.DataSmart object at 0x7f1d941ad208>): for toimport in oe.data.typed_value("OE_IMPORTS", d): > imported = __import__(toimport) inject(toimport.split(".", 1)[0], imported) File "/media/build1/poky/meta/lib/oe/sstatesig.py", line 267, in <module>: >class SignatureGeneratorOEEquivHash(SignatureGeneratorOEBasicHashMixIn, bb.siggen.SignatureGeneratorUniHashMixIn, bb.siggen.SignatureGeneratorBasicHash): name = "OEEquivHash" bb.data_smart.ExpansionError: Failure expanding variable OE_IMPORTED[:=], expression was ${@oe_import(d)} which triggered exception AttributeError: module 'bb.siggen' has no attribute 'SignatureGeneratorUniHashMixIn' into: ERROR: Error importing OE modules: module 'bb.siggen' has no attribute 'SignatureGeneratorUniHashMixIn' which can then trigger a version mismatch error message. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-18base.bbclass: define PACKAGECONFIG_CONFARGS before only sometimes appending ↵Martin Jansa
to it * just to make sure it's expaned by bitbake before it gets executed in shell * e.g. with cmake.bbclass and cmake recipe (any recipe without PACKAGECONFIG options have this issue) it looks like this: bitbake -e cmake | grep EXTRA_OECMAKE= EXTRA_OECMAKE=" -DCMAKE_DOC_DIR=share/doc/cmake-3.14 -DCMAKE_USE_SYSTEM_LIBRARIES=1 -DCMAKE_USE_SYSTEM_LIBRARY_JSONCPP=0 -DCMAKE_USE_SYSTEM_LIBRARY_LIBUV=0 -DCMAKE_USE_SYSTEM_LIBRARY_LIBRHASH=0 -DKWSYS_CHAR_IS_SIGNED=1 -DBUILD_CursesDialog=0 -DKWSYS_LFS_WORKS=1 \${PACKAGECONFIG_CONFARGS}" Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-08base.bbclass: Add OE_EXTRA_IMPORTSChris Laplante
OE_IMPORTS is not intended to be touched by users, but there are cases in which layers might want to make additional Python modules available to Python functions. For example, Python modules defined in the layer themselves (under meta-layer/lib). Signed-off-by: Chris Laplante <chris.laplante@agilent.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-30base.bbclass: add named SRCREVs to the sstate hashMichael Ho
Several fetchers support named sources that require setting a SRCREV with the source name as a suffix. These named SRCREV variables are not captured in the sstate hash calculation because they're only referenced within the bitbake fetcher function. Several recipes avoid this bug by adding the different SRCREVs to their packaging versioning but this is not enforced so it is very trivial to trip this bug case. Add a snippet to the base.bbclass anonymous python to add all named SRCREV variables to the vardeps of do_fetch to capture them in the sstate hash calculation. Testing of the bug can be shown by running the following bitbake commands with this patch set not applied: bitbake vulkan-demos | tee sed -i 's/SRCREV_gli = ".*"/SRCREV_gli = "xxx"/' \ ../meta/recipes-graphics/vulkan/vulkan-demos_git.bb bitbake vulkan-demos | tee; The above results in no errors despite a broken SRCREV because the recipe is considered unchanged by the bitbake sstate hash. After applying this patch the above commands instead result in a fetcher error which is correct. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-05base/pixbufcache: Remove obsolete sstatecompletions codeRichard Purdie
This has been unused in OE-Core since the introduction of recipe specific sysroots. Its not so useful since it only runs once upon sstate installation, not per installation per sysroot. Remove the weird looking comment left behind in pixbufcache too. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-03base.bbclass, staging.bbclass: Move prepare_recipe_sysroot task dependencyPeter Kjellerstedt
Move prepare_recipe_sysroot's task dependency on populate_sysroot from base.bbclass (where it was specified in the middle of do_configure's definition) to staging.bbclass (where the rest of do_prepare_recipe_sysroot is defined). This was a left-over from when recipe specific sysroots were introduced in commit 809746f5 and the task dependency on populate_sysroot was moved from do_configure to do_prepare_recipe_sysroot. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-02-15base.bbclass: Check BuildStarted for HOSTTOOLSRobert Yang
There might be no bb.event.ConfigParsed event if bitbake server is running, so check bb.event.BuildStarted too to make sure HOSTTOOLS_DIR exists. Fixed: $ export BB_SERVER_TIMEOUT=-1 $ bitbake quilt-native $ rm -fr tmp $ bitbake quilt-native ERROR: Error running gcc --version: /bin/sh: gcc: command not found This error is caused by enable_uninative(), it runs twice (ConfigParsed and BuildStarted), the error would happen when there is no ConfigParsed event (no hosttools is created), but BuildStarted. This patch can fix the problem. [YOCTO #13022] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-26base.bbclass, classextend.py: Drop catering to gcc-initialKhem Raj
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-15base.bbclass: Add comments for gcc links to ccacheRobert Yang
Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-13base.bbclass: Display name of licenses which caused SkipRecipeNathan Rossi
Display the name of the restricted licenses which caused the recipe to be skipped. This makes it easy to determine which license or licenses are missing and need to be checked and whitelisted. Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-08base.bbclass: avoid 'find -ignore_readdir_race -delete'Matthias Schiffer
Due to a bug in find [1], -ignore_readdir_race does not work correctly with -delete. This can lead to spurious build failures when files disappear while such a command is running; specifically this was seen in the case of do_configure and do_populate_lic running concurrently for packages with ${B} == ${WORKDIR}: find: '.../sstate-build-populate_lic': No such file or directory While the issue is fixed in the findutils git master, the find command of the host system is called here, so we can't ensure that the used version contains the fix. Many common distros have not updated to a recent enough findutils version yet (Ubuntu 18.10 contains the fix, while 18.04 is still affected). Work around the issue by passing the output of find to 'rm -f' instead of using -delete. [1] https://savannah.gnu.org/bugs/?52981 Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-06oe-init-buildenv/base: Relax python version checks in favour of HOSTTOOLS ↵Richard Purdie
manipulation Several distros are now shipping "python" as python v3 contra to the original python guidelines. This causes users confusion/pain in trying to use our tools. We can just force "python" to "python2" within HOSTTOOLS to avoid this issue and hide the complexity from the user. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-14classes: sanity-check LIC_FILES_CHKSUMRoss Burton
We assume that LIC_FILES_CHKSUM is a file: URI but don't actually verify this, which can lead to problems if you have a URI that resolves to a path of / as Bitbake will then dutifully checksum / recursively. [ YOCTO #12883 ] Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-05-29base.bbclass: update obsolete comment about rpm do_unpack dependenciesAndre McCurdy
The previous comment was made obsolete by: http://git.openembedded.org/openembedded-core/commit/?id=2f31f1795bc0c85b1646bc7d9596bbe778cb84e5 Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-05-22default-distrovars.inc: drop obsolete LGPLv2_WHITELIST_GPL-3.0Andre McCurdy
There doesn't seem to be a clear reason to have two separate variables to hold whitelisted GPLv3 recipes. Both variables are treated the same, so adding a recipe to LGPLv2_WHITELIST_GPL-3.0 is already equivalent to adding it to WHITELIST_GPL-3.0. Anyone needing to whitelist a GPLv3 recipe should now just use WHITELIST_GPL-3.0. Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-05-11base: improve do_unpack[cleandirs] logicRoss Burton
If a recipe sets S to ${WORKDIR}/ then the S != WORKDIR test doesn't work as expected. Use os.path.normpath() to normalise the paths so string comparison works. Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-04-05base.bbclass: fix do_unpack[cleandirs] varflag handlingEnrico Jorns
As introduced by a56fb90dc3805494eeaf04c60538425e8d52efc5 ('base.bbclass wipe ${S} before unpacking source') the base.bbclass uses a python anonymous function to set the 'do_unpack' varflag 'cleandirs' to either '${S}' or '${S}/patches' depending on equality of '${S}' and '${WORKDIR}'. Not that this only differs from the way almost all other recipes set or modify a tasks 'cleandirs' flag, it also has a significant impact on the kernel.bbclass (and possibly further ones) and causes incorrect behavior for rebuilds triggered by source modification, e.g. by a change of the defconfig file for a kernel build. The kernel.bbclass tries to extend do_unpack[cleandirs]: | do_unpack[cleandirs] += " ${S} ${STAGING_KERNEL_DIR} ${B} ${STAGING_KERNEL_BUILDDIR}" As python anonymous functions are evaluated at the very end of recipe parsing, the d.setVarFlag('do_unpack', 'cleandirs', '${S}') statement in base.bbclass will overwrite every modification to cleandirs that is done as shown for the kernel class above. As a result of this, a change to a kernels 'defconfig' will lead to an updated defconfig file in ${WORKDIR}, but as ${B} never gets cleaned and ${B}/.config still exists, it will not be copied to ${B}/.config and thus not find its way in the build kernel. This is a severe issue for the kernel development and build process! This patch changes setting of the cleandirs varflag in base.bbclass to a simple variable assignment as almost all other recipes do it. This now again allows overwriting or appending the varflag with common methods such as done in kernel.bbclass. This issue affects morty, pyro, rocko and master. Signed-off-by: Enrico Jorns <ejo@pengutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-03-04base: Handle backfilling in anonymous python code, not event handlerRichard Purdie
Handling of backfilling is trickier than you'd think. We need this to execute early enough that the user will see the changes in bitbake -e and other output yet late enough that the virtclass extensions have changed the tunes before it executes. It makes more sense to execute this at anonymous python time now bitbake -e correctly handles this and that unbreaks multilib corruption of these variables. [YOCTO #12373] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-03-04base: Don't print LICENSE warning for non-recipe contextRichard Purdie
Now bitbake is executing anonymous python fragments in bitbake -e, ensure we don't show the error in that context (where PN would be unchanged from default). Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-01-25classes/recipes: Convert SkipPackage -> SkipRecipeRichard Purdie
The new name is much more consistent with what this actually means. We put the pieces in place to rename everything a while back but looks like we forgot to actually do it! Fix that now. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-01-14base.bbclass: add automatic dependency on xz-native for .deb SRC_URIDariusz Pelowski
FetchMethod.unpack requires xz for unpacking of embedded data.tar.xz Signed-off-by: Dariusz Pelowski <dariusz.pelowski@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-01-12base.bbclass: drop legacy armv7a-vfp-neon TUNE_PKGARCH renamingAndre McCurdy
ARM specific TUNE_PKGARCH renaming was adding in 2011 handle the transition from armv7a -> armv7a-vfp-neon: http://git.openembedded.org/openembedded-core/commit/?id=08c0b7060009113e8dffdef51ff6b9b4b7f28894 Active package feeds should now have long since updated to the new naming. For example, Angstrom stopped using on the legacy naming in 2012: https://github.com/Angstrom-distribution/meta-angstrom/commit/2e33fb5bd08edda6457dd211f4ff4ec4aad9d85d Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-21base: add automatic dependency on xz-native for .txz SRC_URIAndré Draszik
.txz is .tar.xz, so add it, as this can actually be found in the wild. Signed-off-by: André Draszik <git@andred.net> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-11-10base.bbclass: increase indent in get_layers_branch_rev() and buildcfg_vars()Andre McCurdy
Although it may not appeal so much to users to prefer 80x24 consoles, the general trend is for screens to get bigger and the current output has started to look a little cramped on a modern HD display. Increasing from 17 to 20 is obviously arbitrary, but does give enough space to cleanly display layers such as "meta-nodejs-contrib" and "meta-virtualization" while still keeping the output fairly compact. Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-11-08base.bbclass: use d instead on e.dataLeonardo Sandoval
According to the bitbake documentation, the "d" global datastore should be used instead of "e.data" because the latter is deprecated. Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-07-21base.bbclass: Make .jar file depend on unzip-nativeRicardo Ribalda Delgado
Unzip is required for jar files. Without this patch: ERROR: junit4-4.3.1-r0 do_unpack: Unpack failure for URL: 'http://downloads.sourceforge.net/junit/junit-4.3.1-src.jar'. Unpack command PATH="/var/lib/jenkins/workspace/qt5122-dyspro/build/tmp/sysroots-uninative/x86_64-linux/usr/bin ......." unzip -q -o '/var/lib/yocto/downloads/junit-4.3.1-src.jar' failed with return value 127 Suggested-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-07-21classes/base: set do_unpack dependencies for rpm filesPaul Eggleton
If we're unpacking any rpm (not just .src.rpm) then we'll need to call rpm2cpio.sh. As of OE-Core rev a7da1aade118d1ccf1b286f82556cd9f706bd2a4 that script no longer uses file-native, but there is a chance that the rpm file will be compressed internally using xz (for example, rpms from Fedora) and therefore the script will need xzcat provided xz-native. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-06base: Add MultiConfigParsed handler to deal with unstable build signaturesRichard Purdie
This uses the newly added MultiConfigParsed event to handle problems where checksums in multiconfig build were not fuctioning as expected. The issue arises around SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS which contains entries like: * gcc-cross-${TARGET_ARCH}->virtual/${TARGET_PREFIX}libc-for-gcc * gcc-cross-${TARGET_ARCH}->linux-libc-headers These need to be expanded in the multiconfig data store but then placed into the shared main datastore used by the siggen code. The only other alternative would be a siggen instance for each multiconfig however that seemed even more complex and invasive. In real world usage, this issue would mean a qemux86 base config with other armv5 and armv7 configs (e.g. beaglebone and qemuarm) would try and build gcc-cross twice since dependencies normaly excluded (e.g. linux-libc-headers) would now be included. This breaks sstate reuse as well as breaking builds unless separate tmpdirs are used. This patch adds all the entries for each multiconfig. Whilst there may be duplicates, this shouldn't be an issue. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28base.bbclass: extend PACKAGECONFIG to also allow RRECOMMENDSAndré Draszik
It can be useful to add RRECOMMENDS to packages created, based on certain PACKAGECONFIGs. In particular where a package depends on certain linux kernel infrastructure (kernel modules) which might or might not be built as a module, being able to RRECOMMENDS instead of RDEPENDS on the relevant packages avoids build failures in case those modules are built statically into the kernel, i.e. in case no package is being created for them. Add another field to the PACKAGECONFIG syntax to achieve just that. Signed-off-by: André Draszik <adraszik@tycoint.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-05-12base: Simplify BASEDEPENDS constructionRichard Purdie
This code dates from distant times before we had class overrides. The comments are also rather stale. Rewrite this code using class overrides which makes it safer, more modern and more easily understandable. 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-03-30base.bbclass: ensure HOSTTOOLS links point to executablesRoss Burton
Use the new executable argument to bb.utils.which() to ensure that the symlinks point to executable files and not for example directories with the right name which happened to be on $PATH. [ YOCTO #11256 ] Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-16classes/base: reformat HOSTTOOLS errorPaul Eggleton
Adjust the message slightly to make it clearer, in particular mentioning the HOSTTOOLS variable. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> 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-08base.bbclass: improve wording when skipping recipes with incompatible licensesAndre McCurdy
The previous wording, e.g. ERROR: wget was skipped: incompatible with license GPLv3 isn't very clear and could be taken to imply that the recipe is incompatible with its own license. Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-03-01base.bbclass: Fix OE_IMPORTSJoshua Watt
Udpate OE_IMPORTS to include oe.license because it is being used. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-02-15classes: Drop now unneeded update_data callsRichard Purdie
Now that the datastore works dynamically we don't need the update_data calls so we can just remove them. They're not actually done anything at all for a while. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>