summaryrefslogtreecommitdiffstats
path: root/meta/classes
AgeCommit message (Collapse)Author
2022-05-28Revert "meson.bblcass: Remove empty egg-info directories before running meson"Richard Purdie
This reverts commit 47d9d90b4ec7d04d6f3f1a9b97c0ab7f1264a88e. This is no longer needed with a patch to fix importlib in python. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-05-27cve-check: Only include installed packages for rootfs manifestErnst Sjöstrand
Before this the rootfs manifest and the summary were identical. We should separate the summary and rootfs manifest more clearly, now the summary is for all CVEs and the rootfs manifest is only for things in that image. This is even more useful if you build multiple images. (From OE-Core rev: 3b8cc6fc45f0ea5677729ee2b1819bdc7a441ab1) Signed-off-by: Ernst Sjöstrand <ernstp@gmail.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-05-27cve-check: Add helper for symlink handlingErnst Sjöstrand
(From OE-Core rev: 5046d54df2c3057be2afa4143a2833183fca0d67) Signed-off-by: Ernst Sjöstrand <ernstp@gmail.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-05-23kernel.bbclass: Do not overwrite recipe's custom postinstRaphael Teller
Allow recipe to set a custom postinst for kernel image. Use prependVar in order to allow custom postinst to be ran after default postinst, potentially modifying the installed file/symlink. (From OE-Core rev: 579906b9f4ea32c8d4e0e11a87ee6c9e27cdf0dc) Signed-off-by: Raphael Teller <raphael.teller@se.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-05-23cve-check.bbclass: Added do_populate_sdk[recrdeptask].leimaohui
As product, sdk should do cve check as well as rootfs. (From OE-Core rev: cc17753935c5f9e08aaa6c5886f059303147c07b) Signed-off-by: Lei Maohui <leimaohui@fujitsu.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-05-21rust-common: Fix sstate signatures between arm hf and non-hfRichard Purdie
Building with MACHINE=qemuarm and MACHINE=qemux86-64 causes rust-native to rebuild. The reason is all the ingredients into the RUST_*_SYS variables are being tracked but that doesn't really make sense in this case: $ bitbake-diffsigs tmp/stamps/x86_64-linux/rust-native/1.60.0-r0.do_rust_gen_targets.sigdata.63* tmp/stamps/x86_64-linux/rust-native/1.60.0-r0.do_rust_gen_targets.sigdata.34* NOTE: Starting bitbake server... basehash changed from 860b8f11b10182dc5b2737f62cdb697477f714adb63eeb4d4b932d67cac8eec2 to 9379e8b9df9696e8056fec7d1534661f34dda073f6d816e241b09a2dff76ae2d Variable rust_base_triple value changed: @@ -36,4 +36,4 @@ # In some cases uname and the toolchain differ on their idea of the arch name -TUNE_FEATURES{callconvention-hard} = Set +TUNE_FEATURES{callconvention-hard} = Unset Switch to using the final variable value for sstate signature purposes which avoids this issue. (From OE-Core rev: 38b61aeaf877f6a34c3c0060c175119975ebd782) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-05-21images_types: isolate the write of UBI configurationKory Maincent
Isolate the writing of the UBI configuration in a separate function. This allows to use a custom configuration easily by overriding the function. Replace the echo functions by a cat to have a more readable configuration. (From OE-Core rev: 601294b35c83faa134e26844c65db59b42d5052f) Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-05-20cargo_common.bbclass: enable bitbake vendoring for externalsrcChanho Park
To support crate:// fetcher on externalsrc, we need to remove "-z ${EXTERNALSRC} check of bitbake vendoring. It is possible to disable vendoring by CARGO_DISABLE_BITBAKE_VENDORING = "1" if externalsrc-ed project does not want to enablt it. (From OE-Core rev: 3d8a388ba540598fec83d505d62ac36642bb90c7) Signed-off-by: Chanho Park <chanho61.park@samsung.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-05-20externalsrc.bbclass: support crate fetcher on externalsrcChanho Park
To support crate:// fetcher on externalsrc, we need to make pass-through the URIs in SRC_URI. (From OE-Core rev: c55c79507f63a4e758a486537aacfc13009161c7) Signed-off-by: Chanho Park <chanho61.park@samsung.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-05-17cve-check: Fix report generationMarta Rybczynska
The addition of summary output caused two issues: error when building an image and the fact that JSON output was generated even when CVE_CHECK_FORMAT_JSON. When generating an image it caused an error like: ERROR: core-image-minimal-1.0-r0 do_rootfs: Error executing a python function in exec_func_python() autogenerated: The stack trace of python calls that resulted in this exception/failure was: File: 'exec_func_python() autogenerated', lineno: 2, function: <module> 0001: *** 0002:cve_check_write_rootfs_manifest(d) 0003: File: '/home/alexk/poky/meta/classes/cve-check.bbclass', lineno: 213, function: cve_check_write_rootfs_manifest 0209: 0210: link_path = os.path.join(deploy_dir, "%s.json" % link_name) 0211: manifest_path = d.getVar("CVE_CHECK_MANIFEST_JSON") 0212: bb.note("Generating JSON CVE manifest") *** 0213: generate_json_report(json_summary_name, json_summary_link_name) 0214: bb.plain("Image CVE JSON report stored in: %s" % link_path) 0215:} 0216: 0217:ROOTFS_POSTPROCESS_COMMAND:prepend = "${@'cve_check_write_rootfs_manifest; ' if d.getVar('CVE_CHECK_CREATE_MANIFEST') == '1' else ''}" Exception: NameError: name 'json_summary_name' is not defined The fix is to pass the d variable to the pure python function generate_json_report to get correct values of variables and add conditions for the JSON output where needed. In addition clarify the message presenting the summary JSON file, which isn't related to an image. Uses partial fixes from Alex Kiernan, Ernst Sjöstrand (ernstp), and Davide Gardenal. Fixes: f2987891d315 ("cve-check: add JSON format to summary output") (From OE-Core rev: 9015dec93233c7d45fd0c9885ff5d4ec23ad377d) Signed-off-by: Marta Rybczynska <marta.rybczynska@huawei.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-05-16staging: Fix rare sysroot corruption issueRichard Purdie
We've seen failures on the autobuilder in oe-selftest where things which should be in the sysroot aren't. The exact steps to reproduce the exact failure are elusive and probably hash equivalance dependency but this set of steps does reproduce corruption which is probably of the same origin: Add DISTRO_FEATURES += "systemd" bitbake dbus Remove DISTRO_FEATURES += "systemd" bitbake dbus bitbake dbus -c clean bitbake dbus -c configure Add DISTRO_FEATURES += "systemd" bitbake quilt-native bitbake dbus -c populate_sysroot Remove DISTRO_FEATURES += "systemd" bitbake dbus -c compile Where dbus will now fail as the compiler was no longer in the sysroot. This works by clearing x11 and other values out of DISTRO_FEATURES so the x11 dependencies are removed from the sysroot. The configure stamp remains valid so when the original configuration is restored, it becomes valid again but a load of the sysroot disappeared and build failures result. Fix this by removing stamps when we remove things from the sysroot. Depends on a change to bitbake build.py to add the clean_stamp API. [YOCTO #14790] (From OE-Core rev: f4b1cecc82435b71135d7b65f6ea67be0e4f8c66) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-05-15npm.bbclass: Don't create /usr/lib/node symlinkZoltán Böszörményi
When a recipe DEPENDS on multiple other npm based recipes, the symlink will create a conflict. (From OE-Core rev: 9896a7e3a9bdbc6bf3bb67b5f5d5c8ae8225ed0f) Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-05-15npm.bbclass: Fix file permissions before opening it for writingZoltán Böszörményi
Some node module archives in npmjs.org contain wrong permissions. I found a case with package.json in the archive being r-xr-xr-x for which open(..., "w") fails. Modify the manifest file permissions to add the write bit for the owner. (From OE-Core rev: c6740091cb7336aaa3bb9b692fe4dc6fc92aa3a8) Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-05-15image_types/runqemu-addptable2image: Fix a minor typoLeon Anavi
Fix a minor typo and replace "partion" with "partition". (From OE-Core rev: 186df231f95096c0ee0f29f1080deb351701374f) Signed-off-by: Leon Anavi <leon.anavi@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-05-15kernel-yocto.bbclass: say what SRC_URI entry is being droppedRoss Burton
If there is a defconfig set by KBUILD_DEFCONFIG and something that looks like a defconfig in SRC_URI, the SRC_URI is dropped. This happens even if the entry in SRC_URI is called my_defconfig_frag.cfg. Arguably, this is a bug and the behaviour should be changed, but for now if we're going to remove entries from SRC_URI we should make it clear what entry is being removed. (From OE-Core rev: c807876507fa0257be9abc15457b312e01368c17) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-05-15kernel: add missing path to search for debug filesAndrej Valek
Since explicit debug package creation via ${KERNEL_PACKAGE_NAME}-dbg has been added to kernel, it has to cover all PACKAGE_DEBUG_SPLIT_STYLE options. For ex. when the variable "debug-file-directory" package search path has to be set explicitly, otherwise it will not find any files. (From OE-Core rev: 9c39da147683dcaaa244b3ddc4531c4408ad5c9e) Signed-off-by: Andrej Valek <andrej.valek@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-05-11sanity: Don't warn about make 4.2.1 for mintRichard Purdie
Whilst not a supported distro, we can exclude this from the warning as it is debian derived and doesn't have the issue. (From OE-Core rev: b561e40f906737eec81245c6a12e78501311f667) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-05-11image.bbclass: allow overriding dependency on virtual/kernel:do_deployDmitry Baryshkov
Since the commit fe26b2379ecd ("image.bbclass: Depend on virtual/kernel:do_deploy"), the image.bbclass made building images depend on virtual/kernel. For some images, including small initramfs, this is not the case. Allow overriding this dependency in case developers knows what they are doing. (From OE-Core rev: 55875f68212657167ac6dc26f5fd93eac24b098e) Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-05-11overlayfs: add docs about skipping QA check & service dependenciesClaudius Heine
Add some documentation about skipping the QA check related to missing fstab entries or mount units for base mount points where the overlayfs is mounted from. Also add a short paragraph about adding a systemd unit dependency to services in recipes, so that they are started only after the overlayfs is mounted and ready. No functional change. (From OE-Core rev: 7adc49fa6fdbdf118f74e95193e80ae7ef019e27) Signed-off-by: Claudius Heine <ch@denx.de> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-05-09Revert "image.bbclass: allow overriding dependency on virtual/kernel:do_deploy"Jacob Kroon
As pointed out in https://lists.openembedded.org/g/openembedded-core/message/165058 https://lists.openembedded.org/g/openembedded-core/message/165216 this patch sets KERNELDEPLOYDEPEND but then uses KERNELDEPMODDEPEND. Revert the changes since no one seems interested enough to fix it. If someone wants this then make the variable name readable by adding underscores where appropriate, for example by calling it KERNEL_DEPLOY_DEPEND. This reverts commit dcf9dfa4e6305786cd713aa28deda94a50bd6635. (From OE-Core rev: f0bd9e5d10dc86d7b2639a31ab12728ab67bebd5) Signed-off-by: Jacob Kroon <jacob.kroon@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-05-08package: Ensure we track whether PRSERV was active or notRichard Purdie
Currently the signatures for do_packagedata don't reflect whether PRServ was active or not. This means that if you have mxiing of PRServ usage and non PRServ usage against the same sstate cache it can rarely become corrupted with one referencing the other. This likely doesn't happen in general but does on the autobuilder as PRServ is tested. Add in some variables to ensure the binary state of PRServ being enabled or disabled is tracked (but not the server value). We continue to assume one PRServ is used per sstate cache. (From OE-Core rev: dd660e5c3fb74f7c4b7b8e863f7143066ae22813) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-05-08pypi.bbclass: Set CVE_PRODUCT to PYPI_PACKAGEAlex Kiernan
The CVE product name for PyPI packages is (usually) the same as the PyPI package name (and not our recipe name), so use that as the default. (From OE-Core rev: 61f6b0ad09bf87cdc2d3f08770b7c44cad1d0e58) Signed-off-by: Alex Kiernan <alexk@zuma.ai> Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-05-07abi_version/sstate: Bump hashequiv and sstate versions due to git changesRichard Purdie
The autobuilder sstate was corrupted via incorrect equiavlences caused by the security fix to git and the poor interaction that had with SCM version checks under fakeroot/pseudo. Bump the versions to enable a clean slate to work off. (From OE-Core rev: 3b6672730372e130d4d72b683fc3150911964745) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-05-07base: Avoid circular references to our own scriptsRichard Purdie
We'd like to intercept git calls but we don't want circular references and HOSTTOOLS currently sets them up. Tweak to avoid them. (From OE-Core rev: 52c37e133fa55846aca2248ffcf3a10648dbb8d7) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-05-05rootfs-postcommands: fix symlinks where link and output path are equalDavide Gardenal
When creating the manifest and the testdata.json links, if the link name is equal to the output name the link is not created, otherwise it is. This prevents a link-to-self in the first case. (From OE-Core rev: bed63756c56f296ff3d5a7eef66e978bd19f1008) Signed-off-by: Davide Gardenal <davide.gardenal@huawei.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-05-04cve-check: fix symlinks where link and output path are equalDavide Gardenal
An if statement now checks if the link and output path are the same, if they are then the link is not created, otherwise it is. (From OE-Core rev: 2f024c0236c4806f0e59e4ce51a42f6b80fdf1b3) Signed-off-by: Davide Gardenal <davide.gardenal@huawei.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-05-04cve-check: add JSON format to summary outputDavide Gardenal
Create generate_json_report including all the code used to generate the JSON manifest file. Add to cve_save_summary_handler the ability to create the summary in JSON format. (From OE-Core rev: f2987891d315466b7ef180ecce81d15320ce8487) Signed-off-by: Davide Gardenal <davide.gardenal@huawei.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-05-03classes: rootfs-postcommands: add skip option to overlayfs_qa_checkClaudius Heine
The overlayfs_qa_check checks if the current root file system has a mount configured for each overlayfs, when the overlayfs class is used. However there are certain instances where this mount point is created at runtime and not static in a fstab entry or systemd mount unit. One such case would be if overlayfs-etc is used, where the device is mounted in the preinit script and not via a mount unit or fstab entry. However there are other possibilities for this as well, like startup scripts that support a dynamic partition layout. For instance when systemd-repart is used. This adds the `OVERLAYFS_QA_SKIP` variable, which allows to define QA skips via its flags. In principle it supports multiple QA skip flags separated by whitespace, but only one (`mount-configured`) is implemented here. To skip this QA check simply add `mount-configured` to the flag of `OVERLAYFS_QA_SKIP` with the same name. For instance if a overlayfs is configured as: OVERLAYFS_MOUNT_POINT[data] = "/data" Skipping this QA check can be done by setting: OVERLAYFS_QA_SKIP[data] = "mount-configured" Also add a testcase and fix a typo (fstat -> fstab). (From OE-Core rev: 2ce9173169a2a86392c4a85fe9be7fbbd7353b7f) Signed-off-by: Claudius Heine <ch@denx.de> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-30license_image.bbclass: Make QA errors fail the buildPeter Kjellerstedt
If, e.g., license-file-missing is added to ERROR_QA, then the build should fail if any licenses are missing. (From OE-Core rev: dd91c4bec8335cab2bbd0b33caf50d314ca72bdc) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-30kernel-yocto: allow patch author date to be commit dateBruce Ashfield
In situations where a buid needs to be reproducible, it is sometimes desireable to use a patches author date, versus the time when it is applied. This generates a consistent hash between different patch applications. We leverage the existing KERNEL_DEBUG_TIMESTAMPS to trigger the use of a new option to kgit-s2q. This allows us to use the author date in a reproducible configuration, but disable it if we need the current time/date. (From OE-Core rev: ebe2411ce78d5e4ea49b9b4cb732b461ecc32ca6) Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-29image.bbclass: allow overriding dependency on virtual/kernel:do_deployDmitry Baryshkov
Since the commit fe26b2379ecd ("image.bbclass: Depend on virtual/kernel:do_deploy"), the image.bbclass made building images depend on virtual/kernel. For some images, including small initramfs, this is not the case. Allow overriding this dependency in case developers knows what they are doing. (From OE-Core rev: dcf9dfa4e6305786cd713aa28deda94a50bd6635) Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-28cve-check: no need to depend on the fetch taskRoss Burton
The only part of the cve-check task which needs files is the patch examination, and typically these patches are local so fetch isn't needed. (From OE-Core rev: 2c9b3186d3b7c18cbea239ab9b06e85b7c243b54) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-28staging: Ensure we filter out ourselvesRichard Purdie
Adding a dependency on ourselves in this function doesn't make sense, the hash may change after hash equivalence is applied. Other code using BB_TASKDEPDATA does handle the self reference correctly (which is there for a reason), update this code to do likewise. (From OE-Core rev: d98b06c9c6f480de1e5167bfe8392e39300fc02c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-27sanity: skip make 4.2.1 warning for debianNicolas Dechesne
This is a follow up patch of: ad5829aa1f8a (sanity: Show a warning that make 4.2.1 is buggy on non-ubuntu systems) Debian10 has the exact same version/sources for make as Ubuntu (focal), e.g. https://packages.debian.org/source/buster/make-dfsg and https://packages.ubuntu.com/source/focal/make-dfsg. As per the corresponding changelog, the patch mentioned in ad5829aa1f8a, is included in both Debian and Ubuntu in make 4.2.1-1.1. So it's safe to use make 4.2.1 in Debian10. (From OE-Core rev: 1d5d5278ff4f620cd786b85e880e8429a04a1548) Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-27wic: Add dependencies for erofs-utilsSean Anderson
In order to build erofs filesystems, wic must have the erofs-utils package installed into its sysroot. Fixes: 30375ce97 ("Add support for erofs filesystems") (From OE-Core rev: 68e364340c439a1341d37c3f7a2b0e6aad8e1e56) Signed-off-by: Sean Anderson <sean.anderson@seco.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-27base: Drop git interceptRichard Purdie
We're going to use the environment approach for solving this issue. (From OE-Core rev: 0982977dc052ad4e65608f6853f930121d08837a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-26go.bbclass: disable the use of the default configuration fileChen Qi
We need to disable the use the default configuration file. This is to ensure that user settings do not mess things up when building go recipes. For example, if I set 'GOBIN=./relative/path' in $HOME/.config/go/env, then go-runtime fails to build with error like below: cannot install, GOBIN must be an absolute path According to `go help environment', """ Setting GOENV=off in the environment disables the use of the default configuration file. """ We can explicitly disable the configuration file by setting GOENV to off. (From OE-Core rev: 711b41744ab08ee62c71cdccca335a7828ec0ba1) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-26create-spdx: delete virtual/kernel dependency to fix FreeRTOS buildDavide Gardenal
When building FreeRTOS this dependency generates an error because bitbake cannot find any provider for "virtual/kernel". >From a dependency analysis the task is executed independently from this so it can be safely removed. This patch has been discussed in this ML thread: https://lists.openembedded.org/g/openembedded-core/topic/90602531 (From OE-Core rev: 1c02b768a71ec88bfe1cc0c4443683de8b66056e) Signed-off-by: Davide Gardenal <davide.gardenal@huawei.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-26devshell.bbclass: Allow devshell & pydevshell to use the networkPeter Kjellerstedt
Otherwise it will fail if using OE_TERMINAL = "xterm" with the not so helpful error: xterm: Xt error: Can't open display: localhost:0.0 (From OE-Core rev: ba53fc3bcecfe32401471dc1008c7ead96504150) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-26qemu.bbclass: Extend ppc/ppc64 extra optionsKhem Raj
Some recipes are marked machine specific which need qemu usermode during build eg. if they use meson build system, which means they wont get right -cpu settings to run qemu-ppc/qemu-ppc64 and build fails, this ensures that we set the right options when PACKAGE_ARCH is set to MACHINE_ARCH on ppc/ppc64 qemu (From OE-Core rev: 9f71bbe65a458f08cd8ede6522c8b988603202a0) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-22install/devshell: Introduce git intercept script due to fakeroot issuesPaul Gortmaker
In a devshell, recent versions of git will complain if the repo is owned by someone other than the current UID - consider this example: ------ bitbake -c devshell linux-yocto [...] kernel-source#git branch fatal: unsafe repository ('/home/paul/poky/build-qemuarm64/tmp/work-shared/qemuarm64/kernel-source' is owned by someone else) To add an exception for this directory, call: git config --global --add safe.directory /home/paul/poky/build-qemuarm64/tmp/work-shared/qemuarm64/kernel-source kernel-source# ------ Of course the devshell has UID zero and the "real" UID is for "paul" in this case. And so recent git versions complain. As the whole purpose of the devshell is to invoke a shell where development can take place, having a non-functional git is clearly unacceptable. Richard suggested we could use PSEUDO_UNLOAD=1 to evade this issue, and I suggested we probably will see other similar instances like this and should make use of PATH to intercept via devshell wrappers - conveniently we already have examples of this. Here, we copy the existing "ar" example and tune it to the needs of git to combine Richard's suggestion and mine. As such we now also can store commit logs and use send-email with our user specific settings, instead of "root", so in additon to fixing basic commands like "git branch" it should also increase general usefulness. RP: Tweaked the patch so the PATH change only applies to the devshell task and is a generic git intercept rather than devshell specific. RP: Also apply the PATH change to do_install tasks since that also runs under fakeroot and several software projects inject "git describe" output into their binaries (systemd, iputils, llvm, ipt-gpu-tools at least) causing reproducibility issues from systems with different git versions. (From OE-Core rev: 3266c327dfa186791e0f1e2ad63c6f5d39714814) Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-21kernel-yocto.bbclass: Fixup do_kernel_configcheck usage of KMETARuss Dill
The do_kernel_configcheck task requires a meta directory, normally set by ${KMETA}. The meta directory is taken as a relative path from ${S}: outfile = "{}/{}/cfg/mismatch.txt".format( s, kmeta ) However, when checking for the presence of ${KMETA} the current working directory is searched. This will almost always fail and "kgit --meta" is used instead. If the user does have a path in their current working directory that matches the ${KMETA} variable but the path is not present within the kernel source directory, the build will fail if it tries to write config errors/ warnings to that path. If ${KMETA} is not set, the same problem exists with the hard-coded "meta" directory. Fix these issues by checking for ${KMETA} within ${S} rather than the current working directory. Additionally, drop the hardcoded backup directory "meta" as it hasn't been functioning and probably has no users (From OE-Core rev: f4a3e80a4a6f4f709d09940dcaf45b2b00654496) Signed-off-by: Russ Dill <russ.dill@nikolamotor.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-21package.bbclass: Prevent perform_packagecopy from removing /sysroot-onlyRuss Dill
The files in /sysroot-only are intended to make it into the recipes sysroot output, but not into the package. However, if do_package is run before do_populate_sysroot, the files are removed. Use a smaller hammer to avoid copying the files into the package so they are still around when do_populate_sysroot runs. (From OE-Core rev: 493145c6f1bc92ab2b7a23e181641b09df87c9ff) Signed-off-by: Russ Dill <russ.dill@nikolamotor.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-19go: Always pass interpreter to linkerJoerg Vehlow
When gos internal linker is used, it uses hardcoded paths to the interpreter (dynamic linker). For x86_64 this hardcoded path is /lib64/ld-linux-x86-64.so.2, but yocto's default dynamic linker path is /lib64/ld-linux-x86-64.so.2. Most of the time, the internal linker is not used and binutils linker sets the correct path, but sometimes the internal linker is used and the resulting binary will not work on x86_64. To ensure the path is always correct, pass it to the linker. (From OE-Core rev: 6b54215074d7f3dbba07f096f16b9c0acf51527c) Signed-off-by: Joerg Vehlow <joerg.vehlow@aox.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-19create-spdx: fix error when symlink cannot be createdDavide Gardenal
If IMAGE_NAME and IMAGE_LINK_NAME are the same an exception is raised in image_combine_spdx because it cannot create a symlink with the same exact path of the original file. In that case there is no point in creating a link in the first place. Refactor image_combine_spdx to avoid code duplication (From OE-Core rev: 88f76bba705007a7fcda506c79f743060d8f2e52) Signed-off-by: Davide Gardenal <davide.gardenal@huawei.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-19package_manager: fix missing dependency on gnupg when signing deb package feedsFerry Toth
When signing the deb package feed gpg tools are a soft requirement. If gnupg-native is not declared a dependancy the version from hosttools is used. Unfortunately the gpg-agent version from Ubuntu 16.04 on the autobuilders is incompatible with the package_index task and fails during oe-selftest. Fix by making gnupg-native a dependency. Fixes: 0b4231b5 "package_manager: sign DEB package feeds" Reported-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Suggested-by: Richard Purdie <richard.purdie@linuxfoundation.org> (From OE-Core rev: c063b658e30a24be9214abc23cd2a16c0260e93e) Signed-off-by: Ferry Toth <ftoth@exalondelft.nl> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-14kernel: Delete unused KERNEL_LOCALVERSION variableAlex Kiernan
This has been unused since: commit fb61dc1430f81ae2ee59766ffab8404fd79ff1b1 Author: Richard Purdie <richard@openedhand.com> Date: Mon Jan 8 21:05:18 2007 +0000 kernel.bbclass: Drop KERNEL_RELEASE variable git-svn-id: https://svn.o-hand.com/repos/poky/trunk@1123 311d38ba-8fff-0310-9ca6-ca027cbcb966 (From OE-Core rev: 320da1c2b9add9fecd74e7f33ddc5418b326c786) Signed-off-by: Alex Kiernan <alexk@zuma.ai> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-14sanity: Show a warning that make 4.2.1 is buggy on non-ubuntu systemsRichard Purdie
We keep seeing hangs on the autobuilder with make 4.2.1 on Centos8, Alma8 and OpenSuse workers. The hang occurs in perl and kernel builds in particular. The issue is fixed in 4.3 and has been patched on Ubuntu systems: https://git.savannah.gnu.org/cgit/make.git/commit/?id=78b5fec6898c26956d00548427cda1101cb80f8a https://savannah.gnu.org/bugs/?51400 Add a sanity test for make 4.2.1 and error for non-ubuntu systems. We're making a buildtools-make-tarball available which can be used to allow systems with the broken version to use the project. (From OE-Core rev: ad5829aa1f8a7369509542b913bfd8d21d1b1bc3) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-14externalsrc/devtool: Fix to work with fixed export funcition flags handlingRichard Purdie
If we fix bitbake to correctly handle the cleandirs and fakeroot flags for tasks handled by EXPORT_FUNCTIONS, we break devtool since it only considers these for top level functions. Add in extra code to intercept the cleandirs flags for commonly used sub functions too. [YOCTO #8621] (From OE-Core rev: 67fad829f37ed0a8e20c599d2b65635158591d06) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-12kernel.bbclass: Fix the do_strip() malfunctionKevin Hao
The BB variable can't be referenced directly in a python function, this misusage of the variable reference causes strip function to be always skipped. Fixed: b9c3db4953e4 ("kernel.bbclass: Use KERNEL_IMAGEDEST instead of hardcoded boot path") (From OE-Core rev: c405cb4f421a8c964fa59123ee41879ebd5f829c) Signed-off-by: Kevin Hao <kexin.hao@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>