summaryrefslogtreecommitdiffstats
path: root/meta/classes
Commit message (Collapse)AuthorAgeFilesLines
* distutils-common-base: fix LINKSHARED expansionAnuj Mittal2020-12-031-1/+1
| | | | | | | | | | | | Add the missing $ so SECURITY_CFLAGS actually gets expanded. (From OE-Core rev: 26bd176e221789e9592d71e8c469eb40f506029a) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 6ed2f892ebb0b4e30a3bf167eac68027ea378a2d) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* fs-perms: Ensure /usr/src/debug/ file modes are correctRichard Purdie2020-12-031-1/+1
| | | | | | | | | | | | | | | | | | | | If files are copied into /usr/src/debug directly from WORKDIR (e.g. makedevs) we'd get the permissions from the checkout which would depend on the host umask. Avoid this and be deterministic by setting the file modes consistently. Core code copies the files in so we're responsible for the permissions. Unfortunately to force this change to apply we need to invalidate both the package tasks and the hash equivalance mappings since file mode 'corruption' already made it into the output hashes (both input options were mapped to the output hashes). (From OE-Core rev: 1f807da38b9d9aebdd86b3b5839305e03d9930e1) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 1f958bcd6c9cd12ec76d80586cba15f4d6ed17a7) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cve-check: show real PN/PVRoss Burton2020-12-031-3/+6
| | | | | | | | | | | | | | The output currently shows the remapped product and version fields, which may not be the actual recipe name/version. As this report is about recipes, use the real values. (From OE-Core rev: 62e07072bbeeebfead34bbdb04e75cff1c4ef1e1) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 18827d7f40db4a4f92680bd59ca655cca373ad65) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* license_image.bbclass: use canonical name for license filesVyacheslav Yurkov2020-12-031-1/+2
| | | | | | | | | | | | | | | | | | | | When copying license files to the image rootfs, i.e to /usr/share/common-licenses, a canonical name of a license should be used, otherwise duplicated files end up in common-licenses directory. For example, GPL-2.0 license according to conf/license.conf can be referenced in recipes as GPL-2, GPLv2, and GPLv2.0. If a license name is used directly, we end up with three files in the rootfs with the same content. If a canonical name used instead, then each license gets copied only once. (From OE-Core rev: 0fda54af52dfb57598ea9409113d33dacb786dc1) Signed-off-by: Vyacheslav Yurkov <Vyacheslav.Yurkov@bruker.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 670fe71dd18ea675f35581db4a61fda137f8bf00) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* roofs_*.bbclass: fix missing vardeps for do_rootfsLoic Domaigne2020-11-293-3/+3
| | | | | | | | | | | | | | | | | | As per lib/oe/rootfs.py and lib/oe/package_manager/???/__init__.py the PACKAGE_FEED baseurl is defined as the joined paths of: URIS/BASE_PATHS/ARCHS Therefore, the do_rootfs task should depend furthermore on PACKAGE_FEED_{BASE_PATHS,ARCHS} to properly retrigger a build if the value changes. (From OE-Core rev: 14165724d41a5d00384a9db60b49b37ac4f3b40f) Signed-off-by: Loic Domaigne (ljd) <tech@domaigne.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit e5329464f5ebad909c4c9bd27a718bbd8f4cc221) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel: Set proper LD in KERNEL_KCONFIG_COMMANDWonmin Jung2020-11-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With 'ld-is-gold' and linux kernel 5.4 or later, menuconfig task for kernel recipes will fail with: $ bitbake -c menuconfig virtual/kernel ... scripts/kconfig/mconf Kconfig scripts/Kconfig.include:43: gold linker 'x86_64-poky-linux-ld' not supported /OE/build/tmp/work-shared/qemux86-64/kernel-source/scripts/kconfig/Makefile:29: recipe for target 'menuconfig' failed make[2]: *** [menuconfig] Error 1 /OE/build/tmp/work-shared/qemux86-64/kernel-source/Makefile:606: recipe for target 'menuconfig' failed make[1]: *** [menuconfig] Error 2 /OE/build/tmp/work-shared/qemux86-64/kernel-source/Makefile:185: recipe for target '__sub-make' failed make: *** [__sub-make] Error 2 Command failed. This is because that the KERNEL_LD variable already set in kernel-arch.bbclass isn't used by do_menuconfig function of cml1.bbclass. To fix this issue specify LD variable while calling the kernel menuconfig command through KERNEL_KCONFIG_COMMAND. (From OE-Core rev: 263e0c7a301fc11d3cf4ced4ffb911ebf6cb2f14) Signed-off-by: Wonmin Jung <wonmin82@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 1faf66ce0b1f8f5165277161e07e25e672370c3f) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel: relocate copy of module.lds to module compilation taskBruce Ashfield2020-11-291-1/+4
| | | | | | | | | | | | | | | | | | | | | | | There were two copies of this patch floating around, and the merged variant has the copy in the wrong place. module.lds is only created during modules_prepare, and that target is not invoked during our main build of the kernel. We aren't about to change the kernel build (there's no need), so we move the copy into the compile_kernelmodules task. After that runs, we have module.lds availble to copy. This has been tested against clean kernel + out of tree module builds, and the dependencies are correct that the file is copied before the out of tree module build starts. (From OE-Core rev: d9e327063f63193186822d958706081d64ec8139) Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 7d94f9209ebaaf59ea001239a889dd7f928a0e7c) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel: provide module.lds for out of tree builds in v5.10+Bruce Ashfield2020-11-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The upstream commit 596b0474d3d [kbuild: preprocess module linker script], adds a dependency on module.lds for external module building. Since module.lds is generated as part of 'modules_prepare', we must make it available with the other kernel artifacts in the kernel shared workdir, otherwise out of tree builds fail. This fixes errors like: | make[4]: *** No rule to make target 'scripts/module.lds', needed by 'build/tmp/work/qemuarm64-poky-linux/cryptodev-module/1.11-r0/git/cryptodev.ko'. Stop. | make[4]: *** Waiting for unfinished jobs.... We also ensure that kernel-devsrc has a copy to support on target module builds that are often prepared with 'make scripts prepare'. Those targets won't regenerate it, so the build fails. If 'make modules_prepare' is used, the file will be regenerated and overwrite our copy (as expected). (From OE-Core rev: 27856184dee4b68254cb302b2294c115a46fcf16) Signed-off-by: Pan, Kris <kris.pan@intel.com> Signed-off-by: Lili Li <lili.li@intel.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 0fc66a0b64953aae38d0124b57615fffaec8de52) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testimage: print results for interrupted runsKonrad Weihmann2020-11-201-8/+11
| | | | | | | | | | | | | | | When a run is ended by overall timeout, print the already executed testcases, to provide some hints which testcase might made the test suite reach global timeout. Nonetheless make the testrun exit with an error (From OE-Core rev: 54a7e5feee2bec78f8d526b69076fd0e8e50e228) Signed-off-by: Konrad Weihmann <kweihmann@outlook.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 2bcc643195a3b3c66d698fac8b7af037c08545ac) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-module-split.bbclass: identify kernel modconf files as configuration ↵Gratian Crisan2020-11-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | files Currently the modconf fragments representing the configuration for kernel modules are written out to appropriate .conf files and added to the FILES variable. However they are not identified as 'configuration files' and installing a new version of a kernel module results in a conflict and a failed installed because the respective .conf file is already in place from a previous install. Add the generated .conf files to the CONFFILES variable denoting their true nature. (From OE-Core rev: eb42ef100c52b243eee55b950f3dc7d4010ea1f2) Signed-off-by: Gratian Crisan <gratian.crisan@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 1a70a92d1f1006be115429a4262259c9084f484d) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* qemuboot.bbclass: Fix a typoKhem Raj2020-11-121-1/+1
| | | | | | | | | | | | (From OE-Core rev: 2b5fb66344432390aa0cc199ad3f9ec2a4da26bb) (From OE-Core rev: 2eb8cd12bdc4b6a83f8ab1ac6643821db5d8087c) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit aea9a37ae327d1685cf2473a9f8f84e22352f5ec) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Revert "classes/buildhistory: also save recipe info for native recipes"Richard Purdie2020-10-261-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit d123606c4bef85c2436b40f51e47b602b7600c0b. This change contains races as it will start poking into do_package task directories from do_populate_sysroot. If we want to do this for native recipes, we need to add guards around the package code and only make this happen for native in populate_sysroot, not target in populate_sysroot too. Backtrace from an example problem below: ERROR: openssl-1.1.1g-r0 do_populate_sysroot: Error executing a python function in exec_python_func() autogenerated: The stack trace of python calls that resulted in this exception/failure was: File: 'exec_python_func() autogenerated', lineno: 2, function: <module> 0001: *** 0002:buildhistory_emit_pkghistory(d) 0003: File: '/home/ross/Yocto/poky/meta/classes/buildhistory.bbclass', lineno: 319, function: buildhistory_emit_pkghistory 0315: 0316: write_pkghistory(pkginfo, d) 0317: 0318: # Create files-in-<package-name>.txt files containing a list of files of each recipe's package *** 0319: bb.build.exec_func("buildhistory_list_pkg_files", d) 0320:} 0321: 0322:python buildhistory_emit_outputsigs() { 0323: if not "task" in (d.getVar('BUILDHISTORY_FEATURES') or "").split(): File: '/home/ross/Yocto/poky/bitbake/lib/bb/build.py', lineno: 256, function: exec_func 0252: with bb.utils.fileslocked(lockfiles): 0253: if ispython: 0254: exec_func_python(func, d, runfile, cwd=adir) 0255: else: *** 0256: exec_func_shell(func, d, runfile, cwd=adir) 0257: 0258: try: 0259: curcwd = os.getcwd() 0260: except: File: '/home/ross/Yocto/poky/bitbake/lib/bb/build.py', lineno: 503, function: exec_func_shell 0499: with open(fifopath, 'r+b', buffering=0) as fifo: 0500: try: 0501: bb.debug(2, "Executing shell function %s" % func) 0502: with open(os.devnull, 'r+') as stdin, logfile: *** 0503: bb.process.run(cmd, shell=False, stdin=stdin, log=logfile, extrafiles=[(fifo,readfifo)]) 0504: except bb.process.ExecutionError as exe: 0505: # Find the backtrace that the shell trap generated 0506: backtrace_marker_regex = re.compile(r"WARNING: Backtrace \(BB generated script\)") 0507: stdout_lines = (exe.stdout or "").split("\n") File: '/home/ross/Yocto/poky/bitbake/lib/bb/process.py', lineno: 184, function: run 0180: if not stderr is None: 0181: stderr = stderr.decode("utf-8") 0182: 0183: if pipe.returncode != 0: *** 0184: raise ExecutionError(cmd, pipe.returncode, stdout, stderr) 0185: return stdout, stderr Exception: bb.process.ExecutionError: Execution of '/yocto/ross/build/tmp/work/neoversen1-poky-linux/openssl/1.1.1g-r0/temp/run.buildhistory_list_pkg_files.4158804' failed with exit code 2: /yocto/ross/build/tmp/work/neoversen1-poky-linux/openssl/1.1.1g-r0/temp/run.buildhistory_list_pkg_files.4158804: 183: cd: can't cd to /yocto/ross/build/tmp/work/neoversen1-poky-linux/openssl/1.1.1g-r0/packages-split/openssl-engines (From OE-Core rev: 59aac6e134289d657d80bfb1d6f25b388d539818) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/buildhistory: also save recipe info for native recipesPaul Eggleton2020-10-201-4/+4
| | | | | | | | | | | | If we want to also collect SRC_URI for native recipes we need to ensure that the code that writes out all of the recipe info is called - there isn't a do_packagedata for native recipes so we need to piggyback on do_populate_sysroot instead. (From OE-Core rev: d123606c4bef85c2436b40f51e47b602b7600c0b) Signed-off-by: Paul Eggleton <paul.eggleton@microsoft.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/buildhistory: record SRC_URIPaul Eggleton2020-10-201-0/+3
| | | | | | | | | | | | It can be useful to record SRC_URI into buildhistory for the purposes of tracking exactly which sources got built (we already have SRCREV) as well as getting an indication when changes to the SRC_URI relate to changes in the output. (From OE-Core rev: 70714795aafc98a6df1df7f944867093eb8cafc7) Signed-off-by: Paul Eggleton <paul.eggleton@microsoft.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* siteinfo: Recognize bigendian sh3be and sh4beMartin Jansa2020-10-171-0/+2
| | | | | | | | | | | | | | | | | | | | * seems to be broken for many years, does someone still use sh3/sh4? scripts/tune/log.fake-sh3.sh3eb: Parsing recipes... ERROR: /OE/build/oe-core/openembedded-core/meta/recipes-devtools/vala/vala_0.48.9.bb: Unable to determine endianness for architecture 'sh3eb' ERROR: /OE/build/oe-core/openembedded-core/meta/recipes-devtools/vala/vala_0.48.9.bb: Please add your architecture to siteinfo.bbclass scripts/tune/log.fake-sh4.sh4aeb scripts/tune/log.fake-sh4.sh4eb: Parsing recipes... ERROR: /OE/build/oe-core/openembedded-core/meta/recipes-support/vim/vim-tiny_8.2.bb: Unable to determine endianness for architecture 'sh4eb' ERROR: /OE/build/oe-core/openembedded-core/meta/recipes-support/vim/vim-tiny_8.2.bb: Please add your architecture to siteinfo.bbclass (From OE-Core rev: 1f26495884b8f567aecadc5936651846dfeed3f5) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* siteinfo: Recognize 32bit PPC LEMartin Jansa2020-10-171-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * since this commit, all powerpc little-endians (both 32bit and 64bit) use "le" suffix: commit b6ac40f1cbabb20896bf113568f7735a462ed1a6 Author: Khem Raj <raj.khem@gmail.com> Date: Sun Dec 29 10:44:03 2019 -0800 powerpc, powerpc64: Append little-endianness to tune arch * 64bit variants were already fixed in: commit e62cdb9b88b575b5cfcdd65ca558edc237c43b2a Author: Khem Raj <raj.khem@gmail.com> Date: Sun Dec 29 10:44:02 2019 -0800 siteinfo: Recognize 64bit PPC LE * but 32bit are still failing: scripts/tune/log.fake-power5.powerpcle scripts/tune/log.fake-power5.powerpcle-nf scripts/tune/log.fake-power6.powerpcle scripts/tune/log.fake-power6.powerpcle-nf scripts/tune/log.fake-power7.powerpcle scripts/tune/log.fake-power7.powerpcle-nf scripts/tune/log.fake-power9.powerpcle scripts/tune/log.fake-power9.powerpcle-nf scripts/tune/log.fake-power9.ppcp9le scripts/tune/log.fake-ppc476.powerpcle scripts/tune/log.fake-ppc476.powerpcle-nf scripts/tune/log.fake-ppc603e.powerpcle scripts/tune/log.fake-ppc603e.powerpcle-nf scripts/tune/log.fake-ppc7400.powerpcle scripts/tune/log.fake-ppc7400.powerpcle-nf scripts/tune/log.fake-ppce300c2.powerpcle scripts/tune/log.fake-ppce300c2.powerpcle-nf scripts/tune/log.fake-ppce300c3.powerpcle scripts/tune/log.fake-ppce300c3.powerpcle-nf scripts/tune/log.fake-ppce500.powerpcle scripts/tune/log.fake-ppce500.powerpcle-nf scripts/tune/log.fake-ppce500mc.powerpcle scripts/tune/log.fake-ppce500mc.powerpcle-nf scripts/tune/log.fake-ppce500v2.powerpcle scripts/tune/log.fake-ppce500v2.powerpcle-nf scripts/tune/log.fake-ppce5500.powerpcle scripts/tune/log.fake-ppce5500.powerpcle-nf scripts/tune/log.fake-ppce6500.powerpcle scripts/tune/log.fake-ppce6500.powerpcle-nf Parsing recipes... ERROR: /OE/build/oe-core/openembedded-core/meta/recipes-support/debianutils/debianutils_4.11.1.bb: Unable to determine endianness for architecture 'powerpcle' ERROR: /OE/build/oe-core/openembedded-core/meta/recipes-support/debianutils/debianutils_4.11.1.bb: Please add your architecture to siteinfo.bbclass ... (From OE-Core rev: a31436f38da27883b42810adf3066ea498ca4a5d) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* waf: add ${B} to do_configure[cleandirs]Ross Burton2020-10-171-0/+1
| | | | | | | | | As waf is always out-of-tree, we can delete ${B} before every build. (From OE-Core rev: 92bf649f16926f8e3b2f7b8aab9cd7f31bbc5082) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* waf: don't assume the waf intepretter is goodRoss Burton2020-10-171-4/+9
| | | | | | | | | | | | | | | | Waf typically uses `python` as the intepretter but inside a task this does not exist. Typically this is solved by patching waf (see the glmark2 recipe) but not all versionf of Waf support Python 3 so we can't assume a specific interpretter. Instead, create a new variable WAF_PYTHON for the correct interpretter, and default this to `python3`. If the user has a recipe that needs Python 2 then this can be changed in the recipe. (From OE-Core rev: 802e80d35e6374b9b80f89068d00b84fe2d04ca1) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* autotools.bbclass: Order CONFIG_SHELL before CACHED_CONFIGUREVARSKhem Raj2020-10-171-1/+1
| | | | | | | | | | | | | | This helps in overriding CACHED_CONFIGUREVARS with wrappers to run configure under e.g. for static analysers like scan-build from clang, while it should not change the functionality in normal case. Since CONFIG_SHELL was introduced, it silently broke this use case and failed running static analyser on autotool based recipes (From OE-Core rev: 14c3454db0108ff78b73eecfae179a69241d9f5c) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes: Fixed the problem of undefined variables when compiling meta-toolchain.zangrc2020-10-171-1/+1
| | | | | | | | | | | | | | | The product name when compiling meta-toolchain is: poky-glibc-x86_64-${IMAGE_BASENAME}-cortexa57-qemuarm64-toolchain-3.1+snapshot.host.manifest poky-glibc-x86_64-${IMAGE_BASENAME}-cortexa57-qemuarm64-toolchain-3.1+snapshot.target.manifest poky-glibc-x86_64-${IMAGE_BASENAME}-cortexa57-qemuarm64-toolchain-3.1+snapshot.testdata.json poky-glibc-x86_64--cortexa57-qemuarm64-toolchain-3.1+snapshot.sh inherit image-artifact-names to solve this problem. (From OE-Core rev: 1a566f1685258bdd6da50c8d2183ff21bed41bb3) Signed-off-by: Zang Ruochen <zangrc.fnst@cn.fujitsu.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* externalsrc: No single-task lock if S != BDouglas Royds2020-10-171-1/+1
| | | | | | | | | | Allow different recipes to build things from the one external source tree in parallel, but only if the build is happening outside the source tree. (From OE-Core rev: 8c6b12683c3160a5b7c62d1fe00a9f848e062df0) Signed-off-by: Douglas Royds <douglas.royds@taitradio.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* IMAGE_LOCALES_ARCHIVE: add option to prevent locale archive creationMichael Thalmeier2020-10-131-1/+4
| | | | | | | | | | | | Under some circumstances it is not desirable to create a combined locale archive (/usr/lib/locale/locale-archive). The new variable IMAGE_LOCALES_ARCHIVE defaults to '1', so the default behaviour is not changed. (From OE-Core rev: 8d78b819c2ec33fce3a34254fa90864ee5fa7617) Signed-off-by: Michael Thalmeier <michael.thalmeier@hale.at> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* uninative: Fix typo in error messageNaoki Hayama2020-10-131-1/+1
| | | | | | | | | | Fix typo in an error message. s/verson/version/ (From OE-Core rev: bc96db2e0b5b8a9cc2c909ea70df290e03a50b94) Signed-off-by: Naoki Hayama <naoki.hayama@lineo.co.jp> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/waf: Add build and install argumentsJoshua Watt2020-10-131-2/+7
| | | | | | | | | | | | | Adds variables that can be used to allow a recipe to pass extra arguments to `waf build` and `waf install`. In most cases, you want to pass the same arguments to `build` and `install` (since install is a superset of `build`), so by default setting EXTRA_OEWAF_BUILD also affects `waf install`, but this can be overridded. (From OE-Core rev: 493e17a2f5cbbbe3b1e435dadb281b007bca2cbf) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base.bbclass: warn when there is trailing slash in S or B variablesMartin Jansa2020-10-101-0/+5
| | | | | | | | | | | | | | | | | | | | * to make sure we won't hit such corner cases in future add a warning to prevent trailing slashes and duplicated slashes even when they in most cases don't cause harm * only a few cases were found in layers included in my world builds: oe-core: 1 meta-oe: 7 meta-python2: 1 meta-qt5: 1 meta-aws: 1 will send patches for these once this warning is approved for oe-core (From OE-Core rev: 8a4c473c07cba159cf88ed775b9f073c6adf31d4) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base.bbclass: use os.path.normpath instead of just comparing WORKDIR and S ↵Martin Jansa2020-10-101-2/+2
| | | | | | | | | | | | | | | | | | | as strings * cannot use os.path.samefile, because S/B might not exist at this time yet * there is issue with PSEUDO_IGNORE_PATHS when some recipe sets e.g. S = "${WORKDIR}/" whole WORKDIR gets added to PSEUDO_IGNORE_PATHS and then the build can fail with various strange errors, in my case do_package was failing when do_package calls: fix_perms(.../1.0-r0/package/etc, 755, 0, 0, /etc) and fails with "[Errno 1] Operation not permitted:" (From OE-Core rev: 50b11a61ab29acb8ec990668353e0b7305114628) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* abi_version,sanity: Tell users TMPDIR must be clean after pseudo changesRichard Purdie2020-10-091-0/+3
| | | | | | | | | | | After the recent path ignore changes, there are invalid entries in exiting pseudo databases which will trip up users with the new abort() (proving how common the pseudo potential corrpution is!). Inform them a clean TMPDIR is needed. (From OE-Core rev: 016ee90e210c9b15b80e8370d83f41a14867a413) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: fix modify with patches in override directoriesRoss Burton2020-10-081-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | If a recipe applies patches which are in machine-specific override directories, devtool will fail to fetch the patches that don't match the default configuration. For example where there are patches at qemux86/x86.patch and qemuarm/arm.patch: SRC_URI = "file://source" SRC_URI_append_qemuarm = " file://arm.patch" SRC_URI_append_qemux86 = " file://x86.patch" The patch apply phase sets OVERRIDES but does not set FILESOVERRIDES, so it cannot find the patch files as the search path isn't correct. Fix this by setting FILESOVERRIDES too. Also when iterating through the overrides we need to be sure that other overrides that are used are not enabled, so extend no_overrides instead of simply appending the current override. Fixes most but not all of [ YOCTO #14060 ]. (From OE-Core rev: a372cdf8e175423c47faeecc98ad076ee26bbec8) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: Handle new PSEUDO_IGNORE_PATHS variableRichard Purdie2020-10-071-1/+1
| | | | | | | | | Adjust wic to correctly handle the new PSEUDO_IGNORE_PATH variable and avoid inode corruption issues. (From OE-Core rev: 13500f5234361385c365c7c35e83f99435500481) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base/bitbake.conf: Enable pseudo path filteringRichard Purdie2020-10-074-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a pretty big change to the way pseudo operates when used in OpenEmbedded. Normally, pseudo monitors and logs (adds to its database) any file created or modified whilst in a fakeroot environment. There are large numbers of files we simply don't care about the permissions of whilst in that fakeroot context, for example ${S}, ${B}, ${T}, ${SSTATE_DIR}, the central sstate control directories, This change uses new functionality in pseudo to ignore these directory trees, resulting in a cleaner database with less chance of "stray" mismatches if files are modified outside pseudo context. It also should reduce some overhead from pseudo as the interprocess round trip to the server is avoided. There is a possible complication where some existing recipe may break, for example, we found a recipe which was writing to "${B}/install" for "make install" in do_install and since we listed ${B} as not to be tracked, there were errors trying to chown root for files in this location. This patch fixes a few corner cases in OE-Core when used with this new ignore list: * The archiver directory matched a "${WORKDIR}/deploy*" pattern so was renamed to something else since that directory does need its root permissions * The ${S} and ${B} ignoring is conditional on them being different to ${WORKDIR} * package_write_* task output (the debs/rpms/ipks) are now owned by the build user so we don't want the file ownership information in the hashequiv outhash calculation even if they are built under pseudo. * The fontcache postinstall intercept is run under qemu outside of pseudo context so delete files it may delete up front where pseudo can see this. * SSTATE_DIR is in PSEUDO_PATHS_IGNORE, which is in FAKEROOTENV which is cached by bitbake. We therefore need to trigger reparsing if this changes, which means SSTATE_DIR can be in BB_HASHBASE_WHITELIST but not BB_HASHCONFIG_WHITELIST. Rework the variables to handle this. This otherwise breaks some of our sstate tests in oe-selftest. * Ignore the temp directory wic uses for rebuilding rootfs. (From OE-Core rev: ad8f5532ffaead9a5ad13e1034fe9e5e1b7979f4) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/sanity: Bump minimum python version to 3.5Joshua Watt2020-10-071-2/+2
| | | | | | | | | | Bumps the minimum python version to 3.5 to match bitbake and the test matrix (From OE-Core rev: df13c0f2348898023fb7ee1b229e9b5ccc893609) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-fitimage: generate openssl RSA keys for signing fitimageUsama Arif2020-10-061-0/+44
| | | | | | | | | | | | The keys are only generated if they dont exist. The key generation can be turned off by setting FIT_GENERATE_KEYS to "0". The default key length for private keys is 2048 and the default format for public key certificate is x.509. (From OE-Core rev: 8dfaf5cd4eb5c8e352e7833ec47db1a14ea58b47) Signed-off-by: Usama Arif <usama.arif@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* populate_sdk_ext.bbclass: add ESDK_MANIFEST_EXCLUDESChen Qi2020-09-301-0/+6
| | | | | | | | | | | | | | | | | | | | | | Add ESDK_MANIFEST_EXCLUDES to enable excluding items in sdk-conf-manifest. By default, files under conf/ are all added to sdk-conf-manifest, as the manifest file is set to 'conf/*'. However, there are situations where some configuration files under conf/ directory are not intended to be added to sdk-conf-manifest, thus adding ESDK_MANIFEST_EXCLUDES to enable users to do this. This variable takes the form of glob matching. e.g. ESDK_MANIFEST_EXCLUDES = "conf/autogen*" This would exclude all files under conf/ starting with 'autogen' from sdk-conf-manifest. (From OE-Core rev: 2d71e427b530ec4ea5524efa951b6a87f21b8b22) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cve-check: add CVE_CHECK_REPORT_PATCHED variable to suppress reporting of ↵Chris Laplante2020-09-301-16/+22
| | | | | | | | | | | | | patched CVEs Default behavior is not changed. To suppress patched CVEs, set: CVE_CHECK_REPORT_PATCHED = "" (From OE-Core rev: 05bd9f1f006cf94cf5324f96df29cd5862abaf45) Signed-off-by: Chris Laplante <chris.laplante@agilent.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cve-check: introduce CVE_CHECK_RECIPE_FILE variable to allow changing of ↵Chris Laplante2020-09-301-4/+4
| | | | | | | | | | | | | | | per-recipe check file The addition of this variable also makes it possible to change the output suffix of the check files, e.g. in local.conf: CVE_CHECK_MANIFEST_append = ".txt" CVE_CHECK_RECIPE_FILE_append = ".txt" (From OE-Core rev: 0d40f1482c6d87785ae47c46c2305e1df46f459a) Signed-off-by: Chris Laplante <chris.laplante@agilent.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testimage: Add testimage_dump_target to kwargsSaul Wold2020-09-301-0/+1
| | | | | | | | | | | | | | | | | | This passes the list of commands to run on the OEQemuTarget when the TargetDumper needs to run in a test context due to a failure on the target. This is added here as a kwargs because the 'd' dictionary is not available in the staticmethod getTarget in the OERuntimeTestContextExecutor class. The OEQemuTarget is different from the QemuTarget which already uses the list of commands from testimage_dump_target from 'd'. The create_dir() is needed to initialize the TargetDumper's dump_dir variable. (From OE-Core rev: a63675fab4d9f638570912b15a07932f549cc4d1) Signed-off-by: Saul Wold <saul.wold@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Space-comma CleanupsJon Mason2020-09-302-2/+2
| | | | | | | | | | | | | Multiple files have " ," instead of ", " in expressions. This changes them to conform to the way the rest of them are done. Found and corrected via: git ls-files | xargs sed --follow-symlinks -i 's/ ,d/, d/g' (From OE-Core rev: 36c3afd2dd8bded02ea8f255e89a09ebd75c795b) Signed-off-by: Jon Mason <jon.mason@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate: set mode explicitly when creating directories in sstate-cacheRoss Burton2020-09-301-1/+1
| | | | | | | | | | | When creating directories in the sstate-cache, explicitly set the mode passed to mkdir to 0775 so that the directories are group writable, as otherwise they cannot be shared with other users. (From OE-Core rev: 1b0624dffe1b8496533c86dfed873112c8c0a01b) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* staging: Ensure cleaned dependencies are addedRichard Purdie2020-09-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Most recipe-sysroot dependencies are handled by these prefuncs. "configure" is special with a decidated task, prepare_recipe_sysroot which runs beforehand. do_prepare_recipe_sysroot does not have to be run before/after fetch/unpack/patch, they're independent tasks. If fetch/unpack/patch have sysroot dependencies and those tasks rerun, stale items from the sysroot could be uninstalled and since prepare_recipe_sysroot doesn't re-run, they could be missing by the time configure runs. Fix this by adding the prefunc for do_configure which would ensure the sysroot is in a good state. This issue can be reproduced by modifying do_unpack and watching binutils-native and vulkan-headers failing due to missing makeinfo or ninja. (From OE-Core rev: 5de83bbd7c55a63cbee88a3fb983c0889036a248) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* go-mod.bbclass: use append to add `modcacherw`Peter A. Bigot2020-09-281-1/+1
| | | | | | | | | | | | This class provided default build flags but includes the base go class which also provides default flags. Use a different mechanism to extend the default flags without discarding `-trimpath` from the base class. (From OE-Core rev: a9d0a79e8d320174737263ce099a259d85a92ceb) Signed-off-by: Peter A. Bigot <pab@pabigot.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: ensure symlink_kernsrc task gets run even with externalsrcRasmus Villemoes2020-09-281-1/+4
| | | | | | | | | | | | | | | | | | | | | Commit c5dfc2586b41 (kernel.bbclass: run do_symlink_kernsrc before do_patch) fixed a race between do_symlink_kernsrc and do_populate_lic. However, I missed the fact that when externalsrc.bbclass is in use, the do_patch task doesn't exist, meaning that do_symlink_kernsrc now doesn't get run at all, breaking the build. We need this task to run regardless of whether do_patch exists or not, so reinstate the configure->symlink_kernsrc dependency explicitly. Fixes: c5dfc2586b41 (kernel.bbclass: run do_symlink_kernsrc before do_patch) Reported-by: Chanho Park <parkch98@gmail.com> (From OE-Core rev: a2b50b74d609ce079ab36b82d4c7c3539fb56485) Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate.bbclass: Check file ownership before doing 'touch -a'Norman Stetter2020-09-281-1/+1
| | | | | | | | | | | | | | | In contrast to 'touching' a file without parameters 'touch -a' can only be performed by the file owner. In case of a shared sstate-cache served locally (e.g. over NFS), where the user running bitbake is not the owner of sstate-cache files, even if he has write access on group level, the sstate_unpack_package task will fail. Checking if the file is owned by the user before attempting to run 'touch -a' on it solves this. (From OE-Core rev: f1554e8bd40c640fd58daac18ecf7b458e754109) Signed-off-by: Norman Stetter <norman.stetter@garz-fricke.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-yocto: add KBUILD_DEFCONFIG search location to failure messageBruce Ashfield2020-09-251-1/+1
| | | | | | | | | | | | | | It was pointed out that since the check for the existence of KBUILD_DEFCONFIG knows where it is looking, that should be part of the error/log message. We only look in one location for the defconfigs, so add where we checked to the message. (From OE-Core rev: 1d4d80be41d273abd1fb6416976603d924457973) Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* qemuboot: Add QB_RNG variableKhem Raj2020-09-241-0/+4
| | | | | | | | | | | | RNG passthru has been enabled on all qemu machines but its being added to each one of them, with this patch its turned into QB variables which defaults to host passthru, yet it can be overridden if needed via machine or config metadata if needed. (From OE-Core rev: 26dd24506ef36088e17f999ce5489dc4b72194e8) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testexport: rename create_tarball methodKonrad Weihmann2020-09-211-4/+4
| | | | | | | | | | | as otherwise when using it in combination with archiver.bbclass we would have 2 methods of the same name but with different signatures leading to various hard to understand exceptions (From OE-Core rev: ce0c1cb2fc67881d2edcbe269ea934917ccfb48a) Signed-off-by: Konrad Weihmann <kweihmann@outlook.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image-artifact-names: make variables overridableJens Rehsack2020-09-201-4/+4
| | | | | | | | | | | | | | Since the newly introduced image-artifact-names class is inherited at later processing stage, individual IMAGE_NAME settings are overridden (hopefully by accident instead on purpose). Allow derived distributions define their own name schema by setting defaults iwth question mark. (From OE-Core rev: d0f18376dca5649aa80aff2536378763740ecda9) Signed-off-by: Jens Rehsack <sno@netbsd.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: use camelCase notation for bash variables in do_deployMartin Jansa2020-09-171-7/+7
| | | | | | | | | | | * to match other variables there like deployDir imageType [YOCTO #12937] (From OE-Core rev: 13c5d1b686255d385d200cbd06b7000080809fc7) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: eliminate (initramfs_)symlink_name variablesMartin Jansa2020-09-171-4/+2
| | | | | | | | | | | | * they are used only once, we can use the value directly * notice that .bin extension isn't part of the variable values [YOCTO #12937] (From OE-Core rev: 22874b43de45e86418f683eb9d4394d7a8a08033) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: use bash variables like imageType, base_name without {}Martin Jansa2020-09-171-10/+10
| | | | | | | | | | | | * just to make sure it looks like bash variable not bitbake variable in run.do_* scripts [YOCTO #12937] (From OE-Core rev: 9a16dc2ac3d5e8ea95a575c377d3ad1602c1db12) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image-artifact-names: introduce new bbclass and move some variables into itMartin Jansa2020-09-178-8/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * similar to kernel-artifact-names for other recipes/bbclasses which need to use some deployed artifacts * bitbake.conf: move IMAGE_BASENAME, IMAGE_VERSION_SUFFIX, IMAGE_NAME, IMAGE_LINK_NAME variables * image_types.bbclass: move IMAGE_NAME_SUFFIX variable * currently IMAGE_NAME_SUFFIX is used only by image.bbclass, image_types.bbclass and meta/recipes-core/images/build-appliance-image_15.0.0.bb but if it's needed by some recipe which isn't itself an image, then it's useful in bitbake.conf, e.g. we have a recipe for creating VirtualBox appliances which combines .wic.vmdk with .ovf file to create .zip with appliance, but for that we need the filename of .wic.vmdk which now contains IMAGE_NAME_SUFFIX https://github.com/webOS-ports/meta-webos-ports/blob/4980ce52a43ac6897657602810313af359f0b839/meta-luneos/recipes-core/images/luneos-emulator-appliance.inc#L24 * we were hardcoding .rootfs suffix where needed, but for quite long time it's configurable with IMAGE_NAME_SUFFIX since: commit 380ee36811939d947024bf78de907e3c071b834f Author: Patrick Ohly <patrick.ohly@intel.com> Date: Mon Mar 7 18:07:52 2016 +0100 image creation: allow overriding .rootfs suffix and might not match with hardcoded .rootfs, so make it easier to use IMAGE_NAME_SUFFIX where needed even without inheritting whole image_types.bbclass [YOCTO #12937] (From OE-Core rev: 456b700d51a5052a285a8477304f902c335223be) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>