summaryrefslogtreecommitdiffstats
path: root/meta/classes
Commit message (Collapse)AuthorAgeFilesLines
...
* nativesdk: clear MACHINE_FEATURESDouglas2020-07-121-0/+1
| | | | | | | | | | Further to 96c20c9df7: Try to avoid nativesdk recipes accidentally being dependent on MACHINE_FEATURES. (From OE-Core rev: 956e5bd6862ca898143a234aa85cc83b1f2d1807) Signed-off-by: Douglas Royds <douglas.royds@taitradio.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cml1: Move find_cfgs() helper to cml1.bbclassRasmus Villemoes2020-07-121-0/+10
| | | | | | | | | | | | | u-boot.inc and busybox.inc contain identical copies of this little helper. They both inherit the cml1 class and use cml1_do_configure right after having used this helper, and other recipes that want to write similar logic for doing Kconfig via fragments will also need it or something equivalent. (From OE-Core rev: af687c9137a3e8efe48afa6fd12866cf656ae913) Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* ptest: append to FILESKonrad Weihmann2020-07-121-1/+1
| | | | | | | | | | | as ptest FILES could be determined before or after the classes was inherited, if is much safer to append to the setting of FILES_${PN}-ptest (From OE-Core rev: 419ad35ffe7f5199e49a246ef9854f0810ca1d6c) Signed-off-by: Konrad Weihmann <kweihmann@outlook.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: consolidate skipping of temporary do_package filesRoss Burton2020-07-121-5/+8
| | | | | | | | | | | | | | | During the course of do_package_rpm and friends the tools create a top-level CONTROL or DEBIAN directory in the package directory. do_package_qa needs to be aware of these files and ignore them, this was previously done in just one check but instead should be done once when building the file list so all the checks don't see the temporary files. [ YOCTO #13804 ] (From OE-Core rev: 4b2f45c47a5c8c800626f12c14f216a5ab923512) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* spdx: Remove the class as its obsoleteRichard Purdie2020-07-081-360/+0
| | | | | | | | | | | | The project is a strong supporter of SPDX but this class is old code using a dated approach which now misleads people. Remove it. The meta-sdpxscanner layer is a much more modern and active approach to handling this and we should be pointing people there. (From OE-Core rev: 871599bf76b3fb635efd416340803f7bf3341f7e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: make dependency on lzop-native conditionalTimon Ulrich2020-07-081-1/+2
| | | | | | | | | a native lzop is only needed when an lzo compressed initramfs is actually present (From OE-Core rev: 1217ddf070261c5fe523729b2a833bd38f1e4ccd) Signed-off-by: Timon Ulrich <t.ulrich@anapur.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* baremetal-image.bbclass: Create a class for baremetal applications or an RTOSAlejandro Hernandez2020-07-081-0/+99
| | | | | | | | | | | | | | | | Baremetal applications or an RTOS built with OpenEmbedded can share the same code to be built as an image, tested and packaged in case they can be updated as a firmware blob from Linux. This class creates the proper wiring to mimic OE Linux image creation and testing infrastructure, inheriting it makes the process of creating a baremetal application transparent to the developer deploying it automatically along with its required bits to be run and tested. (From OE-Core rev: 34df656e1d7070337f62c8fd9b2dc27491275416) Signed-off-by: Alejandro Hernandez Samaniego <alejandro@enedino.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: add gzip-native to do_deploy dependenciesMatt Madison2020-07-081-1/+1
| | | | | | | | | | | | | | | When a modules tarball is created during kernel_do_deploy, the tarball is compressed using gzip, but gzip-native is not a dependency so the build host's gzip is being used for this. Using gzip-native will, by default, use pigz instead of single-threaded gzip, making this task less of a bottleneck for builds with a large modules package. (From OE-Core rev: 1243aad78601e9a5c0a3471c8a105c429536599d) Signed-off-by: Matt Madison <matt@madison.systems> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel/yocto: fix search for defconfig from src_uriAndrey Zhizhikin2020-07-081-2/+3
| | | | | | | | | | | | | | | | | | | Fetcher provides full paths to defconfig and scc files, which awk comparison operator does not catch during construction of src_uri_defconfig and sccs_from_src_uri lists. This causes the src_uri_defconfig variable to come out empty, and fails further validation if defconfig is only supplied via SRC_URI. Replace comparison operator with awk match function which searches for sub-string during filtering, effectively placing defconfig from SRC_URI into src_uri_defconfig and scc files in sccs_from_src_uri respectively. Fixes: 23dcff0d396c (kernel/yocto: ensure that defconfigs are processed first) Cc: Bruce Ashfield <bruce.ashfield@gmail.com> (From OE-Core rev: f52ce0fa98bf3bd72df7467031001f3128c145f2) Signed-off-by: Andrey Zhizhikin <andrey.z@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/kernel: Use a copy of image for kernel*.rpm if fs doesn't support ↵Yanfei Xu2020-07-051-3/+19
| | | | | | | | | | | | | | | symlinks Some filesystems don't support symlink, then you will get failure when you install or update the kernel rpm package. Now we use a copy of image for these filesystems instead of symlink. Suggested-by: Bruce Ashfield <bruce.ashfield@gmail.com> Suggested-by: Richard Purdie <richard.purdie@linuxfoundation.org> (From OE-Core rev: bb946b8cdbd01408bfa0ba8e53f9e09931dfb29d) Signed-off-by: Yanfei Xu <yanfei.xu@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: add lz4 dependency and fix the call to lz4Timon Ulrich2020-07-051-1/+2
| | | | | | | | | | | | If the initramfs image is type lz4, then a native lz4 is needed. Additionally an output filename needs to be specified when calling lz4, otherwise STDOUT will be used implicitly. (From OE-Core rev: c83a7aec59defbbc049d44ba34a7a409ada4fa19) Signed-off-by: Timon Ulrich <t.ulrich@anapur.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/archive: do_configure should not depend on do_ar_patchedJoshua Watt2020-07-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The commit d4be264061 ("classes/archiver: run do_unpack_and_patch after do_preconfigure") correctly moved do_unpack_and_patch to depend on do_preconfigure, but left do_ar_patched as a dependency of do_configure introduced from 8a7c779487 ("classes/archiver: Create patched archive before configuring"). Having do_configure depend on do_ar_patched is blatantly wrong. Firstly, doing so causes the taskhash of do_configure to change which is undesirable. Secondly, the anon python that sets up the tasks carefully skips GCC recipes that depend on gcc-source to provide their source code since running do_unpack_and_patch in them would delete the source code. Adding in the dependency effectively bypasses this and makes these recipes delete the shared gcc-source This fixes errors (for real this time) like: cat: .../gcc/defaults.h: No such file or directory when making certain configuration changes. For posterity, you could easily reproduce gcc-source being erased by running the commands (replacing aarch64 with your correct target arch): bitbake -c cleanall gcc-source gcc-cross-aarch64 bitbake -c do_deploy_archives gcc-source # The following would fail because # gcc-cross-aarch64:do_unpack_and_patch erases shared source, so # do_configure after that fails. bitbake gcc-cross-aarch64 (From OE-Core rev: f02c1904330da47a25cf85f0077712f584f4ee5b) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rootfs-postcommands: Improve/fix rootfs_check_host_user_contaminatedRichard Purdie2020-07-031-4/+8
| | | | | | | | | | | | | | | Currently if the find command finds /home it stops checking the other files. Tweak the find expression to fix this. Also, from Alex Kiernan <alex.kiernan@gmail.com>, generate output for each contaminated path so it's visible in the main log file. When matches are found, dump the data from the group and passwd files so useful debugging can be done based on the results. (From OE-Core rev: 504f1d158bf7c6ad08fbce755021db2b14565231) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gtk-icon-cache.bbclass: add runtime dependencyChangqing Li2020-07-031-3/+16
| | | | | | | | | | | | | | | | | | | | | | fix error: + /usr/lib/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders --update-cache /var/tmp/rpm-tmp.mdYxY6: line 12: /usr/lib/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders: No such file or directory %post(adwaita-icon-theme-3.36.1-r0.0.noarch): waitpid(2961) rc 2961 status 7f00 warning: %post(adwaita-icon-theme-3.36.1-r0.0.noarch) scriptlet failed, exit status 127 when install adwaita-icon-theme on target, which inherit gtk-icon-cache above error reported, fix by add runtime dependency to pkgs we don't use explicit RDEPENDS, so fix do_rootfs breaking by adding it into DEPENDS. Error: Problem: conflicting requests - nothing provides gdk-pixbuf needed by adwaita-icon-theme-3.36.1-r0.noarch - nothing provides gtk+3 needed by adwaita-icon-theme-3.36.1-r0.noarch (From OE-Core rev: 31e3d34c8a9c3e8481aa837aa0bf52adf095fe62) Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/archiver: run do_unpack_and_patch after do_preconfigureJoshua Watt2020-07-021-2/+2
| | | | | | | | | | | | | | | | | | | | | The commit 8a7c779487 ("classes/archiver: Create patched archive before configuring") fixed a race condition when using the archiver, but introduced a bug where the GCC source would occasionally be deleted due to the archiving code running before do_preconfigure. Instead, make sure the archiving code runs after do_preconfigure by making do_unpack_and_patch depend on it. This makes more sense anyway since do_preconfigure is effectively an extension of do_patch. This fixes errors like: cat: .../gcc/defaults.h: No such file or directory when making certain configuration changes (From OE-Core rev: d4be264061023ae0ea6e023d82a7b99605bfc22c) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* deploy.bbclass: Clean DEPLOYDIR before do_deployDaniel Klauer2020-06-302-2/+1
| | | | | | | | | | | | | | | | | | | | | | do_deploy should clean up ${DEPLOYDIR} before running, just like do_install cleans up ${D} before running. This reduces the risk of DEPLOYDIR being accidentally contaminated by files from previous runs, possibly even with different config, in case of incremental builds. It is convenient to have this in deploy.bbclass, so it doesn't have to be duplicated in every recipe, considering for example meta-freescale, which has 23 affected recipes. All recipes using deploy.bbclass (grep -r 'inherit .*deploy') in poky, meta-openembedded and meta-freescale look like they either benefit from this or are at least not affected negatively by it. The only exception I've noticed was uboot-sign.bbclass, which was however fixed by the previous patch. (From OE-Core rev: 7083a7d56f4d90c81d2e6652ee291d20fd908bbe) Signed-off-by: Daniel Klauer <daniel.klauer@gin.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* uboot-sign: Refactor do_deploy prefunc to do_deploy_prependDaniel Klauer2020-06-301-5/+6
| | | | | | | | | | | | | | | | | When inherited by the u-boot recipe (UBOOT_PN), uboot-sign.bbclass adds a concat_dtb step, which places additional files into ${DEPLOYDIR} before do_deploy. By turning this from a prefunc into a part of the normal do_deploy function, it becomes possible to use do_deploy[cleandirs] = "${DEPLOYDIR}" in the future, without deleting the files produced by concat_dtb. As before, care is taken to not interfere with the kernel's do_deploy definition, since concat_dtb was only needed for u-boot. (From OE-Core rev: 17619c1a41fa961afc317e4aafab9cdc4ff14a49) Signed-off-by: Daniel Klauer <daniel.klauer@gin.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel/yocto: ensure that defconfigs are processed firstBruce Ashfield2020-06-301-12/+21
| | | | | | | | | | | | | | | | | | | | | It is uncommon that a BSP definition and a defconfig are used in a single configuration. That being said, it is a valid way to organize kernel configuration meta data. When a defconfig is used, either on the src_uri or from in the kernel tree, it is normally expected that it is the baseline, with all options applied on top of it. With this commit, we detect either type of defconfig and ensure that it is used first, followed by the fragments in their previous order. This allows existing configuration stacks to remain the same, while ensuring that a defconfig combined stack works as expected. (From OE-Core rev: e6845327b69396d843a2f3c4c3ac9400ae9caedf) Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* populate_sdk_ext: Fix to use python3, not pythonRichard Purdie2020-06-281-1/+1
| | | | | | | | | We should be using python3 here, it was missed in the conversion. Spotted on autobuilder tests failing on systems with python missing. (From OE-Core rev: db07b09196022078346aadd565760240b7da6a71) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: Fix Module.symvers supportLili Li2020-06-281-1/+1
| | | | | | | | | | | | | | | | | | Starting from v5.8-rc1 commit 269a535ca931 (modpost: generate vmlinux.symvers and reuse it for the second modpost"), kernel will generate new vmlinux.symvers instead of dumping all the vmlinux symbols into Module.symvers in the first pass. Error log: 'run.do_shared_workdir.16614' failed with exit code 1: DEBUG: cp: cannot stat 'Module.symvers': No such file or directory This change will check the file Module.symvers existence before copying it. (From OE-Core rev: cd2d62a08a1dfcd890a03ee55132b6d6c65f5ab7) Signed-off-by: Lili Li <lili.li@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* mime.bbclass: fix post install scriptlet errorChangqing Li2020-06-231-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | fix error during post uninstall: %postun(shared-mime-info-data-2.0-r0.4.corei7_64): execv(/bin/sh) pid 78 + '[' 0 = 0 ']' + set -e + '[' x '!=' x ']' + echo 'Updating MIME database... this may take a while.' Updating MIME database... this may take a while. + update-mime-database /usr/share/mime Directory '/usr/share/mime/packages' does not exist! %postun(shared-mime-info-data-2.0-r0.4.corei7_64): waitpid(78) rc 78 status 100 warning: %postun(shared-mime-info-data-2.0-r0.4.corei7_64) scriptlet failed, exit status 1 when run post uninstall scriptlet, /usr/share/mime/packages has been removed during unintall, while update-mime-database will check xml under /usr/share/mime/packages. workaround by create this dir before update, then remove it (From OE-Core rev: 6f262a316d6c32ff9ce96ab4bd95726772b5f20f) Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* qemu: uprev v4.2.0 -> v5.0.0Sakib Sajal2020-06-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Major update after v4.2. Changes: - os_find_datadir() was changed after the v4.2 release causing v5.0 to not find the bios and not boot the image. Fix is sent to upstream qemu. See: qemu/find_datadir.patch - v5.0 binary had host contamination for dynamically linked libraries, "--extra-ldflags='${LDFLAGS}'" in EXTRA_OECONF resolved the issue - bluetooth code was removed: qemu.git$ git show 1d4ffe8dc7 hence removed PACKAGECONFIG[bluez] - -show-cursor qemu option is now deprecated, updated scripts/runqemu to use updated option instead - added PACKAGECONFIG definitions - added qemu-ptest to conf/distro/include/ptest-packagelists.inc - increased support for ARM architecture, cpu and board - removed patches merged upstream and refreshed existing ones Testing: Build core-image-minimal against the machines in openembedded-core/meta/conf/machine and succesfully booted with qemu v5.0 Ran qemu-ptest on x86-64 and arm64 with identical results: PASS: 1166 SKIP: 0 FAIL: 0 (From OE-Core rev: ee9ec9e344541c1ccd9b9b8e3b8c1e00d008ad85) Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com> Signed-off-by: Joe Slater <joe.slater@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meson.bbclass: avoid unexpected operating-system namesAndreas M?ller2020-06-171-0/+3
| | | | | | | | | | | | | | For example 'linux-gnueabi' is not what meson consumers expect: See canonical table of OS names for Meson (thanks Ross). Surprisingly this did not pop up earlier but wrong system-name can break building as described in [1] [1] https://lists.openembedded.org/g/openembedded-core/topic/meson_host_machine_system/73023862 (From OE-Core rev: 010202076760329829fbde8dab4f535d6f755873) Signed-off-by: Andreas Müller <schnitzeltony@gmail.com> Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/archiver: Create patched archive before configuringJoshua Watt2020-06-171-1/+1
| | | | | | | | | | | | | | do_configure and do_preconfigure can modify source files, which causes race conditions if these tasks run in parallel with do_ar_patched. Add explicit task dependencies to ensure that do_ar_patched finishes before these tasks start. Specifically, this fixes a race condition with gcc-source where do_ar_patched races with do_preconfigure deleting gcc/gengtype-lex.c (From OE-Core rev: 8a7c7794870815030239e90b03e37ed302b7e885) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sign_rpm.bbclass: ignore thread countDaniel McGregor2020-06-171-0/+1
| | | | | | | | | | Similar to sign_ipk, ignore the number of threads used for signing RPMs. (From OE-Core rev: 77be5fd7df96ebd5a07bfaa3921c074ef8c470c7) Signed-off-by: Daniel McGregor <daniel.mcgregor@vecima.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* relocatable.bbclass: Avoid an exception if an empty pkgconfig dir existPeter Kjellerstedt2020-06-151-9/+11
| | | | | | | | | | | Rewrite relocatable_native_pcfiles() so that it can handle that any of the checked pkgconfig directories are empty without causing an exception. (From OE-Core rev: f9c5df6dc1c13e9b05ff1b47ad84ad339f6779a4) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: Check for feature check variables not being usedJacob Kroon2020-06-121-1/+11
| | | | | | | | | | Add a package QA check for wether any of the variables used by features_check.bbclass is set while not inheriting the class itself. (From OE-Core rev: c06489d102682504afe33f9fee3facd9628b3f57) Signed-off-by: Jacob Kroon <jacob.kroon@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* features_check: Warn if not usedJacob Kroon2020-06-121-0/+15
| | | | | | | (From OE-Core rev: 56c1fe3bc89af86a2524ed5b724fe74ba514acc5) Signed-off-by: Jacob Kroon <jacob.kroon@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* archiver: Capture git submodules in mirror archiverPaul Barker2020-06-091-7/+6
| | | | | | | | | | Using the new Fetch.expanded_urldata() function we can get URL data for all git submodules. (From OE-Core rev: d908ca51b72f4ba417e7573ae3d953535f53286c) Signed-off-by: Paul Barker <pbarker@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* features_check: Factorize code for checking featuresJacob Kroon2020-06-091-78/+32
| | | | | | | | | | | | The DISTRO/MACHINE/COMBINED features should be treated identically, so convert the expanded code to a loop. This fixes some of the COMBINED error messages which were previously referring to MACHINE features. There should be no functional changes. (From OE-Core rev: 051f6efd1b2d5c8c11ab91a75a34f6dc04caf211) Signed-off-by: Jacob Kroon <jacob.kroon@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/buildhistory: capture package configJan Luebbe2020-06-041-0/+3
| | | | | | | | | | | | As the PACKAGECONFIG variable has a large influence on the resulting package sizes and dependencies, it's useful to capture it in the recipe-level buildhistory. This makes it straightforward to analyze the impact of PACKAGECONFIG changes on the resulting image size. (From OE-Core rev: 189fae9f2df58759e9d66a3877c9ef30df4854bf) Signed-off-by: Jan Luebbe <jlu@pengutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* buildstats.bbclass: Do not recalculate build start timeJunling Zheng2020-06-041-1/+1
| | | | | | | | | | The build start time is recorded in __timedata_build, which we should use rather than recalculating it. (From OE-Core rev: b723e9a4de67f33f61f2e7fe36ea451a46840b3e) Signed-off-by: Junling Zheng <zhengjunling@huawei.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* buildstats.bbclass: Remove useless variablesJunling Zheng2020-06-041-2/+0
| | | | | | | | | Remove useless variables bn and bsdir in write_task_data(). (From OE-Core rev: de26d6ce9d2154b5bb51491d9f4bd590cb5a0fc7) Signed-off-by: Junling Zheng <zhengjunling@huawei.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cve-check: include epoch in product version outputRalph Siemsen2020-06-041-1/+1
| | | | | | | | | | | | In the generated cve.log files, include the epoch in the product version. This better matches how versions are displayed elsewhere, in particular the bb.warn("Found unpatched CVE...") that appears on the terminal when CVEs are found. (From OE-Core rev: e1c3c0b6e5b01304e2127f5058986697e82adf93) Signed-off-by: Ralph Siemsen <ralph.siemsen@linaro.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate.bbclass: When siginfo or sig files are missing, stop fetcher errorsMark Hatle2020-05-301-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Prior to fetching, the system checks if the sstate file is present either locally or on the mirror. If it is, then it goes to the fetch stage. Up to three files can be fetched, sstate, sstate.siginfo and sstate.sig (if signature validation is enabled). The previous pstaging_fetch function would iterate over these, and if a download error occurred would spew forth a great amount of fetcher failure messages as well as stop fetching the next item in the set. This was resolved by adding a fetcher.checkstatus() call prior to the download. If the file isn't present, then the exception will be triggered, and no fetcher failure messages will reach the user. The exception handler is then modified to be a pass so that it will loop and pull the rest of the files that that are requested. Additionally, a check for the existance of the .sig file was added to the sstate_installpkg to avoid an error trying to load the .sig if it wasn't downloaded. (From OE-Core rev: a9085140434e2d26c0bb75bb53fcb7f7c19ef86d) Signed-off-by: Mark Hatle <mark.hatle@xilinx.com> Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* multilib/recipes: Use new RecipePostKeyExpansion eventRichard Purdie2020-05-273-8/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. (From OE-Core rev: b3fda056a674889cd9697e779de023d4f993d3ce) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* go.bbclass: Add `-trimpath` to default build flagsOtavio Salvador2020-05-261-1/+1
| | | | | | | | | | The `-trimpath` option is important for reproducible builds so full build paths and module paths are not embedded. (From OE-Core rev: e3df027b3697b6a92b417bba8d442a5bd15525fd) Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* go-mod.bbclass: Add class for `go mod` supportOtavio Salvador2020-05-261-0/+20
| | | | | | | | | | | | | | | | | When using Go Modules, the the current working directory MUST be at or below the location of the 'go.mod' file when the go tool is used, and there is no way to tell it to look elsewhere. It will automatically look upwards for the file, but not downwards. To support this use case, we provide the `GO_WORKDIR` variable, which defaults to `GO_IMPORT` but allows for easy override. [YOCTO #13883] (From OE-Core rev: 11c2b06ac98cc5064640705712bffa156519f450) Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_rpm.bbclass: add PACKAGE_ADD_METADATA_RPM to sstate variablesMichael Ho2020-05-251-0/+4
| | | | | | | | | | | | | | | | Refactor the addition of vardeps for this package class to use RPMEXTRAVARS and pass the items through gen_packagevar so package name specific overrides are accounted for. This matches the style used in package_ipk.bbclass. Since do_package_write_rpm does not have any "extra vars" that affect the rpm packaging yet, this commit has to add the variable. This refactoring is needed to add PACKAGE_ADD_METADATA_RPM to RPMEXTRAVARS so it affects the sstate hash of do_package_write_rpm. (From OE-Core rev: 9e1907d7bd5f825d5ccca1da2a1e6ccc494088dd) Signed-off-by: Michael Ho <Michael.Ho@bmw.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_deb.bbclass: add PACKAGE_ADD_METADATA_DEB to sstate variablesMichael Ho2020-05-251-2/+3
| | | | | | | | | | | | | | Refactor the addition of vardeps for this package class to use DEBEXTRAVARS and pass the items through gen_packagevar so package name specific overrides are accounted for. This matches the style used in package_ipk.bbclass. Additionally add PACKAGE_ADD_METADATA_DEB to the DEBEXTRAVARS list so the packaging is redone if the variable changes value. (From OE-Core rev: e669141ccaeff346896f67f72b33c6aeae5cba46) Signed-off-by: Michael Ho <Michael.Ho@bmw.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_ipk.bbclass: add PACKAGE_ADD_METADATA_IPK to sstate variablesMichael Ho2020-05-251-1/+1
| | | | | | | | | | Add PACKAGE_ADD_METADATA_IPK to IPKEXTRAVARS so it affects the sstate hash of do_package_write_ipk. (From OE-Core rev: 4147f0d7a1c2a35cb12e76ed910ef7f066bab90b) Signed-off-by: Michael Ho <Michael.Ho@bmw.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.bbclass: add PACKAGE_ADD_METADATA to sstate variablesMichael Ho2020-05-251-2/+2
| | | | | | | | | | | | | | | | The PACKAGE_ADD_METADATA can be used to define additional metadata for packages. Changes to this variable should affect the packaging sstate hash so packages are re-generated when this variable changes. This variable is added to both PKGDATA_VARS and PACKAGEVARS. It is needed in PACKAGEVARS to ensure changes invoke do_package to re-run. It is needed in PKGDATA_VARS to ensure changes are written into the pkgdata so that the hash equiv reports a change and does not skip over the package_write tasks. (From OE-Core rev: de871a51cc450e3f90c923c5d80155453e5c241d) Signed-off-by: Michael Ho <Michael.Ho@bmw.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_rpm.bbclass: respect package overrides for the main packageMichael Ho2020-05-251-10/+12
| | | | | | | | | | | | | | | | | Apply ${PN} to OVERRIDES when determining the base package spec variables. Without this, there is a mismatch in behaviour where overrides for the base package have no effect while overrides for subpackages do. The subpackages should not be affected by this override as they apply their own package overrides and will by default fetch the base variables and apply them in the spec file. This makes the behaviour for package overrides match the implementation in package_deb.bbclass and package_ipk.bbclass. (From OE-Core rev: b438a90fa4644dd3e5355f82730257ef579ceda9) Signed-off-by: Michael Ho <Michael.Ho@bmw.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* archiver.bbclass: Fix duplicated SRC_URIs for do_ar_originalRobert Yang2020-05-251-1/+7
| | | | | | | | | | | | | | | | | | The argument urls of bb.fetch2.Fetch(urls, d) are duplicated to SRC_URI, which caused errors like: bb.data_smart.ExpansionError: Failure expanding variable SRCPV, expression was ${@bb.fetch2.get_srcrev(d)} which triggered exception FetchError: Fetcher failure: The SRCREV_FORMAT variable must be set when multiple SCMs are used. The SCMs are: git://github.com/docker/notary.git;destsuffix=git/src/github.com/docker/notary git://github.com/docker/notary.git The first one is from original SRC_URI, the second one is from the variable 'urls', so cleanup SRC_URI before call bb.fetch2.Fetch() can fix the problem. (From OE-Core rev: b244c4f3427cd07376d4b8f7d27e38735bcc90e7) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sanity.bbclass: Detect and fail if 'inherit' is used in conf fileGregor Zatko2020-05-241-0/+6
| | | | | | | | | | | | | | | | | | 'inherit' directive may not be used in conf files as it's supposed to be used for the inheritance of classes. Correct form in conf file is INHERIT. This commit adds: - a sanity check to find whether the wrong case exists - fail the build if so - tell user about the difference in directives [YOCTO #5426] (From OE-Core rev: 07bf9b460fe97dec86439302a83bbefa8bac9d70) Signed-off-by: Gregor Zatko <gzatko@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cve-check: Run it after do_fetchKhem Raj2020-05-241-1/+1
| | | | | | | | | | | | | | | | Certain recipes e.g. bash readline ( from meta-gplv2 ) download patches instead of having them in metadata, this could fail cve_check ERROR: readline-5.2-r9 do_cve_check: File Not found: qemuarm/build/../downloads/readline52-001 This patch ensures that download is done before running CVE scan, even though these will be external patches and may not contain CVE tags as it expects, but it will fix the run failures as seen above (From OE-Core rev: e406fcb6c609a0d2456d7da0d2406d2d9fa52dd2) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* linux-modules.tgz: fix file permissions to rootLi Wang2020-05-221-0/+1
| | | | | | | | | | the files of linux-modules should be same permissions with rootfs.tar.bz2, because it is a part of rootfs when used to install. (From OE-Core rev: 71e141906069c6f754199512741f6e3d5b72fee7) Signed-off-by: Li Wang <li.wang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base/insane: Check pkgs lics are subset of recipe lics only onceQuentin Schulz2020-05-212-14/+20
| | | | | | | | | | | | | | | | | | | | 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. (From OE-Core rev: 852408ed4be1f64c57e196688728b7ed223d3493) Signed-off-by: Quentin Schulz <quentin.schulz@streamunlimited.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/image_types_wic: Reorder do_flush_pseudodbRicardo Ribalda2020-05-191-1/+1
| | | | | | | | | | | | | | | When IMAGE_FSTYPES contains more types than wic, it can happen than the pseudo database is not flushed properly. This can be solved by changing the order of when do_flush_pseudodb is launched. Yocto Bug: https://bugzilla.yoctoproject.org/show_bug.cgi?id=13898 Fixes: dde90a5dd2b2 ("wic: Fix multi images .wks with bitbake") (From OE-Core rev: 445b0a9544b55735496bbb23dbff3399b3b9e9a4) Signed-off-by: Ricardo Ribalda <ricardo@ribalda.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* archiver.bbclass: Make do_deploy_archives a recursive dependencyPaul Barker2020-05-181-1/+3
| | | | | | | | | | | | | | | | To ensure that archives are captured for all dependencies of a typical bitbake build we add do_deploy_archives to the list of recursive dependencies of do_build. Without this, archives may be missed for recipes such as gcc-source which do not create packages or populate a sysroot. do_deploy_archives is also added to the recursive dependencies of do_populate_sdk so that all sources required for an SDK can be captured. (From OE-Core rev: cd3f766ae1875dfa1f63b68e2ae5b6a950ce67ae) Signed-off-by: Paul Barker <pbarker@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>