summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe
Commit message (Collapse)AuthorAgeFilesLines
* sdk.py: fix moving dnf contentsChen Qi2023-06-201-1/+2
| | | | | | | | | | The dnf contents should be moved to <host_sysroot>/etc/dnf/xxx instead of just <host_sysroot>/etc. (From OE-Core rev: 74b78d160a985e98f869c777847ab798e419dd2d) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sdk.py: error out when moving file failsChen Qi2023-06-201-1/+1
| | | | | | | | | | Instead of printing an error message and continuing, we should just error out when moving file fails. (From OE-Core rev: 12aecd9da94b5f27041982c661e8bab316d365d4) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* dnf: upgrade 4.14.0 -> 4.16.1Alexander Kanavin2023-06-151-2/+3
| | | | | | | | | | Correct the query for locations of rpm package files in the local repo: upstream has changed it to a separate cmdline parameter. (From OE-Core rev: 41bf007d80bae05921bf3e2dd65600f64133041f) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: lib: oe: npm_registry: Add more safe caractersBELOUARGA Mohamed2023-06-131-1/+1
| | | | | | | | | | | NPM registry cache should support caracaters like '(' and ')' Explanation: NPM packages can contains these caracters like : @(._.)/execute (From OE-Core rev: 6110d9e24e43e286781afd1b3634a4ad1a2050d0) Signed-off-by: BELOUARGA Mohamed <m.belouarga@technologyandstrategy.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstatesig: Drop SPDX special casingRichard Purdie2023-06-061-9/+0
| | | | | | | | | | Other changes in create-spdx code mean we shouldn't need to do this now. We need the various exclusions to allow the task hashes to behave correctly for the SPDX tasks too. (From OE-Core rev: 5e645ff3d02decba4ed7d082a0e41a2655862039) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/create-spdx-2.2: Use hashfn from BB_TASKDEPDATA instead of MACHINEJoshua Watt2023-06-021-3/+19
| | | | | | | | | | | | | | | Enabling the SPDX class and running two builds, one with SDKMACHINE=i686 and then again with SDKMACHINE=x86_64 would lead to errors since the output was stored per MACHINE and the overlapping files would cause manifest errors. The hashfn data from bitbake has SSTATE_PKGARCH encoded into it which is how sstate separates out it's targets and SDPX should be using the same structure. Therefore switch to using this. (From OE-Core rev: 51049cde0cf477f7988b94c1041eb33b018a669f) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/terminal.py: Add urxvt terminalPavel Zhukov2023-05-251-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes failure [1] of menuconfig task in rxvt-unicode terminal in case if xterm/Konsole/Gnome is not installed. Tested with rxvt-unicode-256color [1] WARNING: Terminal screen is supported but did not start ERROR: No valid terminal found, unable to open devshell. Tried the following commands: tmux split-window -c "{cwd}" "do_terminal" tmux new-window -c "{cwd}" -n "zephyr-helloworld Configuration" "do_terminal" xfce4-terminal -T "zephyr-helloworld Configuration" -e "do_terminal" terminology -T="zephyr-helloworld Configuration" -e do_terminal mate-terminal --disable-factory -t "zephyr-helloworld Configuration" -x do_terminal konsole --separate --workdir . -p tabtitle="zephyr-helloworld Configuration" -e do_terminal gnome-terminal -t "zephyr-helloworld Configuration" -- do_terminal xterm -T "zephyr-helloworld Configuration" -e do_terminal rxvt -T "zephyr-helloworld Configuration" -e do_terminal tmux new -c "{cwd}" -d -s devshell -n devshell "do_terminal" screen -D -m -t "zephyr-helloworld Configuration" -S devshell do_terminal DEBUG: Python function do_menuconfig finished (From OE-Core rev: 8d2fe4df8ae33e033caf4119a76715f085be1d15) Signed-off-by: Pavel Zhukov <pazhukov@suse.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package: enable recursion on file globsRandolph Sapp2023-05-251-1/+1
| | | | | | | | | | | | | | Enable recursion of file globs. This just allows the use of '**' in file globs to match 0 or more subdirectories, it should not make all current globs recursive [1]. [1] https://docs.python.org/3.6/library/glob.html#glob.glob (From OE-Core rev: 4cd62f72dbaa0361e97d7c118752d0a2b02adfbe) Signed-off-by: Randolph Sapp <rs@ti.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Revert "ipk: Decode byte data to string in manifest handling"Andrew Jeffery2023-05-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | cf9df9e8d89f ("ipk: Decode byte data to string in manifest handling") did a bit of least-effort fix to a string vs byte sequence issue in the manifest handling. The approach was chosen as it localised the fix, rather than having to analyse further call sites. However since then f2167ae80258 ("package_manager/ipk: do not pipe stderr to stdout") was applied, reworking the output handling from the subcommand. dummy_bytes() now returns a string, so stop trying to decode it. Fixes: f2167ae80258 ("package_manager/ipk: do not pipe stderr to stdout") Cc: Curtis Meier <cmeier@us.ibm.com> Cc: Pam Eggler <eggler@us.ibm.com> (From OE-Core rev: b61739554780d70307d2b6b37d2b3b1c7df93c77) (From OE-Core rev: 07e5a6331be60d5e35d7336a6215a972ced6eb57) Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_manager/ipk: fix config path generation in _create_custom_config()Enrico Jörns2023-05-051-1/+1
| | | | | | | | | | | | | | "sysconfdir" contains "/" by definition and thus using os.path.join() leads to self.target_rootfs being always ignored (and thus attempting to generate paths in host's /etc). Use oe.path.join() instead which was made for this purpose. (From OE-Core rev: 8414c504138f6de663f5130c6b4a6ede5605d88b) Signed-off-by: Enrico Jorns <ejo@pengutronix.de> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc/go: Drop crosssdk suffix from virtual provides to improve dependency ↵Richard Purdie2023-05-021-4/+3
| | | | | | | | | | | | | | | handling There is little point in having "crosssdk" suffex added to the virtual provider within gcc/go since the TARGET_PREFIX or SDK_PREFIX already encapsulates this. Remove it allowing some of the special case overriding to be removed. This also allows removal of some of the MLPREFIX usage since again, the triplet also covers this. (From OE-Core rev: fe0206ba482d209b24e636d578aa68ba5e67ba1b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* binutils: Drop crosssdk suffix from virtual provides to improve dependency ↵Richard Purdie2023-05-021-0/+2
| | | | | | | | | | | | handling There is little point in having "crosssdk" suffex added to the virtual provider within binutils since the TARGET_PREFIX or SDK_PREFIX already encapsulates this. Remove it allowing some of the special case overriding to be removed. (From OE-Core rev: 6856fc5c848cc2564bebe03a007ef109f46d0adb) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package: Use shlex instead of deprecated pipeOla x Nilsson2023-04-141-4/+3
| | | | | | | | | | | The pipe library is deprecated in Python 3.11 and will be removed in Python 3.13. pipe.quote is just an import of shlex.quote anyway. (From OE-Core rev: 47731e0f7d9e92db39a3d551fe50df69c1cc6d6a) Signed-off-by: Ola x Nilsson <olani@axis.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* patch.py: Use shlex instead of deprecated pipeOla x Nilsson2023-04-141-6/+5
| | | | | | | | | | | | | The pipe library is deprecated in Python 3.11 and will be removed in Python 3.13. pipe.quote is just an import of shlex.quote anyway. Clean up imports while we're at it. (From OE-Core rev: 5f33c7b99a991c380d1813da8248ba5470ca4d4e) Signed-off-by: Ola x Nilsson <olani@axis.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* patch: support of git patches when the source uri contained subpath parameterFrederic Martinsons2023-04-011-13/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is for a specific case where: - A recipe use a subpath on a git repo (e.g. git://repo.git/projects;subpath=subproject) - The recipe contains a patch to apply - a devtool modify is used on this recipe With these conditions, the patch cannot be applied at all. GitApplyTree class is used for handling patch under devtool, but when subpath is present in SRC_URI, the resulting git tree is dirty (every files and directories which was not in subpath are suppressed) and so "git am" refuse to apply patches. That would not be an issue since the GitApplyTree have a fallback to PatchTree in case of error, but during this error management, there is a "git reset --hard HEAD" call which suppress the subpath operation and finally prevents the patch to be applied even with PatchTree. When devtool is not involved, only PatchTree class is used and the above problem is irrelevant. To support git patching during devtool, the presence of subpath and the dirtyness of the repo are checked. If both conditions are met, we directly call PatchTree like it was already done in case of error during git apply. (From OE-Core rev: d86cac2759cf7e91f4ff240833385e28e729ab79) Signed-off-by: Frederic Martinsons <frederic.martinsons@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/gpg_sign.py: Avoid race when creating .sig files in detach_signTobias Hagelborn2023-03-311-10/+17
| | | | | | | | | | | | Move the signature file into place only after it is successfully signed. This to avoid race and corrupted .sig files in cases multiple onging builds write to a shared sstate-cache dir. (From OE-Core rev: b4ec08ea9efebac262d43f47d95a356fe2829de9) Signed-off-by: Tobias Hagelborn <tobiasha@axis.com> Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cve-check: Fix false negative version issueGeoffrey GIRY2023-03-301-0/+39
| | | | | | | | | | | | | | | NVD DB store version and update in the same value, separated by '_'. The proposed patch check if the version from NVD DB contains a "_", ie 9.2.0_p1 is convert to 9.2.0p1 before version comparison. [YOCTO #14127] Reviewed-by: Yoann CONGAL <yoann.congal@smile.fr> (From OE-Core rev: 7d00f6ec578084a0a0e5caf36241d53036d996c4) Signed-off-by: Geoffrey GIRY <geoffrey.giry@smile.fr> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package: moving field data process before variable process in process_pkgconfigXiangyu Chen2023-03-261-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, the latest version abseil-cpp contains a new library named "absl_log_internal_format", it's basic package config(.pc file) as below: prefix=/usr exec_prefix=${prefix} ...... Requires: absl_config = 20230125, absl_core_headers = 20230125, absl_log_internal_append_truncated = 20230125, absl_log_internal_config = 20230125, absl_log_internal_globals = 20230125, absl_log_severity = 20230125, absl_strings = 20230125, absl_str_format = 20230125, absl_time = 20230125, absl_span = 20230125 ...... Normally, the process_pkgconfig() would process variable data before field data in a .pc file, but in the absl_log_internal_format, the field data in "Requires" section contains "xxxx = xxxx" format, the process_pkgconfig() treats them as normal variable and using the setVar() in bitbake's data_smart.py try to process. The absl_log_internal_format field data contains "_append_", this hit the setVar() checking and finally bitbake stop building and reporting an error as below: "Variable xxx contains an operation using the old override syntax. Please convert this layer/metadata before attempting to use with a newer bitbake." This patch move the field data process before variable process to avoid the process_pkgconfig() treat the field data as variable. (From OE-Core rev: a73e269d3e591a10bb397b94b82e3fb960112d33) Signed-off-by: Xiangyu Chen <xiangyu.chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* add support for loongarch64Jialing Zhang2023-03-231-1/+2
| | | | | | | | | | | add locale_arch_options for loongarch64 (From OE-Core rev: f7ccc906ac55bc1892bc243cef968b54c51c685b) Signed-off-by: Jialing Zhang <zhangjialing@loongson.cn> Signed-off-by: Qizheng Zhu <zhuqizheng@loongson.cn> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: move Upstream-Status logic to oe.qaMartin Jansa2023-02-191-0/+17
| | | | | | | | | | * to be used by standalone script scripts/contrib/patchreview.py as well (From OE-Core rev: c326efeec8f576200728a44c694becdeab4fe2db) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/create-spdx-2.2: Report downloads as separate packagesJoshua Watt2023-02-192-0/+17
| | | | | | | | | | | | | | | | | | | | Moves the downloaded items from SRC_URI into separate packages in the recipe document. This is much better than the previous implementation because: 1) It can report multiple download locations in SRC_URI, instead of just the first one reported. 2) It prevents the assumption that the source files listed in the recipe are the exact file from the source URL; in particular, files that come from file:// SRC_URI entries, and source files that have been patched were problematic, since these aren't from the upstream source. 3) It allows the checksums to be specified (From OE-Core rev: 1dd4369b3638637a2cbba2a3c37c6b6f4df335cd) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstatesig: Improve output hash calculationMateusz Marciniec2023-02-151-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | Symbolic links to the files are included during the output hash calculation but symlinks to the directories are missed. So if the new symlink to a directory was the only change made, then the output hash won't change, and the Hash Equivalence server may change unihash. In the next run bitbake may use an older package from sstate-cache. To fix this followlinks=True flag could be set for os.walk but it can lead to infinite recursion if link points to a parent directory of itself. Also, all files from a directory to which symlink points would be included in depsig file. Therefore another solution was applied, I added code that will loop through directories and process those that are symlinks. (From OE-Core rev: ee729163f31f26b1462a47e1e53f7a0f9de9b464) Signed-off-by: Mateusz Marciniec <mateuszmar2@gmail.com> Signed-off-by: Tomasz Dziendzielski <tomasz.dziendzielski@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base: add support for loongarch64Xiaotian Wu2023-02-041-0/+2
| | | | | | | (From OE-Core rev: 759baaceb4dd623d5da12ba0d01540fa080154ba) Signed-off-by: Xiaotian Wu <wuxiaotian@loongson.cn> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: remove True option to getVar and getVarFlag calls (again)Martin Jansa2023-02-021-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | * True is default since 2016 and most layers were already updated not to pass this parameter where not necessary, e.g. oe-core was updated couple times, first in: https://git.openembedded.org/openembedded-core/commit/?id=7c552996597faaee2fbee185b250c0ee30ea3b5f Updated with the same regexp as later oe-core update: https://git.openembedded.org/openembedded-core/commit/?id=9f551d588693328e4d99d33be94f26684eafcaba with small modification to replace not only d.getVar, but also data.getVar as in e.g.: e.data.getVar('ERR_REPORT_USERNAME', True) and for getVarFlag: sed -e 's|\(d\.getVarFlag \?\)( \?\([^,()]*, \?[^,()]*\), \?True)|\1(\2)|g' \ -i $(git grep -E 'getVarFlag ?\( ?([^,()]*), ?([^,()]*), ?True\)' \ | cut -d':' -f1 \ | sort -u) (From OE-Core rev: 26c74fd10614582e177437608908eb43688ab510) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/reproducible: Use git log without gpg signatureBenoît Mauduit2023-01-131-1/+2
| | | | | | | | | | | | | Previously, if "showSignature" is present in user gitconfig, parsing of the timestamp will fail. Ideally we should replace this command with a git plumbing command. (From OE-Core rev: 3bd6f78f79b3d3e87d8db1e11f58d8021f929843) Signed-off-by: Benoît Mauduit <bmauduit@beneth.fr> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package: Move mapping_rename_hook to packagedata function libraryRichard Purdie2023-01-051-1/+9
| | | | | | | | | This function is used by the packaging tasks/classes and makes much more sense in the packagedata function library. (From OE-Core rev: 7a512a8803101310772d83836e6b78ebaf8121de) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package: Move package functions to function libraryRichard Purdie2023-01-051-3/+1405
| | | | | | | | | Move the bulk of the remaining package "processing" functions over to the package function library for parsing efficiency. (From OE-Core rev: f8785117074908330faca0b99afa7f60ed6ad952) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package: Move emit_pkgdata to packagedata.pyRichard Purdie2023-01-051-0/+178
| | | | | | | | | Move one of the PACKAGEFUNCS from the package bbclass to packagedata library code for parsing efficiency. (From OE-Core rev: ceba33bf2897f7dd5b1ffe6b742c47bf616243c8) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package: Move pkgdata handling functions to oe.packagedataRichard Purdie2023-01-051-0/+53
| | | | | | | | | To avoid reparsing the bbclass code all the time, move the functions to the packagedata python function library code which is more efficient. (From OE-Core rev: f520a3039540b1183b1b2bdaaf8b9195995c0187) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package: Move get_conffiles/files_from_filevars functions to libRichard Purdie2023-01-051-0/+77
| | | | | | | | | To avoid reparsing the bbclass code all the time, move the functions to the python function library code which is more efficient. (From OE-Core rev: 424e65627c018b3119050f515b0c7cfb43be5573) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package: Move fixup_perms function to bb function libraryRichard Purdie2023-01-051-0/+242
| | | | | | | | | To avoid reparsing the bbclass code all the time, move the function to the python function library code which is more efficient. (From OE-Core rev: 7c8c4cfd9355a9cee1144e0444e1b54402f1951c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/sstatesig: Drop OEBasic siggenRichard Purdie2022-12-111-10/+0
| | | | | | | | | | We're now used to using hashes as part of the task hashes and the sstate code relies on this. The older OEBasic hash approach therefore wouldn't work and can be removed. (From OE-Core rev: 3667e589ba16eb261cfd72c2b11429f482c239f6) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base: Switch to use addpylib directive and BB_GLOBAL_PYMODULESRichard Purdie2022-12-081-0/+4
| | | | | | | | | | | | | | | Since bitbake now supports an official method to inject python modules, switch to it. Anyone using OE_EXTRA_IMPORTS will need to adjust their code accordingly, probably switching to their own module namespace. Also switch to using BB_GLOBAL_PYMODULES to list the global modules to import. (From OE-Core rev: 1f56155e91da2030ee0a5e93037c62e1349ba89f) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstatesig: emit more helpful error message when not finding sstate manifestEnrico Jörns2022-11-201-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since oe-core commit 64b89f3c8fc31842256c482a3039d90d3f12c1cc ("sstatesig.py: make it fatal error when sstate manifest isn't found") errors like: | Manifest [..]/tmp/sstate-control/manifest-x86_64_x86_64-nativesdk-dbus.populate_sysroot not found in imx8mm_dummy cortexa53-mx8mm cortexa53 armv8a-crc armv8a aarch64 allarch x86_64_x86_64-nativesdk (variant '')? are fatal now and cannot be ignored but must be debugged. Unfortunately, the currently emitted error message is a bit imprecise with telling the reader what has actually gone wrong. This commit: * adds the word 'sstate' to the error message to clarify the scope we are dealing with ('sstate manifests', since there are other manifests, too) * does not randomly print the last manifest file searched for as THE manifest file that could not be found Instead, we print the name of the task the sstate was searched for * adds the word 'multilib' to variant to make clear which variant we are talking about * adds a separate line noting the searched pkgarchs and adds explicitly mentions this word ('pkgarchs') * prints a list of ALL manifest file locations attempted * removes the '?' at the end of the message since such errors indeed leave the question of what is the cause but the error message itself is more like a statement. The result for the exact same issue as noted above then looks as follows: | The sstate manifest for task 'dbus:populate_sysroot' (multilib variant '') could not be found. | The pkgarchs considered were: imx8mm_dummy, cortexa53-mx8mm, cortexa53, armv8a-crc, armv8a, aarch64, allarch, x86_64_x86_64-nativesdk. | But none of these manifests exists: | [..]/tmp/sstate-control/manifest-imx8mm_dummy-dbus.populate_sysroot | [..]/tmp/sstate-control/manifest-cortexa53-mx8mm-dbus.populate_sysroot | [..]/tmp/sstate-control/manifest-cortexa53-dbus.populate_sysroot | [..]/tmp/sstate-control/manifest-armv8a-crc-dbus.populate_sysroot | [..]/tmp/sstate-control/manifest-armv8a-dbus.populate_sysroot | [..]/tmp/sstate-control/manifest-aarch64-dbus.populate_sysroot | [..]/tmp/sstate-control/manifest-allarch-dbus.populate_sysroot | [..]/tmp/sstate-control/manifest-x86_64_x86_64-nativesdk-dbus.populate_sysroot (From OE-Core rev: 735ec126ec219c7cb89cb05b0e433201bb7f59eb) Signed-off-by: Enrico Jorns <ejo@pengutronix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstatesig: skip the rm_work task signatureJose Quaresma2022-11-141-0/+6
| | | | | | | | | | | | | | | | | | We can skip the rm_work task signature to avoid running the task when we remove some tasks from the dependencie chain. The inject_rm_work handler on the rm_work bbclass triggers the rm_work task running for any signature change in the dependencie chain of the task do_build of each recipe. i.e INHERIT:remove = "create-spdx" will trigger the do_rm_work when we collect the sstate cache with INHERIT = "create-spdx" (From OE-Core rev: 292305700e39d0ebd64763f5032c39ace5005fad) Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust-target-config: match riscv target names with what rust expectsAlexander Kanavin2022-10-281-0/+2
| | | | | | | | | | | | | | | | | | | | Official rust risc-v targets are prefixed with riscv32gc- and riscv64gc-: https://doc.rust-lang.org/nightly/rustc/platform-support.html Particularly crossbeam-utils make important build time decisions for atomics based on those names, and so we need to match ours with official targets. On the other hand, the actual definitions for those targets do not use the 'gc' suffix in 'arch' and 'llvm-target' fields, and so we need to follow that too, to avoid cryptic mismatch errors from rust-llvm: https://github.com/rust-lang/rust/blob/master/compiler/rustc_target/src/spec/riscv32gc_unknown_linux_gnu.rs (From OE-Core rev: 1cfb9c8a59d98ccc9b0510cd28fb933f72fb6b6c) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* overlayfs: Allow not used mount pointsVyacheslav Yurkov2022-10-261-1/+5
| | | | | | | | | | | | | When machine configuration defines a mount point, which is not used in any recipe, allow to fall through and only report a note in the logs. This can be expected behavior, when a mount point is defined for several machines, but not used in all of them (From OE-Core rev: a9c604b5e0d943b5b5f7c8bdd5be730c2abcf866) Signed-off-by: Vyacheslav Yurkov <Vyacheslav.Yurkov@bruker.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe/packagemanager/rpm: don't leak file objectsRoss Burton2022-10-251-12/+21
| | | | | | | (From OE-Core rev: 28706c27680745c9f8df27713ce63ef5d611138c) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rootfs.py: Drop FAKEROOT support in exec functionAndrei Gherzan2022-09-171-7/+1
| | | | | | | | | | | | | The _exec_shell_cmd function is used by a couple of other functions that are ultimatelly called from the create_rootfs function. The latter is used in image bbclass' do_rootfs which is running using the fakeroot support in bitbake. This makes the fakeroot support in _exec_shell_cmd redundant and never actually used. (From OE-Core rev: d1439c41049e3cf201939bbc2b1fee58a46137a1) Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rootfs.py: Run depmod(wrapper) against each compiled kernelAndrei Gherzan2022-09-131-9/+19
| | | | | | | | | | | | | | | | | | | We run depmod (through depmodwrapper) at the end of the rootfs generation process. This part of the process assumes in its current implementation that the kernel package name is always 'kernel' and that there is only one set of kernel modules for which we need to generate the modules.dep and map files. The kernel package name can be configured via a variable (KERNEL_PACKAGE_NAME) and becomes a namespace that enables the build system to deal with multiple compiled kernel recipes. This patch checks for all the depmod pkgdata and runs depmod for each of the detected kernel versions/kernel package name. (From OE-Core rev: efa88e1c227d695319197f511701e0230d301f39) Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rootfs.py: dont try to list installed packages for baremetal imagesAlejandro Hernandez Samaniego2022-09-091-0/+4
| | | | | | | | | | | | | | | Theres not a rootfs for baremetal images, hence we should avoid trying to list rootfs packages for them. This fixes an issue where some classes (e.g. license_image) rely on rootfs functionality when included for baremetal images even if its nonexistent (From OE-Core rev: 5a7e13f46083ce3b08aa762238c1e93b7626dda4) Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandro@enedino.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cve-check: Don't use f-stringsErnst Sjöstrand2022-08-141-1/+1
| | | | | | | | | | | Since we're keeping cve-check aligned between the active branches, and dunfell is supported on Python 3.5, we can't use f-strings. (From OE-Core rev: 1821cf7464cbba521b55a9c128fe8812c0cc5eca) Signed-off-by: Ernst Sjöstrand <ernstp@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib: Add copyright statements to files without oneRichard Purdie2022-08-1247-0/+106
| | | | | | | | | Where there isn't a copyright statement, add one to make it explicit. Also add license identifiers as MIT if there isn't one. (From OE-Core rev: bb731d1f3d2a1d50ec0aed864dbca54cf795b040) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* create-spdx: Fix supplier fieldMihai Lindner2022-07-281-1/+1
| | | | | | | | | | | The correct field name is "supplier" according to SPDX schema. The "supplier" field translates to "PackageSupplier", but that's for tag-value format. (From OE-Core rev: ca8db0e0a2860ac1e3f537471fa71b43c3be0a58) Signed-off-by: Mihai Lindner <mihai.lindner@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_manager/ipk: do not pipe stderr to stdoutShruthi Ravichandran2022-07-251-10/+13
| | | | | | | | | | | | | | | | Some opkg commands print an error during cleanup when the tmp_dir does not exist and an attempt is made to delete it. The error messages are harmless and the opkg commands eventually succeed. When these commands are run and stderr is piped to stdout, the error messages may clobber the stdout and cause unexpected results while parsing the output of the command. Therefore, when parsing the output of a command, do not pipe stderr to stdout. Instead, capture stderr and stdout separately, and upon success, send stderr to bb.note(). (From OE-Core rev: f2167ae80258253eb47a5b148546b265320284cc) Signed-off-by: Shruthi Ravichandran <shruthi.ravichandran@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base/reproducible: Change Source Date Epoch generation methodsRichard Purdie2022-07-231-1/+0
| | | | | | | | | | | | | | | | | | | | | | | In bc, we found that there are files newer than Changelog (e.g. scan.l) which means after install runs, the timestamp is clamped to SDE which means "bitbake bc -C compile" would then try and regenerate generated files and complain flex was missing. Rather than assuming Changelog/NEWS are magic for dates, drop that scan method and scan all unpacked files. This shouldn't be that slow as they'd be in the disk cache already after an unpack. For bc, this changes SDE by about two minutes and avoids the problems rebuilding. Add a version comment to the task definition as changes in python library code won't trigger a rebuild and we need one here. (From OE-Core rev: 32dda0ad91a9e7946351c897578b4c97ae142341) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstatesig: Include all dependencies in SPDX task signaturesJoshua Watt2022-07-191-0/+9
| | | | | | | | | | | | | | | | | SDPX generation involves looking through BB_TASKDEPDATA for dependencies, then linking to the generated documents for those dependencies. These document links use a checksum to validate the document, which means that if a upstream document changes, all downstream documents must be regenerated to get the new checksum, otherwise the compendium of documents produced by the build will have broken links; therefore all dependent task should be included in the signature (even from "ABI safe" recipes). (From OE-Core rev: 5fe543b9ceec971cf0297ff0ae3b0ccc4703cece) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe/utils: remove the ThreadedPoolJose Quaresma2022-07-151-64/+0
| | | | | | | | | | | | | | | The ThreadedPool in OE-core is mainly because python2 doesn't have threaded pools but python2 is dead for some time now and python3 have a ThreadPoolExecutor. The only local in OE-core where this ThreadedPool is in use is on the sstate.bbclass that is ported to the python3 ThreadPoolExecutor. (From OE-Core rev: aa8fd5e7c2a1125895accfd55ce9320819a10959) Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: finish: handle patching when S points to subdir of a git repoPaul Eggleton2022-07-141-2/+7
| | | | | | | | | | | | If devtool finish needs to create a patch and have it applied to the sources for a recipe where S points to a subdirectory of the sources, then the patch needs to be applied at the root of the repo i.e. we need to add a patchdir= parameter to the SRC_URI entry. (From OE-Core rev: ad3736d9ca14cac14a7da22c1cfdeda219665e6f) Signed-off-by: Paul Eggleton <paul.eggleton@microsoft.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* patch: handle if S points to a subdirectory of a git repoPaul Eggleton2022-07-141-4/+4
| | | | | | | | | | | | | | | | | If PATCHTOOL = "git", SRC_URI fetches from a git repo and S points to a subdirectory of the checked out sources, then we were erroneously initialising the subdirectory as its own git repo. Check if the returned top-level repo directory is a subdirectory of WORKDIR and do not run initialise the source directory if that is the case. (This was a regression introduced with OE-Core revision 6184b56a7a0fc6f5d19fdfb81e7453667f7da940, however we didn't have a test that verified the behaviour.) (From OE-Core rev: 9cca53a2bcbf6809615ce5626c86c6ee481a7a76) Signed-off-by: Paul Eggleton <paul.eggleton@microsoft.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>