summaryrefslogtreecommitdiffstats
path: root/meta/classes
AgeCommit message (Collapse)Author
2021-03-11image.bbclass: deltask do_packagedatarbt/imageRobert Yang
This can fix a do_package error when compile with meta-secure-core layer: http://layers.openembedded.org/layerindex/branch/master/layer/meta-secure-core/ $ bitbake kernel-initramfs [snip] WARNING:kernel-initramfs-1.0-r0 do_package: Manifest build/tmp-glibc/sstate-control/manifest-x86_64_x86_64-nativesdk-secure-core-image-initramfs.packagedata not found in intel_x86_64 corei7-64 core2-64 x86_64 allarch x86_64_x86_64-nativesdk (variant '')? [snip] This is because kernel-initramfs wants to pack an initramfs image into kernel-initramfs.rpm which adds a dependency in kernel-initramfs.bb to do this: d.appendVarFlag('do_install', 'depends', ' ${INITRAMFS_IMAGE}:do_image_complete') This causes kernel-initramfs' do_package depends on ${INITRAMFS_IMAGE}:do_image_complete's do_packagedata, then we will get the error. Delete do_packagedata as other do_package relelated tasks for the image recipe will fix the error. Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
2021-03-10insane: don't check for a warning string that is never outputRoss Burton
insane has checks that the compiler isn't printing "CROSS COMPILE Badness" during configure/compile/install, but this message hasn't been output by GCC since 2010 (23f522e7). The current warning is "include location [...] is unsafe for cross- compilation" and as that is a proper GCC warning, we can make it fatal in follow-up patches. Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-03-06rootfs-postcommands: correctly set systemd target for weston imagesAlexander Kanavin
Otherwise, weston wouldn't actually start when systemd is in use. Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-03-06core-image.bbclass: add a weston IMAGE_FEATURE, similar to x11-baseAlexander Kanavin
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-03-02meson: update 0.56.2 -> 0.57.1Alexander Kanavin
Replace hacky 0001-gnome.py-prefix-g-i-paths-with-PKG_CONFIG_SYSROOT_DI.patch with entries in meson.cross. Rest of the patches are refreshed. Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-02-26bitbake.conf/image: Move image specific PSEUDO_IGNORE_PATHS to image classRichard Purdie
This path is image specific so we can move to the image class definition of PSEUDO_IGNORE_PATHS. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-02-26populate_sdk: Add directories to PSEUDO_IGNORE_PATHSRichard Purdie
Some paths used in sdk construction shouldn't be tracked under pseudo so list these. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-02-26image: Add directories to PSEUDO_IGNORE_PATHSRichard Purdie
Some paths used in image construction shouldn't be tracked under pseudo so list these. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-02-26externalsrc: Pass through npmsw URIs in SRC_URIMike Crowe
NPM shrinkwrap files need to stay in SRC_URI even when using externalsrc so that npm_do_fetch can run to fetch the required dependencies. Signed-off-by: Mike Crowe <mac@mcrowe.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-02-26package/package_rpm: Disable font_provides configuration for reproducibiltyRichard Purdie
The host may or may not have fc-cache which is used for find provides information by rpmdeps. This lead to non-deterministic build output. Disable the font provides code so we have deterministic builds, we have nothing using/relying on it at this point. Need to disable this in both the rpmdeps code and in package_rpm itself although the latter shouldn't be being used. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-02-26go: Enable CGO and pie buildmode on rv64Khem Raj
go1.16 has added CGO support for riscv64 arch Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-02-26goarch: Use softfloat instead of 387 for 386 goarchKhem Raj
387 has been removed from go 1.16 see [1] [1] https://github.com/golang/go/issues/40255 Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-02-24reproducible: Improve SOURCE_DATE_EPOCH_FALLBACK handlingRichard Purdie
Ensure the fallback value if used is written to the SDE file and hence stored in sstate, reducing any confusion within the code over '0' values. Bump the HASHEQUIV_VERSION since we've had a ton of trouble with ensuring this rolls out correctly on the autobuilder so others may too, take a clean slate for it. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-02-24reproducible_builds: SOURCE_DATE_EPOCH should not be 0Jan-Simon Möller
A SOURCE_DATE_EPOCH of 0 might be misinterpreted by namely rpm as no SDE. e.g.: char *srcdate = getenv(SOURCE_DATE_EPOCH); if (srcdate && rpmExpandNumeric(%{?clamp_mtime_to_source_date_epoch})) Solve this by: - providing a SOURCE_DATE_EPOCH_FALLBACK variable != 0 - changing defaults to use it - using SOURCE_DATE_EPOCH_FALLBACK also when reading 0 out of sstate-cache Signed-off-by: Jan-Simon Möller <jsmoeller@linuxfoundation.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-02-23report-error.bbclass: Add layer and bitbake version info to error reportMilan Shah
Instead of just providing local.conf info, add layer names and their revisions with bitbake version information into error report makes it easier to understand and reproduce failed build. [YOCTO #9700] Signed-off-by: Milan Shah <mshah@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-02-23kernel-fitimage: Don't use unit addresses on FITKlaus Heinrich Kiwi
Das U-Boot 2021.4-rc1 has the following commit: commit 3f04db891a353f4b127ed57279279f851c6b4917 Author: Simon Glass <sjg@chromium.org> Date: Mon Feb 15 17:08:12 2021 -0700 image: Check for unit addresses in FITs Using unit addresses in a FIT is a security risk. Add a check for this and disallow it. CVE-2021-27138 Adjust the kernel-fitimage.bbclass accordingly to not use unit addresses. This changte is required before we can bump U-Boot to 2021.4. Signed-off-by: Klaus Heinrich Kiwi <klaus@linux.vnet.ibm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-02-23goarch.bbclass: Fix ppc64le detectionKhem Raj
ppc64le should go above ppc64 in checks otherwise it gets subsumed wrongly with ppc64 check Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-02-23linuxloader: Deal with little-endian ppc64 ldso nameKhem Raj
On ppc64le 'le' should be appended to ldso name Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-02-21license_image: Don't canonicalise INCOMPATIBLE_LICENSERichard Purdie
The code internally correctly handles canonicalisation of these license fields, we shouldn't call it manually. The issue is that the fields can contain wildcards and GPLv3* means something quite different to GPLv3-only*. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-02-21licenses: Update INCOMPATIBLE_LICENSE for 'or-later' handlingRichard Purdie
Where a user adds "GPLv3" to INCOMPATIBLE_LICENSE they almost certainly mean both GPLv3-only and GPLv3-or-later. Update the code to handle this correctly. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-02-21licenses: Fix canonical license for 'or-later' handlingRichard Purdie
GPLv2 and GPLv2+ are two difference licenses with different meanings and we can't just pretend they're the same thing. Change the code to treat them separately. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-02-21recipes: Update common-licenses references to match new namesRichard Purdie
The licenses were renamed to match their SPDX names, fix the references in LIC_FILES_CHKSUM in OE-Core. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-02-19package_rpm: Enable use_source_date_epoch_as_buildtime in package_rpm classJan-Simon Möller
Adding --define 'use_source_date_epoch_as_buildtime 1' to rpmbuild ensure that the rpm header does have a consistent BUILDTIME tag. This allows the rpms to be built reproducibly. Signed-off-by: Jan-Simon Möller <jsmoeller@linuxfoundation.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-02-19cmake: set CMAKE_EXPORT_NO_PACKAGE_REGISTRYKonrad Weihmann
if a cmake file uses export(PACKAGE) command it creates a folder ~/.cmake/package/<name> in the current user's home-dir. fix this host contermination by setting CMAKE_EXPORT_NO_PACKAGE_REGISTRY to ON by default, which makes the export() command do nothing Signed-off-by: Konrad Weihmann <kweihmann@outlook.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-02-19kernel-fitimage: fix dtbo support for fit imagesAnthony Bagwell
8a2f4e143 added support for u-boot boot script but missed adding the extra parameter to fitimage_emit_section_config on the dtbo branch Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-02-19sstate.bbclass: Split sstate summary into locally and network found artifactsAlejandro Hernandez Samaniego
Modify sstate class to add extra output, differentiating between artifacts found locally and those found over the network. Signed-off-by: Alejandro Enedino Hernandez Samaniego <alhe@linux.microsoft.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-02-18rootfs_deb: handle aarch64 SDK_ARCHRoss Burton
This class maps from OE architectures to dpkg architectures, but wasn't handling aarch64 correctly. Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-02-17distutils3-base: Fix after native packaging changesRichard Purdie
Now that native recipes have PACKAGES, this DEPENDS construct doesn't work. It applies to target and nativesdk recipes so adjust accordingly. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-02-16classes: Drop now unneeded umask flagsRichard Purdie
Now that 022 is the default in BB_DEFAULT_UMASK in bitbake.conf, we don't need any of these task flags, clean up. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-02-12npm.bbclass: avoid building target nodejs for native npm recipesYoann Congal
The current recipe unconditionally RDEPENDS on nodejs (the target one). When building on the "-native recipe" of "BBCLASSEXTEND native" recipe, the target nodejs is unnecessarily built. This patch fixes this by only RDEPENDS on nodejs when building for the target. Signed-off-by: Yoann Congal <yoann.congal@smile.fr> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-02-09cve-check: add include/exclude layersakuster
There are times when exluding or including a layer may be desired. This provide the framwork for that via two variables. The default is all layers in bblayers. CVE_CHECK_LAYER_INCLUDELIST CVE_CHECK_LAYER_EXCLUDELIST Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-02-09cve-check.bbclass: add layer to cve logakuster
Lets include whcih layer a package belongs to and add it to the cve logs Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-02-07autotools: no need to depend on gnu-configRoss Burton
autoconf 2.70 onwards installs its own copies of config.guess/config.sub which we keep up to date when autoconf builds, so there's no need to depend on gnu-config for those files. Signed-off-by: Ross Burton <ross.burton@arm.com>
2021-02-07autotools: remove intltoolize logicRoss Burton
autoconf 2.70 now invokes intltoolize, so there's no need to do it again in this class. Signed-off-by: Ross Burton <ross.burton@arm.com>
2021-02-07autotools: disable gtkdocize for nowRoss Burton
This breaks kmod, so for now we can continue to do it ourselves. Signed-off-by: Ross Burton <ross.burton@arm.com>
2021-02-07autotools: don't warn about obsolete usageRoss Burton
New autoconf warns about obsolete macro usage, but there is quite a lot of obsolete usage in the wild which isn't really in our problem. Signed-off-by: Ross Burton <ross.burton@arm.com>
2021-02-06license_image.bbclass: Don't attempt to symlink to the same fileMike Looijmans
Sometimes (that is, in all my builds) the lic_manifest_dir and lic_manifest_symlink_dir end up pointing to the same file, resulting in an error like this: Exception: FileExistsError: [Errno 17] File exists: '/.../tmp-glibc/deploy/licenses/my-image-tdkz15' -> '/.../tmp-glibc/deploy/licenses/my-image-tdkz15' First check to see if this is the case before attempting to create the link. Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-02-06image_types.bbclass: tar: use posix format instead of gnuMartin Jansa
* gnu isn't compatible with --xattrs used e.g. here: https://github.com/advancedtelematic/meta-updater/blob/d3a832f66e8802cb45536ff278d5c77f946d341d/classes/image_types_ostree.bbclass#L16 causing do_image_tar failing with: | tar: --xattrs can be used only on POSIX archives | Try 'tar --help' or 'tar --usage' for more information. * https://www.gnu.org/software/tar/manual/html_chapter/tar_8.html says about posix format: This is the most flexible and feature-rich format. It does not impose any restrictions on file sizes or file name lengths. This format is quite recent, so not all tar implementations are able to handle it properly. However, this format is designed in such a way that any tar implementation able to read `ustar' archives will be able to read most `posix' archives as well, with the only exception that any additional information (such as long file names etc.) will in such case be extracted as plain text files along with the files it refers to. This archive format will be the default format for future versions of GNU tar. and: The default format for GNU tar is defined at compilation time. You may check it by running tar --help, and examining the last lines of its output. Usually, GNU tar is configured to create archives in `gnu' format, however, future version will switch to `posix'. * I've compared tar on centos7 and ubuntu-18.04: bash-4.2$ cat /etc/centos-release CentOS Linux release 7.9.2009 (Core) bash-4.2$ tar --version tar (GNU tar) 1.26 ... bash-4.2$ tar --help | tail -n 5 *This* tar defaults to: --format=gnu -f- -b20 --quoting-style=escape --rmt-command=/etc/rmt --rsh-command=/usr/bin/ssh ... bitbake@e0ee76f81c2f:/$ grep VERSION /etc/os-release VERSION="18.04.5 LTS (Bionic Beaver)" VERSION_ID="18.04" VERSION_CODENAME=bionic bitbake@e0ee76f81c2f:/$ tar --version tar (GNU tar) 1.29 ... bitbake@e0ee76f81c2f:/$ tar --help | tail -n 5 ... *This* tar defaults to: --format=gnu -f- -b20 --quoting-style=escape --rmt-command=/usr/lib/tar/rmt --rsh-command=/usr/bin/rsh Both support posix format (as pax POSIX 1003.1-2001). But centos7 version is already too old anyway, because it doesn't support --sort=name used since: https://git.openembedded.org/openembedded-core/commit/?id=4fa68626bbcfd9795577e1426c27d00f4d9d1c17 and https://git.openembedded.org/openembedded-core/commit/?id=f19e43dec63a86c200e04ba14393583588550380 says that 1.28 is the minium version now and https://git.openembedded.org/openembedded-core/commit/?id=7a66434cf11b7f051699b774e4fccd6738351368 recommends to use install-buildtools for hosts with tar < 1.28 On the other side latest tumbleweed from: https://hub.docker.com/r/opensuse/tumbleweed with tar-1.33 alredy defaults to posix format: b99dbb3d86dd:/ # head -n 3 /etc/os-release NAME="openSUSE Tumbleweed" ID="opensuse-tumbleweed" b99dbb3d86dd:/ # tar --version tar (GNU tar) 1.33 ... b99dbb3d86dd:/ # tar --help | tail -n 3 *This* tar defaults to: --format=posix -f- -b20 --quoting-style=escape --rmt-command=/usr/bin/rmt --rsh-command=/usr/bin/ssh I've packaged some sample rootfs directory with both tars and the result is identical (with --format=gnu as well as --format=posix). with ubuntu: tar --sort=name --format=gnu --numeric-owner -cf rootfs.ubuntu.gnu.tar -C rootfs . tar --xattrs --xattrs-include=* --sort=name --format=posix --numeric-owner -cf rootfs.ubuntu.posix.tar -C rootfs . tumbleweed: tar --sort=name --format=gnu --numeric-owner -cf rootfs.tumbleweed.gnu.tar -C rootfs . tar --xattrs --xattrs-include=* --sort=name --format=posix --numeric-owner -cf rootfs.tumbleweed.posix.tar -C rootfs . centos7 (without --sort=name): tar --format=gnu --numeric-owner -cf rootfs.centos7.gnu.tar -C rootfs . tar --xattrs --xattrs-include=* --format=posix --numeric-owner -cf rootfs.centos7.posix.tar -C rootfs . size is identical: -rw-r--r-- 1 mjansa mjansa 2487480320 Feb 5 09:19 rootfs.ubuntu.gnu.tar -rw-r--r-- 1 mjansa mjansa 2487480320 Feb 5 10:17 rootfs.centos7.gnu.tar -rw-r--r-- 1 mjansa mjansa 2487480320 Feb 5 10:26 rootfs.tumbleweed.gnu.tar -rw-r--r-- 1 mjansa mjansa 2579875840 Feb 5 10:15 rootfs.ubuntu.posix.tar -rw-r--r-- 1 mjansa mjansa 2579875840 Feb 5 10:16 rootfs.centos7.posix.tar -rw-r--r-- 1 mjansa mjansa 2579875840 Feb 5 10:26 rootfs.tumbleweed.posix.tar but md5s aren't: 5e3880283379dd773ac054e20562fdea rootfs.centos7.gnu.tar abeaf992c780aa780a27be01365d26f5 rootfs.centos7.posix.tar 0c6ee59d87ab56583293262de110bca4 rootfs.tumbleweed.gnu.tar 1555bc7276eaba924bf82a13a010fd6d rootfs.tumbleweed.posix.tar 553d802bba351e273191bd5b2a621b66 rootfs.ubuntu.gnu.tar b6d7b43b30174686f6625ba3c7aefdc6 rootfs.ubuntu.posix.tar diffoscope shows some differences when using gnu format: $ diffoscope rootfs.tumbleweed.gnu.tar rootfs.ubuntu.gnu.tar ... -00239890: 3030 3000 3030 3737 3637 0020 4b00 0000 000.007767. K... +00239890: 3030 3000 3031 3135 3737 0020 4b00 0000 000.011577. K... ... -00239900: 0075 7374 6172 2020 0000 0000 0000 0000 .ustar ........ +00239900: 0075 7374 6172 2020 0072 6f6f 7400 0000 .ustar .root... ... -00239920: 0000 0000 0000 0000 0000 0000 0000 0000 ................ +00239920: 0000 0000 0000 0000 0072 6f6f 7400 0000 .........root... with posix format there are also some differences shown by diffoscope: $ diffoscope rootfs.tumbleweed.posix.tar rootfs.ubuntu.posix.tar 016a4c00: 2e2f 7573 722f 6269 6e2f 5061 7848 6561 ./usr/bin/PaxHea -016a4c10: 6465 7273 2f63 6861 7474 722e 6532 6673 ders/chattr.e2fs -016a4c20: 7072 6f67 7300 0000 0000 0000 0000 0000 progs........... +016a4c10: 6465 7273 2e32 322f 6368 6174 7472 2e65 ders.22/chattr.e +016a4c20: 3266 7370 726f 6773 0000 0000 0000 0000 2fsprogs........ ... 03937000: 2e2f 7573 722f 6269 6e2f 5061 7848 6561 ./usr/bin/PaxHea -03937010: 6465 7273 2f63 6f6e 7461 696e 6572 642d ders/containerd- -03937020: 6374 7200 0000 0000 0000 0000 0000 0000 ctr............. +03937010: 6465 7273 2e32 322f 636f 6e74 6169 6e65 ders.22/containe +03937020: 7264 2d63 7472 0000 0000 0000 0000 0000 rd-ctr.......... so cannot really say which format is better for reproducible tar archives from different distros, but posix at least supports xattrs and it's the format for future. Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-02-03package: Ensure do_packagedata is cleaned correctlyRichard Purdie
In an earlier commit, libprocps was split into a separate package leaving no shlibs in the main package. A bug was seen where igt-gpu-tools wouldn't build correctly in some cases as it thought the librbary was still in the main package, throwing qa errors as a result. The issue was due to an extra file being left in the sstate output of the do_packagedata task in the shlibs2/ folder which contained the bad shlibs information. The reason for this was that the temporary directory used in this task wasn't being cleaned so files which were deleted were not handled correctly. Add a missing cleandirs entry to fix this. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-02-03sanity.bbclass: Check if PSEUDO_IGNORE_PATHS and paths under pseudo control ↵Dorinda
overlap Added a sanity check for when PSEUDO_IGNORE_PATHS and paths under pseudo control overlap to avoid random failures generated. [YOCTO #14193] Signed-off-by: Dorinda Bassey <dorindabassey@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-01-31image_types: Ensure tar archives are reproducibleRichard Purdie
The tar output seems to vary depending on the version of tar used and distro configuration. Be explict about the output format to avoid this and be determinstic. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-01-30Revert "sanity.bbclass: check if PSEUDO_IGNORE_PATHS and ${S} overlap"Richard Purdie
This reverts commit c5a6cc4146402620851e2a1f2b01d69989150ba2. This was accientally added and shouldn't have been, it has a v2 and was then determined not to be required.
2021-01-30kernel.bbclass: fix deployment for initramfs imagesAwais Belal
The do_bundle_initramfs() only processes kernel image types that are found in KERNEL_IMAGETYPE_FOR_MAKE whereas the build system can generate other types that are not directly supported by the kernel build system. In which case when we come to the deploy phase not all the images mentioned in KERNEL_IMAGETYPES would have a respective initramfs bundled image. An example is using vmlinux.gz in KERNEL_IMAGETYPES and enabling initramfs and then we see install: cannot stat 'arch/arm64/boot/vmlinux.gz.initramfs': No such file or directory So we align the deploy phase with bundle initramfs phase and pick up relevant initramfs bundled images using KERNEL_IMAGETYPE_FOR_MAKE instead of KERNEL_IMAGETYPES. Signed-off-by: Awais Belal <awais_belal@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-01-30cve_check: add CVE_VERSION_SUFFIX to indicate suffix in versioningLee Chee Yang
add CVE_VERSION_SUFFIX to indicate the version suffix type, currently works in two value, "alphabetical" if the version string uses single alphabetical character suffix as incremental release, blank to not consider the unidentified suffixes. This can be expand when more suffix pattern identified. refactor cve_check.Version class to use functools and add parameter to handle suffix condition. Also update testcases to cover new changes. Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-01-30sanity.bbclass: check if PSEUDO_IGNORE_PATHS and ${S} overlapDorinda
added a sanity check for when PSEUDO_IGNORE_PATHS and ${S} overlap to avoid random failures generated. [YOCTO #14193] Signed-off-by: Dorinda Bassey <dorindabassey@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-01-30npm.bbclass: use python3 for npm configVyacheslav Yurkov
python2-native executable is not available in sysroot anymore, which causes compilation of some nodejs modules to fail. Switch to python3 as a default python version. Signed-off-by: Vyacheslav Yurkov <uvv.mail@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-01-29gtk-doc: Disable dependencies in native caseRichard Purdie
Ensure that dependencies like qemu-native aren't added in the native case since we don't want docs generate for native recipes. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-01-29native: Stop clearing PACKAGESRichard Purdie
Native recipes have been special and they don't have packages generated from them. The RDEPENDS/RPROVIDES and other runtime package specific variables can contain important data about dependencies recipes need though and currently it is required to write this information explicitly in the native case. We now delete the packaging tasks for native recipes which removes the need to clear PACKAGES. The next step to improve the metadata is to stop clearing it and ensure any entries in these variables are remapped appropriately. The R* variables were already being processed by the class extension code but the implementation was suboptimal. This patch stops clearing PACKAGES and PACKAGES_DYNAMIC and fixes the places where that caused issues in OE-Core, for example PACKAGES additions in anonymous python without the "-native" suffix and a case where the included classes caused a self reference in DEPENDS which would once have been removed by the previous code. The implementation uses datastore/parser parameters to ensure that the variable overrides are not overwritten when calling setVar which is appropriate for a function as close to the core as this one is. Some now unneeded code in python3-setuptools is dropped, there are further changes like this which can follow. This change was verified with OE-Core by comparing task-depends.dot generated by "bitbake world -g" before and after the change, the files were identical. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-01-29package_rpm: Clean up unset runtime package variable handlingRichard Purdie
If the R* runtime package variables are unset it could cause trackbacks. There were some fallbacks already, clean this up to handle consistently. The code was expecting strings but setting defaults of empty lists which silently were converted to strings by the "or" statements which was a nightmare to understand or alter. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-01-29buildhistory.bbclass: avoid exception for empty BUILDHISTORY_FEATURES variablePeter Bergin
An exception is fired when a BuildStarted event is sent to buildhistory bbclass and the variable BUILDHISTORY_FEATURES is not set. ERROR: Execution of event handler 'buildhistory_eventhandler' failed Traceback (most recent call last): File "<...>/meta/classes/buildhistory.bbclass", line 862, in buildhistory_eventhandler(e=<bb.event.BuildStarted object at 0x7f94c3810250>): python buildhistory_eventhandler() { > if e.data.getVar('BUILDHISTORY_FEATURES').strip(): reset = e.data.getVar("BUILDHISTORY_RESET") AttributeError: 'NoneType' object has no attribute 'strip' This can happen in a multiconfig build where the default configuration use the buildhistory class but not the configuration in mc. It should be a rare case that this happens and it was found in a missconfigured build. Signed-off-by: Peter Bergin <peter@berginkonsult.se> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>