summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe
Commit message (Collapse)AuthorAgeFilesLines
...
* lib/oe/buildcfg.py: Remove unused parameterJermain Horsman2023-11-051-5/+5
| | | | | | | | | | | Several functions included the 'd' parameter but never used it, additionally the value passed is always None. (From OE-Core rev: 9e03ce0426576ebef3739dc1dfec4f7cd73ae094) Signed-off-by: Jermain Horsman <jermain.horsman@nedap.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/buildcfg.py: Include missing importJermain Horsman2023-11-051-0/+1
| | | | | | | | | | | get_layer_revisions() uses the os.path module but it is not included in the imports. (From OE-Core rev: 4339ef5b46c39cce402d1cc3526b39702837b839) Signed-off-by: Jermain Horsman <jermain.horsman@nedap.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta/lib/oe/copy_buildsystem.py: do not derefence symlinksAlexander Kanavin2023-11-051-1/+1
| | | | | | | | | | | | | | | | | | | This was added (I think) for the purpose of supporting layers that refer to items outside of the layer via relative symlinks: https://git.yoctoproject.org/poky-contrib/commit/?id=d31d1ad4e566e42d0bbcf1f41ac25e33181fb517 I do not think copying the link target into the layer that references it is the correct solution: rather the original target should be included into the SDK with the same relative path. This change is done for the sake of preserving symlinks that are referencing things inside the layer as they are; particularly the content of scripts/esdk-tools/. (From OE-Core rev: 52a7bbd5c4875c5f61ea65dda38e495a2925a20d) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cve-check: don't warn if a patch is remoteRoss Burton2023-11-031-5/+6
| | | | | | | | | | | | | | | | We don't make do_cve_check depend on do_unpack because that would be a waste of time 99% of the time. The compromise here is that we can't scan remote patches for issues, but this isn't a problem so downgrade the warning to a note. Also move the check for CVEs in the filename before the local file check so that even with remote patches, we still check for CVE references in the name. (From OE-Core rev: 0251cad677579f5b4dcc25fa2f8552c6040ac2cf) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/sstatesig.py: dump locked.sigs.inc only when explicitly asked via -S ↵Alexander Kanavin2023-10-271-3/+4
| | | | | | | | | | | | | | | | | | | | lockedsigs This was writing out locked-sigs.inc into cwd with every 'bitbake -S' invocation. When the intent is only to to get task stamps (-S none), or print the difference between them (-S printdiff), the file is unnecessary clutter. A couple of selftests/scripts were however relying on this, so they're adjusted to explicitly request the file. eSDK code calls dump_lockedsigs() separately via oe.copy_buildsystem.generate_locked_sigs() and so isn't affected. (From OE-Core rev: ad57c3cac2a8d3e60222e3cca0685f582dcea135) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cve-check: slightly more verbose warning when adding the same package twiceRoss Burton2023-10-261-1/+1
| | | | | | | | | | | Occasionally the cve-check tool will warn that it is adding the same package twice. Knowing what this package is might be the first step towards understanding where this message comes from. (From OE-Core rev: c1179faec8583a8b7df192cf1cbf221f0e3001fc) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstatesig: be more precise and show the full path in exceptionsJose Quaresma2023-10-191-2/+2
| | | | | | | | | | | | | | | | | | | | Also remove the warning than doesn't make sense as the code will generate an exception and bitbake will abort. Before: | WARNING: core-image-minimal-initramfs-1.0-r0 do_image_complete: KeyError in . | Exception: Exception: KeyError: 'getpwuid(): uid not found: xxxxx' | Path . is owned by uid xxxxx, gid yyy, which doesn't match any user/group on target. This may be due to host contamination. After: | Exception: Exception: KeyError: 'getpwuid(): uid not found: xxxxx' | Path /build/tmp/work/intel_corei7_64-lmp-linux/core-image-minimal-initramfs/1.0-r0/sstate-build-image_complete is owned by uid xxxxx, gid yyy, which doesn't match any user/group on target. This may be due to host contamination. (From OE-Core rev: 90f84e345950a02bf91f823cc9c6d893e7cd1100) Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* goarch: Move Go architecture mapping to a libraryJoshua Watt2023-10-192-1/+35
| | | | | | | | | | | | Other spaces uses the Go architecture definitions as their own (for example, container arches are defined to be Go arches). To make it easier for other places to use this mapping, move the code that does the translation of OpenEmbedded arches to Go arches to a library. (From OE-Core rev: 3e86f72fc2e1cc2e5ea4b4499722d736941167ce) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstatesig: add a new info level for SIGGEN_LOCKEDSIGS_TASKSIG_CHECKJulien Stephan2023-10-091-1/+17
| | | | | | | | | | | | | | | | | | | | | | | as of now, SIGGEN_LOCKEDSIGS_TASKSIG_CHECK can take 2 values: "warn" and "error", displaying respectively a warning or a fatal error message only when a task is locked and the task signature is different from the locked one. The "info" level is introduced to add a "note" message to remind the user that a recipe is locked even if the signature is equivalent to the locked one. The "warn" and "error" level display the warn/error message for each task having a mismatch of the signature. Doing this with the "info" level would result in very verbose output if there are several tasks locked, so the info level will only print once the list of recipes that have locked signature. (From OE-Core rev: 840402181d36ca3f60119984478979afb5bb3bbf) Signed-off-by: Julien Stephan <jstephan@baylibre.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib: Import packagedata oe module by defaultRichard Purdie2023-09-261-1/+1
| | | | | | | | | | | | | | Variable dependencies for functions in the oe.packagedata module were missing as it was not present in BBIMPORTS. Add it as the fact it was missing is likely just historical oversight from base.bbclass history and the dependencies are useful. Add an exclusion to bitbake.conf to ensure BB_NUMBER_THREADS doesn't change task checksums. (From OE-Core rev: 7df9178766ee7939d139648e04f5747b0ffe1e13) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/qa: update guidelines link for Upstream-StatusMichael Opdenacker2023-09-221-1/+1
| | | | | | | (From OE-Core rev: a8781a8f02c924d8a19e727e5d1bc6b89bf976da) Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/qa: remove obsolete "Accepted" string for Upstream-StatusMichael Opdenacker2023-09-221-1/+1
| | | | | | | | | | Replaced by "Backport" since release 3.2 https://docs.yoctoproject.org/migration-guides/migration-3.2.html#miscellaneous-changes (From OE-Core rev: 4053fa9184fd016cfa59a67ff7857e17d88bf25e) Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* create-spdx/sbom: Ensure files don't overlap between machinesRichard Purdie2023-09-221-7/+27
| | | | | | | | | | | | | | | | | | | | | | Currently the by-id and by-namespace SPDX files are created without reference to PACKAGE_ARCH. This means that for two machines using a common package architecture (e.g. genericx86-64 and qqemux86-64), there would be overlapping files. This means that the build of one can remove files from the other leading to build failures. An example would be: 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 To fix this, add PACKAGE_ARCH to the path used for the files and use a search path based upon PACKAGE_ARCHS to access them. (From OE-Core rev: b2db10e966438071d00d2057b84d5f347613d841) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/package_managegment: Add nativesdk-intercept PATHEilís 'pidge' Ní Fhlannagáin2023-09-173-0/+15
| | | | | | | | | | | | | | | | | | [YOCTO #15023] This patch adds (and removes after function execution) the nativesdk-intercept/chown|chgrp PATH before target_pm.run_intercepts calls during populate_sdk builds. This has been tested with cleanall builds and testsdk and fails on deb due to an issue where $D${localstatedir}/cache/man/ does not exist for some reason. I've a work around for that in the next patch in this series. (From OE-Core rev: e7afdfe9da150209ab2676d09eae040de2155c6d) Signed-off-by: Eilís 'pidge' Ní Fhlannagáin <pidge@baylibre.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/package: Refactor to make strip_execs callable without dAdrian Freihofer2023-09-121-3/+4
| | | | | | | | | | | 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>
* lib/oe/utils: Refactor to make multiprocess_launch callable without dAdrian Freihofer2023-09-121-3/+9
| | | | | | | | | | | This is a preparation for making the strip_execs function callable from devtool without going via tinfoil and a bitbake server process. (From OE-Core rev: af8ee73cdef90b83556a7ac5e139a08108706486) 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>
* classes: Drop ';' delimiter from ROOTFS/IMAGE*COMMAND variablesRichard Purdie2023-09-091-5/+5
| | | | | | | | | | | | | Originally these were shell functions but they have long since been processed by bb.build.exec_func(). Since we no longer need shell syntax, we can drop the ';' delimiters and just use a space separated string. This cleans up the variable and quietly removes any stray ';' that do happen to still make it in. (From OE-Core rev: c3365dfd9ddd7fbe70b62e0f11166e57a8ca6f73) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/recipeutils.py: accommodate SRCPV being optional and deprecated in ↵Alexander Kanavin2023-08-301-5/+4
| | | | | | | | | | version check regex (From OE-Core rev: 84794b59940cb08ec44e5ee7718a464d24136812) 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>
* patch.py: use --absolute-git-dir instead of --show-toplevel to retrieve gitdirJulien Stephan2023-08-291-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [YOCTO #14141] Currently the gitdir is manually constructed using `git rev-parse --show-toplevel` and appending `.git`. This is most of the time correct but not always: `.git` can be a file with the following content: gitdir: <some_folder> This is the case for submodules, so when using devtool modify on a recipe using submodules *and* patching files inside one of the submodules, do_patch fails with the following error: ERROR: Error executing a python function in exec_func_python() autogenerated: The stack trace of python calls that resulted in this exception/failure was: File: 'exec_func_python() autogenerated', lineno: 2, function: <module> 0001: *** 0002:patch_do_patch(d) 0003: File: '<..>/poky/meta/classes-global/patch.bbclass', lineno: 157, function: patch_do_patch 0153: except Exception as exc: 0154: bb.utils.remove(process_tmpdir, True) 0155: bb.fatal("Importing patch '%s' with striplevel '%s'\n%s" % (parm['patchname'], parm['striplevel'], repr(exc).replace("\\n", "\n"))) 0156: try: *** 0157: resolver.Resolve() 0158: except bb.BBHandledException as e: 0159: bb.utils.remove(process_tmpdir, True) 0160: bb.fatal("Applying patch '%s' on target directory '%s'\n%s" % (parm['patchname'], patchdir, repr(e).replace("\\n", "\n"))) 0161: File: '<..>/poky/meta/lib/oe/patch.py', lineno: 769, function: Resolve 0765: def Resolve(self): 0766: olddir = os.path.abspath(os.curdir) 0767: os.chdir(self.patchset.dir) 0768: try: *** 0769: self.patchset.Push() 0770: except Exception: 0771: import sys 0772: os.chdir(olddir) 0773: raise File: '<..>/poky/meta/lib/oe/patch.py', lineno: 274, function: Push 0270: else: 0271: next = 0 0272: 0273: bb.note("applying patch %s" % self.patches[next]) *** 0274: ret = self._applypatch(self.patches[next], force) 0275: 0276: self._current = next 0277: return ret 0278: File: '<..>/poky/meta/lib/oe/patch.py', lineno: 556, function: _applypatch 0552: if os.path.lexists(hooks_dir_backup): 0553: raise Exception("Git hooks backup directory already exists: %s" % hooks_dir_backup) 0554: if os.path.lexists(hooks_dir): 0555: shutil.move(hooks_dir, hooks_dir_backup) *** 0556: os.mkdir(hooks_dir) 0557: commithook = os.path.join(hooks_dir, 'commit-msg') 0558: applyhook = os.path.join(hooks_dir, 'applypatch-msg') 0559: with open(commithook, 'w') as f: 0560: # NOTE: the formatting here is significant; if you change it you'll also need to Exception: NotADirectoryError: [Errno 20] Not a directory: '<..>/build/tmp/work/core2-64-poky-linux/vulkan-samples/git/devtooltmp-n87_zx1i/workdir/git/third_party/spdlog/.git/hooks' Using `git rev-parse --absolute-git-dir` instead of `git rev-parse --show-toplevel` ensure we get the correct gitdir (From OE-Core rev: f74879dd95b19504ce8a8554636d2310d0336806) Signed-off-by: Julien Stephan <jstephan@baylibre.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipes/classes/scripts: Drop SRCPV usage in OE-CoreRichard Purdie2023-08-241-3/+1
| | | | | | | | 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>
* cve_check: Fix cpe_id generationJasper Orschulko2023-08-221-1/+1
| | | | | | | | | | | | | | Use "*" (wildcard) instead of "a" (application)in cpe_id generation, as the product is not necessarily of type application, e.g. linux_kernel, which is of type "o" (operating system). (From OE-Core rev: cae9528b002c06143bf048b991b9d7e93968cb6b) (From OE-Core rev: e7c1def3c3c3a72249802ef6fb64292277a7a53e) Signed-off-by: Jasper Orschulko <jasper@fancydomain.eu> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/package_manager: Improve repo artefact filteringRichard Purdie2023-08-161-1/+4
| | | | | | | | | | | | | | | | | | | | | If you run an arm build followed by an x86 one and then ask for a full repo to be created, it will include all of the arm and x86 packages. testexport will then find the arm socat package rather than the x86 one and try and run arm binaries within an x86 qemu image with no success. The reproducer for this was: oe-selftest -r fitimage.FitImageTests.test_initramfs_bundle runtime_test.TestImage.test_testimage_install This patch only symlinks in the compatible package archictures rather than all of them which fixes the failure and the resulting autobuilder intermittent failure too. [YOCTO #15190] (From OE-Core rev: 30b45bcf49bf8207fd96bb45a55d7708661f3359) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipes: remove unused AUTHOR variableMichael Opdenacker2023-08-101-1/+1
| | | | | | | | | | | | No longer used in generating packages Also creates a possible confusion with the recipe maintainer name. (From OE-Core rev: 9d5edd124b7dddb995ceddd79f8a7fc8cf44badf) 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>
* sstatesig: Update to match bitbake changes to runtaskdepsRichard Purdie2023-08-091-5/+9
| | | | | | | | | | | Bitbake has changes to runtaskdeps in siginfo files to fix bugs in being able to locate them for sstate and hash debugging purposes. This patch updates to match the changes to the format. (From OE-Core rev: 4f1148eeab2500022d7e17feadf80027a01a51f1) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package: always sort the conffilesJean-Marie Lemetayer2023-08-091-1/+1
| | | | | | | | | | | | To improve package reproducibility, the conffiles order should not be directly linked to the file system. Sorting the conffiles solves this issue. (From OE-Core rev: c7800fa825fa610327e3d2ee8c5707973b726a83) Signed-off-by: Jean-Marie Lemetayer <j.lemetayer@kerlink.fr> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rpm: Pick debugfs package db files/dirs explicitlyAlex Kiernan2023-07-211-1/+1
| | | | | | | | | | | Rather than copying the entire /etc hierarchy, specify the pieces we actually need. (From OE-Core rev: f0fea55ab02b013484282177a636795a254e7986) Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rootfs: Add debugfs package db file copy and cleanupAlex Kiernan2023-07-211-6/+14
| | | | | | | | | | | | | | | | | When copying the package database files for the debugfs, add individual file copy as well as tree copying. After the debug rootfs has been created, cleanup the package files. This then allows us to avoid a problem where (for rpm at least) extraneous files in the debug rootfs would cause failures during oe-selftest because some files existed in both regular and debugfs images. (From OE-Core rev: ce49ea435ce55eb5b6da442c12e03a806534c38d) Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cve-check: add option to add additional patched CVEsAndrej Valek2023-07-191-0/+25
| | | | | | | | | | | | | | | | | | | | | | - Replace CVE_CHECK_IGNORE with CVE_STATUS to be more flexible. The CVE_STATUS should contain an information about status wich is decoded in 3 items: - generic status: "Ignored", "Patched" or "Unpatched" - more detailed status enum - description: free text describing reason for status Examples of usage: CVE_STATUS[CVE-1234-0001] = "not-applicable-platform: Issue only applies on Windows" CVE_STATUS[CVE-1234-0002] = "fixed-version: Fixed externally" CVE_CHECK_STATUSMAP[not-applicable-platform] = "Ignored" CVE_CHECK_STATUSMAP[fixed-version] = "Patched" (From OE-Core rev: 34f682a24b7075b12ec308154b937ad118d69fe5) Signed-off-by: Andrej Valek <andrej.valek@siemens.com> Signed-off-by: Peter Marko <peter.marko@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sdk.py: fix moving dnf contentsChen Qi2023-06-201-1/+2
| | | | | | | | | | The dnf contents should be moved to <host_sysroot>/etc/dnf/xxx instead of just <host_sysroot>/etc. (From OE-Core rev: 74b78d160a985e98f869c777847ab798e419dd2d) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sdk.py: error out when moving file failsChen Qi2023-06-201-1/+1
| | | | | | | | | | Instead of printing an error message and continuing, we should just error out when moving file fails. (From OE-Core rev: 12aecd9da94b5f27041982c661e8bab316d365d4) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* dnf: upgrade 4.14.0 -> 4.16.1Alexander Kanavin2023-06-151-2/+3
| | | | | | | | | | Correct the query for locations of rpm package files in the local repo: upstream has changed it to a separate cmdline parameter. (From OE-Core rev: 41bf007d80bae05921bf3e2dd65600f64133041f) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: lib: oe: npm_registry: Add more safe caractersBELOUARGA Mohamed2023-06-131-1/+1
| | | | | | | | | | | NPM registry cache should support caracaters like '(' and ')' Explanation: NPM packages can contains these caracters like : @(._.)/execute (From OE-Core rev: 6110d9e24e43e286781afd1b3634a4ad1a2050d0) Signed-off-by: BELOUARGA Mohamed <m.belouarga@technologyandstrategy.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstatesig: Drop SPDX special casingRichard Purdie2023-06-061-9/+0
| | | | | | | | | | Other changes in create-spdx code mean we shouldn't need to do this now. We need the various exclusions to allow the task hashes to behave correctly for the SPDX tasks too. (From OE-Core rev: 5e645ff3d02decba4ed7d082a0e41a2655862039) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/create-spdx-2.2: Use hashfn from BB_TASKDEPDATA instead of MACHINEJoshua Watt2023-06-021-3/+19
| | | | | | | | | | | | | | | Enabling the SPDX class and running two builds, one with SDKMACHINE=i686 and then again with SDKMACHINE=x86_64 would lead to errors since the output was stored per MACHINE and the overlapping files would cause manifest errors. The hashfn data from bitbake has SSTATE_PKGARCH encoded into it which is how sstate separates out it's targets and SDPX should be using the same structure. Therefore switch to using this. (From OE-Core rev: 51049cde0cf477f7988b94c1041eb33b018a669f) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/terminal.py: Add urxvt terminalPavel Zhukov2023-05-251-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes failure [1] of menuconfig task in rxvt-unicode terminal in case if xterm/Konsole/Gnome is not installed. Tested with rxvt-unicode-256color [1] WARNING: Terminal screen is supported but did not start ERROR: No valid terminal found, unable to open devshell. Tried the following commands: tmux split-window -c "{cwd}" "do_terminal" tmux new-window -c "{cwd}" -n "zephyr-helloworld Configuration" "do_terminal" xfce4-terminal -T "zephyr-helloworld Configuration" -e "do_terminal" terminology -T="zephyr-helloworld Configuration" -e do_terminal mate-terminal --disable-factory -t "zephyr-helloworld Configuration" -x do_terminal konsole --separate --workdir . -p tabtitle="zephyr-helloworld Configuration" -e do_terminal gnome-terminal -t "zephyr-helloworld Configuration" -- do_terminal xterm -T "zephyr-helloworld Configuration" -e do_terminal rxvt -T "zephyr-helloworld Configuration" -e do_terminal tmux new -c "{cwd}" -d -s devshell -n devshell "do_terminal" screen -D -m -t "zephyr-helloworld Configuration" -S devshell do_terminal DEBUG: Python function do_menuconfig finished (From OE-Core rev: 8d2fe4df8ae33e033caf4119a76715f085be1d15) Signed-off-by: Pavel Zhukov <pazhukov@suse.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package: enable recursion on file globsRandolph Sapp2023-05-251-1/+1
| | | | | | | | | | | | | | Enable recursion of file globs. This just allows the use of '**' in file globs to match 0 or more subdirectories, it should not make all current globs recursive [1]. [1] https://docs.python.org/3.6/library/glob.html#glob.glob (From OE-Core rev: 4cd62f72dbaa0361e97d7c118752d0a2b02adfbe) Signed-off-by: Randolph Sapp <rs@ti.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Revert "ipk: Decode byte data to string in manifest handling"Andrew Jeffery2023-05-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | cf9df9e8d89f ("ipk: Decode byte data to string in manifest handling") did a bit of least-effort fix to a string vs byte sequence issue in the manifest handling. The approach was chosen as it localised the fix, rather than having to analyse further call sites. However since then f2167ae80258 ("package_manager/ipk: do not pipe stderr to stdout") was applied, reworking the output handling from the subcommand. dummy_bytes() now returns a string, so stop trying to decode it. Fixes: f2167ae80258 ("package_manager/ipk: do not pipe stderr to stdout") Cc: Curtis Meier <cmeier@us.ibm.com> Cc: Pam Eggler <eggler@us.ibm.com> (From OE-Core rev: b61739554780d70307d2b6b37d2b3b1c7df93c77) (From OE-Core rev: 07e5a6331be60d5e35d7336a6215a972ced6eb57) Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_manager/ipk: fix config path generation in _create_custom_config()Enrico Jörns2023-05-051-1/+1
| | | | | | | | | | | | | | "sysconfdir" contains "/" by definition and thus using os.path.join() leads to self.target_rootfs being always ignored (and thus attempting to generate paths in host's /etc). Use oe.path.join() instead which was made for this purpose. (From OE-Core rev: 8414c504138f6de663f5130c6b4a6ede5605d88b) Signed-off-by: Enrico Jorns <ejo@pengutronix.de> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc/go: Drop crosssdk suffix from virtual provides to improve dependency ↵Richard Purdie2023-05-021-4/+3
| | | | | | | | | | | | | | | handling There is little point in having "crosssdk" suffex added to the virtual provider within gcc/go since the TARGET_PREFIX or SDK_PREFIX already encapsulates this. Remove it allowing some of the special case overriding to be removed. This also allows removal of some of the MLPREFIX usage since again, the triplet also covers this. (From OE-Core rev: fe0206ba482d209b24e636d578aa68ba5e67ba1b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* binutils: Drop crosssdk suffix from virtual provides to improve dependency ↵Richard Purdie2023-05-021-0/+2
| | | | | | | | | | | | handling There is little point in having "crosssdk" suffex added to the virtual provider within binutils since the TARGET_PREFIX or SDK_PREFIX already encapsulates this. Remove it allowing some of the special case overriding to be removed. (From OE-Core rev: 6856fc5c848cc2564bebe03a007ef109f46d0adb) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package: Use shlex instead of deprecated pipeOla x Nilsson2023-04-141-4/+3
| | | | | | | | | | | The pipe library is deprecated in Python 3.11 and will be removed in Python 3.13. pipe.quote is just an import of shlex.quote anyway. (From OE-Core rev: 47731e0f7d9e92db39a3d551fe50df69c1cc6d6a) Signed-off-by: Ola x Nilsson <olani@axis.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* patch.py: Use shlex instead of deprecated pipeOla x Nilsson2023-04-141-6/+5
| | | | | | | | | | | | | The pipe library is deprecated in Python 3.11 and will be removed in Python 3.13. pipe.quote is just an import of shlex.quote anyway. Clean up imports while we're at it. (From OE-Core rev: 5f33c7b99a991c380d1813da8248ba5470ca4d4e) Signed-off-by: Ola x Nilsson <olani@axis.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* patch: support of git patches when the source uri contained subpath parameterFrederic Martinsons2023-04-011-13/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is for a specific case where: - A recipe use a subpath on a git repo (e.g. git://repo.git/projects;subpath=subproject) - The recipe contains a patch to apply - a devtool modify is used on this recipe With these conditions, the patch cannot be applied at all. GitApplyTree class is used for handling patch under devtool, but when subpath is present in SRC_URI, the resulting git tree is dirty (every files and directories which was not in subpath are suppressed) and so "git am" refuse to apply patches. That would not be an issue since the GitApplyTree have a fallback to PatchTree in case of error, but during this error management, there is a "git reset --hard HEAD" call which suppress the subpath operation and finally prevents the patch to be applied even with PatchTree. When devtool is not involved, only PatchTree class is used and the above problem is irrelevant. To support git patching during devtool, the presence of subpath and the dirtyness of the repo are checked. If both conditions are met, we directly call PatchTree like it was already done in case of error during git apply. (From OE-Core rev: d86cac2759cf7e91f4ff240833385e28e729ab79) Signed-off-by: Frederic Martinsons <frederic.martinsons@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/gpg_sign.py: Avoid race when creating .sig files in detach_signTobias Hagelborn2023-03-311-10/+17
| | | | | | | | | | | | Move the signature file into place only after it is successfully signed. This to avoid race and corrupted .sig files in cases multiple onging builds write to a shared sstate-cache dir. (From OE-Core rev: b4ec08ea9efebac262d43f47d95a356fe2829de9) Signed-off-by: Tobias Hagelborn <tobiasha@axis.com> Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cve-check: Fix false negative version issueGeoffrey GIRY2023-03-301-0/+39
| | | | | | | | | | | | | | | NVD DB store version and update in the same value, separated by '_'. The proposed patch check if the version from NVD DB contains a "_", ie 9.2.0_p1 is convert to 9.2.0p1 before version comparison. [YOCTO #14127] Reviewed-by: Yoann CONGAL <yoann.congal@smile.fr> (From OE-Core rev: 7d00f6ec578084a0a0e5caf36241d53036d996c4) Signed-off-by: Geoffrey GIRY <geoffrey.giry@smile.fr> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package: moving field data process before variable process in process_pkgconfigXiangyu Chen2023-03-261-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, the latest version abseil-cpp contains a new library named "absl_log_internal_format", it's basic package config(.pc file) as below: prefix=/usr exec_prefix=${prefix} ...... Requires: absl_config = 20230125, absl_core_headers = 20230125, absl_log_internal_append_truncated = 20230125, absl_log_internal_config = 20230125, absl_log_internal_globals = 20230125, absl_log_severity = 20230125, absl_strings = 20230125, absl_str_format = 20230125, absl_time = 20230125, absl_span = 20230125 ...... Normally, the process_pkgconfig() would process variable data before field data in a .pc file, but in the absl_log_internal_format, the field data in "Requires" section contains "xxxx = xxxx" format, the process_pkgconfig() treats them as normal variable and using the setVar() in bitbake's data_smart.py try to process. The absl_log_internal_format field data contains "_append_", this hit the setVar() checking and finally bitbake stop building and reporting an error as below: "Variable xxx contains an operation using the old override syntax. Please convert this layer/metadata before attempting to use with a newer bitbake." This patch move the field data process before variable process to avoid the process_pkgconfig() treat the field data as variable. (From OE-Core rev: a73e269d3e591a10bb397b94b82e3fb960112d33) Signed-off-by: Xiangyu Chen <xiangyu.chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* add support for loongarch64Jialing Zhang2023-03-231-1/+2
| | | | | | | | | | | add locale_arch_options for loongarch64 (From OE-Core rev: f7ccc906ac55bc1892bc243cef968b54c51c685b) Signed-off-by: Jialing Zhang <zhangjialing@loongson.cn> Signed-off-by: Qizheng Zhu <zhuqizheng@loongson.cn> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: move Upstream-Status logic to oe.qaMartin Jansa2023-02-191-0/+17
| | | | | | | | | | * to be used by standalone script scripts/contrib/patchreview.py as well (From OE-Core rev: c326efeec8f576200728a44c694becdeab4fe2db) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/create-spdx-2.2: Report downloads as separate packagesJoshua Watt2023-02-192-0/+17
| | | | | | | | | | | | | | | | | | | | Moves the downloaded items from SRC_URI into separate packages in the recipe document. This is much better than the previous implementation because: 1) It can report multiple download locations in SRC_URI, instead of just the first one reported. 2) It prevents the assumption that the source files listed in the recipe are the exact file from the source URL; in particular, files that come from file:// SRC_URI entries, and source files that have been patched were problematic, since these aren't from the upstream source. 3) It allows the checksums to be specified (From OE-Core rev: 1dd4369b3638637a2cbba2a3c37c6b6f4df335cd) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstatesig: Improve output hash calculationMateusz Marciniec2023-02-151-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | Symbolic links to the files are included during the output hash calculation but symlinks to the directories are missed. So if the new symlink to a directory was the only change made, then the output hash won't change, and the Hash Equivalence server may change unihash. In the next run bitbake may use an older package from sstate-cache. To fix this followlinks=True flag could be set for os.walk but it can lead to infinite recursion if link points to a parent directory of itself. Also, all files from a directory to which symlink points would be included in depsig file. Therefore another solution was applied, I added code that will loop through directories and process those that are symlinks. (From OE-Core rev: ee729163f31f26b1462a47e1e53f7a0f9de9b464) Signed-off-by: Mateusz Marciniec <mateuszmar2@gmail.com> Signed-off-by: Tomasz Dziendzielski <tomasz.dziendzielski@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>