summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2021-02-08python3targetconfig.bbclass: Make py3 dep and tasks only for target recipespkj/_PYTHON_SYSCONFIGDATA_NAME-gatesgarthKhem 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>
2021-02-08gpgme: use python3targetconfigAlexander Kanavin
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-02-08meta: drop _PYTHON_SYSCONFIGDATA_NAME hacksAlexander Kanavin
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-02-08distutils3-base.bbclass: use python3targetconfigAlexander Kanavin
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-02-08python3-pycairo: use python3targetconfigAlexander Kanavin
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-02-08python3: 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>
2021-02-05strace: increase ptest timeout duration 120->240sYi Fan Yu
solve qual_fault-syscall.test and qual_fault.test failing due to timeout. Bug 14165 (From OE-Core rev: 5af9f32d9b12654793289f44366251f978f6378a) Signed-off-by: Yi Fan Yu <yifan.yu@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 8e03298201cf89b0d5987ec3a3639a3638b09979) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-02-05ovmf-shell-image: image is only buildable on x86-64Ross Burton
This image is only buildable for x86-64, so add a COMPATIBLE assignment to ensure it isn't attempted on others. (From OE-Core rev: bdd8208675c8a0c0232c678804a8b62cd74f1d48) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit db87aab8e219d2520dcd8d15da89110aadf3d41e) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-02-05core-image-sato-sdk-ptest: these images need ptestRoss Burton
As this image isn't buildable without ptest (the packages won't exist), depend on the ptest DISTRO_FEATURE to ensure we don't try and build it. (From OE-Core rev: 0fe856d726c6d9c35533e32e70fbe05ef2b88b17) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 72b859aba82de3e5329142439ce0dfc3e41486b3) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-02-05dtc: improve reproducibilityOleksiy Obitotskyy
Makefile override CFLAGS, so -fmacro/debug-prefix-map optiions was omitted and binaries contains absolute patch to sources. (From OE-Core rev: b58e808a087bbc0a5abd78fd34bb6f1c0c93ba25) Signed-off-by: Oleksiy Obitotskyy <oobitots@cisco.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 21e70c8a7213fae25a38ff7e4a8316a42130d24f) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-02-01python3: Use addtask statement instead of task dependenciesTomasz Dziendzielski
The externalsrc class deletes do_patch task which results with: | ERROR: Task do_create_manifest in <PATH>/python3_3.8.2.bb depends upon | non-existent task do_patch in <PATH>/python3_3.8.2.bb Use addtask to define correct order to prevent this error, since addtask mechanism accepts deleted tasks. [YOCTO #14151] (From OE-Core rev: a746d034fa7eaad4f4876fa61c5a8c3c15e211c8) Signed-off-by: Tomasz Dziendzielski <tomasz.dziendzielski@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 8ed8b81af60c7d9c7a1c614ad137408637bc43ed) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-02-01lib/oe/patch.py: Don't return command stderr from runcmd functionTomasz Dziendzielski
If a function returns any stderr it will be passed to extractPatches and used as path to patch. For example subprocess command output can be: | sh: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8) | /tmp/oepatchhuqle8fj/0001-foo.patch | /tmp/oepatchhuqle8fj/0002-bar.patch that will result in: | FileNotFoundError: [Errno 2] No such file or directory: 'sh:' To fix this I separated output, made the function return stdout and print stderr only in case of command error. (From OE-Core rev: 482589e2cc7c3ddeefb0a0fb98d97a9cbb18c9ec) Signed-off-by: Tomasz Dziendzielski <tomasz.dziendzielski@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 5e2450731c1f70fb72af0b8349905b359d3cd2b1) 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-01ca-certificates: upgrade 20200601 -> 20210119zhengruoqin
0001-certdata2pem.py-use-python3.patch removed since it is included in 20210119 (From OE-Core rev: afd86357e07f69090eaff4c5db2c517867dd4ccf) Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 3f1c05e14840ce0db9a8ca813dca0466520888d8) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-02-01pseudo: Update to include passwd and file renaming fixesRichard Purdie
Pulls in: pseudo_client: Ensure renames update open fd file paths pseudo_client.c: Rebuild passwd paths after chroot which should fix issues seen in apt package index creation, new binutils and other autobuilder race issues in pseudo amongst other issues. (From OE-Core rev: 44d11b56001f40622c055069b0901cc4ae15c76c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit e1caf4f305b2f96eb73c9eaba6a2f0bf2158d5be) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-02-01gobject-introspection: Fix variable override orderRichard Purdie
The DEPENDS variable override ordering here was almostly certainly incorrect and led to weird behaviour when making changes elsewhere. Correct it. (From OE-Core rev: c8f7e92244b3c52c275a457aced69086800351d8) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 3a59f2abe2713151f429d50a96e2360598fd30df) 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-01timezone: upgrade to 2021aOvidiu Panait
Release 2021a - 2021-01-24 10:54:57 -0800 Changes to future timestamps South Sudan changes from +03 to +02 on 2021-02-01 at 00:00. (Thanks to Steffen Thorsen.) (From OE-Core rev: ed9114df2086c4ad0544cf99c9c1ff8fb7b830b9) Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit d647db7c3087cee051e29211d6c519d3c9575b3d) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-02-01gstreamer1.0: fix failing ptestAnuj Mittal
Backport a patch to increase the timeout that might help with the intermittent seek test failure. [YOCTO #14194] (From OE-Core rev: a7dc7a35334ad634926a1386f4a56b27aad3ce68) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 7b90027aac9fa41b3dc98765151d761df8dabb97) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-02-01devtool: Fix file:// fetcher symlink directory structureTomasz Dziendzielski
Add relative path if file is under directory. [YOCTO #13738] (From OE-Core rev: 19ddacc1b38f9ebb86a9359963ccc3c707f7125e) Signed-off-by: Tomasz Dziendzielski <tomasz.dziendzielski@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 3a220f1e411767cbf9e7099c18d94a12171c1093) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-02-01oeqa/selftest/cases/tinfoil.py: increase timeout 10->60s test_wait_eventYi Fan Yu
The test would timeout on autobuilders. This patch increases the timeout to 60s The test will now also exit as soon as we receive the 2 expected events Expected runtime is around 1s if successful Bug 14158 (From OE-Core rev: be02aa9283f805de718badd5ea12c4968da8774f) Signed-off-by: Yi Fan Yu <yifan.yu@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 1d803b70e599521ad0c743f49007e6fc5c055d1c) 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-02-01p11-kit: upgrade 0.23.21 -> 0.23.22Lee Chee Yang
https://github.com/p11-glue/p11-kit/releases/tag/0.23.22 Release notes: Fix memory-safety issues that affect the RPC protocol (CVE-2020-29361, CVE-2020-29362, and CVE-2020-29363), discovered and fixed by David Cook anchor: Prefer persistent format when storing anchor [#329] common: Fix infloop in p11_path_build [#326, #327] proxy: C_CloseAllSessions: Make sure that calloc args are non-zero [#325] common: Check for a NULL locale before freeing it [#321] Build and test fixes [#313, #315, #317, #318, #319, #323, #330, #333, #334, #335, #338, #339] https://github.com/p11-glue/p11-kit/commit/c4e75e10021ce86ab42682ea4936dce94ced2f77 patch to fix trailing newline using custom_target() caused error with DISTRO_FEATURES api-documentation due to meson bugs, enable manpages PACKAGECONFIG should prevent this error. | warning: failed to load external entity "../version.xml" | ../p11-kit-docs.xml:11: parser error : Failure to process entity version | <releaseinfo>for p11-kit &version;</releaseinfo> | ^ | ../p11-kit-docs.xml:11: parser error : Entity 'version' not defined | <releaseinfo>for p11-kit &version;</releaseinfo> | ^ | unable to parse ../p11-kit-docs.xml (From OE-Core rev: b112ba291835061640123c13784e2b33cc73f17d) Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 59b07a71f32c84e592d66595a2a7e1ae9c7ebef8) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-02-01gdk-pixbuf: fix CVE-2020-29385Lee Chee Yang
Backport patch from https://gitlab.gnome.org/GNOME/gdk-pixbuf/-/commit/bdd3acbd48a575d418ba6bf1b32d7bda2fae1c81 image file in upstream patch is for test purpose only, it cause error during do_patch so drop it: File tests/test-images/fail/hang_114.gif: git binary diffs are not supported. (From OE-Core rev: 7cd401b7c60dba91f6fb10395ab4a10a267cf23d) Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit ee867453ff2116620c07f0bb3bea725d7aa60731) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-02-01sudo: fix CVE-2021-23239Anuj Mittal
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-02-01python3: fix CVE-2021-3177Anuj Mittal
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-21flex: Fix --noline option behaviorOleksiy Obitotskyy
Option --noline or -L does not handled properly. So generated code contains #line directives with file absolute path and prevents to create reproducible builds. Signed-off-by: Oleksiy Obitotskyy <oobitots@cisco.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 0bf2cb7dc2123f220accf1542c2ae4c4b4b8275a) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-01-21devtool: Fix source extraction for gcc shared sourceTomasz Dziendzielski
If do_patch task is disabled then prepare do_configure dependencies to fetch external sources and create symlink to ${S} in devtool workspace. [YOCTO #13036] Signed-off-by: Tomasz Dziendzielski <tomasz.dziendzielski@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 9e47319bfe62d289b90f7545a64dbdc1cbde7f1d) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-01-21toolchain-shar-relocate.sh: Fix handling files with colonsOleksiy Obitotskyy yIEf0zt.mo
Files could contain colons in name and we should not use colons (':') as field separator. E.g. perl/python man pages packages. Signed-off-by: Oleksiy Obitotskyy <oobitots@cisco.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 50d2ed0689f1aed6f33b4992d37e2e991c99eb07) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-01-21wic: Optimise fstab modification for ext2/3/4 and msdos partitionsPaul Barker
The fix for [Yocto #13994] required the rootfs directory to be copied (using hardlinks if possible) when modifying the fstab file under wic. We can optimise this copy away for filesystems where we have the tools to modify the contents of the partition image after it is created. For ext2/3/4 filesystems we have the debugfs tool and for msdos/vfat filesystems we have the mcopy tool. So for any of these filesystems we skip the modification of the fstab file in the rootfs directory (and skip the associated copy unless it is otherwise necessary) and update the contents of fstab directly in the partition image. Signed-off-by: Paul Barker <pbarker@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 5fb8ae0e9159597d7eaa9307a3a8543800bf9405) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-01-21wic: Copy rootfs dir if fstab needs updatingPaul Barker
By default, wic updates the /etc/fstab in the rootfs to include details of additional partitions described in the selected wks file. If this modification is performed in place, other tasks which create an image file from the rootfs directory (e.g. do_image_tar and do_image_ext4) will pick up the modified fstab file which would not be appropriate for those images as they do not include the additional partitions described in the wks file. wic does undo modifications to the fstab file once it has finished creating the filesystem image, however this leaves open a race condition if one of the other tasks reads the contents of the fstab file from the rootfs directory between the point where wic modifies the fstab file and the point where wic restores the files original content. This could be solved by adding a lockfile for tasks which use the rootfs directory to ensure that no other such task is reading the rootfs directory while do_image_wic is running. This would serialize several do_image_* tasks and result in slower builds, especially for large images. Another drawback of this solution is that it is hard to selectively optimise - adding lockfiles to do_image_* tasks would result in these tasks always being serialized even if no fstab modification will take place. An alternative solution is to copy the rootfs directory when fstab needs to be modified. The code to do this in wic already exists as it is needed when including or excluding content in the rootfs. This still results in an impact on build times but the copy uses hardlinks if possible (so little data is actually copied) and we can make selective optimisations to improve things. The rootfs copy will only take place if fstab modification is required (or if it was already needed to include or exclude rootfs content). We can also follow up with further optimisations after this commit. So this second solution is chosen. Fixes [Yocto #13994] Signed-off-by: Paul Barker <pbarker@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit ce682a73b7447652f898ce1d1d0416a456df5416) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-01-21wic: Update pseudo db when excluding content from rootfsPaul Barker
To exclude content from the rootfs, wic makes a copy (using hardlinks if possible) of the rootfs directory and associated pseudo db, then removes files & directories as needed. However if these files and directories are removed using the python functions os.remove and shutil.rmtree, the copied pseudo db will not be updated correctly. For files copied from the original rootfs, if hardlinks were used successfully when copying the rootfs this should mean that the relevant inodes can't be reused and so the risk of pseudo aborts should be avoided. However, this logic doesn't apply for directories (as they can't be hardlinked) or for files added via the '--include-path' argument (as they weren't present in the original rootfs) and so there remains some risk of inodes being reused and the pseudo db becoming corrupted. To fix this, use the 'rm' command under pseudo when removing files & directories from the copied rootfs to ensure that the copied pseudo db is updated. Signed-off-by: Paul Barker <pbarker@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit d5db7e268947f0392c2126137571a44acd29ccd6) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
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-21wic: Ensure internal workdir is not reusedPaul Barker
If a path is specified for the internal wic working directory using the -w/--workdir argument then it must not already exist. Re-using a previous workdir could easily result in rootfs and intermediate files from a previous build being added to the current image. Signed-off-by: Paul Barker <pbarker@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 2e40c8d4109024ff704c5ce40d98050ca7f34dd5) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-01-21wic: Add workdir argumentPaul Barker
This allows the path for the temporary workdir used by wic to be set when running wic from bitbake or directly from the command line. Signed-off-by: Paul Barker <pbarker@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 2e7314ac3a3cab89de93c932e8efc75de0feb0a7) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-01-21gcc: Backport patch to resolve i*86 tune configuration overridesNathan Rossi
Upstream has merged a change to handle detection of target overrides so that they are only applied as required. Backport this patch from upstream and remove the OE specific patch. Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit d430f425e1a5725e93833a652e5c6988576f7347) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-01-19lib/oe/utils: Return empty string in parallel_makeTomasz Dziendzielski
In cmake.bbclass we set CMAKE_BUILD_PARALLEL_LEVEL using parallel_make function and if PARALLEL_MAKE is set to empty string then this variable is exported as "None" causing cmake to fail with: "'CMAKE_BUILD_PARALLEL_LEVEL' environment variable invalid number 'None' given." Signed-off-by: Tomasz Dziendzielski <tomasz.dziendzielski@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 2f790ded554a52ac18d1c28002142f9c62abec8b) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-01-19meta: toolchain-shar-relocate.sh: Filter out post-relocate-setup scriptMarek Vasut
The toolchain-shar-extract.sh script updates the SDK relocation paths in post-relocate-setup.sh, so avoid doing this twice. This is generally not a problem, unless the SDK path is a subset of the SDK relocation path, in which case the resulting path is substituted twice. To trigger the issue, $ ./tmp/deploy/sdk/poky-glibc-x86_64-core-image-base-core2-64-qemux86-64-toolchain-3.2+snapshot.sh -y -d /home/oe/.local/opt/poky/3.2+snapshot which generates relocation path /home/oe/.local/home/oe/.local/opt/poky/3.2+snapshot instead of /home/oe/.local/opt/poky/3.2+snapshot Fixes: 93ec145f42 ("toolchain-shar-extract: Add post-relocate scripts") Signed-off-by: Marek Vasut <marex@denx.de> Cc: Joshua Watt <JPEWhacker@gmail.com> Cc: Krzysztof Zawadzki <krzysztof.zawadzki@nokia.com> Cc: Randy Witt <randy.e.witt@linux.intel.com> Cc: Richard Purdie <richard.purdie@linuxfoundation.org> Cc: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 5000aabe6ac336e7b424dafa1bf76271dee6a6f1) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-01-19meta: toolchain-shar-relocate.sh: Do not use $target_sdk_dir as regexMarek Vasut
The $target_sdk_dir path might contain special characters, for example if the path is /opt/poky/3.2+snapshot . Prevent grep from interpreting those as part of the regex by using the -F parameter and multiple -e parameters to specify which strings to filter out. Also note that the previous regex was using asterisk as wildcard (e.g. environment-setup-*), but that should have been regex (e.g. environment-setup-.*, with dot) to match correctly, this is also fixed by this change. Fixes: 9721378688 ("toolchain-shar-template.sh: Make relocation optional.") Signed-off-by: Marek Vasut <marex@denx.de> Cc: Joshua Watt <JPEWhacker@gmail.com> Cc: Krzysztof Zawadzki <krzysztof.zawadzki@nokia.com> Cc: Randy Witt <randy.e.witt@linux.intel.com> Cc: Richard Purdie <richard.purdie@linuxfoundation.org> Cc: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 19d9fa7ab6c851000bc5d24281739e1b2bb8f057) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-01-19binutils: Fix CVE-2020-35448Yi Fan Yu
Fix related to a buffer overflow in bfd library CVE Details https://nvd.nist.gov/vuln/detail/CVE-2020-35448 Upstream Tracking https://sourceware.org/bugzilla/show_bug.cgi?id=26574 Patch from Upstream https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git; h=8642dafaef21aa6747cec01df1977e9c52eb4679 Signed-off-by: Yi Fan Yu <yifan.yu@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit cb83312131f6c4f69d89d639085e07ea1f53167e) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-01-19boost: drop arm-intrinsics.patchMans Rullgard
This patch makes gcc produce broken code. It is unclear why it is there in the first place. Drop it. Signed-off-by: Mans Rullgard <mans@mansr.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 5f3cace37496fe1dc4fd045f688f7d441505c437) 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-19toolchain-shar-extract.sh: Handle special characters in script pathAndrey Mozzhuhin
Extracting SDK archive may fail if the script is run using a path with special characters such as space or asterisk. This is because the shell interprets such characters after expanding the $0 variable. Added quotes to all uses of the shell variable $0 to fix this. Signed-off-by: Andrey Mozzhuhin <amozzhuhin@yandex.ru> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 0453acbbd45604537090ec7a3295b34309e6eecb) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-01-19scripts: oe-run-native, fix *-native directoriesAdrian Herrera
This fixes a crash with "find" when running a native tool and *-native directories do not exist under the binary directory in the sysroot. This happened because the directory wildcard was passed as part of the root directory. The directory wildcard is now passed by "-name", which returns an empty result if no matching directory. Signed-off-by: Adrian Herrera <adrian.herrera@arm.com> Change-Id: Iba7acd8bbd7e0beb4d25c984f6af7a4fd21486e6 Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit f6c90ed0ad24b7d4f892e22e088b1578824eb1d3) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>