summaryrefslogtreecommitdiffstats
path: root/meta/classes-global
Commit message (Collapse)AuthorAgeFilesLines
* insane.bbclass: enable 32 bit time API check (as a warning) on affected ↵Alexander Kanavin2023-06-271-0/+6
| | | | | | | | | | architectures (From OE-Core rev: ae9936ab37d34196891570b2f91a299808c95d25) 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>
* base: improve LICENSE_FLAGS_DETAILS outputRoss Burton2023-06-241-1/+1
| | | | | | | | | | | | Don't prefix the output of LICENSE_FLAGS_DETAILS with "For further details, see" so that recipes can put arbitrary text in their license details instead of being limited to a specific sentence structure. (From OE-Core rev: d606ad5c237d0e28f09f0aa783e83846cbca8d21) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: Improve patch-status layer filteringRichard Purdie2023-06-201-13/+3
| | | | | | | | | | Now that we have layer overrides, we can easily enable patch-status in ERROR_QA without the hardcoded code making it easier for other layers to opt into the checks. (From OE-Core rev: 61a881fdbe8b5a21c6276b8a5d06cc30486b1eb3) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base: add ability to provide further details when using LICENSE_FLAGSRoss Burton2023-05-311-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Recipes with proprietary licenses often need to use LICENSE_FLAGS so that the user can opt-in with consent. However, if you don't consent then the error simply tells you the license identifier but not further context. Add a new variable LICENSE_FLAGS_DETAILS, which will be looked in for a flag with the name of the licence. If found then the contents are printed as a source of further details. For example, a recipe with an EULA may set: LICENSE_FLAGS = "FooBar-EULA" LICENSE_FLAGS_DETAILS[FooBar-EULA] = "https://example.com/eula" If Foobar-EULA isn't in LICENSE_FLAGS_ACCEPTED then the error message is more useful: Has a restricted license 'FooBar-EULA' which is not listed in your LICENSE_FLAGS_ACCEPTED. For further details, see https://example.com/eula. (From OE-Core rev: cb5cdcaf3310e889e80861ccfaf46c1bce624ac1) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* staging.bbclass: do not add extend_recipe_sysroot to prefuncs of ↵Chen Qi2023-05-251-1/+1
| | | | | | | | | | | | | | | | prepare_recipe_sysroot When running prepare_recipe_sysroot task, the extend_recipe_sysroot is run twice. What prepare_recipe_sysroot does is executing extend_recipe_sysroot, there's no need to add extend_recipe_sysroot to its prefuncs. (From OE-Core rev: bf7584a2ac16ee46ff5b41536b06bb46d0cbada7) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: simplify exceptions for 32 bit time API checkAlexander Kanavin2023-05-051-11/+3
| | | | | | | | | | | | | | | | Existing implementation required to list both specific problematic apis, and files that use them: neither is necessary as both are seen in package_qa error messages, and can cause excessive amount of exception lines, if there are too many files, or they are installed in arch-specific locations. Also, the value of INSANE_SKIP should be the test that needs to be skipped, and in this case it wasn't. Also, all problematic recipes are now correctly listed. (From OE-Core rev: e6ebd0c556dfc576a59f5755d97089a2a241f698) 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>
* license.bbclass: Include LICENSE in the output when it fails to parsePeter Kjellerstedt2023-05-051-1/+1
| | | | | | | | (From OE-Core rev: 1a5197760da3890cc80ac7da8d589766612d9051) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* binutils: Drop crosssdk suffix from virtual provides to improve dependency ↵Richard Purdie2023-05-021-2/+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>
* sanity.bbclass: Update minimum gcc version to 8.0Mark Hatle2023-04-041-3/+3
| | | | | | | | | | | | | | With a gcc older then 8.0, mesa-native will fail to build with the error: sorry, unimplemented: non-trivial designated initializers not supported According to https://docs.mesa3d.org/install.html?highlight=gcc+version#compile the required minimum compiler version is now GCC 8.0. (From OE-Core rev: aa466053bf8a4b7998a462f0b49372d3a68a28e3) Signed-off-by: Mark Hatle <mark.hatle@amd.com> Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.bbclass: check packages name conflict in do_packageFawzi KHABER2023-03-301-0/+9
| | | | | | | | | | | | | | | It is possible to rename packages with the macro PKG:${PN} and result in a package name conflict if the target name exists already. Add a fatal check to prevent this issue to go unnoticed. Fix [Yocto #12060] Reviewed-by: Yoann CONGAL <yoann.congal@smile.fr> (From OE-Core rev: f6cb63d3a871c4eef52d981131a56bf41aa1dcdf) Signed-off-by: Fawzi KHABER <fawzi.khaber@smile.fr> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* abi_version/sstate: Handle pkgconfig output changes and bump output versionsRichard Purdie2023-03-262-2/+2
| | | | | | | | | | | | | A recent package.py change has highlighted some corruption issues with -dev pkgconfig package dependencies. Bump the output versions to trigger a rebuild and ensure everything is consistent. Take the opportunity to also drop all HASHEQUIV_HASH_VERSION entries since the main version is changing. (From OE-Core rev: f45ddfbf007de858327eef0ffefd5840ef4c69b8) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* staging/multilib: Fix manifest corruptionRichard Purdie2023-03-091-3/+4
| | | | | | | | | | | | | The previous fix wasn't enough to address all the possible ways the manifests might be ordered. Rework the previous fix so it is tied to the multilib cross-canadian code which is causing the problem. RECIPE_SYSROOT_MANIFEST_SUBDIR is not documented as I'd hope nobody ever needs to use this outside the core multilib code. (From OE-Core rev: beab42e00713880cd95a04729c892f8662fbcbed) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base: fix typosUlrich Ölmann2023-03-071-2/+2
| | | | | | | (From OE-Core rev: 0f8baa36fa99c66dbf305da355b665cb053c3ef4) Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* staging: Separate out different multiconfig manifestsRichard Purdie2023-03-071-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | """ require conf/multilib.conf MACHINE = "qemuarm64" MULTILIBS = "multilib:lib32" DEFAULTTUNE:virtclass-multilib-lib32 = "armv7athf-neon" bitbake gcc-cross-canadian-arm """ and then inspecting the lib32* manifest files under recipe-sysroot-native shows them referencing lib32-recipe-sysroot instead of recipe-sysroot as used by gcc-cross-canadian recipes. To fix this separate out the manifest by multilib. It is caching mechanism to optimise disk usage so this doesn't break anything, just separated out some files. (From OE-Core rev: 891d3faa3ed3d1cc231da58e5fa1325f05d5ade5) 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>
* sstate: Add check_for_interrupts() call functionality added in bitbakeRichard Purdie2023-02-231-0/+3
| | | | | | | | | | | | | Add in the new 'check' calls which mean that the code can exit from longer running code loops if requested by the user. This covers sstate checks and sstate manifest cleanup code which currently couldn't be interrupted by the user from the UI. Increase the minimum bitbake version which brings in this API. (From OE-Core rev: cb6c50689175668b66ffbe09ff8f250ba9a9034b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: move Upstream-Status logic to oe.qaMartin Jansa2023-02-191-16/+3
| | | | | | | | | | * 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>
* insane.bbclass: use 4 spaces for indentationMartin Jansa2023-02-191-25/+25
| | | | | | | | | | * this block was using just 3 (From OE-Core rev: 4578f2237cb694473eb54ff85af342ee94c9f19d) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta/conf: move default configuration templates into meta/conf/templates/defaultAlexander Kanavin2023-02-161-3/+3
| | | | | | | | This sets the ground for standardizing (and enforcing) the location of configuration templates: let's start with the default one. Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devshell: Do not add scripts/git-intercept to PATHPeter Kjellerstedt2023-02-101-2/+0
| | | | | | | | | | | | | The use of scripts/git-intercept was introduced in commit 3266c327df (install/devshell: Introduce git intercept script due to fakeroot issues) and later reverted in commit af27c81eaf (scripts: Make git intercept global). (From OE-Core rev: f6c260c8e2a33e282a35afc99de4ef8cc1791b08) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate.bbclass: Fetch non-existing local .sig files if neededTobias Hagelborn2023-02-021-2/+3
| | | | | | | | | | | | | | | | | | For the case of a global shared state cache and a local sstate cache with a mix of signed and un-signed entries, there is a case where a .sig is missing locally, but may exist in the global sstate cache. For this case, do not just fail sstate fetch, but rather backfill the .sig file from the global sstate cache. If this case is detected, re-run the fetch operation to get the global .sig file (if it exists). (From OE-Core rev: d5ea1a5396bf9fd4303cae46bc0e042be8de8d67) Signed-off-by: Tobias Hagelborn <tobias.hagelborn@axis.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sanity: Fix small typosYoann Congal2023-01-261-4/+4
| | | | | | | | | | | | | * reproducibile -> reproducible * distrubution -> distribution * Joined lines gone awry * and and -> and (From OE-Core rev: 60196e7512e97c2509256403dad5c8a23dce32fc) Signed-off-by: Yoann Congal <yoann.congal@smile.fr> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta/classes-global: remove package_tar.bbclassMichael Opdenacker2023-01-251-77/+0
| | | | | | | | | | | Remove package_tar.bbclass, which is no longer in use in oe-core and meta-oe, and which the document reports as broken and unsupported. (From OE-Core rev: 90ce19122802a16e6067f3a2ce3447acf1070fe5) Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: Improve patch warning/error handlingRichard Purdie2023-01-211-9/+17
| | | | | | | | | | | | | | | Currently, whilst patch errors or warnings are shown, the errors don't stop builds. The configuration isn't very configurable from WARN_QA and ERROR_QA either. This patch: * Uses the standard mechanisms to handle the patch fuzz warnings/errors * Makes Upstream-Status checking configurable from WARN/ERROR_QA * Allows that checking to be used with non-core layers * Makes patch-fuzz an error by default (From OE-Core rev: 76a685bfcf927593eac67157762a53259089ea8a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* uninative: Ensure uninative is enabled in all cases for BuildStarted eventRichard Purdie2023-01-111-0/+2
| | | | | | | | | | | | | Recent changes in bitbake mean the datastore is not always reset between ConfigParsed and BuildStarted. This means in a fresh buiild, with memory resident bitbake active, uninative may end up disabled. Update the code so the enable code is always run at BuildStarted if needed. (From OE-Core rev: db743cc78fe5172bb4a4dac9c1dad4f5aa9e1491) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package: Drop support for PACKAGEBUILDPKGD function customisationRichard Purdie2023-01-051-18/+8
| | | | | | | | | | | We don't really need the customisation capability of PACKAGEBUILDPKGD since we also have PACKAGE_PREPROCESS_FUNCS which is generally used by recipes. Drop PACKAGEBUILDPKGD to have some simpler/clearer code. This allows some function wrappers to be removed too. (From OE-Core rev: 6a4f24724cea3ddf55cacccb80fa54aa898dfa86) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package: Move mapping_rename_hook to packagedata function libraryRichard Purdie2023-01-054-16/+3
| | | | | | | | | 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: Drop unused function and obsolete commentRichard Purdie2023-01-051-12/+0
| | | | | | | | The function appears unused and the comment obsolete, drop them. (From OE-Core rev: f3745718f8ec3bbed9816bf3d891e9885f8518b5) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package: Move package functions to function libraryRichard Purdie2023-01-051-1396/+11
| | | | | | | | | 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-177/+2
| | | | | | | | | 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-054-62/+7
| | | | | | | | | 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-054-80/+4
| | | | | | | | | 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-237/+1
| | | | | | | | | 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>
* base.bbclass: Fix way to check ccache pathChangqing Li2022-12-231-1/+1
| | | | | | | | | | | | | | The previous code had 2 issues: 1. make hosttools/ccache always link to host's ccache (/usr/bin/ccache) even we have one buildtools 2. make hosttools/gcc etc, link to host's gcc event we have one buildtools when keyword ccache in buildtools's path, eg: /mnt/ccache/bin/buildtools This patch is for fix above issues. Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_rpm: Fix Linux 6.1.0 perf 1.0 version mistranslationMarek Vasut2022-12-171-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | With Linux 6.1.0 and perf 1.0-r9, a build which includes perf-dev fails due to perf-dev depending on perf 6.6.1.0-r9 . This is because translate_vers() operates on perf-dev and mangles its version. The following scenario occurs: ver=6.1.0-r9 pv=1.0 pkgv=6.1.0 reppv=6.1.0 With Linux 6.1.0, a corner case is hit where pv is a substring of ver, which yields this corrupted version 6.6.1.0-r9 . Example in python3: >>> "6.1.0-r9".replace("1.0", "6.1.0") '6.6.1.0-r9' >>> "6.0.13-r9".replace("1.0", "6.0.13") '6.0.13-r9' The fix is to only replace pv with reppv in case pv is at the beginning of ver , instead of replacing all occurences. (From OE-Core rev: bf2096a43d56c2d633a4b6e3db9e4390da4be6e2) Signed-off-by: Marek Vasut <marex@denx.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: Add QA check for 32 bit time and file offset functionsOla x Nilsson2022-12-171-0/+128
| | | | | | | | | | | Check for known symbols that should have been redirected to 64bit variants when -D_FILE_OFFSET_BITS=64 and -D_TIME_BITS=64 are set. (From OE-Core rev: 8e2af04f24443fad2040bb32e6033d49e3120517) Signed-off-by: Ola x Nilsson <olani@axis.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sanity: Update minimum python version to 3.8Richard Purdie2022-12-121-3/+3
| | | | | | | | | Bitbake is moving to a minimum python version of 3.8, update OE-Core to match to make things consistent. (From OE-Core rev: cc05bc04156122fd6f918191a9cec7bc0392415e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base: Switch to use addpylib directive and BB_GLOBAL_PYMODULESRichard Purdie2022-12-081-23/+0
| | | | | | | | | | | | | | | 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>
* base: Drop do_package base definitionRichard Purdie2022-11-271-5/+1
| | | | | | | | | | | | I can't see how anyone would be using this very old package function definition since package.bbclass is always inherited in modern OE. All it seems to do is waste CPU cycles. Drop it and it's associated EXPORT_FUNCTIONS entry. (From OE-Core rev: 56f7aa4cc0256aff96a1d720bd1931ea9a9bac8a) 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>
* sstate: show progress bar againEnrico Scholz2022-11-221-1/+5
| | | | | | | | | | | | | | | | | | | Transition to ThreadPoolExecutor (eb6a6820928472ef194b963b606454e731f9486f) broke the | Checking sstate mirror object availability: ... progress bar because the removed 'thread_worker' was still referenced in an asynchronous function. As the result of the future is never read, the resulting backtrace is silently discarded. Replace the information given to 'ProcessProgress' by a counter. (From OE-Core rev: eacd52216815e0c75e5f257b6db792afd8b1b6df) Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* mirrors.bbclass: update CPAN_MIRRORTim Orling2022-11-221-2/+1
| | | | | | | | | | | | Both of these redirect to https://cpan.metacpan.org/: http://cpan.metacpan.org/ http://search.cpan.org/CPAN/ (From OE-Core rev: f1b74fc09f70d52d9ac629b04d81aa94fd97ff40) Signed-off-by: Tim Orling <tim.orling@konsulko.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sanity: Drop data finalize callRichard Purdie2022-11-141-9/+2
| | | | | | | | | | | This call was effectively like update_data and no longer did anything in bitbake. Drop it as it is obsolete. (From OE-Core rev: d3eb4531aae28a07cb7e52ed5fe1102445d2effd) 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>
* sstate: Allow optimisation of do_deploy_archives task dependenciesJose Quaresma2022-11-141-1/+1
| | | | | | | | | | | do_deploy_archives tasks don't need their dependencies so we can optimistion this as we do for some other tasks. (From OE-Core rev: 3dd9f6e398844380d3765c54d35afe0d2ccf82e7) 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>
* sanity.bbclass: do not check for presence of distutilsAlexander Kanavin2022-11-111-3/+1
| | | | | | | | | | | | | | | This will be removed in 3.12 and has been deprecated for a while. If anything breaks because of its absence on the host, this would expose the breakage so it can be fixed. icu source specifically does not refer to distutils anywhere. (From OE-Core rev: 8e3a5b0709384f2b455a82ac1e8e212686fe4456) 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>
* package: Fix handling of minidebuginfo with newer binutilsNathan Rossi2022-11-111-3/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Newer versions of binutils (2.38+) have changed how the "--only-keep-debug" of objcopy behaves when stripping non-debug sections from an ELF. https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=68f543154e92ab0f5d6c569e0fa143f5e8bd2d80 This change causes associated sections to be correctly marked as NOBITS with the section contents removed from the output. The side effect is that this causes issues with objcopy's ability to perform symbol and relocation stripping (-S/--strip-all) on the debug split ELF, such that with some object files (e.g. kernel modules) objcopy fails to strip symbols/relocations with an error like the following: .../.debug/nls_cp950.ko[.rodata]: file truncated Because of this it is now problematic to generate minidebuginfo for these types of ELF objects. However it is not typically useful to inject minidebuginfo into these types of ELFs, and other distributions (e.g. Fedora, referring to find-debuginfo.sh of debugedit) only insert minidebuginfo into executables and shared libraries. This change causes the minidebuginfo injection to only apply to EXEC/DYN type ELFs, which limits the injection to executables and shared libraires. Additionally this change fixes the parsing of the sections from the "readelf -W -S" output which was not accounting for the section index column having leading spaces for single digit index values e.g. "[ 1]". (From OE-Core rev: 2084cfcb3d15db3e02637f1cd63ab9c997f38a65) Signed-off-by: Nathan Rossi <nathan.rossi@digi.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* mirrors.bbclass: use shallow tarball for nativesdk-binutilsEtienne Cordonnier2022-11-071-0/+2
| | | | | | | | | | | This is useful e.g. when using meta-clang, which introduces a dependency to nativesdk-binutils when populating the SDK, and then a full tarball of binutils is fetched additionally to a shallow tarball. (From OE-Core rev: 18624a89cb09bab78f9200a7c63406c75845e3e3) Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: add codeload.github.com to src-uri-bad checkRoss Burton2022-11-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | GitHub redirects /archive/ URLs to codeload.github.com, a dedicated service for caching git archives: $ wget -v https://github.com/unicode-org/icu/archive/refs/tags/release-72-1.zip HTTP request sent, awaiting response... 302 Found Location: https://codeload.github.com/unicode-org/icu/zip/refs/tags/release-72-1 [following] This is not the case for uploaded artifacts: $ wget -v https://github.com/unicode-org/icu/releases/download/release-72-1/icu4c-72_1-data-bin-l.zip.asc HTTP request sent, awaiting response... 302 Found Location: https://objects.githubusercontent.com/github-production-release-asset-2e65be/49244766/... [following] Check for codeload.github.com URLs in the src-uri-bad check in case the SRC_URI contains this final URL, and not the public URI. (From OE-Core rev: a3b4575259fa304c596ed227ed60769b5f72f0a8) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sanity: check for GNU tar specificallyRoss Burton2022-10-291-0/+8
| | | | | | | | | | | | | We need the system tar to be GNU tar, as we reply on --xattrs. Some distributions may be using libarchive's tar binary, which is definitely not as featureful, so check for this and abort early with a clear message instead of later with mysterious errors. (From OE-Core rev: 7dd2b1cd1bb10e67485dab8600c0787df6c2eee7) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* mirrors.bbclass: use shallow tarball for binutils-nativeEtienne Cordonnier2022-10-281-0/+1
| | | | | | | | | | | | This is useful e.g. when using meta-clang, which introduces a dependency to binutils-native, and then a full tarball of binutils is fetched additionally to a shallow tarball. The original BB_GIT_SHALLOW lines were added because of https://www.mail-archive.com/yocto@lists.yoctoproject.org/msg08752.html (From OE-Core rev: bd83b8b502ae935c75b59aaf71bbb531c9771dcc) Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* own-mirrors: add crateAdrian Freihofer2022-10-251-1/+1
| | | | | | | | | | Support downloading crate files from a mirror at SOURCE_MIRROR_URL. (From OE-Core rev: aebf4f183267a1e2f073078ade0ddc916ceed53f) Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: Allow hashlib version that only accepts on parameterMark Hatle2022-10-251-1/+4
| | | | | | | | | | | | Some versions of hashlib don't appear to implement the second FIPS related argument. Detect this and support both versions. (From OE-Core rev: 2bbabed51e3aca138486d3feef640f5d3249be40) Signed-off-by: Mark Hatle <mark.hatle@amd.com> Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org> Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>