summaryrefslogtreecommitdiffstats
path: root/meta/classes
AgeCommit message (Collapse)Author
2019-09-16classextend.py: don't extend file for file dependencyChangqing Li
Fix error like: lib32-e2fsprogs-1.45.3-r0 do_package_qa: QA Issue: /usr/sbin/e2scrub_all contained in package lib32-e2fsprogs-e2scrub requires /bin/bash, but no providers found in RDEPENDS_lib32-e2fsprogs-e2scrub For some lib32 packages(eg: lib32-bash, lib32-sed) which probvides files, extend is not needed Eg: RPROVIDES of lib32-bash expects to have /bin/bash, with original extend, it will become lib32-/bin/bash, then will cause above error Fix by don't extend file dependency, and skip multilib check for file dependency in do_package_qa to avoid error like: WARNING: lib32-bash-5.0-r0 do_package: QA Issue: lib32-bash package lib32-bash - suspicious values '/bin/bash /bin/sh' in RPROVIDES [multilib] (From OE-Core rev: a9163120ed52534e7dbf4db50dc2b03bbf69f06b) Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-16nativesdk.bbclass: Clear out LIBCEXTENSION and ABIEXTENSIONKhem Raj
These variables dont make sense for nativesdk targets which essentially are target only properties, this helps in avoiding recompile of nativesdk-libgcc-initial when switch libcs. nativesdk targets are glibc only for OE (From OE-Core rev: aff2d1264030a8061fc1b31dae0f369bfd76826b) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-16icecc: blacklist pixmanTim Blechmann
pixman declares prng_state as `omp threadprivate`, causing linker errors: prng_state: TLS reference mismatches non-TLS reference (From OE-Core rev: a95953fccc7c05650710e45103c3e9fa06d1ff4d) Signed-off-by: Tim Blechmann <tim@klingt.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-16populate_sdk_base.bbclass: nativesdk-glibc-locale is required on musl tooKhem Raj
musl based extensible sdk fails to install ERROR: OE-core's config sanity checker detected a potential misconfiguration. Either fix the cause of this error or at your own risk disable the checker (see sanity.conf). Following is the list of potential problems / advisories: Your system needs to support the en_US.UTF-8 locale. The real reason is that its missing locale-archive in buildtools-tarball hence python3 from buildtools-tarball fails to run bitbake when installing esdk (From OE-Core rev: c6e8e13f910544b2a4435d8b9e6dbc65847ef182) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-11chrpath.bbclass: Add break_hardlinks kwarg to allow breaking hardlinksNathan Rossi
Add the break_hardlinks kwarg to break hardlinks when modifying files. This uses the bb.utils.break_hardlinks function to break hardlinks. The default is to maintain existing behaviour and leave hardlinks in place. (From OE-Core rev: 7628f6bdb5704c018d83e284364994b72557eaa5) Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-07python3native, pythonnative: export PYTHON_LIBRARY and PYTHON_INCLUDE_DIRKhem Raj
packages can use find_package(PythonInterp REQUIRED) find_package(PythonLibs REQUIRED) while we control PYTHON pointing to native py3 the libs and include directories will then point to build host version, which can result in unexpected combination and if we are lucky we get errors if its quite different e.g. py2 libs/includes and py3 executable This variable can be then used to export PYTHON_LIBRARY and PYTHON_INCLUDE_DIR so that above find_packages can work correctly see [1] for how it happens in cmake LLDB uses it see [2] [1] https://github.com/Kitware/CMake/blob/master/Modules/FindPythonLibs.cmake [2] https://github.com/llvm/llvm-project/blob/master/lldb/cmake/modules/LLDBConfig.cmake#L226 (From OE-Core rev: e45c06fe6f9a21c2cd06ae003cb112556382f81e) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-06Revert "kernel.bbclass: adjust a condition checking"Jason Wessel
This reverts commit 6676411fccff2d331878e4ca1f9411aafb056a80. This revert restores the original code and adds a comment. The commit that was reverted broke a number of wic templates and tools which rely on the initramfs creation dependency and the case where the INITRAMFS_IMAGE_BUNDLE is not set. If an end user does not want the INITRAMFS_IMAGE generated, it should be set to "". [ Issue: LIN1019-1791 ] (From OE-Core rev: ab61a11623ac0a25ba1c98d686c79815abab573f) Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-06autotools: always include config_site.d files in CONFIG_SITEDan Callaghan
Fixes: https://bugzilla.yoctoproject.org/show_bug.cgi?id=13375 (From OE-Core rev: e60c170b451a4aa561d08bfce97dca05508c2106) Signed-off-by: Dan Callaghan <dan.callaghan@opengear.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-06package.bbclass: allow shell-style wildcards in PRIVATE_LIBSAlexander Kanavin
PRIVATE_LIBS is used to exclude 'private' libraries from getting added to automatic runtime dependency resolution. This variable currently has to list all libraries by name, which becomes a maintenance issue if the list of such libraries frequently changes, or is very large. This change allows using shell-style wildcards in the variable, similar to how FILES lists what gets packaged. (From OE-Core rev: 732db32714c208d8eeeb90308926dc886ef7b791) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-06archiver.bbclass: Do not archive srpm's if there are no package tasksNathan Rossi
Do not attempt to archive recipes which have no packaging tasks (e.g. inherits nopackages). (From OE-Core rev: 8618425e3f5a095a4fd409029c46e770c9526eee) Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-06Clean up remnants of glibc-initialNathan Rossi
Remove remnants of the glibc-initial recipe. (From OE-Core rev: 332b1e21db3e0cbeeb14f12dd6aeedb89b76d761) Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-03rm_work: Remove redundant 'after' in addtask statementJacob Kroon
Introduced in commit b3de5d5795767a4b8c331fa5040166e7e410eeec. (From OE-Core rev: bad3918467cc979f278a70a00e828704ef885fd4) Signed-off-by: Jacob Kroon <jacob.kroon@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-01image.bbclass: Fix debug output for rootfs sizeDaniel Klauer
The debug output showed the wrong variable. (From OE-Core rev: 9b404c24ddc6212576b78c9fc56c57baa0fb3745) Signed-off-by: Daniel Klauer <daniel.klauer@gin.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-28rootfs-postcommands.bbclass: add inittab tweak to read_only_rootfs_hook()Andre McCurdy
It's not clear that we actually need to call mount -o remount,XX from the busybox-inittab inittab at all, but as we currently do, let's respect read-only-rootfs in IMAGE_FEATURES and not remount / as rw. (From OE-Core rev: 8840a831d47a94f36bb2e173164dbaf9b955e809) Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-28icecc: blacklist systemtapTim Blechmann
compiling systemtap with icecc causes the following build failure > build/tmp/work/silvermont-64-poky-linux/systemtap/4.0-r0/recipe-sysroot/usr/include/python3.7m/modsupport.h:120:66: note: in definition of macro 'PyModule_AddIntMacro' > HelperSDT/_HelperSDT.c:145:34: error: 'PyTrace_RETURN' undeclared (first use in this function); did you mean 'PyTrace_C_RETURN'? (From OE-Core rev: 66719424096eb0d3470647579364efe1556dc7b6) Signed-off-by: Tim Blechmann <tim@klingt.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-21libc-package.bbclass: Split locale hard link processing into two partsJason Wessel
The locale-processing in cross-localedef was proven to be unsafe to run in parallel due to the way it tried to make hard links to files that could disappear before the link operation was completed. To avoid corruption of the pseudo database, and create a deterministically generated link tree, the operation of the locale generation and the hard link resolution have been split into two separate parts. A side effect of this change is that the do_package() rule for glibc-locale will be slightly smaller because some of the hard links were missed in the past, particularly if you had a lot of cpus free to perform the work. Before the patch: % du -sk locale-tree 312524 locale-tree With the patch: % du -sk locale-tree 290772 locale-tree A number of comparisons were performed such as diffing the output, cross checking the link references using tar's listing output, and comparing against the results with out a parallel build to ensure the locale-tree is correct in its final form. [YOCTO #11299] [YOCTO #12434] (From OE-Core rev: 93d935927dd0ec0fa6f0a80a71236a7b00a5d1a4) Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-21package: Fix race between do_package and do_packagedataRichard Purdie
do_package has PKGDESTWORK as a cleandir and do_packagedata has it as an sstate-input dir. This means do_package wipes out the directory at both do_package and do_package_setscene. do_package_setscene and do_packagedata_setscene can run in parallel when installing from sstate which means they can wipe out parts of each other leading to interesting build failures. We therefore have to add in a hardlink copy so that the directories can work independently of each other. (From OE-Core rev: 692b2046bb60806ee6bbde6ba15bd1637b00efb1) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-21systemd.bbclass: Limit rm_sysvinit_initddir and rm_systemd_unitdir to target ↵Khem Raj
alone These postfuncs cause native recipes to rebuild when changing system init provider between sysvinit and systemd. Some of these native recipes are pretty early in dependency chain ( e.g. util-linux ) which can casue rebuild of pretty much everything including compiler. Found with bitbake-diffsigs Hash for dependent task python/python3_3.7.4.bb:do_prepare_recipe_sysroot:virtual:native:/mnt/a/yoe/sources/openembedded-core/meta/recipes-devt ools/python/python3_3.7.4.bb changed from 2a45fe0cd0d3640a88c4a5c8b1880c4e9a089cc7446a91d2a920c1cef6fa916a to bc2a0921cce50da1b7be3b59a3d8211ec 2a31262493ffa5909acbb7116fad3bf Hash for dependent task util-linux/util-linux_2.34.bb:do_populate_sysroot:virtual:native:/mnt/a/yoe/sources/openembedded-core/meta/recipes- core/util-linux/util-linux_2.34.bb changed from 15d6e165f025f10c2c455df8a875cafe021eaed4214c793e708d4827a58ca89d to 54e542d5da99cacfc9290ef5d27 9de50bdcb9195f67ae6dfff59fe41d10f7bd2 Hash for dependent task util-linux/util-linux_2.34.bb:do_install:virtual:native:/mnt/a/yoe/sources/openembedded-core/meta/recipes-core/ util-linux/util-linux_2.34.bb changed from e25b1119ce8dd7ca43fbd2db771e04fa6ff6b9d701fd78ac6c443224b036ed9f to bb5b172a83e7edd272402a9dcd80c4e1 29aa1ecb824c2cfa388086cfed24fef5 basehash changed from 62df6610eab9c1b1a17d7132943507641c8538690f26186843c86144d4598e64 to 80471f7c0bded9d1b593da69708b0e0f10882db08 5e1bf769edb3018e6c744d0 Variable rm_sysvinit_initddir value changed: @@ -11,4 +11,4 @@ shutil.rmtree(sysv_initddir) DISTRO_FEATURES{systemd} = Unset -DISTRO_FEATURES{sysvinit} = Set +DISTRO_FEATURES{sysvinit} = Unset (From OE-Core rev: f2d60e0f6a8e93cb0779f4719e58b99ad01fb954) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-14uboot: fixes to uboot-extlinux-config attribute valuesWill Page
The way this class uses overrides to support generation of multiple sections is subject to two different issues: 1) labels that conflict with existing override names causing the value for the conflicting label to be set for all labels, and 2) reusing the override list through each iteration, prepending each new label to the list of overrides makes earlier labels' value take precedence over later labels, making later labels virtually impossible to customize. The first issue is resolved by removing all label names from overrides before iterating over labels. The second issue is resolved by generating a fresh list of overrides with only the current label added. The current label is also appended to the list of overrides instead of prepended, which makes it the highest priority override. This is matches the behavior of devtool-source.bbclass, which similarly monkey-patches overrides. Closes https://bugzilla.yoctoproject.org/show_bug.cgi?id=13469 . (From OE-Core rev: 42b44fdd9e63b8d39cf83baecec08328275558ff) Signed-off-by: Will Page <wpage@polysync.io> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-14linuxloader: Add entries for riscv64Khem Raj
(From OE-Core rev: 1cd6ffcabea2036fde6493f75687e546c6fe003c) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-14insane.bbclass: in file-rdeps do not look into RDEPENDS recursivelyAlexander Kanavin
Recursive RDEPENDS resolution requires that all of the dependent recipes' packaging has completed. There is no mechanism to ensure that and therefore races were observed. This change effectively requires recipes to list their runtime file dependencies explicitly rather than have them pulled indirectly. This may require a bit of fixing in layers, but should result in a better definition of runtime file dependencies. (From OE-Core rev: 08e2b5a31b23b98459479caf6ec5f5c6fc19d57a) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-13icecc.bbclass: catch subprocess.CalledProcessErrorMartin Jansa
* this might be related to: commit d2fcaeb153fdc3f8d7143ea823139f1537055ff1 Author: Douglas Royds <douglas.royds@taitradio.com> Date: Thu Dec 20 11:59:47 2018 +1300 icecc: Don't generate recipe-sysroot symlinks at recipe-parsing time * it's still a bit unclear when and why this happends, but I'm seeing random tasks sometimes failing with: WARNING: Exception during build_dependencies for set_icecc_env WARNING: Error during finalise of /build/meta-oe/meta-python/recipes-devtools/python/python-markupsafe_1.0.bb ERROR: Traceback (most recent call last): File "/build/bitbake/lib/bb/data_smart.py", line 411, in expandWithRefs s = __expand_python_regexp__.sub(varparse.python_sub, s) File "/build/bitbake/lib/bb/data_smart.py", line 136, in python_sub value = utils.better_eval(codeobj, DataContext(self.d), {'d' : self.d}) File "/build/bitbake/lib/bb/utils.py", line 421, in better_eval return eval(source, ctx, locals) File "Var <set_icecc_env>", line 1, in <module> File "/build/oe-core/meta/classes/icecc.bbclass", line 287, in icecc_get_and_check_tool link_path = icecc_get_tool_link(t, d) File "/build/oe-core/meta/classes/icecc.bbclass", line 246, in icecc_get_tool_link return subprocess.check_output("readlink -f %s" % tool, shell=True).decode("utf-8")[:-1] File "/usr/lib/python3.6/subprocess.py", line 336, in check_output **kwargs).stdout File "/usr/lib/python3.6/subprocess.py", line 418, in run output=stdout, stderr=stderr) subprocess.CalledProcessError: Command 'readlink -f /build/BUILD/work/qemux86-oe-linux/python-markupsafe/1.0-r0/recipe-sysroot-native/usr/bin/x86_64-oe-linux/x86_64-oe-linux-g++' returned non-zero exit status 1. The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/build/bitbake/bin/bitbake-worker", line 239, in child the_data = bb_cache.loadDataFull(fn, appends) File "/build/bitbake/lib/bb/cache.py", line 327, in loadDataFull bb_data = self.load_bbfile(virtualfn, appends, virtonly=True) File "/build/bitbake/lib/bb/cache.py", line 340, in load_bbfile datastores = parse_recipe(bb_data, bbfile, appends, mc) File "/build/bitbake/lib/bb/cache.py", line 303, in parse_recipe bb_data = bb.parse.handle(bbfile, bb_data) File "/build/bitbake/lib/bb/parse/__init__.py", line 107, in handle return h['handle'](fn, data, include) File "/build/bitbake/lib/bb/parse/parse_py/BBHandler.py", line 142, in handle return ast.multi_finalize(fn, d) File "/build/bitbake/lib/bb/parse/ast.py", line 386, in multi_finalize finalize(fn, d) File "/build/bitbake/lib/bb/parse/ast.py", line 351, in finalize bb.parse.siggen.finalise(fn, d, variant) File "/build/bitbake/lib/bb/siggen.py", line 147, in finalise taskdeps = self._build_data(fn, d) File "/build/bitbake/lib/bb/siggen.py", line 118, in _build_data tasklist, gendeps, lookupcache = bb.data.generate_dependencies(d) File "/build/bitbake/lib/bb/data.py", line 388, in generate_dependencies deps[dep], values[dep] = build_dependencies(dep, keys, shelldeps, varflagsexcl, d) File "/build/bitbake/lib/bb/data.py", line 317, in build_dependencies value, parsedvar = d.getVarFlag(key, "_content", False, retparser=True) File "/build/bitbake/lib/bb/data_smart.py", line 802, in getVarFlag parser = self.expandWithRefs(value, cachename) File "/build/bitbake/lib/bb/data_smart.py", line 424, in expandWithRefs raise ExpansionError(varname, s, exc).with_traceback(tb) from exc File "/build/bitbake/lib/bb/data_smart.py", line 411, in expandWithRefs s = __expand_python_regexp__.sub(varparse.python_sub, s) File "/build/bitbake/lib/bb/data_smart.py", line 136, in python_sub value = utils.better_eval(codeobj, DataContext(self.d), {'d' : self.d}) File "/build/bitbake/lib/bb/utils.py", line 421, in better_eval return eval(source, ctx, locals) File "Var <set_icecc_env>", line 1, in <module> File "/build/oe-core/meta/classes/icecc.bbclass", line 287, in icecc_get_and_check_tool link_path = icecc_get_tool_link(t, d) File "/build/oe-core/meta/classes/icecc.bbclass", line 246, in icecc_get_tool_link return subprocess.check_output("readlink -f %s" % tool, shell=True).decode("utf-8")[:-1] File "/usr/lib/python3.6/subprocess.py", line 336, in check_output **kwargs).stdout File "/usr/lib/python3.6/subprocess.py", line 418, in run output=stdout, stderr=stderr) bb.data_smart.ExpansionError: Failure expanding variable set_icecc_env, expression was if [ "${@use_icecc(bb, d)}" = "no" ] then return fi ICECC_VERSION="${@icecc_version(bb, d)}" if [ "x${ICECC_VERSION}" = "x" ] then bbwarn "Cannot use icecc: could not get ICECC_VERSION" return fi ICE_PATH="${@icecc_path(bb, d)}" if [ "x${ICE_PATH}" = "x" ] then bbwarn "Cannot use icecc: could not get ICE_PATH" return fi ICECC_BIN="${@get_icecc(d)}" if [ -z "${ICECC_BIN}" ]; then bbwarn "Cannot use icecc: icecc binary not found" return fi if [ -z "$(which patchelf patchelf-uninative)" ]; then bbwarn "Cannot use icecc: patchelf not found" return fi # Create symlinks to icecc in the recipe-sysroot directory mkdir -p ${ICE_PATH} if [ -n "${KERNEL_CC}" ]; then compilers="${@get_cross_kernel_cc(bb,d)}" else compilers="x86_64-oe-linux-gcc x86_64-oe-linux-g++" fi for compiler in $compilers; do ln -sf ${ICECC_BIN} ${ICE_PATH}/$compiler done ICECC_CC="${@icecc_get_and_check_tool(bb, d, "gcc")}" ICECC_CXX="${@icecc_get_and_check_tool(bb, d, "g++")}" # cannot use icecc_get_and_check_tool here because it assumes as without target_sys prefix ICECC_WHICH_AS="${@bb.utils.which(os.getenv('PATH'), 'as')}" if [ ! -x "${ICECC_CC}" -o ! -x "${ICECC_CXX}" ] then bbwarn "Cannot use icecc: could not get ICECC_CC or ICECC_CXX" return fi ICE_VERSION=`$ICECC_CC -dumpversion` ICECC_VERSION=`echo ${ICECC_VERSION} | sed -e "s/@VERSION@/$ICE_VERSION/g"` if [ ! -x "/build/BUILD/work/qemux86-oe-linux/python-markupsafe/1.0-r0/recipe-sysroot-native/usr/bin/icecc-create-env" ] then bbwarn "Cannot use icecc: invalid ICECC_ENV_EXEC" return fi ICECC_AS="`${ICECC_CC} -print-prog-name=as`" # for target recipes should return something like: # /OE/tmp-eglibc/sysroots/x86_64-linux/usr/libexec/arm920tt-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/4.8.2/as # and just "as" for native, if it returns "as" in current directory (for whatever reason) use "as" from PATH if [ "`dirname "${ICECC_AS}"`" = "." ] then ICECC_AS="${ICECC_WHICH_AS}" fi if [ ! -f "${ICECC_VERSION}.done" ] then mkdir -p "`dirname "${ICECC_VERSION}"`" # the ICECC_VERSION generation step must be locked by a mutex # in order to prevent race conditions if flock -n "${ICECC_VERSION}.lock" \ /build/BUILD/work/qemux86-oe-linux/python-markupsafe/1.0-r0/recipe-sysroot-native/usr/bin/icecc-create-env "${ICECC_CC}" "${ICECC_CXX}" "${ICECC_AS}" "${ICECC_VERSION}" then touch "${ICECC_VERSION}.done" elif ! wait_for_file "${ICECC_VERSION}.done" 30 then # locking failed so wait for ${ICECC_VERSION}.done to appear bbwarn "Timeout waiting for ${ICECC_VERSION}.done" return fi fi # Don't let ccache find the icecream compiler links that have been created, otherwise # it can end up invoking icecream recursively. export CCACHE_PATH="$PATH" export CCACHE_DISABLE="1" export ICECC_VERSION ICECC_CC ICECC_CXX export PATH="$ICE_PATH:$PATH" bbnote "Using icecc path: $ICE_PATH" bbnote "Using icecc tarball: $ICECC_VERSION" which triggered exception CalledProcessError: Command 'readlink -f /build/BUILD/work/qemux86-oe-linux/python-markupsafe/1.0-r0/recipe-sysroot-native/usr/bin/x86_64-oe-linux/x86_64-oe-linux-g++' returned non-zero exit status 1. ERROR: Task (virtual:multilib:lib32:/build/meta-oe/meta-python/recipes-devtools/python/python-markupsafe_1.0.bb:do_patch) failed with exit code '1' (From OE-Core rev: 577919d71f9be3de851c653e6981d715b37042ea) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-12image_types_wic.bbclass: Copy the .wks and .env files to deploy image dirJason Wessel
When using a .wks.in file, the only place that the generated .wks file exists in the tmp/work area. A copy should be left behind in the deploy directory so that you can easily run the wic tool to re-generate or modify a new image without running bitbake. Custom .wks.in files can reference any number of bitbake variables, so it is important to save the result. below is an example of using the generated .wks file in the deploy area. The full name of my generated .wks file was core-image-minimal-ostree-uboot-ab.wks, but since you usually only have a single .wks file per image you can use a wild card like: cd tmp*/deploy/images/* wic create --vars . -e core-image-minimal -s -m core-image-minimal-*.wks (From OE-Core rev: 42293d75404486e20db9f7a80d0d1756887b576d) Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-12deb: allow custom dpkg commandTim Blechmann
trying to reduce the turnaround times for local builds, i'm trying to find a way to inject `-Zgzip -z1` into the dkpg-deb command line. attached patch introduces a `DPKG_BUILDCMD` variable for this purpose. (i'm not very familiar with the whole bitbake infrastructure, so i'm wondering: do i have to add it to the `vardeps` of do_package_deb?) tia, tim >From 62d4930d307d5d07844889001e8a1c3111b72b98 Mon Sep 17 00:00:00 2001 From: Tim Blechmann <tim@klingt.org> Date: Thu, 8 Aug 2019 06:48:54 +0200 Subject: [PATCH] package_deb: allow dpkg-deb to be customized via DPKG_BUILDCMD the command line to invoke `dpkg-deb` is hardcoded. there are certain use cases where we want to tweak how debian packages are compiled: e.g. the default uses xz compression, which is rather CPU intensive. for local builds one might want to pass `-Zgzip -z1` to favor speed over compression ratio. we therefore introduce a `DPKG_BUILDCMD` variable which allows downstream code to customize how dpkg-deb is executed (From OE-Core rev: 4e00ceaf38f2ae338e3b192c3485aaa963f54b99) Signed-off-by: Tim Blechmann <tim@klingt.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-08mesa,llvm,meson: Update llvm to 8.0.1 plus define and use LLVM version globallyKhem Raj
- Add missing dependency on libedit - Define LLVMVERSION on the same lines as GCCVERSION and other tools - Use LLVMVERSION in mesa and meson.bbclass to get llvm version instead of hardcoding it - Use llvm patches unmodified from meta-clang, helps in keeping them in sync - Define PREFERRED_VERSION for llvm, llvm-native, nativesdk-llvm (From OE-Core rev: 3c08b638348abd543fc92baf56c28ca16ae6aac6) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-06license_image.bbclass: drop invalid commentsMing Liu
These comments are not valid any more, drop them. (From OE-Core rev: 39f5a3030a97bdf567ee11091dd4e95ef04585d7) Signed-off-by: Ming Liu <liu.ming50@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-06sstate/sstatesig: Update to new form of BB_HASHCHECK_FUNCTIONRichard Purdie
Bitbake has updated to a cleaned up form of BB_HASHCHECK_FUNCTION, adapt to this cleanup. This is an API breaking change. (From OE-Core rev: a4d413d8d809132b0e0a5dd673a36e2bd0e0be4c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-06sanity: update for new bb.build.exec_func() behaviourRoss Burton
The pythonexception argument is no more, and passing True is the new behavior. [ YOCTO #13468 ] (From OE-Core rev: b7a34d2b8d684e5b98f5c286de67dc1b5d8df853) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-06classes/lib: Remove bb.build.FuncFailedRichard Purdie
Whilst seemingly a good idea, this exception doesn't really serve any purpose that bb.fatal() doesn't cover. Wrapping exceptions within exceptions isn't pythonic. Its not used in many places, lets clean up those and remove usage of it entirely. It may ultimately be dropped form bitbake entirely. (From OE-Core rev: efe87ce4b2154c6f1c591ed9d8f770c229b044ad) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-03sstate: Reduce race windowsRichard Purdie
When we write to the sstate directory we try to do so atomically so consumers either see one version or another but never an imcomplete file. Unfortunately this is reliant on filesystem support and with some NFS configurations a replaced file would be lost from memory even if users held open descriptors. It makes sense to try and avoid replacing existing files where we can. (From OE-Core rev: 18cdc087fd5da30e2b31f3d4e81b153cd36ca844) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-03insane: check if the recipe incorrectly uses DEPENDS_${PN}Ross Burton
Some people mistakenly use DEPENDS_${PN} and wonder why the dependencies don't work. Check for this and tell the user to use DEPENDS. (From OE-Core rev: cfaa104955c4ad0aafbe5d59ef85e4a8e3526c69) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-03meson.bbclass: do not pass native compiler/linker flags via command lineAlexander Kanavin
With 0.51.0 version these command line options override what is in the cross file (e.g. the cross-flags). I could not determine what is the scenario when the native flags are needed (this would be building a native binary in the context of cross build). If we find such a scenario we would need to find a way to pass native flags through some other channel. (From OE-Core rev: 6239b77c78b4b584274019130b715f21ac9defdf) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-07-31classes/sstate: regenerate sstate when signing enabledJoshua Lock via Openembedded-core
This change ensures that the task signatures changes, and therefore sstate tasks are rerun, when signing is enabled. This has the positive outcome that if signing is enabled new signed shared state objects will be produced, rather than just signing shared state objects for tasks where no work has been performed yet. The downside of this change is that enabling/disabling sstate object signing alters the taskhash and results in rebuilding the world. (From OE-Core rev: ef60c65e3856682b90b17ae06a1b675756fd4496) Signed-off-by: Joshua Lock <jlock@vmware.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-07-31gnome: Remove the gnome classAdrian Bunk
All that was left was inherit gnomebase gtk-icon-cache gconf mime and especially inheriting the obsolete gconf is usually unwanted. (From OE-Core rev: ba4304bd269d14cb0df73d657901816293c993cc) Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-07-31kernel.bbclass: fix installation of modules signing certificatesDmitry Eremin-Solenikov
If one has provided external key/certificate for modules signing, Kbuild will skip creating signing_key.pem and will write only signing_key.x509 certificate. Thus we have to check for .x509 file existence rather than .pem one. (From OE-Core rev: 2527e731eba43bd36d0ea268aca6b03155376134) Signed-off-by: Dmitry Eremin-Solenikov <dmitry_eremin-solenikov@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-07-27image_types.bbclass: make gzipped images rsyncableDiego Rondini
Both gzip and pigz implement the --rsyncable option, allowing small changes to images to save a lot of data when they are transferred using rsync. This patch enables --rsyncable by default. (From OE-Core rev: b253101b9400cd12b80b6c5b7d1d0b01b31a6c6b) Signed-off-by: Diego Rondini <diego.rondini@kynetics.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-07-27classes/sstate: don't use unsigned sstate when verification enabledJoshua Lock via Openembedded-core
When signature verification of shared state objects is enabled (SSTATE_VERIFY_SIG) use of an unsigned object, even though it produces a warning, seems unexpected. Instead skip unsigned objects and force the non-accelerated task to be run. (From OE-Core rev: 571235978d98552e3734bf382454dd51272db782) Signed-off-by: Joshua Lock <jlock@vmware.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-07-27sstate: fix log messageJoshua Lock via Openembedded-core
Referring to the sstate object as a staging package is an artefact of the code's origins. Switch to referring to an "Sstate package" in order to be more accurate and consistent with the rest of the file. (From OE-Core rev: 06559c1ed86dbce53505f9ed98111fe9d0b97ed7) Signed-off-by: Joshua Lock <jlock@vmware.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-07-26package: Improve determinismRichard Purdie
Its possible in cases with multiple shlib providers we were not being deterministic. Add in a couple of sorted() calls to fix the shlibs and pkgconfig cases with this potential issue. (From OE-Core rev: 5b9a4214ee17e1a39dd5a1742f2ac5ed25a11310) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-07-26image_types_wic: add syslinux-native dependency conditionalNaveen Saini
Add syslinux-native dependency only for IA host machines. Able to build wic image successfully for below template which uses legacy bios(syslinux): https://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/scripts/lib/wic/canned-wks/directdisk-gpt.wks [YOCTO #13276] (From OE-Core rev: 7e2ee2b59319e1d2c185d65de47cc8f5c048dd03) Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-07-26kernel-uboot: remove useless special casing of arm64 ImageBedel, Alban
Since commit a725d188b5 (kernel-uboot: compress arm64 kernels) arm64 Image files are handled exactly like in the default case, making this special case pointless. Remove it to make the code simpler. (From OE-Core rev: 60bc7e180e2d44ac026e5537552a567784dc506a) Signed-off-by: Alban Bedel <alban.bedel@aerq.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-07-26image_types: Remove remnants of hdddirectDaniel Ammann
hdddirect was removed in commit 929ba563f1bc7195c4981b8e139c432b2cc388ea. (From OE-Core rev: 7a91a9818057d69cba32db2428ffc1a1ebb3876e) Signed-off-by: Daniel Ammann <daniel.ammann@bytesatwork.ch> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-07-22meson.bbclass: export STRIP=${BUILD_STRIP}Ross Burton
In Meson the environment variables are always the native tools, so export STRIP=${BUILD_STRIP} along with CC et al to silence this Meson warning: WARNING: Env var STRIP seems to point to the cross compiler. This is probably wrong, it should always point to the native compiler. (From OE-Core rev: 8d1557356d2c7d94eeef2a9b61d3c9622e337a9e) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-07-19cve-update-db-native: Remove hash column from database.Pierre Le Magourou
djb2 hash algorithm was found to do collisions, so the database was sometime missing data. Remove this hash mechanism, clear and populate elements from scratch in PRODUCTS table if the current year needs an update. (From OE-Core rev: 78de2cb39d74b030cd4ec811bf6f9a6daa003d19) Signed-off-by: Pierre Le Magourou <pierre.lemagourou@softbankrobotics.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-07-19cve-check: Replace CVE_CHECK_CVE_WHITELIST by CVE_CHECK_WHITELISTPierre Le Magourou
CVE_CHECK_WHITELIST does not contain version anymore, as it was not used. This variable should be set per recipe. (From OE-Core rev: 7069302a4ccbb5b72e1902f284cf078516fd7294) Signed-off-by: Pierre Le Magourou <pierre.lemagourou@softbankrobotics.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-07-18staging: Drop clean_recipe_sysrootRichard Purdie
With recent changes to runqueue, this fuction is unsafe as setscene tasks can run at the same time as normal ones and doing things before do_fetch no longer offers any guarantees. There is other code which cleans out things from the sysroots as tasks rerun so we should rely upon that instead. (From OE-Core rev: 27ce69861edb7e52078b59ebf8fefc9201e9a228) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-07-18cve-check: allow comparison of Vendor as well as ProductRoss Burton
Some product names are too vague to be searched without also matching the vendor, for example Flex could be the parser compiler we ship, or Adobe Flex, or Apache Flex, or IBM Flex. If entries in CVE_PRODUCT contain a colon then split it as vendor:product to improve the search. Also don't use .format() to construct SQL as that can lead to security issues. Instead, use ? placeholders and lets sqlite3 handle the escaping. (From OE-Core rev: e6bf90009877d00243417898700d2320fd87b39c) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-07-18cve-check.bbclass: initialize to_appendMikko Rapeli
Fixes build failure with core-image-minimal: Exception: UnboundLocalError: local variable 'to_append' referenced before assignment (From OE-Core rev: 270ac00cb43d0614dfe1c95f960c76e9e5fa20d4) Signed-off-by: Mikko Rapeli <mikko.rapeli@bmw.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-07-18kernel-fitimage: uboot-sign: fix missing signatureJun Nie
u-boot.bin with dtb & signature should be placed in ${B} so that it can be deployed by u-boot as expected. Otherwise, the version without signature is installed. (From OE-Core rev: bfc8c964a9760a2c4a1d1902918908a1e7361c17) Signed-off-by: Jun Nie <jun.nie@linaro.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-07-17wic: add support for kernel with initramfs bundledChee Yang Lee
when INITRAMFS_IMAGE_BUNDLE and INITRAMFS_IMAGE are set, wic should look for kernel with initramfs image bundled. Include required variable MACHINE, INITRAMFS_IMAGE_BUNDLE, INITRAMFS_IMAGE, INITRAMFS_LINK_NAME and KERNEL_IMAGETYPE in WICVARS. No longer require default value for variable kernel as KERNEL_IMAGETYPE is not optional variable and included in WICVARS. image_types_wic to inherit kernel-artifact-names to obtain default INITRAMFS_LINK_NAME when INITRAMFS_IMAGE_BUNDLE are set. update wic.Wic2.test_image_env test case to filter optional variable INITRAMFS_LINK_NAME, INITRAMFS_IMAGE and INITRAMFS_IMAGE_BUNDLE. (From OE-Core rev: bac984fbb2d5ad5d13ba3275c8a3e878d8753c58) Signed-off-by: Chee Yang Lee <chee.yang.lee@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>