summaryrefslogtreecommitdiffstats
path: root/meta/classes-global
Commit message (Collapse)AuthorAgeFilesLines
* sanity.bbclass: Check for additional native perl modules.Philip Balister2024-01-031-1/+1
| | | | | | | | | | | | | | | Since we use the build systems native perl, we need to check that all perl modules required for a build are installed. For a default Fedora 39 install, autoconf-native and libxcrypt both fail to build due to missing perl modules. After taking careful notes, this commits adds checks for File::Compare, File::Copy, open, and FindBin. [YOCTO #14691] (From OE-Core rev: 3d09e759f838a7ce66fd1fb6e6a6653abce9e3a4) Signed-off-by: Philip Balister <philip@balister.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes-global/insane: Look up all runtime providers for file-rdepsJoshua Watt2023-12-241-18/+12
| | | | | | | | | | | | Uses the new foreach_runtime_provider_pkgdata() API to look up all possible runtime providers of a given dependency when resolving file-rdeps. This allows the check to correctly handle RPROVIDES for non-virtual dependencies (From OE-Core rev: 018fa1b7cb5e6a362ebb45b93e52b0909a782ac9) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes-global/sstate: Fix variable typoJoshua Watt2023-12-241-1/+1
| | | | | | | | | | The vardepsexclude was subtly wrong in that it referenced STATE_MANMACH when the actual variable name is SSTATE_MANMACH. (From OE-Core rev: ec5054396f7fafea2a071d2695ae111fc585d6e6) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* ipk: Switch to using zstd compressionJoshua Watt2023-12-231-2/+2
| | | | | | | | | | | | | | | | | | | | | Converts IPK package generation to use zstd instead of xz. zstd has a much larger compression/speed tradeoff range allowing users to choose what suits them best, and fast decompression speeds. It also continues to support parallel compression as xz did. A new variable called ZSTD_DEFAULTS is provided to set the defaults for places that want to use zstd for compression; the zst image conversion command is also modified to use this. Finally, in order for this to function properly, opkg must include zstd support, so it is enabled all the time with no PACKAGECONFIG to turn it off. (From OE-Core rev: 1bc3e9bbaa670b6128c74c76b4b5264e60ce3463) 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>
* sstate: Fix dir ownership issues in SSTATE_DIRRichard Purdie2023-12-151-2/+7
| | | | | | | | | | | | | | | | | | | We currently use mkdir -p to create missing parent directories within SSTATE_DIR. Reading the man page for mkdir mentions that parent directories are created with the current umask, *not* the mode passed upon the commandline. We could fix this by setting and resetting the umask but since we already have decent python code able to do this, move to using that injecting a python function into the chain of functions already present. This should help fix the occasional sstate directory creation with the wrong permissions. [YOCTO #14385] (From OE-Core rev: ae642a4b038c6946e6c8aa9778bf09099d938a31) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base: Unpack .7z files with p7zipDaniel Ammann2023-12-131-0/+4
| | | | | | | | (From OE-Core rev: b129a45288ce465888b609e463cf94538de22a3c) Signed-off-by: Daniel Ammann <daniel.ammann@bytesatwork.ch> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: ensure more paths have the workdir removedRoss Burton2023-12-091-10/+10
| | | | | | | | | | | When showing paths to the user we don't want to include the whole build directory. Passing the package name to package_qa_clean_path strips this completely. (From OE-Core rev: 7f1a862d2a432f216e37bf63648bef787422a43d) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate: Remove unneeded code from setscene_depvalid() related to useraddRichard Purdie2023-12-081-5/+0
| | | | | | | | | With recent changes to runqueue in bitbake, this horrible hack is no longer needed and we can drop it. (From OE-Core rev: f7f50b6013f7b636fe46448b1cbe1473de891527) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gdb/systemd: enable minidebuginfo support conditionallyEtienne Cordonnier2023-12-061-1/+1
| | | | | | | | | | | | | | Enabling minidebuginfo is not useful if gdb and systemd-coredump are unable to parse it. In order to parse it, gdb needs xz support. Systemd needs coredump enabled, as well as elfutil enabled as well (systemd-coredump loads libdw which is part of elfutils using dlopen). (From OE-Core rev: 0d2df803bebfd7e832ab7da54c4dacaaeeb424a9) 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>
* package_ipk: Fix Source: field variable dependencyRichard Purdie2023-11-231-1/+5
| | | | | | | | | | | The Source: variable is generated from FILE but this is excluded from checksums normally which results in a reproduciubility issue when the filename changes. Add in a dependency by reworking the code a little to avoid this. (From OE-Core rev: 3ea7da76c6930031a0071069027b1d71f737fbc9) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* staging.bbclass: process installed dependencies in deterministic order as wellMartin Jansa2023-11-201-1/+1
| | | | | | | | | | | | | | | | | | * similarly as direct dependencies before * this doesn't fix any issue (at least AFAIK), just keeps the log files more deterministic to avoid unnecessary churn like in: perl-native.log.do_configure: -NOTE: Installed into sysroot: ['zlib-native', 'make-native', 'perlcross-native', 'gdbm-native', 'xz-native', 'gettext-minimal-native', 'texinfo-dummy-native', 'libtool-native'] +NOTE: Installed into sysroot: ['zlib-native', 'make-native', 'perlcross-native', 'gdbm-native', 'libtool-native', 'gettext-minimal-native', 'texinfo-dummy-native', 'xz-native'] and similarly in "Note: Skipping as already exists in sysroot: (From OE-Core rev: cedee02e1acaffd8932809ceb5b6f9bd4f861283) 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>
* package/package_write: Improve packagedata code locationRichard Purdie2023-11-085-22/+12
| | | | | | | | | | Move the do_packagedata dependencies into the package_write codeblocks themselves. Also drop the dependency for the tar package backend which was dropped. (From OE-Core rev: 372a7f2e3c5c03da044e576e1501e86f8938f5e6) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: Move unpack tests to do_recipe_qaRichard Purdie2023-11-081-24/+22
| | | | | | | | | The SRC_URI tests are a better fit for the new do_recipe_qa task, move them there. (From OE-Core rev: 5afde8e24e74c7b73c1da312cca65b3277a6c355) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate: Ensure sstate searches update file mtimeRichard Purdie2023-11-081-10/+2
| | | | | | | | | | | | | | | Commands like "bitbake XXX -S printdiff" search for sstate files but don't download them. This means that local files aren't touched as the download code would do, meaning the sstate cleanup scripts can delete them. This can then lead to obtuse build failures. Have the search code touch local files in the same way as the main code paths would to avoid these files disappearing. Move the function to a common touch() function in lib/oe instead of duplicating code. (From OE-Core rev: a27fc0bd5706ab5b9c68a0271fcf57377a678cdf) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes: Move package RDEPENDS processing out of debian.bbclassSergei Zhmylev2023-11-062-16/+22
| | | | | | | | | | | | | | | INHERIT_DIRSTO by default includes debian.bbclass which in turn properly establishes dependencies between package management tasks and build process. Debian class also unconditionally renames several packages in a Debian way. In order to allow disabling of such renaming rules, the logic of RDEPENDS handling is moved to a package.bbclass. This commit also solves the SDK building issue without debian.bbclass. (From OE-Core rev: 8313a4201cde39c444aa6fbe82e46a767fc31f6b) Signed-off-by: Sergei Zhmylev <s.zhmylev@yadro.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* uninative.bbclass: Add ldso information for riscv64Khem Raj2023-11-051-1/+1
| | | | | | | | (From OE-Core rev: 1532b3904a2852f37e3e269ed06ddba5aa87e183) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base: Ensure recipes using mercurial-native have certificatesRichard Purdie2023-10-271-1/+1
| | | | | | | | | | | | If you try and fetch using mercurial-native, you see certificate errors since it is configured to find ones in the sysroot, not the system. Add the missing dependency so that mercurial recipes using the native tool work. Found trying to make mirroring for old meta-oe stable branches work. (From OE-Core rev: fc567e35b374f8b08975602609ee71e64357fb3d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_rpm: Allow compression mode overrideNiko Mauno2023-10-261-2/+4
| | | | | | | | | | | | | | | | | | | | | | | Commit 4a4d5f78a6962dda5f63e9891825c80a8a87bf66 ("package_rpm: use zstd instead of xz") changed the rpm package compressor from 'xz' to 'zstd' which results in decompression failure with BusyBox-provided 'rpm2cpio' applet and 'rpm' applet when given the '-i' (Install package) option: rpm2cpio: no gzip/bzip2/xz magic Introduce a variable which makes it possible to use a different compression mode, making it possible to override the default value for example like RPMBUILD_COMPMODE = "${@'w6T%d.xzdio' % int(d.getVar('XZ_THREADS'))}" to enable rpm decompression without including the full rpm package in the resulting root filesystem. (From OE-Core rev: a40d9258148e28cbee2168c93179cd4c1232fb62) Signed-off-by: Niko Mauno <niko.mauno@vaisala.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_rpm: Remove unused definitionsNiko Mauno2023-10-261-4/+0
| | | | | | | | | | Some local variables defined in do_package_rpm() are not referenced, so remove such dead code lines. (From OE-Core rev: 5d387bc9001726937ffa7d3cfc333cfa31b681fb) Signed-off-by: Niko Mauno <niko.mauno@vaisala.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_rpm: Minor cosmetic and style fixesNiko Mauno2023-10-261-3/+3
| | | | | | | | | | Add the missing conventional space characters around bitbake variable assignment operators. Also fix a typo on a comment line. (From OE-Core rev: 3dea51ce6c91dc2b12a5520dede51ec6357e87d5) Signed-off-by: Niko Mauno <niko.mauno@vaisala.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_rpm: Fix some pycodestyle issuesNiko Mauno2023-10-261-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | Fix following subset of observations reported by version 2.10.0 of pycodestyle utility: meta/classes-global/package_rpm.bbclass:65:46: E231 missing whitespace after ',' meta/classes-global/package_rpm.bbclass:66:46: E231 missing whitespace after ',' meta/classes-global/package_rpm.bbclass:107:19: E231 missing whitespace after ',' meta/classes-global/package_rpm.bbclass:109:69: E202 whitespace before ')' meta/classes-global/package_rpm.bbclass:122:103: W291 trailing whitespace meta/classes-global/package_rpm.bbclass:194:74: W291 trailing whitespace meta/classes-global/package_rpm.bbclass:448:16: E713 test for membership should be 'not in' meta/classes-global/package_rpm.bbclass:450:16: E713 test for membership should be 'not in' meta/classes-global/package_rpm.bbclass:520:1: W293 blank line contains whitespace meta/classes-global/package_rpm.bbclass:521:15: E231 missing whitespace after ',' meta/classes-global/package_rpm.bbclass:542:12: E713 test for membership should be 'not in' meta/classes-global/package_rpm.bbclass:544:12: E713 test for membership should be 'not in' meta/classes-global/package_rpm.bbclass:647:67: W291 trailing whitespace (From OE-Core rev: 7920599c05c066767025063b277df73c6560753d) Signed-off-by: Niko Mauno <niko.mauno@vaisala.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_qa_check_rdepends: Allow /usr/bin/sh if usrmergeJörg Sommer2023-10-231-0/+4
| | | | | | | | | | | | If the distro feature usrmerge is set, all files from /bin are moved to /usr/bin, i.e. /usr/bin/sh is the same as /bin/sh and should be allowed be ignored, because it's always present. (From OE-Core rev: 330dc61053afae8a1812bda6f9e01e2f09d1f08f) Signed-off-by: Jörg Sommer <joerg.sommer@navimatix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: unimplemented-ptest: ignore source file errorsYoann Congal2023-10-171-10/+16
| | | | | | | | | | | | | | | In some cases, pathlib.Path.glob() might throw FileNotFoundError when file/directory disappear while it is iterating over them. This "warning" is not important enough to crash build in this case so just take a bb.note of the problem and move on. (From OE-Core rev: 85ddbb67f0f6f823cac0966db78e5b74c5a54c4c) Signed-off-by: Yoann Congal <yoann.congal@smile.fr> Reported-by: Mark Hatle <mark.hatle@amd.com> Closes: https://lists.openembedded.org/g/openembedded-core/message/189254 Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: skip unimplemented-ptest on S=WORKDIR recipesYoann Congal2023-10-171-0/+2
| | | | | | | | | | | | On S=WORKDIR recipes, the unimplemented-ptest check will scan the whole WORKDIR and "see" disappearing file and directory. (From OE-Core rev: 9a2d2f7c2b7236667a6d80355f73db4c27e6582e) Signed-off-by: Yoann Congal <yoann.congal@smile.fr> Reported-by: Mark Hatle <mark.hatle@amd.com> Closes: https://lists.openembedded.org/g/openembedded-core/message/189254 Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: Add a naive heuristic to detect test subdirectoriesJérémy Rosen2023-10-151-0/+4
| | | | | | | | | | | | | | | | | if there is a "test" or "tests" subdirectory at toplevel, this usually means we have some unit tests available. This test is very good at detecting handcrafted tests and I was not able to find any false positive. False positive can be dealt with the usual INSANE_SKIP mechanism (From OE-Core rev: 0c91ad29f7ea313bc25481be9d40f216c0770b98) Signed-off-by: Jérémy Rosen <jeremy.rosen@smile.fr> Reviewed-by: Yoann Congal <yoann.congal@smile.fr> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: Detect build-system test harnessesJérémy Rosen2023-10-151-0/+12
| | | | | | | | | | | | | | | | | | | most build-systems have a way to implement a "make check" or equivalent command that will run tests in the source directory. This heuristic will detect the keywords in the build-system configuration that activates tests. Note that in the case of autotools, we use Makefile.in as our source instead of Makefile.am to easily follow includes. Filenaming conventions for autotools files are not reliable enough to do naive matching. (From OE-Core rev: bc9013295256443e877f29b7e00605ffa5177efa) Signed-off-by: Jérémy Rosen <jeremy.rosen@smile.fr> Reviewed-by: Yoann Congal <yoann.congal@smile.fr> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: Detect python and perl based testsJérémy Rosen2023-10-151-0/+22
| | | | | | | | | | | | | | | | | | | | match_line_in_files will look for a regex in all files matching a glob. we use iglob to avoid a complete, recursive scan of all source. iglob is based on python iterators and will scan as we walk through the directories pytest are detected by looking for "import pytest" or "from pytest" in any python file. perl Test:: is detetected by looking for any t/*.t in the toplevel source directory. (From OE-Core rev: 00d64ac38ae4af6193fae3b02375a16b1821f29e) Signed-off-by: Jérémy Rosen <jeremy.rosen@smile.fr> Reviewed-by: Yoann Congal <yoann.congal@smile.fr> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: Add unimplemented-ptest infrastructureJérémy Rosen2023-10-151-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | This infrastructure will use heuristics to detect when package sources seem to have unit tests implemented but no ptest have been implemented in the recipe. No heuristics have been implemented at this point, only the infrastructure to skip the test when ptest are implemented. This is part of python_do_qa_patch since we need the sources in their final state but do not need any configuration done A missing-ptest QA test already existed but it was used for a different purpose and overridden by ptest.bbclass. Thus, a new QA keyword was added Note: The QA test is not enabled by default and may be enabled to hunt down potential ptests with: WARN_QA += "unimplemented-ptest" (From OE-Core rev: 282ae38543e22cbdcbf69c64eace551997927ce3) Signed-off-by: Jérémy Rosen <jeremy.rosen@smile.fr> Reviewed-by: Yoann Congal <yoann.congal@smile.fr> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* packages.bbclass: Correct the check for conflicts with renamed packagesPeter Kjellerstedt2023-10-061-5/+3
| | | | | | | | | | | | | | | | The original solution replaced all overrides with the package name that was being checked. This can have unforseen consequences where some variable involved in defining the value for the PKG:<package> variable may rely on some override which is not set as expected. It also meant that any PKG variable set using an override would not be caught, e.g., PKG:${PN}:${MACHINE} = "${PN}-dev" (made up example that would always fail with the old code). (From OE-Core rev: de62d538dbfe6caf123ff366643f893077175583) 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>
* insane.bbclass: Count raw bytes in shebang-sizeJan Garcia2023-09-221-2/+1
| | | | | | | | | | Operating systems limit the shebang to a maximum number of bytes. This patch makes the shebang-size check count raw bytes instead of UTF-8 characters. (From OE-Core rev: d4ac66c5cdaf971fb717cc5c5bf9aa51a787d412) Signed-off-by: Jan Garcia <j@n-garcia.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate: Stop allowing overlapping symlinks from sstateRichard Purdie2023-09-221-24/+6
| | | | | | | | | | | | | | | | When originally implemented, overlapping symlinks in DEPLOY_DIR were common. That is no longer the case and these overlapping links are causing bugs in other areas (e.g. bug 14123). Therefore start showing errors for overlapping symlinks in shared areas. Whilst here, fix a broken file reference in the grep command to match current file layouts and update the message shown to users to match current times. Most of the message content is obsolete now due to other advances and changes in the way the staging code now works. (From OE-Core rev: 15f98f72e1730fed5164fcd539737a7a7b96a1a2) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* license/license_image: Fix license file layout to avoid overlapping filesRichard Purdie2023-09-202-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently DEPLOY_DIR/licenses is added to SSTATE_ALLOW_OVERLAP_FILES. This leads to bugs since when one MACHINE_ARCH recipes is cleaned, it removes the files for another which then results in later build failures as license files disappear. The solution is to include SSTAGE_PKGARCH in the path names to the license files. That does mean a search has to be used to find the correct license files for a given PN but that can be done via SSTATE_ARCHS. The implication for other tools is the layout has changed so tools will need to adapt to the new paths. The benefit is no more strange build failures such as from patterns like: MACHINE=qemux86-64 bitbake core-image-minimal MACHINE=genericx86-64 bitbake core-image-minimal MACHINE=qemux86-64 bitbake linux-yocto -c clean MACHINE=genericx86-64 bitbake core-image-minimal -C rootfs [YOCTO #14123] For anyone finding this commit, I'd question how much people should be relying on this code for tooling and suggest the SPDX manifests should be the preferred data format going forward anyway. (From OE-Core rev: 1a4ab9fc26659507e678e87312b514e8ea515673) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* multilib: fix SSTATE_ARCHS for multilib usageRichard Purdie2023-09-201-1/+2
| | | | | | | | | | | | | | When building multilibs, we need to inject the multilib sstate pkgarch into SSTATE_ARCHS so the list forms a complete search path. Add a tweak to do this. PACKAGE_ARCH defaults to TUNE_PKGARCH so this is equivalent and just guards against recipes changing the value which may have other unwanted side effects. (From OE-Core rev: 37126ffc7ccbd3df57ebbd8e581d158f03bb3b4c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate: Fix nativesdk entry in SSTATE_ARCHSRichard Purdie2023-09-201-1/+1
| | | | | | | | | | PACKAGE_ARCH gets refined by each target so this value isn't valid in all contexts. Tweak to use underlying variables to build it so that it remains valid in wider contexts and works with new usage in sdpx and license classes. (From OE-Core rev: ca90379147cb75755d205670781d8922161e9317) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/package: Refactor to make strip_execs callable without dAdrian Freihofer2023-09-121-1/+2
| | | | | | | | | | | This allows to call strip_execs function from devtool without going via tinfoil and a bitbake server process. (From OE-Core rev: 3bde26d64a0c8c3ef8ffbcb398f2a268759321af) Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base: add newline before LICENSE_FLAGS_DETAILSMichael Opdenacker2023-09-111-1/+1
| | | | | | | | | | | To improve readability and avoid putting one inside LICENSE_FLAGS_DETAILS. (From OE-Core rev: 5e027da9265e58df016fc3ebe45e4400f0e5c7a7) 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>
* uninative.bbclass: sync to use UNINATIVE_STAGING_DIRChen Qi2023-08-301-1/+1
| | | | | | | | | | | | All other places in this bbclass are using ${UNINATIVE_STAGING_DIR}-uninative, we should sync to use that too, although UNINATIVE_STAGING_DIR's default value is STAGING_DIR. (From OE-Core rev: a51fbe7975b15b1cb250974ced711cbd863dd88d) 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: Remove an unused variablePeter Kjellerstedt2023-08-241-1/+0
| | | | | | | | | | | The use of coremeta_path was removed with commit 61a881fdbe (insane: Improve patch-status layer filtering) when the patch-status QA test was generalized. (From OE-Core rev: 71a2c7b2608640dfa45d065692541d537149052e) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipes/classes/scripts: Drop SRCPV usage in OE-CoreRichard Purdie2023-08-241-4/+0
| | | | | | | | Now that SRCPV isn't needed we can simplify things in a few places... (From OE-Core rev: 843f82a246a535c353e08072f252d1dc78217872) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base/package: Move source revision information from PV to PKGVRichard Purdie2023-08-242-26/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Source control information being present in PV used to be a hard requirement for bitbake to operate correctly. Now that hashes are a required part of task stamps, this requirement no longer exists. This means we can defer the hash pieces to PKGV and simplify PV. Use new bitbake fetcher API to inject the source revisions directly into the hash allowing removal of some horrible code from base.bbclass and avoiding any hardcoding about how SRCREV may or may not be used. Use that API to object the string to append to PKGV and append that directly. The user visible effect of this change is that PV will no longer have revision information in it and this will now be appended to PV through PKGV when the packages are written. Since PV is used in STAMP and WORKDIR, users will see small directory naming and stamp naming changes. This will mean that sstate reuse through hash equivalence where the source revision changes but the output does not will become possible as the sstate naming will become less specific and no longer contain the revision. The SRCPV variable will no longer be needed in PV and is effectively now just a null operation. Usage can be removed over time. (From OE-Core rev: a8e7b0f932b9ea69b3a218fca18041676c65aba0) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Add GCP fetcher to list of supported protocolsEmil Ekmečić2023-08-141-1/+2
| | | | | | | | | | | If accepted, this patch should merge with the corresponding BitBake patch titled "fetch2: add Google Cloud Platform (GCP) fetcher". (From OE-Core rev: 1e2e596bcdff031d7d7dc1d6f6adbb03d9ec2995) Signed-off-by: Emil Ekmečić <eekmecic@snap.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: add a RECIPE_MAINTAINER check (oe-core recipes only)Alexander Kanavin2023-07-301-1/+10
| | | | | | | | | | | | | | Absent maintainer entries are as well a frequent source of friction, as they are checked only in selftest, and so aren't revealed until autobuilder runs. The selftest is retained as it also checks for obsolete entries in maintainers.inc (not possible to do in insane class). (From OE-Core rev: 675dff0e37666c1cffa10a83f6f1f67d5fadd204) 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>
* insane.bbclass: add a SUMMARY/HOMEPAGE check (oe-core recipes only)Alexander Kanavin2023-07-301-0/+16
| | | | | | | | | | | | | | | | | This was done in a selftest, but that is too late and creates friction in integration as errors are not seen until autobuilder fails. Bonus fix: SUMMARY check wasn't even working, as in the absence of one set in the recipe there is a default value set from bitbake.conf. I left DESCRIPTION check out for now, as many recipes don't actually have it, and it's set from SUMMARY (plus a dot) if absent. (From OE-Core rev: 4144c2f43da39336b03cfd612cbe1694cbf8c7bd) 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>
* insane.bbclass: add do_recipe_qa taskAlexander Kanavin2023-07-301-0/+14
| | | | | | | | | | | | | | | | | There is a need to run QA checks that can operate entirely from recipe metadata and do not need any of the build artefacts or source code. After some deliberation it was concluded that such checks are best collected in their own task that runs as early as possible, and so this commit adds the task. Like package_qa, the task is sstate enabled, but doesn't (yet) register the qa results into sstate. (From OE-Core rev: e0c71367ab59021fc430ef215bbfc3b525036ba4) 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>
* 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>