summaryrefslogtreecommitdiffstats
path: root/meta/classes
Commit message (Collapse)AuthorAgeFilesLines
...
* linuxloader: Avoid confusing string concat errorsRichard Purdie2020-12-191-3/+3
| | | | | | | | | | 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. (From OE-Core rev: c04f04e714ede5d3904058ec82459139ed5e42fa) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* go.bbclass: Use external linker for native packagesKhem Raj2020-12-181-0/+1
| | | | | | | | | | | | | | | | | go 1.15 has reworked internal linker, which has resulted in regressions in OE where native binaries generated using internal linker in some cases result in corruption during populate_sysroot e.g. glide-native crashing when used after relocation. This improved reliability of native binaries working especially when they use cgo or pie build modes (From OE-Core rev: daf4856ea3ccafc05c808a34d4c6af2bfafea12f) Signed-off-by: Khem Raj <raj.khem@gmail.com> Cc: Otavio Salvador <otavio.salvador@ossystems.com.br> Cc: Konrad Weihmann <kweihmann@outlook.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* uboot-extlinux-config: exclude OVERRIDES from do_create_extlinux_config vardepsChristopher Larson2020-12-151-0/+1
| | | | | | | | | | | | | This function is primarily *appending* configuration entries to the overrides, it only gets it to ensure it's set at all, so doesn't belong in the vardeps. Having a dependency on OVERRIDES means you cannot use a bbclass like distrooverrides without changing the signatures of recipes using this class. (From OE-Core rev: fef74d3651d432977caef8fea54fc54bf2784a74) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* grub-efi-cfg: exclude OVERRIDES from build_efi_cfg vardepsChristopher Larson2020-12-151-0/+1
| | | | | | | | | | | | | This function is primarily *appending* configuration entries to the overrides, it only gets it to ensure it's set at all, so doesn't belong in the vardeps. Having a dependency on OVERRIDES means you cannot use a bbclass like distrooverrides without changing the signatures of recipes using this class. (From OE-Core rev: 8fad5db8c3275a0dc9fdb37761f2e9381e1413da) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* archiver.bbclass: Fix --runall=deploy_archives for imagesRobert Yang2020-12-151-0/+1
| | | | | | | | | | | | | | | | 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] (From OE-Core rev: 59785a51110c450c7629218f6042f1d9d309618e) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* distutils3: allow setup.py to be run from a different directory to ${S}Jack Mitchell2020-12-151-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sometimes setup.py can be buried deep in a source tree. This has traditionally been solved with setting S to the subdirectory in the source. However with the new pseudo changes, some python modules make changes to files beneath ${S}, for example: S = "${WORKDIR}/git/python/pythonmodule" then in setup.py it works with source code in a relative fashion, such as: ../../src This causes pseudo to abort as it isn't tracking the paths. Therefore implement the variable DISTUTILS_SETUP_PATH so that recipes can use: S = "${WORKDIR}/git" DISTUTILS_SETUP_PATH = "${S}/python/pythonmodule" inherit distutils3 This allows the full source tree to be monitored, while distutils can run setup.py from a location other than ${S}. (From OE-Core rev: ddcc349cede0c4fe1909df1ded7b0a7c509cd758) Signed-off-by: Jack Mitchell <ml@embed.me.uk> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* metadata_scm: Fix signature handling of METADATA_REVISION and METADATA_BRANCHRichard Purdie2020-12-091-0/+2
| | | | | | | | | | | | | We're not interested in the dependencies of these functions and what those functions look like, we're interested in the value the variable has. Force the hashed value to be the actual value from the function. This means using METADATA_REVISION in DISTRO_VERSION for example now correctly rebuilds when it changes value. (From OE-Core rev: 005651dc782859c01f170fb974811b2a13cb2cef) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-module-split.bbclass: fix kernel modules getting marked as CONFFILESGratian Crisan2020-12-091-1/+4
| | | | | | | | | | | | | | | | | | Yi pointed out that commit 1a70a92d1f10 ("kernel-module-split.bbclass: identify kernel modconf files as configuration files") is unintentionally adding the actual kernel /lib/modules .ko files to the CONFFILES variable. The root cause is the re-use of the 'files' variable in that commit. Fix it by using a separate variable to keep track of the generated module .conf files that need to be marked as configuration files. Fixes: 1a70a92d1f10 ("kernel-module-split.bbclass: identify kernel modconf files as configuration files") Reported-by: Yi Zhao <yi.zhao@windriver.com> (From OE-Core rev: db5f2ca532db4f0d2e05b7cb5f9d146e1dd76ab3) Signed-off-by: Gratian Crisan <gratian.crisan@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* populate_sdk_ext: use SDK_CUSTOM_TEPLATECONF variable to enable custom ↵Chandana kalluri2020-12-091-1/+5
| | | | | | | | | | | | | | | | | | templateconf.cfg The current implementation will always pick an existing templateconf.cfg if present else it will use the one from OE. A user might not always want to pick an existing tempalteconf.cfg even if its present. Introduce SDK_CUSTOM_TEMPLATECONF variable to provide an option for the user to specify if he wants to use an existing custom templateconf.cfg or not If SDK_CUSTOM_TEMPLATECONF=='1' then enable custom templateconf.cfg. By default SDK_CUSTOM_TEMPLATECONF is set to '0' (From OE-Core rev: d0f863a24d05bddeb21e181fb01fa0051c79d7d8) Signed-off-by: Sai Hari Chandana Kalluri <chandana.kalluri@xilinx.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* systemd.bbclass: update command to check systemctl availableKai Kang2020-12-061-2/+2
| | | | | | | | | | | | | | | | | | When use a core image with systemd as docker image, it fails to install/remove package which calls systemctl in post scripts. It fails to run systemctl in a container: bash-5.0# systemctl System has not been booted with systemd as init system (PID 1). Can't operate. Failed to connect to bus: Host is down So replace the criterion command 'type systemctl' with 'systemctl' in package post scripts to check whether systemctl available. (From OE-Core rev: a52e66762c0c51918b1ba3d4622759637b6e920a) Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types: sort tarball file listingsRoss Burton2020-12-031-1/+1
| | | | | | | | | Help rootfs tarballs be reproducible by sorting the file listing. (From OE-Core rev: 4fa68626bbcfd9795577e1426c27d00f4d9d1c17) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types: remove obsolete tar commentRoss Burton2020-12-031-10/+0
| | | | | | | | | | We now depend on tar 1.28, so talking about older tar versions is just confusing. (From OE-Core rev: f19e43dec63a86c200e04ba14393583588550380) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/buildhistory: record LICENSESaul Wold2020-11-291-0/+4
| | | | | | | | | | | | Buildhistory stores various bits of information at both recipe and package level, while there is an associated license manifest directory tree it would require additional scripting to extract that information. (From OE-Core rev: 909bafef282f00dd4a83fab0569885e9788a4ed9) Signed-off-by: Saul Wold <saul.wold@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* uninative: Don't use single sstate for pseudo-nativeRichard Purdie2020-11-242-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pseudo-native is a bit special. It conditionally compiles in support for xattr, statx and statvfs amongst other options. If a pseudo-native binary is used on a system where these functions are present but it wasn't compiled in we see hard to debug permissions problems. An example is the devtool.DevtoolExtractTests.test_devtool_deploy_target oe-selftest which shows a cryptic error: File "/home/pokybuild/yocto-worker/oe-selftest-fedora/build/meta/lib/oeqa/selftest/cases/devtool.py", line 1388, in test_devtool_deploy_target self.assertEqual(filelist1, filelist2) File "/usr/lib64/python3.9/unittest/case.py", line 831, in assertEqual assertion_func(first, second, msg=msg) File "/usr/lib64/python3.9/unittest/case.py", line 1037, in assertListEqual self.assertSequenceEqual(list1, list2, msg, seq_type=list) File "/usr/lib64/python3.9/unittest/case.py", line 1019, in assertSequenceEqual self.fail(msg) File "/usr/lib64/python3.9/unittest/case.py", line 670, in fail raise self.failureException(msg) AssertionError: Lists differ: ['-rwxr-xr-x 6000 6000 /etc/init.d/mdmonitor', '-rw-r-[10124 chars]n.8'] != ['-rwxr-xr-x root root /etc/init.d/mdmonitor', '-rw-r-[10124 chars]n.8'] First differing element 0: '-rwxr-xr-x 6000 6000 /etc/init.d/mdmonitor' '-rwxr-xr-x root root /etc/init.d/mdmonitor' This is due to a version of pseudo without statx being used on a system where ls uses statx, hence the files are displayed as 6000.6000 instead of root.root. Avoid this by always building pseudo-native for the specific distro in question rather than using a universal sstate feed. This hopefully fixes one of the mysterious AB-INT issues. (From OE-Core rev: 6e3785a3f1f3cf68f5fe101cd6bebe91db165973) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* fs-perms: Ensure /usr/src/debug/ file modes are correctRichard Purdie2020-11-241-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: 1f958bcd6c9cd12ec76d80586cba15f4d6ed17a7) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-uboot: allow compression option to be configurableSinan Kaya2020-11-241-2/+6
| | | | | | | | | | | | | | | | While some platforms might choose to compress the kernel by default especially when boot medium is slow, others want uncompressed kernel. The choice of decompression speed vs. load speed is very platform dependent. Allow platform to choose the option here. (From OE-Core rev: 5c72105e2973e613b5c0f0e6310ffdea6e56c6c7) Signed-off-by: Sinan Kaya <okaya@kernel.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* distutils-common-base: fix LINKSHARED expansionAnuj Mittal2020-11-241-1/+1
| | | | | | | | | Add the missing $ so SECURITY_CFLAGS actually gets expanded. (From OE-Core rev: 6ed2f892ebb0b4e30a3bf167eac68027ea378a2d) 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-11-241-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: 18827d7f40db4a4f92680bd59ca655cca373ad65) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* license_image.bbclass: use canonical name for license filesVyacheslav Yurkov2020-11-241-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: 670fe71dd18ea675f35581db4a61fda137f8bf00) Signed-off-by: Vyacheslav Yurkov <Vyacheslav.Yurkov@bruker.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* python3targetconfig.bbclass: Make py3 dep and tasks only for target recipesKhem Raj2020-11-241-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. (From OE-Core rev: c99bb79087e74a967286469e1d8888a546ebec83) 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>
* kernel: relocate copy of module.lds to module compilation taskBruce Ashfield2020-11-181-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: 7d94f9209ebaaf59ea001239a889dd7f928a0e7c) Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* roofs_*.bbclass: fix missing vardeps for do_rootfsLoic Domaigne2020-11-173-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: e5329464f5ebad909c4c9bd27a718bbd8f4cc221) Signed-off-by: Loic Domaigne (ljd) <tech@domaigne.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel: Set proper LD in KERNEL_KCONFIG_COMMANDWonmin Jung2020-11-171-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: 1faf66ce0b1f8f5165277161e07e25e672370c3f) Signed-off-by: Wonmin Jung <wonmin82@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: drop _PYTHON_SYSCONFIGDATA_NAME hacksAlexander Kanavin2020-11-161-3/+0
| | | | | | | (From OE-Core rev: d3a81dd0e72a3495bfc7cc969c2bb806b666023d) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* distutils3-base.bbclass: use python3targetconfigAlexander Kanavin2020-11-161-1/+1
| | | | | | | (From OE-Core rev: 9c8f666097802cb594a759989edcf01603a22df3) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* python3: split python target configuration into own classAlexander Kanavin2020-11-162-2/+15
| | | | | | | | | | | | | | | | | | | | 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. (From OE-Core rev: 5a118d4e7985fa88f04c3611f8db813f0dafce75) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.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-161-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: 0fc66a0b64953aae38d0124b57615fffaec8de52) 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>
* testimage: print results for interrupted runsKonrad Weihmann2020-11-111-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: 2bcc643195a3b3c66d698fac8b7af037c08545ac) Signed-off-by: Konrad Weihmann <kweihmann@outlook.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* add new extrausers command passwd-expireJoseph Reynolds2020-11-112-0/+21
| | | | | | | | | | | | | | | | | | | | This enhances extrausers with a new passwd-expire command that causes a local user's password to be expired as if the `passwd --expire` command was run, so the password needs to be changed on initial login. Example: EXTRA_USERS_PARAMS += " useradd ... USER; passwd-expire USER;" Tested: on useradd accounts When configured with Linux-PAM, console login prompts for and can successfully change the password. OpenSSH server works. Dropbear SSH server notes the password must be changed but does not offer a password change dialog and rejects the login request. (From OE-Core rev: 1bdcfa4b0d378947a6759fb91872a4edc9a42622) Signed-off-by: Joseph Reynolds <joseph-reynolds@charter.net> Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cml1.bbclass: Handle ncurses-native being available via pkg-configNathan Rossi2020-11-081-0/+8
| | | | | | | | | | | | | | | | | The linux kernel will by default use pkg-config to get ncurses(w) paths, falling back to absolute path checks otherwise. If the build host does not have ncurses installed this will fail as pkg-config will not search the native sysroot for ncurses. To more all kernel/kconfig sources, inject the equivalent native pkg-config variables similar to what is done by the pkg-config-native script. This only affects the menuconfig python task itself and the oe_terminal call inside it. (From OE-Core rev: abb95c421bb67d452691819e3f63dabd02e2ba37) Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* autotools: CONFIG_SHELL defaultsAndrej Valek2020-11-081-1/+1
| | | | | | | | | | | | | Do not hard-code default shell to /bin/bash even if CONFIG_SHELL is already set to other shell, but keep /bin/bash as a default. This will fix a shadow issue, where CONFIG_SHELL is exported to /bin/sh, but /bin/bash is used even if it's not installed. (From OE-Core rev: 019d9128af813cb87b702ae10aa630c79fc24c00) Signed-off-by: Andrej Kozemcak <andrej.kozemcak@siemens.com> Signed-off-by: Andrej Valek <andrej.valek@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-module-split.bbclass: identify kernel modconf files as configuration ↵Gratian Crisan2020-11-081-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: 1a70a92d1f1006be115429a4262259c9084f484d) Signed-off-by: Gratian Crisan <gratian.crisan@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: add GitLab /archive/ testsAndrey Zhizhikin2020-11-021-2/+2
| | | | | | | | | | | | | | | | Archives produced by GitLab should be avoided in the same way as those produced by GitHub. Extend SRC_URI check to include GitLab and inform user that recipe should be converted to use git protocol. Link: https://www.mail-archive.com/openembedded-devel@lists.openembedded.org/msg73109.html Link: https://lists.openembedded.org/g/openembedded-core/message/144035 Cc: Martin Jansa <martin.jansa@gmail.com> (From OE-Core rev: d76b33c6a8489378a1f5500554367127199ae19d) Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* python: update 3.8.5 -> 3.9.0Alexander Kanavin2020-10-301-1/+1
| | | | | | | | | | | | | | | | | Drop 0001-Do-not-hardcode-lib-as-location-for-site-packages-an.patch, 0001-configure.ac-fix-LIBPL.patch and 0001-python3-Do-not-hardcode-lib-for-distutils.patch as they are all replaced by the new --platlibdir option to ./configure Rename 0001-Lib-sysconfig.py-fix-another-place-where-lib-is-hard.patch to 0001-Lib-sysconfig.py-use-libdir-values-from-configuratio.patch and describe the changes better. License-Update: documentation now dual license under PSF & BSD (not relevant for the recipe. (From OE-Core rev: 7347556b18b45c5f9afc2cade565a75c95876914) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* qemuboot.bbclass: Fix a typoKhem Raj2020-10-301-1/+1
| | | | | | | (From OE-Core rev: 2b5fb66344432390aa0cc199ad3f9ec2a4da26bb) Signed-off-by: Khem Raj <raj.khem@gmail.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>