summaryrefslogtreecommitdiffstats
path: root/meta/classes-global
Commit message (Collapse)AuthorAgeFilesLines
* base/bitbake.conf: Introduce UNPACKDIRRichard Purdie11 days1-2/+2
| | | | | | | | | | | | | Having the unpack directory hardcoded to WORKDIR makes it really hard to make any changes to the unpack process to try and allow for cleanup for example. As a first step toward unraveling the intertwined location usages, add a variable, UNPACKDIR which is where the fetcher is asked to unpack fetched sources. It defaults to the existing value of WORKDIR at this point. (From OE-Core rev: e022d62ba917790af2121da57646271ef17c03fa) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate.bbclass: Add _SSTATE_EXCLUDEDEPS_SYSROOT to vardepsexcludeMark Hatle11 days1-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | When using tinfoil to control the build, multiple commands (serially) could trigger an error such as: When reparsing ....bb:do_package, the basehash value changed from ... to .... The metadata is not deterministic and this needs to be fixed. ERROR: The following commands may help: ERROR: $ bitbake esw-conf -cdo_package -Snone ERROR: Then: ERROR: $ bitbake esw-conf -cdo_package -Sprintdiff However following these commands it was not able to be reproduced. Forcing bitbake to dump the signatures and then running bitbake-diffsigs showed that the value of _SSTATE_EXCLUDEDEPS_SYSROOT was being set in one run, but was blank is a different version. Upon inspecting the code in sstate.bbclass, one usage (without the _) is already excludes, the leading _ version is used as a cache, only if set but is not actually required to be defined. So ignoring the value should work properly. (From OE-Core rev: 4ec704ed6a1cfaf0a6c20f2038e7192e361ef590) Signed-off-by: Mark Hatle <mark.hatle@amd.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: handle dangling symlinks in the libdir QA checkRoss Burton11 days1-2/+2
| | | | | | | | | | | | | | | The "libdir" QA check tries to open every file it finds as an ELF. If it finds a dangling symlink that looks like a library by the filename it will try to open it and fail with FileNotFoundError error. As this dangling symlink probably points to a real file, silently absorb the error. [ YOCTO #13949 ] (From OE-Core rev: f044290f98ea66f2cecfbffd7d392dbc3d986da9) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_rpm: remove support for DIRFILESAlexander Kanavin2024-04-231-22/+9
| | | | | | | | | | | | | | This was added here: https://git.yoctoproject.org/poky/commit/?id=2f42ef8d8fb1febf28252b98884cebabc931f720 It's undocumented, untested, rpm-specific, and currently broken, and to begin with looks like a workaround for Tizen/smack security label conflicts elsewhere. (From OE-Core rev: ea8af19bb909c7e3633d82bec9d925c8f42ec860) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* abi_version/sstate: Switch to a new version for the upcoming releaseRichard Purdie2024-04-161-1/+1
| | | | | | | | | | | In testing websocket hashequivalence, corrupted sstate was injected into the autobuilder extensively. With the new release/LTS, being able to clearly differentiate between old and new sstate is probably desireable anyway so bump the appropriate versions. (From OE-Core rev: 7f107c180f592be29f57f580c60a6adbbebd7714) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sanity: Use diff instead of meld by defaultKhem Raj2024-04-111-1/+1
| | | | | | | | | | | meld fallback assumes that user has a gnome desktop its better to fallback to good old diff tool which will most distributions on build host will carry (From OE-Core rev: d027236eac2a136b06903d4a47adbc50ccd6b7c6) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* utils: enhance readelf command call with llvmlixiaoyong2024-03-301-2/+2
| | | | | | | | | | | | | | Replace `${HOST_PREFIX}readelf` with `${READELF}`. When utilizing llvm for compiling packages, the invocation of GNU readelf will consistently occur if the oe_soinstall and oe_libinstall functions, which are defined in utils.bbclass, are called. This behavior is unfriendly to llvm. So prefer `${READELF}` over `${HOST_PREFIX}readelf`. (From OE-Core rev: daecdd577213da0c045e45c47e7acbd279956d41) Signed-off-by: lixiaoyong <lixiaoyong19@huawei.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* uninative: Add pthread linking workaroundRichard Purdie2024-03-191-2/+2
| | | | | | | | | | | | | | | With newer glibc versions, pthread was merged into the main library so there is no longer any need to link with -lpthread. On newer systems this means that linker flag is dropped from places like pkgconfig .pc files. If uninative then uses this newer library on an older system, the flag is missing and linker errors about missing symbols occur. Adding the linkage unconditionally to our uninative linking flags avoids that problem at a potential cost of slight over linking. (From OE-Core rev: 5ec2bc7ef663db4c04c85eee518297d442556481) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* mirrors: Switch llvm to use shallow cloningRichard Purdie2024-02-291-1/+5
| | | | | | | | | | | The llvm github repo appears to see a lot of churn on branches we're not interested in and is in general huge and unreliable to clone. Switch to shallow clones to improve the user experience. (From OE-Core rev: 6cf98a4954751977fb02fb2024ef842865352138) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* useradd.bbclass: Fix order of postinst-useradd-*Piotr Łobacz2024-02-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | postinst-useradd-* haven't been running in order of dependency. This patch is reworked from Piotr Łobacz's patch and fixes: https://bugzilla.yoctoproject.org/show_bug.cgi?id=15084 https://bugzilla.yoctoproject.org/show_bug.cgi?id=13904 basepasswd_sysroot_postinst in base-passwd can install postinst-useradd-* scripts with any order. Sometimes this means, for example a useradd postinst will attempt to run without the corresponding group postinst causing errors. This patch ensures that we first run groupadd, then useradd and then group membership. [RP: Tweaked to avoid removing previous fixes and for whitespace/style issues Also ensure the scripts are changed to execute with -e to highlight errors] (From OE-Core rev: 322ef726132a47d977d2c6ee41de5358f1e85994) Signed-off-by: Eilís 'pidge' Ní Fhlannagáin <pidge@baylibre.com> Signed-off-by: Piotr Łobacz <p.lobacz@welotec.com> Signed-off-by: Jan Górski <j.gorski@welotec.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: Allow the warning about virtual/ to be disabledPeter Kjellerstedt2024-02-201-6/+7
| | | | | | | | | | | Commit f673d3d239799fb1ab50f4aa5d44187666aa0cd7 introduced a warning for virtual/ being used in RPROVIDES and RDEPENDS. Make it possible to disable the warning by removing "virtual-slash from WARN_QA. (From OE-Core rev: 968ffdb9fee5017eecce36ce878ea604c869ce95) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* patch.bbclass: Make use of oe.patch.GitApplyTree.commitIgnored()Peter Kjellerstedt2024-02-191-3/+1
| | | | | | | | | | This makes use of the oe.patch.GitApplyTree.commitIgnored() function to create commits that shall be ignored by `devtool finish`. (From OE-Core rev: 2393dc35a93546eccee0dd313a6927c7d1512c3b) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate.bbclass: Only sign packages at the time of their creationTobias Hagelborn2024-02-181-46/+94
| | | | | | | | | | | | | | | | | The purpose of the change is to never sign a package not created by the build itself. sstate_create_package is refactored into Python and re-designed to handle signing inside the function. Thus, the signing should never apply to existing sstate packages. The function is therefore renamed into sstate_create_and_sign_package. The creation of the archive remains in a separate shellscript function. Co-authored-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> (From OE-Core rev: ba223f8fff19ea59440d56cf3fe46200f3f71e22) Signed-off-by: Tobias Hagelborn <tobias.hagelborn@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/package: add LOCALE_PATHS to add define all locations for localesJonathan GUILLOT2024-02-141-0/+1
| | | | | | | | | | | | | Some packages may contain localized files not located in default path ${datadir}/locale. Add the new variable LOCALE_PATHS to allow a recipe to define extra paths or even fully override the scanned directories. LOCALE_PATHS is set at ${datadir}/locale by default to keep the exact same behavior for the recipes which did not need modification. (From OE-Core rev: 0ffc7cf01225743789ac30dd325fca05b9203be1) Signed-off-by: Jonathan GUILLOT <jonathan@joggee.fr> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sanity.bbclass: raise_sanity_error if /tmp is noexecMichal Sieron2024-02-131-0/+4
| | | | | | | | | | | | | Older meson versions save temporary scripts in /tmp. Similarly some recipies also do that (e.g. ccan in sbsigntool). As this can lead to unexpected build failures with no simple way to workaround, make such setup a fatal error. (From OE-Core rev: ee93a8e89322143252040bd5bc99259c5efff831) Signed-off-by: Michal Sieron <michalwsieron@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: Clarify runtime/ warningRichard Purdie2024-02-131-1/+1
| | | | | | | | | | We should be pointing people at VIRTUAL-RUNTIME, not virtual so tweak the warning. Try and make it clear the difference between the build dependencies and the runtime ones. (From OE-Core rev: 01d815aa2c0bea113fb79b51bf67c0ff90d57dd2) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* mirrors.bbclass: add infraroot as an https mirrorRandolph Sapp2024-02-101-0/+1
| | | | | | | | | | | | | | Add the new infraroot.at mirror to the MIRRORS string for https sources since infradead.org does not support https and certain proxy configs cause this fetch to fail. Mirror info fetched from the following announcement: https://lists.infradead.org/pipermail/linux-mtd/2023-August/100922.html (From OE-Core rev: ce8f7bb81598aecafe486a461c94254b97518832) Signed-off-by: Randolph Sapp <rs@ti.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* mirrors: Allow shallow glibc to work correctlyRichard Purdie2024-02-081-0/+2
| | | | | | | | | | | | | | The intention of the mirror code was to allow faster cloning of glibc. This wasn't quite working since the full clone was needed by glibc-tests or cross-localedef-native. I noticed this when I updated a build and it was trying to unpack glibc but fetch cross-localedef-native. Add entries to cover these and restore the faster cloning for glibc and realted recipes. (From OE-Core rev: 7891b5fb96f757274bebbb77df634e7af9054298) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_rpm: add RPMBUILD_EXTRA_PARAMS variableMartin Jansa2024-02-081-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * e.g. for DISTROs which define extra user-defined fields with PACKAGE_ADD_METADATA/PACKAGE_ADD_METADATA_RPM as undefined fields in packagedata are fatal error for rpmbuild: "error: line 9: Unknown tag: Author: Unspecified" as shown in: http://errors.yoctoproject.org/Errors/Details/751706/ with "Author" field added with: PACKAGE_CLASSES = "package_rpm" PACKAGE_ADD_AUTHOR_METADATA = "test-author" PACKAGE_ADD_METADATA = "Author: ${PACKAGE_ADD_AUTHOR_METADATA}" to fix rpm build you can use: RPMBUILD_EXTRA_PARAMS = " --define '_Author Author'" keep in mind that this doesn't cause this Author field to be added in .rpm, it just avoids the BUILDSPEC failure. and for ipk build: OPKG_MAKE_INDEX_EXTRA_PARAMS = "-f" alternatively you can avoid additional packagedata fields ending in the package manager (if you use them only with buildhistory or packagedata) with: PACKAGE_ADD_METADATA_RPM = "" PACKAGE_ADD_METADATA_IPK = "" PACKAGE_ADD_METADATA_DEP = "" (From OE-Core rev: 31030e7a19a27ad424b997fad36ee4f633ce0d63) 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>
* classes/package_rpm: streamline the logic in one of the condition blocksAlexander Kanavin2024-02-081-4/+2
| | | | | | | | (From OE-Core rev: e6a8ca554509c0edf9fd36ced88165dc3caf0e87) 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>
* classes/package_rpm: additionally escape \ and " in filenamesAlexander Kanavin2024-02-081-1/+1
| | | | | | | | | | | As specified in: https://github.com/rpm-software-management/rpm/blob/rpm-4.19.x/docs/manual/spec.md#shell-globbing (From OE-Core rev: 78d22c80c3f3a9f82c9f0d3dd1c591d395e02918) 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>
* classes/package_rpm: correctly escape percent charactersAlexander Kanavin2024-02-021-8/+8
| | | | | | | | | | | | | | | | | | This many characters doesn't work with rpm 4.19 packaging (as shown by nodejs recipes), and per documentation a single escape is enough: https://github.com/rpm-software-management/rpm/blob/rpm-4.19.x/docs/manual/spec.md#shell-globbing It also should be done in a function, and just before writing out the corrected filename to .spec, not earlier where the path may still be needed for file operations (such as gettings file attributes). (From OE-Core rev: 6d9fe2623c37e405a80acf71633f7291ecdde533) 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>
* classes/package_rpm: set bogus locations for passwd/group filesAlexander Kanavin2024-01-271-0/+2
| | | | | | | | | | | | | | | | | Since https://github.com/rpm-software-management/rpm/commit/f3eaeeb7341085e1850e914350cf1f33d538320d rpm does its own parsing of /etc/passwd and /etc/group instead of relying on getpwnam() and friends. This has an unfortunate effect of leaking build host uid/gid values for users and groups into the cpio header inside rpm file (where previously those were always zero). Installation of rpm packages relies on rpm header to set files ownership, and that is a different structure that is build from .spec information, so we can avoid host contamination by setting the paths to something bogus. (From OE-Core rev: ac8ea64bb39a5e56599e078c7e6cd056a2aa4144) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/package_rpm: use weak user/group dependenciesAlexander Kanavin2024-01-271-0/+1
| | | | | | | | | | | | | | | rpm 4.19 automatically generates provides and depends for user and groups: https://github.com/rpm-software-management/rpm/blob/rpm-4.19.x/docs/manual/users_and_groups.md#dependencies This mechanism relies on sysusers.d for the 'provides' part, and thus is systemd-only at best. So we need to disable it for now, otherwise image generation fails with unresolved dependencies. (From OE-Core rev: 10064e364f015ad3c0c8d63511cd9a7da5e22c69) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/package_rpm: write file permissions and ownership explicitly into .specAlexander Kanavin2024-01-271-6/+28
| | | | | | | | | | | | | | | | | | | | | | Per https://github.com/rpm-software-management/rpm/commit/77d3529c31ca090a40b8d3959a0bcdd721a556d6 rpm 4.19.1+ will not consider actual filesystem permissions and ownership, and will quietly default to root if not expictly set otherwise in .spec file. There's also additional diagnostics (printing what is in passwd/group) when user/group name lookup against the sysroot fails. That is never supposed to happen, and yet there was one report that it did: https://autobuilder.yoctoproject.org/typhoon/#/builders/44/builds/8493/steps/23/logs/stdio Investigating that issue led to the first three commits in this patchset: sysroot user management postinsts: run with /bin/sh -e to report errors when they happen classes/multilib: expand PACKAGE_WRITE_DEPS in addition to DEPENDS classes/staging: capture output of sysroot postinsts into logs (From OE-Core rev: a9db9a56617459e8f6f6dd466f2e18a7eed5c1e3) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/staging: capture output of sysroot postinsts into logsAlexander Kanavin2024-01-271-2/+2
| | | | | | | | | | | | | | | | | This particularly helps with user management postinsts as otherwise there's no trace left of what was run, in which order, and what was the output. Here's an example from the logs: NOTE: Running postinst /srv/storage/alex/yocto/build-multilib/tmp/work/x86_64-pokymllib64-linux/lib64-quilt/0.67/lib64-recipe-sysroot/usr/bin/postinst-lib64-base-passwd, output: b'/srv/storage/alex/yocto/build-multilib/tmp/work/x86_64-pokymllib64-linux/lib64-quilt/0.67/recipe-sysroot-native/usr/sbin/useradd\nRunning useradd commands...\nNOTE: lib64-ptest-runner: Performing useradd with [--root /srv/storage/alex/yocto/build-multilib/tmp/work/x86_64-pokymllib64-linux/lib64-quilt/0.67/lib64-recipe-sysroot --system --no-create-home --home / --user-group ptest]\n' NOTE: Running postinst /srv/storage/alex/yocto/build-multilib/tmp/work/x86_64-pokymllib64-linux/lib64-quilt/0.67/lib64-recipe-sysroot/usr/bin/postinst-useradd-lib64-ptest-runner, output: b'/srv/storage/alex/yocto/build-multilib/tmp/work/x86_64-pokymllib64-linux/lib64-quilt/0.67/recipe-sysroot-native/usr/sbin/useradd\nRunning useradd commands...\nNOTE: lib64-ptest-runner: Performing useradd with [--root /srv/storage/alex/yocto/build-multilib/tmp/work/x86_64-pokymllib64-linux/lib64-quilt/0.67/lib64-recipe-sysroot --system --no-create-home --home / --user-group ptest]\nNOTE: lib64-ptest-runner: user ptest already exists, not re-creating it\n' (From OE-Core rev: a4dc96293268804b214a02e08d266205fad428b0) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes-global/insane: Add check for "virtual/" in RPROVIDES and RDEPENDSSimone Weiß2024-01-191-0/+6
| | | | | | | | | | | | | Fixes [YOCTO #14538] Recipes shouldn't use "virtual/" in RPROVIDES and RDEPENDS. This was addressed already in recipes in meta-oe and oe-core. Add a test for this in insane.bbclass to ensure no regressions occur. (From OE-Core rev: f673d3d239799fb1ab50f4aa5d44187666aa0cd7) Signed-off-by: Simone Weiß <simone.p.weiss@posteo.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: Python code cleanup in check_32bit_symbolsOla x Nilsson2024-01-151-3/+3
| | | | | | | | (From OE-Core rev: 67b06035326048323f972107f66eb50cf74def0b) 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>
* insane.bbclass: Check for adjtime in check_32_bit_symbolsOla x Nilsson2024-01-151-0/+1
| | | | | | | | | | adjtime was overlooked in the original commit. (From OE-Core rev: 07faecd87e77716cfedffeadc52e0982edfd6c7e) 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.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>