summaryrefslogtreecommitdiffstats
path: root/meta/classes
AgeCommit message (Collapse)Author
2021-09-08kernel-devicetree: Fix interaction when packaging disabledgatesgarthRichard Purdie
When packaging is disabled using the nopackages class, ensure we don't add to PACKAGES. This fixes builds where we have an unpackaged kernel alongside a packaged kernel. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit d6b114cf5a9b22688c0b59a3afc46a07450d87b5) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-09-08kernel: Fix interaction when packaging disabledRichard Purdie
When packaging is disabled using the nopackages class, ensure we don't add to PACKAGES. This fixes builds where we have an unpackaged kernel alongside a packaged kernel. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 2522daf22e2c27dd9c7926feda0345978217c6c3) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-05-05populate_sdk_ext: Avoid copying and producing .pyc filesMark Hatle
Since pyc cache files are really system specific, no real reason to copy or generate them during the eSDK build process. Also generating them has the possibility of re-using inodes that pseudo may have been tracking, leading a build failure. Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit ce8eba263647ae63a722122e28f26af46ae083a0) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-04-23sanity: Further improve directory sanity testsRichard Purdie
Add tests to ensure COREBASE/TMPDIR doon't contain ".." as this causes hard to understand build failures. Also rework the code to test TMPDIR and COREBASE for all the patterns since they may be set differently and one may contain problematic characters. [YOCTO #14111] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit f22a6e46d003aba516a9a0cc7f94eae678d846b7) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-04-20externalsrc: Detect code changes in submodulesDouglas Royds
Further to 50ff9afb39, only detect code changes in submodules that are subdirectories of the EXTERNALSRC directory. The (undocumented) git submodule--helper returns a path for each submodule relative to the top of the repo. Don't add submodules that are not within our source subtree. [YOCTO #14333] Signed-off-by: Douglas Royds <douglas.royds@taitradio.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 1c18225d3ef94a41fc073ae87c163b68e6d46571) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-04-20insane: clean up some more warning messagesRoss Burton
Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 2abe18682192e7b38b9af5a5043906f2f069648f) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-04-20sanity: Add error check for '%' in build pathRichard Purdie
It has been reported that '%' characters in build paths break with python exceptions, probably due to confusion with python string escaping. Whilst it is probably fixable, showing the user a human readable error is better given it doesn't work. [YOCTO #14282] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 31a3cf78452270131a657be45e76569515cff7ef) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-04-09image-live.bbclass: optional depends when ROOTFS emptyGuillaume Champagne
`ROOTFS` is optional. It can be empty if the live image doesn't require a rootfs. In such cases, the build doesn't depend on `do_image_{LIVE_ROOTFS_TYPE}`. Signed-off-by: Guillaume Champagne <champagne.guillaume.c@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 96f47c39f1d17f073243913d524bde84add41d8f) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-04-09image,populate_sdk_base: move 'func' flag setting for sdk command varsChristopher Larson
Setting the 'func' flag on the commands variables ensures that they are parsed as shell, and therefore that the referenced commands contents are included in checksums. Doing this only in image.bbclass means that this is missing in recipes that are not images, but which inherit populate_sdk or populate_sdk_base directly, so move it to the latter. [YOCTO #13998] Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit edc28907ce19a7298059dd388933c58a9c6c28b9) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-04-09buildhistory: add missing vardepsexcludesChristopher Larson
For POPULATE_SDK_POST_TARGET_COMMAND, POPULATE_SDK_POST_HOST_COMMAND, and SDK_POSTPROCESS_COMMAND, the appropriate entries were added to vardepvalueexclude, but we want them in vardepsexclude as well. Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 554b17e0bbe5190e4b03121f2ed06f4845012a71) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-04-09devshell.bbclass: Exceptions displayed within devpyshellDorinda Bassey
If you type something into devpyshell, an exception should be triggered, but that exception isn't printed out because it is not being flushed out of the buffer. This patch fixes that issue. [YOCTO #12156] Signed-off-by: Dorinda Bassey <dorindabassey@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 9f95e82a3b27bfd5177a855326dcad8a5bdf5b2d) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-03-19populate_sdk_ext: record METADATA_REVISIONChen Qi
As we delete the .git/ directory, it's impossible to get METADATA_REVISION inside eSDK. Because of this, we meet the following warning when installing eSDK. WARNING: The base-files:do_install sig is computed to be 16b9d96148d45de183cc94667aae016ec7d102d48255456381e718cd4bbd0aa0, \ but the sig is locked to 6eb0dcaed504282becee94662481d79264db920dee1f7deda18230133fff8f36 in SIGGEN_LOCKEDSIGS_t-qemux86-64 So we record METADATA_REVISION in eSDK generation time to fix this problem. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit ff2ad51b801fd62e2abbc573ba2c9ee8fdc7e012) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-03-10bitbake.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> (cherry picked from commit 66a8ca0f206434e0b301a8fdc90f062750d6d118) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-03-10populate_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> (cherry picked from commit 21621e09162ff9e8014a1cfba78d0f2c3746202a) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-03-10image: 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> (cherry picked from commit 9463be2292b942a1072eea88881b9644e55aadb9) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-03-10externalsrc: 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> (cherry picked from commit e889cbecf9a1731b199e57d79a14e574398586bb) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-03-10report-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> (cherry picked from commit a5afd7b1857c0012ab6e3d8bbafa67a96ff9e9e0) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-03-10package_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> (cherry picked from commit f16721df6b3d0d3e681d9a1b3393417bd62b6275) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-03-10npm.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> (cherry picked from commit 92a9a86df9e3bcffb13d2f8b5dcbe7822170f734) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-03-10cve-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> (cherry picked from commit 5fdde65ef58b4c1048839e4f9462b34bab36fc22) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-03-10cve-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> (cherry picked from commit 00d965bb42dc427749a4c3985af56ceffff80457) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-03-10rootfs_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> (cherry picked from commit 315fe8ab3b5bb8a709be98cd8998d4525fbe8725) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-03-09Revert "sanity.bbclass: Add az fetcher to accepted URI protocols for mirrors ↵Richard Purdie
sanity" This reverts commit c0befa46a2494a1fee46bcee853db6430940ba8f. Was added to the wrong branch accidentally.
2021-02-26sanity.bbclass: Add az fetcher to accepted URI protocols for mirrors sanityAlejandro Hernandez Samaniego
Signed-off-by: Alejandro Enedino Hernandez Samaniego <alhe@linux.microsoft.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-02-11python3targetconfig.bbclass: Make py3 dep and tasks only for target recipesKhem Raj
python3targetconfig append target python3 to dependencies unconditionally, and here its inherited unconditionally too but distutils3-base is inherited in BBCLASSEXTEND'ed recipes and other not-target recipes as well. Hence the change added via 9c8f666097802cb594a759989edcf01603a22df3 is now bridging the native dependencies with target python3 and thats resulting all sorts of rebuilds for multimachine builds e.g. MACHINE=qemuarm bitbake python3-scons-native MACHINE=qemumips bitbake python3-scons-native results in rebuilds for python3-scons-native bitbake-diffsigs shows Hash for dependent task python/python3-scons-native_3.1.2.bb:do_populate_sysroot changed from 1cdb93193b416477df6faa137e83a967b433c7aa29033146b405153f73f36933 to 3cea1e7cbedd121ecb768fbc291cc4e4d7d3b5c0442897 0e3b97bd058d162065 Hash for dependent task python/python3-scons-native_3.1.2.bb:do_install changed from 8d6018fd03ffc6060a04532dc39a5b7ccca1be026a69d069cb4fb11aef86dd89 to c5f1d173596a8e910f45a2b6e0b4dab96cd0102be4d62bd3156 229cb0f5ebb11 Hash for dependent task python/python3-scons-native_3.1.2.bb:do_compile changed from e3ee4b52a15267e6ae7853ec19a666b2fb62608a597608793336382d1c45f8a0 to 1e582043dfe6b3e00aaa532f363ce6afb37652abe837dac 7cc9769194c43eae1 Hash for dependent task python/python3-scons-native_3.1.2.bb:do_configure changed from 770a4d5a77a96ebd9e1e7368f710bca3f88e3b1266dffa3b2d0360b1e3a81e27 to a366982778b03eee5165c3117ee778f848acdfaa2 b346650fbdf114ac70ab57b Hash for dependent task python/python3-scons-native_3.1.2.bb:do_prepare_recipe_sysroot changed from 958910037856ff5d5eb2b5162b3cdd02a3a710fc543b933cfeba771ee095cb72 to 474333fb565f908992fd3716 4935aaecf31a79e867826fe634cde4f44171d8e7 Hash for dependent task python/python3_3.9.0.bb:do_populate_sysroot changed from 7ac1c4fcbb2eacf98d2c32d991751bd2f3c7d55e2e32f2c9e485e7f5975fecf8 to 25dcfe74a95af19cce8df7c29311cc5edbbf6ad 08777e46a6fa6e417c0445018 ... Therefore limit effects of this class only for target recipes. Signed-off-by: Khem Raj <raj.khem@gmail.com> Cc: Alexander Kanavin <alex.kanavin@gmail.com> Cc: Martin Jansa <Martin.Jansa@gmail.com> Cc: Jose Quaresma <quaresma.jose@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 59cc148de3fd19f5041727f072f087f741c506f6) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-02-11meta: drop _PYTHON_SYSCONFIGDATA_NAME hacksAlexander Kanavin
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 7901859e38de06c56b8535a8425e76cb114c57dc) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-02-11distutils3-base.bbclass: use python3targetconfigAlexander Kanavin
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 10cdc26748e64394e829d919a15e899812bb2fe2) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-02-11python3: split python target configuration into own classAlexander Kanavin
Setting _PYTHON_SYSCONFIGDATA_NAME in python3native class globally was problematic as it was leaking into host python environment, which was causing tracebacks depending on host distro and action (typically anything involving importing sysconfig module). The new class sets the variable only in specific tasks where it is needed, and should be inherited explicitly: - use python3native to run scripts with native python - use python3targetconfig to run scripts with native python if those scripts need to access target config data (such as correct installation directories). This also adds a dependency on target python, so should be used carefully to avoid lengthening builds. Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 823cbf815d6984e813f0ae812f6a14469150eeff) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-02-09license_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> (cherry picked from commit 50f83fb542065eaf7a20ac07b63ae06441ada180) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-02-09image_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> (cherry picked from commit 3ecea58f2a3382d9f4b410d6ad7089111334cb6f) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-02-06kernel.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> (cherry picked from commit 526bdd88ccd758204452579333ba188e29270bde) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-02-06package: 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> (cherry picked from commit 50f17d0a655a3a2556f9fcad67259101c2814a36) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-02-06sanity.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> (cherry picked from commit 6e4bd8cabcdedf4b52345ef5eb421f71d0f19b1d) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-02-06staging: Clean up files installed into the sysrootRichard Purdie
There are a variety of files being installed into $datadir which we don't need. Pick the top "offenders" which amount of thousands of files and simply don't install them. These include things like test data, terminfo data, locale data for native tools and so on. This saves copying these files into native and target sysroots and should improve performance (smaller sstate, fewer files to copy around). With this and the python recipe change, alsa-tools went from: recipe-sysroot: 18357 recipe-sysroot-native: 14129 to recipe-sysroot: 10809 recipe-sysroot-native: 8079 which is a decent improvement. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 366c72941fe1c24d0b1d96df46e13cb9eb4e79d6) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-02-06npm.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> (cherry picked from commit d21f50ecf8e8683a92b7d234fa8225c2c1470595) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-02-06npm.bbclass: make shrinkwrap file optionalKamel Bouhara
Some packages don't have shrinkwrap file which means no npmsw uri is provided in the recipe. Signed-off-by: Kamel Bouhara <kamel.bouhara@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 47760b0d7d66b2b68ee197d359f0b7b17374d742) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-02-06image_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. (From OE-Core rev: c56f3c9febc1732aa1302524c6c4da36f16bd1f7) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 9dbe0f69f874d3687ae1accc19116570bad86c04) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-02-01cve_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. (From OE-Core rev: 5dfd5ad5144708b474ef31eaa89a846c57be8ac0) Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 86b42289bda5bc2a4eff221ab476f170dd3d3794) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-02-01cve-check: replace Looseversion with custom version classLee Chee Yang
The way distutils.version.LooseVersion compare version are tricky, it treat all these ( "1.0-beta2", "1.0-rc1", "1.0A", "1.0p2" and "1.0pre1") as greater version than "1.0". This might be right for "1.0A" and "1.0p1" but not for the rest, also these version could be confusing, the "p" in "1.0p1" can be "pre" or "patched" version or even other meaning. Replace Looseversion with custom class, it uses regex to capture common version format like "1.1.1" or tag format using date like "2020-12-12" as release section, check for following known string/tags ( beta, rc, pre, dev, alpha, preview) as pre-release section, any other trailing characters are difficult to understand/define so ignore them. Compare release section and pre-release section saperately. included selftest for the version class. [YOCTO#14127] (From OE-Core rev: 6ced85e9ddd3569240f1e8b82130d1ac0fffbc40) Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 3807c6d9a78ac8ade24c9c69cfe2b9624c49a20d) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-02-01buildhistory.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. (From OE-Core rev: a74e30a4de02c8efd3e7102ba7a4fe06df53cc34) Signed-off-by: Peter Bergin <peter@berginkonsult.se> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 55ead1be58679c3bcb7d1c141672b999d53e90ef) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-02-01externalsrc: Detect code changes in submodulesTomasz Dziendzielski
The srctree_hash was calculated only from main source directory ignoring changes in submodules. [YOCTO #13748] Use submodule--helper to determine all submodules, and calculate hash from all git tree objects names combined. (From OE-Core rev: 50ff9afb3990bcf60b4fa1f937506cb84028c32d) Signed-off-by: Tomasz Dziendzielski <tomasz.dziendzielski@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 9385670add6e630cebef758a30af17d3e57fcdfb) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-02-01sanity.bbclass: sanity check for if bitbake is present in PATHDorinda
If a user executes the environment script instead of sourcing it, there's an error about an empty element in PATH. This is because bitbake isn't present in environment variable PATH. Hence, this patch adds a sanity check to verify if bitbake is present in PATH and if bitbake isn't present issue a warning message. [YOCTO #13822] (From OE-Core rev: e08799913a7f207bc63e085eb98196fd61ed57bc) Signed-off-by: Dorinda Bassey <dorindabassey@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit dbd80a923c9075d363f69ffd86b4392c210d668d) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-02-01sanity: Verify that user isn't building in PSEUDO_IGNORE_PATHSDorinda
If a user builds in a path in PSEUDO_IGNORE_PATHS, random failures are generated. Hence this patch adds a sanity check in sanity.bbclass to ensure that a user isn't building in PSEUDO_IGNORE_PATHS. [YOCTO #14179] (From OE-Core rev: 7a681525e904914e938de25df5cc64209097d15d) Signed-off-by: Dorinda Bassey <dorindabassey@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit bfeeaf9ff148a61868e0c882b7455dc02ca8ed76) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-02-01externalsrc: Fix parsing error with devtool non-git sourcesTomasz Dziendzielski
If srcdir is under poky directory (e.g. devtool poky/build/workspace/sources) and is not a git repository then ${@srctree_hash_files(d)} will run "git rev-parse --git-dir" and detect poky directory as git-dir and run "'git', 'add', '-A', '.'], cwd=s_dir" trying to add srcdir but build dir is in .gitignore and latest git will fail with "The following paths are ignored by one of your .gitignore files: build" which will end with "ExpansionError during parsing". In this commit I added a check if git_dir is the same as git-dir from TOPDIR (which will detect poky directory) and if yes, then treat srcdir as non-git sources. (From OE-Core rev: 95fbac8dcad6c93f4c9737e9fe13e92ab6befa09) Signed-off-by: Tomasz Dziendzielski <tomasz.dziendzielski@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 28bdfe0066cb3c41d6471af75dabcc573e319688) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-01-27linuxloader: Avoid confusing string concat errorsRichard Purdie
None is a bad choice of return value for functions used in variables (strings) as a failure results in concatination errors. Use a string with a clear meaning that can be searched for instead. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-01-21image_types_wic: Move wic working directoryPaul Barker
By default the wic working directory is placed under the output directory. When invoking wic under bitbake, the wic output directory is added to PSEUDO_PATHS_IGNORE to avoid issues with files being removed from outside a pseudo environment (see oe-core commit ad8f5532ff). However, wic will copy the rootfs directory into its working directory if it needs to add or remove content before creating a filesystem image. This copy of the rootfs directory must be tracked by pseudo in order to keep the permissions correct in the resulting image. So we can't have the wic working directory under a path in PSEUDO_PATHS_IGNORE unless we like broken permissions. To fix this the new '-w' argument to wic is used to move the working directory away from the output directory. Note that wic deletes the temporary working directory automatically when it finishes creating an image so users won't normally see the 'tmp-wic' directory under WORKDIR. Fixes [Yocto #14129] Signed-off-by: Paul Barker <pbarker@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 4d07169499c47fa9dc759e6f81843416a6dc25c5) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-01-21wic: Allow exec_native_cmd to run HOSTTOOLSPaul Barker
This allows programs from HOSTTOOLS (e.g. 'install', 'rm', 'mv', etc) to be more easily executed by wic. Without this change only programs from an actual *-native recipe built by bitbake can be executed by wic. Signed-off-by: Paul Barker <pbarker@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 8eb186acdecfbb3151c9a0ab148358e3fe5cce39) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-01-19systemd.bbclass: improve error message when a service unit specified in ↵Chris Laplante
SYSTEMD_SERVICE is not found The previous message was fairly useless without diving into the bbclass. Signed-off-by: Chris Laplante <mostthingsweb@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit ef6117b148be65536e89409a83cbfd22049c652e) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-01-14license.bbclass: Add COMMON_LICENSE_DIR and LICENSE_PATH dirs to ↵Martin Jansa
PSEUDO_IGNORE_PATHS * now without ${COREBASE}/meta in PSEUDO_IGNORE_PATHS after: 73d538f207 bitbake.conf: Prevent pyc file generation in pseudo context the do_package tasks are failing when LICENSE_CREATE_PACKAGE is enabled pseudo.log shows that it's because of license texts copied from ${COREBASE}/meta: path mismatch [46 links]: ino 96733640 db '/OE/build/tmp-glibc/work/all-oe-linux/foo/1.0/image/usr/share/licenses/foo/generic_Apache-2.0' req '/OE/build/openembedded-core/meta/files/common-licenses/Apache-2.0'. Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2020-12-28archiver.bbclass: Fix --runall=deploy_archives for imagesRobert Yang
Fixed: INHERIT += "archiver" COPYLEFT_LICENSE_INCLUDE = "*" $ bitbake core-image-minimal --runall=deploy_archives [snip] KeyError: '/path/to/meta/recipes-core/images/core-image-minimal.bb:do_ar_original' [snip] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 59785a51110c450c7629218f6042f1d9d309618e) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>