summaryrefslogtreecommitdiffstats
path: root/meta/lib
Commit message (Collapse)AuthorAgeFilesLines
* package_manager: sign DEB package feedsFerry Toth2022-04-051-3/+16
| | | | | | | | | | | | | | | | | | Implement debian package repository signature. For each Release file created in repository subdirectory, a signature Release.gpg is created. Signature is performed using gpg backend when the following variables are set in local.conf: PACKAGE_CLASSES += "sign_package_feed" PACKAGE_FEED_GPG_NAME = "<Id of GPG key>" PACKAGE_FEED_GPG_PASSPHRASE_FILE="<path to password file>" (From OE-Core rev: fcc3cee276999efe6402959eb295e7a0e1e96f96) Signed-off-by: Xavier Berger <xavier.berger@bio-logic.net> Signed-off-by: Ferry Toth <ftoth@exalondelft.nl> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gpg-sign: Add parameters to gpg signature functionXavier Berger2022-04-051-1/+5
| | | | | | | | | | | output_suffix: If defined, add output_suffix as file name extension. use_sha256: If True, use sha256 for gpg as digest algorithm (From OE-Core rev: cfcaa54dc73925df448099fb60f75b18350b2a3b) Signed-off-by: Xavier Berger <xavier.berger@bio-logic.net> Signed-off-by: Ferry Toth <ftoth@exalondelft.nl> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest: generalise test_devtool_virtual_kernel_modifyRoss Burton2022-04-011-21/+17
| | | | | | | | | | | | | | | | | | | Generalise this test so that it works on more than qemux86-64: - Don't edit a file in arch/x86 to cause a rebuild, instead use init/ - Look for the edits in the build tree, as the deployed kernel could be of any type (zImage/bzImage/etc) and edits may be in the compressed part. Also remove redundant checks on the result of runCmd(), as this will raise AssertionError exceptions itself so the explicit asserts will never trigger. (From OE-Core rev: f1d2b2ec51f748a28d1bca6615558d553876e5c3) 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>
* oeqa/selftest/wic: use self.td instead of get_bb_var to save on bitbake callsRoss Burton2022-04-011-16/+12
| | | | | | | | | | | | | | | | When a test case starts, self.td is populated with all the variables in the data store. Typically this can be used instead of get_bb_var(), which saves a bitbake call per variable lookup. The only catch is that in parallel runs the build directory is moved after td is populated, so paths in the build directory are wrong: these still need to be fetched in the test. (From OE-Core rev: 884201c6c1bbf7c1b958bab7d7c91e27577eeaac) 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>
* oeqa/selftest/wic: use os.path.join to join pathsRoss Burton2022-04-011-46/+46
| | | | | | | | | | Instead of using string concatenation, use os.path.join. (From OE-Core rev: 73d1b7163792ec089ffb3bf99f1b4f8760beaea7) 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>
* oeqa/selftest/wic: rearrange testsRoss Burton2022-04-011-77/+77
| | | | | | | | | | | | Split the tests into further classes: one which exercises the CLI and doesn't need to build images at all, and another which is just the tests that manipulate existing images. (From OE-Core rev: c9bc4def71325dba7b7ad93001f7fe1acced0bea) 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>
* oeqa/selftest/wic: cleanup WicTestCase.setUpLocalRoss Burton2022-04-011-8/+4
| | | | | | | | | | | Use os.path.join to construct paths, and invoke bitbake once instead of three times. (From OE-Core rev: 27953d4cf6edc86cd505826c3da21222864c7760) 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>
* oeqa/selftest/oescripts: refactor skipping logicRoss Burton2022-04-011-9/+5
| | | | | | | | | | | | | | | | | OEScriptTests currently skips if cairo isn't present, and does a build of core-image-minimal. This is only required for the OEPybootchartguyTests tests, so move that logic there so that the OEListPackageconfigTests run even if cairo isn't available. This leaves OEScriptTests as a simple class containing the scripts_dir assignment, which can then be reused by other tests to avoid code duplication. (From OE-Core rev: fe3ee517772ad8396fcac21ae7eb8d1c8b68fbdb) 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>
* oeqa: rationalise skipifqemu decoratorsRoss Burton2022-04-018-51/+25
| | | | | | | | (From OE-Core rev: 1a3a37cc2b16a8d5cd2258b0b35be43baa363f67) 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>
* oeqa/selftest: tag tests that use runqemuRoss Burton2022-04-018-6/+32
| | | | | | | | | | | There may be environments or machines which don't have working runqemu, so tag all of the tests which use runqemu() so that they can be skipped. (From OE-Core rev: 3f45ce6d2b1dfde8bc3d554397d55f81846c52d5) 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>
* oeqa/core/decorators/data: improve has_* logicRoss Burton2022-04-011-3/+3
| | | | | | | | | | | | | has_feature() should be splitting the feature string into substrings and then looking for membership instead of looking for simple substrings. has_machine() should be using equality instead of substrings. (From OE-Core rev: a4c63819234e252c58e040af8bbdbfb96b6feccf) 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>
* oeqa/selftest: remove unused importsRoss Burton2022-04-0120-35/+14
| | | | | | | (From OE-Core rev: 7ef7b03eeefc0a9911fd62c73e346fa5aeeb09eb) Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/core/utils/misc: remove redundant fileRoss Burton2022-04-011-47/+0
| | | | | | | | | | | This file dates back to 2016. Half of the functions have never been used, the rest are used in one place and have now been replaced. (From OE-Core rev: 5a053b2a84e7a671925fb4a78005145786c57f6a) 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>
* oeqa/core/decorator: remove redundant codeRoss Burton2022-04-011-8/+3
| | | | | | | | | | | There's no need to wrap *tags in a potential list, as *tags will always be a tuple. (From OE-Core rev: 54210c518bcb76d80c8ec9564d1ddf344e9d8924) 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>
* oeqa/runtime/decorator/package.py: remove use of strToSetRoss Burton2022-04-011-3/+6
| | | | | | | | | | | There's no need to use a series of over-generalised functions to just wrap a string in a tuple. (From OE-Core rev: 080854fe346a76f5fbe25058ba1b2425a0459b5e) 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>
* oeqa/selftest/buildoptions: set PACKAGE_CLASSES in ↵Ross Burton2022-04-011-1/+6
| | | | | | | | | | | | | test_arch_work_dir_and_export_source test_arch_work_dir_and_export_source uses the archiver to generate SRPMS, so explicitly set PACKAGE_CLASSES to ensure that package_rpm is used. (From OE-Core rev: 030157fa8dd405be60c55523e074b2ec950d36ad) 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>
* oeqa/selftest/wic: add more arch-specific annotationsRoss Burton2022-04-011-4/+10
| | | | | | | | | | | | Some tests which are marked as x86-specific will actually work on aarch64 (e.g. use EFI), whilst some other tests really are x86-specific (e.g. use syslinux). (From OE-Core rev: 1285bdaa4f472519083c03946ee34c7d8c204e27) 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>
* oeqa/selftest/wic: don't hardcode kernel image type in test_wic_rmRoss Burton2022-04-011-4/+6
| | | | | | | | | | Don't assume bzImage, resepct KERNEL_IMAGETYPE. (From OE-Core rev: f03d47833593734489e73f054f41c3dbbe423204) 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>
* oeqa/selftest/wic: clean up only_for_arch decoratorRoss Burton2022-04-011-9/+5
| | | | | | | | | | | | There's no need to pass a recipe name when determining the target architecture, there's no need to cap the size of the lru_cache as it will only have one entry, and __name__ is set by @wraps. (From OE-Core rev: e8e6c679f6eb74cb25c124a18af88dd5c2e2c833) 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>
* oeqa/selftest/wic: remove redundant assertsRoss Burton2022-04-011-12/+12
| | | | | | | | | | | By default bitbake() will raise an assertion if it fails, so there's no need to wrap it in a further assert. (From OE-Core rev: de3c8994dc482cf5e9f3317c4762fe4ac35d9f31) 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>
* oeqa/selftest/wic: use os.rename instead of bb.utils.renameRoss Burton2022-04-011-3/+4
| | | | | | | | | | | bb.utils.rename() only exists to handle moves across filesystems. As these moves are within the same directory we can just use os.rename(). (From OE-Core rev: 450e09b6d4ca019848aec4c62fce280a09395b97) 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>
* oeqa/selftest/devtool: ensure Git username is set before upgrade testsRoss Burton2022-04-011-0/+8
| | | | | | | | | | | The 'devtool upgrade' tests fail if Git doesn't know the user's name or email, so verify this before the tests start and skip if it is not. (From OE-Core rev: b4d8aca97a1ead38ce55f3bb5859d3d05d9dd84f) 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>
* cve-check: add json formatMarta Rybczynska2022-03-301-0/+16
| | | | | | | | | | | | | | | | | | | | | Add an option to output the CVE check in a JSON-based format. This format is easier to parse in software than the original text-based one and allows post-processing by other tools. Output formats are now handed by CVE_CHECK_FORMAT_TEXT and CVE_CHECK_FORMAT_JSON. Both of them are enabled by default. The JSON output format gets generated in a similar way to the text format with the exception of the manifest: appending to JSON arrays requires parsing the file. Because of that we first write JSON fragments and then assemble them in one pass at the end. (From OE-Core rev: df567de36ae5964bee433ebb97e8bf702034994a) Signed-off-by: Marta Rybczynska <marta.rybczynska@huawei.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/runtime/context: remove duplicate sys.path entries when looking for modulesRoss Burton2022-03-261-1/+5
| | | | | | | | | | | | | | | sys.path can contain duplicate entries for each layer, which means that the search in add_controller_list() will find the same name twice and abort. As duplicate directories should be harmless, remove any duplicates before iterating through the entries. (From OE-Core rev: e478381ac1cccc5f882198fd11c8757db7e3741a) 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>
* oeqa/selftest/tinfoil: Fix intermittent event loss issue in testRichard Purdie2022-03-261-1/+1
| | | | | | | | | | | | | | | | | | | We've been seeing occasional test failures on the autobuilder where we don't see the expected events. It turns out this is due to run_command being helpful and eating them if the server is fast and the client slow. Adding a sleep into the run_command code makes the failure consistent. Use a new "handle_events" argument to allow us to handle all the events which is what this test requires. [YOCTO #14585] (From OE-Core rev: 2292983c717b8cadcf0c443bb7b649a84ea5ad57) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest/incompatible_lic: Remove references to AVAILABLE_LICENSESPeter Kjellerstedt2022-03-241-22/+18
| | | | | | | | | | The AVAILABLE_LICENSES variable has been removed from OE-Core. (From OE-Core rev: bf4a7eee09245c0f7f8939f4cd522646fec6e507) 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>
* oeqa/selftest/tinfoil: Improve tinfoil event test debuggingRichard Purdie2022-03-181-2/+2
| | | | | | | | | | | | | | | We still see occasional test failures for unknown reasons. Add some debugging to show whether the matching files event was received even if the command complete wasn't. Also ensure any commandfailed/commandexit event is shown. This will hopefully aid debugging the next time the issue occurs. (From OE-Core rev: 2f7a788bb51ef09ee23c94176285437ea760fab7) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* buildtools-docs-tarball: Add test for building documentation using sphinxRichard Purdie2022-03-182-0/+19
| | | | | | (From OE-Core rev: 26b224a1bbe27b5d9886be4552147e1d66e34519) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/runtime/ping: Improve failure message to include more detailRichard Purdie2022-03-131-8/+12
| | | | | | | | | | When the ping test fails due to a timeout we only get limited debug information. Tweak the code to improve that in case it sheds any light on intermittent failures. (From OE-Core rev: d81704057950e1970ef7f673fa771834fd2b3f1e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image.bbclass: make sure do_rootfs run from a clean workspaceMing Liu2022-03-131-4/+0
| | | | | | | | | | | | Add ${IMAGE_ROOTFS} and ${IMGDEPLOYDIR} to do_rootfs[dirs] and do_rootfs[cleandirs], this ensures do_rootfs run from a clean workspace, with this change, we can now remove two bb.utils.mkdirhier lines from meta/lib/oe/rootfs.py. (From OE-Core rev: cb8b6f7eee4e059bb311330c57068e11bc477366) Signed-off-by: Ming Liu <liu.ming50@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta/scripts: Improve internal variable namingSaul Wold2022-03-103-4/+4
| | | | | | | | | Update internal variable names to improve the terms used. (From OE-Core rev: f408068e5d7998ae165f3002e51bc54b380b8099) Signed-off-by: Saul Wold <saul.wold@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa: selftest: overlayfs: add test for image with fstab entryStefan Herbrechtsmeier2022-03-041-27/+55
| | | | | | | (From OE-Core rev: 67f1959a46beec5edf133f2f8b02635feea7e599) Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes: rootfs-postcommands: include /etc/fstab in overlayfs_qa_checkStefan Herbrechtsmeier2022-03-041-2/+2
| | | | | | | | | | | | | | | | | The systemd init manager support mount point configuration via mount units and /etc/fstab. 'Mounts listed in /etc/fstab will be converted into native units dynamically at boot and when the configuration of the system manager is reloaded. In general, configuring mount points through /etc/fstab is the preferred approach.' [1] Read mount points from /etc/fstab to determine dynamic mount units. [1] https://www.freedesktop.org/software/systemd/man/systemd.mount.html (From OE-Core rev: 9db988dae6dbf6da7b066728bc13b59a5c45b75c) Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* ipk: Decode byte data to string in manifest handlingAndrew Jeffery2022-03-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | ``` File: '/home/andrew/src/openbmc/openbmc/meta/lib/oe/package_manager/ipk/manifest.py', lineno: 69, function: create_full 0065: output = pm.dummy_install(pkgs_to_install) 0066: 0067: with open(self.full_manifest, 'w+') as manifest: 0068: pkg_re = re.compile('^Installing ([^ ]+) [^ ].*') *** 0069: for line in set(output.split('\n')): 0070: m = pkg_re.match(line) 0071: if m: 0072: manifest.write(m.group(1) + '\n') 0073: Exception: TypeError: a bytes-like object is required, not 'str' ``` Change-Id: Ifefb13bfa22c766d20ab9f73f7abe5163b3df86f (From OE-Core rev: cf9df9e8d89fee9cea4785c94a1e3004a5f3469d) Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* ipk: Import re in manifest moduleAndrew Jeffery2022-03-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | ``` File: '/home/andrew/src/openbmc/openbmc/meta/lib/oe/package_manager/ipk/manifest.py', lineno: 67, function: create_full 0063: 0064: output = pm.dummy_install(pkgs_to_install) 0065: 0066: with open(self.full_manifest, 'w+') as manifest: *** 0067: pkg_re = re.compile('^Installing ([^ ]+) [^ ].*') 0068: for line in set(output.split('\n')): 0069: m = pkg_re.match(line) 0070: if m: 0071: manifest.write(m.group(1) + '\n') Exception: NameError: name 're' is not defined ``` Change-Id: I769a2ab5e57c7b60598ea0390b576d707356db9d (From OE-Core rev: e240a8ede690e56bcf53a97b3be5592e6e4a5a15) Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* copy_buildsystem: allow more layer pathsDaniel Wagenknecht2022-03-041-8/+4
| | | | | | | | | | | | | | | | | | Layers could be located anywhere. The eSDK should work with them even if they are not located in TOPDIR or in the same parent directory as COREBASE. For layers located in the same parent directory as COREBASE this preserves the intent from the previous copy_buildsystem: include layer tree during build structure creation commit. Related OE-Core rev: 5a59a6997f41e606d088e3e86812de56f72f543b (From OE-Core rev: 16d330d42e03085769eddb1b60ba1df7228baf36) Signed-off-by: Daniel Wagenknecht <dwagenknecht@emlix.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust: Introduce arch_to_rust_arch()Andrew Jeffery2022-03-021-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On modern Power systems `uname -m` yields 'ppc64le' while the toolchain knows the architecture as 'powerpc64le'. Provide a mapping from one to the other to integrate with the existing architecture configuration flags. arch_to_rust_arch() only exists to map the OE *_ARCH variables before any further processing, unlike arch_to_rust_target_arch() which is specific to the internal triple handling of rust. On Linux ppc64le systems the changes give the following config: ``` $ cat ./tmp/work/ppc64le-linux/rust-native/1.58.0-r0/targets/ppc64le-linux.json { "llvm-target": "powerpc64le-unknown-linux-gnu", "data-layout": "e-m:e-i64:64-n32:64-v256:256:256-v512:512:512", "max-atomic-width": 64, "target-pointer-width": "64", "target-c-int-width": "64", "target-endian": "little", "arch": "powerpc64", "os": "linux", "env": "gnu", "vendor": "unknown", "target-family": "unix", "linker": "gcc", "cpu": "generic", "dynamic-linking": true, "executables": true, "linker-is-gnu": true, "linker-flavor": "gcc", "has-rpath": true, "has-elf-tls": true, "position-independent-executables": true, "panic-strategy": "unwind" } ``` Change-Id: Ief0c01189185d7d4da31d307270bec4e1de674ca (From OE-Core rev: 9ab61e3cfef0157393cb870d606c2f362e190889) Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* license: Rework INCOMPATIBLE_LICENSE wildcard handlingRichard Purdie2022-03-021-36/+50
| | | | | | | | | | | | | | | | | | | | | | | The current wildcard handling is badly documented and inconsistently used and understood. Forcing users to have to use "GPL-3.0-only GPL-3.0-or-later" whilst explict is not very user friendly. Equally, using the current wildcards is ambigious. This supports pre-defined expansions only and at least makes it clear what GPL-3.0* means (it doesn't include the exception licenses). This is hopefully an acceptable compromise between literal meaning and having something usable. Non-SPDX forms of license in this field have been dropped and errors are shown for unsupported expansions and unsupported old style license terms. Users need to carefully consider how to migrate to the new syntax but the meaning should be well defined and clear from here forward. (From OE-Core rev: 724fc8047cae6ed6197d7deca887b1594871c90e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* license/insane: Show warning for obsolete license usageRichard Purdie2022-03-021-0/+10
| | | | | | | | | | | | | | | We want to use SPDX identifiers in LICENSE variables. There is now a conversion script to make most of the translations. Add a list of strings which have been replaced so we can show warnings to users if they're still used anywhere. Add checks to the package as insane check. This is currently a warning by default but can be turned off or made an error as per the other standard checks. (From OE-Core rev: 9379f80f484f94686a4d494e9e237fadfb72a938) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base/license: Rework INCOMPATIBLE_LICENSE variable handlingSaul Wold2022-03-022-2/+7
| | | | | | | | | | | | | | | | | | | | This re-writes the INCOMPATIBLE_LICENSE checking code to replace the WHITELIST_<lic> with INCOMPATIBLE_LICENSE_EXCEPTIONS = '<pkg>:<lic> <pkg>:<lic> ...' This initial change leaves most of the code structure in place, but the code in base.bbclass needs to be re-written to make the check more consistent around packages (PKGS) and not recipe names (PN). This also is taking into account the changes for SPDX licenses. The aim is to provide a mode consistent variable where the variable name is known and can easily be queried. (From OE-Core rev: 0d19c45ba6cf43518f380ca5afe9753a2eda0691) Signed-off-by: Saul Wold <saul.wold@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool/devtool: Further SPDX identifier cleanupsRichard Purdie2022-03-022-15/+15
| | | | | | | | | | | | Some of these are hard to know what to do with since the original source files for the checksum aren't present. The safe option is to use "-only" as often the main license is ambiguous and the source files themselves determine the "or-later" possibility. The "-only" option therefore is realistically what we need to use in this code. (From OE-Core rev: 2b0cbafc7854de0308a624b17b8aaba704b031d5) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate: do not add TARGET_ARCH to pkgarch for cross recipes.Alexander Kanavin2022-03-021-1/+1
| | | | | | | | | | | | This is redundant (target arch is already in PN), and breaks compiling a cross-canadian toolchain, as that needs populating the sysroot with two different native-hosted toolchains built from cross recipes. Inserting TARGET_ARCH allows only one or the other. (From OE-Core rev: 33fc1792cd782feb8dbb4285e3006bb588f7978f) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts: Various typo/grammar/punctuation fixesRobert P. J. Day2022-03-021-1/+1
| | | | | | | | | | | | | | | | Among other things, fix misspellings of: - absolute - deprecated - suitable - handle and a bunch of other things. (From OE-Core rev: c3773cd6c44dfe82be9ecd248120e7d6c753f891) Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool: Use SPDX license identifiersPeter Kjellerstedt2022-03-013-6/+6
| | | | | | | | | | | | There are still a couple of cases where the license may be set as, e.g., "GPL" or "GPL-2.0" since there is not enough information to decide the actual SPDX license. It is then assumed that the developer will have to correct the information. (From OE-Core rev: e7df51f8d2361e9fe2d67669d2e17f0a5d01004e) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest: recipetool: Correct the URI for socatPeter Kjellerstedt2022-03-011-1/+1
| | | | | | | | | | | The URI to the socat tarball used in the recipetool.RecipetoolCreateTests.test_recipetool_create_simple test has been moved to an "Archive" directory. (From OE-Core rev: 1e8b716e1377ad49f1451cbabe7c9961cc507731) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* license.py: Correct a commentPeter Kjellerstedt2022-02-271-10/+7
| | | | | | | (From OE-Core rev: 1f7a34c6d246c6f42ab823ffd0bd0306705ad88d) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest: drop distutils3 test from recipetoolTim Orling2022-02-251-19/+0
| | | | | | | | | | | | | The distutils*.bbclasses have been moved from oe-core to meta-python, so drop test_recipetool_create_python3_distutils test case. [YOCTO #14610] (From OE-Core rev: 54ae2f647dc7dbafa5b90e9edbd62a0d355702f5) Signed-off-by: Tim Orling <tim.orling@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* licenses: Fix logic error introduced in renameRichard Purdie2022-02-251-2/+2
| | | | | | | | The previous commit introduced a small logic error. Fix the renaming issue. (From OE-Core rev: b01e10b27d23ea1b4ac58376c2423505a70832d6) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* license.py: rename variablesSaul Wold2022-02-251-14/+17
| | | | | | | | | Update the comment to reflect new variable names (From OE-Core rev: 7fbab1aefc127f0e1834f51a8a793b0d7e7b4f07) Signed-off-by: Saul Wold <saul.wold@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* patch.py: Prevent git repo reinitializationPavel Zhukov2022-02-252-5/+25
| | | | | | | | | | There were few bugs in the _isInitialized() function which might trigger git repo to be reinitialized and patches failing to apply. (From OE-Core rev: 80500ecda4c1bc8812e6e078b6b0db5ec46624de) Signed-off-by: Pavel Zhukov <pavel.zhukov@huawei.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>