summaryrefslogtreecommitdiffstats
path: root/scripts
Commit message (Collapse)AuthorAgeFilesLines
* oe-pkgdata-util: Adapt to the new variable override syntaxPeter Kjellerstedt2022-03-111-1/+1
| | | | | | | (From OE-Core rev: 2bf6a0ca9fdf639418646700b20b65c9960efdbe) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta/scripts: Improve internal variable namingSaul Wold2022-03-102-6/+6
| | | | | | | | | 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>
* wic: Use custom kernel path if providedBill Pittman2022-03-081-0/+3
| | | | | | | | | | If the custom kernel path is provided in options, then use that path instead of the default path. (From OE-Core rev: 1068102216a894c467f71f6046fdb37d5577545c) Signed-off-by: Bill Pittman <bill.pittman@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* convert-variable-renames: Fix output stringSaul Wold2022-03-041-1/+1
| | | | | | | (From OE-Core rev: a8d6882144e76f384022fe7d2b4ee13ad876317a) 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-40/+40
| | | | | | | | | | | | 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>
* scripts: Various typo/grammar/punctuation fixesRobert P. J. Day2022-03-023-13/+13
| | | | | | | | | | | | | | | | 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-50/+50
| | | | | | | | | | | | 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>
* recipetool/create_buildsys_python: Add support for more known licensesPeter Kjellerstedt2022-03-011-1/+17
| | | | | | | | | | Add all OSI approved licenses from https://pypi.org/classifiers/. Also add support for Other/Proprietary (Proprietary) and Public Domain (PD). (From OE-Core rev: 99ef134d1019e5b98b845cf71f3eb39871218f9d) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/documentation-audit: Use renamed LICENSE_FLAGS_ACCEPTED variableKhem Raj2022-02-251-2/+2
| | | | | | | (From OE-Core rev: c8f8fe5a4f57febb1fb9b54f53d2a0b95f01179b) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts: fix file writing in convert-spdx-licensesScott Murray2022-02-221-0/+1
| | | | | | | | | | | The convert-spdx-licenses.py script needs the same file closing fix as was made to convert-variable-renames to ensure modified file contents get flushed out. (From OE-Core rev: 46135c87345c7189053dafbed92c754f9f328c32) Signed-off-by: Scott Murray <scott.murray@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts: fix file writing in convert-variable-renamesScott Murray2022-02-221-0/+1
| | | | | | | | | | | | | | In my test environments (Fedora 35 and Debian 10.10 on AMD 2970WX), running the convert-variable-renames.py rename script was resulting in empty files instead of updated ones. From inspection, the new files are never flushed/closed before moving them into place, which seems inherently racy. Adding an explicit close to flush the modified contents out before moving into place fixes the issue for me. (From OE-Core rev: 187ac1ea0a701a5ba9ec92f6aa32f2a67600a584) Signed-off-by: Scott Murray <scott.murray@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: Rename LICENSE_FLAGS variableSaul Wold2022-02-211-0/+1
| | | | | | | (From OE-Core rev: 5c5b3bc563059ba728dc9724656cc69669f8e25f) Signed-off-by: Saul Wold <saul.wold@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* icecc: Improve variables/terminologyRichard Purdie2022-02-211-0/+5
| | | | | | | | | | The SYSTEM and USER seperation between variables seems odd and not necessary, drop it. Avoid the use of whitelist/blacklist and also change "packages" to "recipes" since that misuse causes confusion. (From OE-Core rev: 0df0eb6401a02139b9110bc95e21d97a67125ec5) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts: Add convert-variable-renames script for inclusive language variable ↵Saul Wold2022-02-211-0/+109
| | | | | | | | | | | | | | | | | | | | | | | renaming This script searches for a list of variable that have been renamed and converts them to their more descriptive names. It also searches for a list of variables that have been removed or deprecated and prints a message. It will print a message to inform the user that there are terms that need to be updated in their files. Many of these changes are context sensitive and may not be modified as they might be existing calls to other libraries. This message is informational only. I have tested this on poky and meta-openembedded so far. (From OE-Core rev: 50fe7ba8dba05a9681c9095506f798796cfc2750) (From OE-Core rev: 75f319c105484d0b312a858cc0bd8148728c8622) Signed-off-by: Saul Wold <saul.wold@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta/scripts: Change BB_ENV_EXTRA_WHITE -> BB_ENV_PASSTHROUGH_ADDITIONSRichard Purdie2022-02-215-7/+7
| | | | | | | | After the change to bitbake, update the references in OE-Core to match the updates. (From OE-Core rev: 193affb9f28b0116c3fd619834f145326fee08c5) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* yocto-check-layer: add ability to perform tests from a global bbclassDenys Dmytriyenko2022-02-212-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is useful when needing to test layer's recipes, where this special bbclass can define a global python function that gets called on each recipe parsing during "bitbake -S none world" signature dump and be able to fail layer's check accordingly. First test being added is to detect recipes skipping "installed-vs-shipped" QA check. As "installed-vs-shipped" is a packaging QA check, it happens very late in the build process and failing it could mean some potential issues with packaging, especially when recipe uses BBCLASSEXTEND="nativesdk" and resulting package is used in an SDK. In OE-Core failing this QA check leads to an error, but other layers can suppress it or change it to a warning. Detecting weird packaging problems with SDKs is quite difficult and time consuming. Also, waiting for the actual "installed-vs-shipped" packaging QA check to fail means that all recipes in the layer under test have to run through all standard tasks in the build chain, equivalent to a multi-hour world-build. Hence yocto-check-layer takes a shortcut and only detects a mere attempt at skipping "installed-vs-shipped" QA check in the INSANE_SKIP list during initial parsing when dumping the signature information for the layer. (From OE-Core rev: e8baa75535fc888f1d768b23a0140475e832c910) Signed-off-by: Denys Dmytriyenko <denis@denix.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: explicitly set main or master branches in upgrades when availableAlexander Kanavin2022-02-211-7/+8
| | | | | | | | | | | | | In particular this resolves devtool's inability to pick a branch when the same tagged commit is avaiable in main and in a release maintenance branch. Thanks to Peter Kjellerstedt for the suggestion. (From OE-Core rev: bcb21ee2760a2c76039412a56c6cda43fbf96fd0) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts: Add a conversion script to use SPDX license namesRichard Purdie2022-02-201-0/+144
| | | | | | | | | | | | | We're standardising on SPDX license names so it is overdue to change the ones in the LICENSE fileds to the SPDX values. Add a conversion script which makes this straightforward on the most part. Ultimately this allows the core code to be more efficient and not need to consult the mappings. (From OE-Core rev: 512cd4ca91bc5107d68b7e721257a8f62f878994) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: rawcopy: Add support for packed imagesStefan Herbrechtsmeier2022-02-161-1/+28
| | | | | | | | | | | | | | | Add support for packed images to wic rawcopy handler do minimize disk usage in deploy directory and reuse of packed images between wic and swupdate. Add `unpack` to sourceparams to unpack an bz2, gz and xz archives. Example: part / --source rawcopy --sourceparams="file=core-image-minimal-qemu.ext4.gz,unpack" (From OE-Core rev: 4c97d25791389ece041565981ba3207ce9949a1a) Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: partition: Support valueless keys in sourceparamsStefan Herbrechtsmeier2022-02-161-1/+1
| | | | | | | | | | Accept valueless keys in sourceparams without equals sign (=) to match the comment and support Boolean entries. (From OE-Core rev: 052a9b0f7d2ee5c284cf1b4f1f45caed0489221a) Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scriptutils: Fix handling of srcuri urlsRichard Purdie2022-02-121-0/+1
| | | | | | | | | | | Bitbake is now requiring there be a call to get_srcrev() when urls contain floating revisions. This breaks some recipetool workflows since it is running these queries to determine those revisions. Add a PV entry which triggers that call to avoid the errors. (From OE-Core rev: bdaf0c798da21f9c15d9cb30ab4258a3c75c8bbf) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* runqemu: preload uninative libraries when host gl drivers are in useAlexander Kanavin2022-02-071-0/+8
| | | | | | | | | | | | | | Some of the host distributions build the drivers in a way (RPATH/RUNPATH) that tricks uninative loader into loading pieces of the host libc, if the same pieces haven't been previously loaded by native binaries. Mixing the two libc versions leads to failures. This change ensures that the correct (uninative) versions are always in use. (From OE-Core rev: 39c10816d5ec9d9c7952d786d7a3f942d25d0c27) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* qemu: replace a gtk wrapper with directly setting environment from runqemuAlexander Kanavin2022-02-071-0/+1
| | | | | | | | | | | | | | | The wrapper is executed by host bash, and host bash refuses to run when pseudo libc is preloaded via LD_PRELOAD (which is the case when gl is enabled). Only the fontconfig setting is carried over as local testing showed that only that is necessary for the gui to look ok nowadays; adjust further if necessary. (From OE-Core rev: 34f152de14f803fcfe5c92c515bf585838bba10a) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: deploy-target: Remove stripped binaries in pseudo contextFlorian Amstutz2022-02-071-1/+1
| | | | | | | | | | | deploy-target may fail the second time with "pseudo abort" because devtool-deploy-target-stripped is deleted outside of pseudo's fakeroot context. (From OE-Core rev: 2338a33b690b0bbe279cde3f73764911b239cb50) Signed-off-by: Florian Amstutz <florian.amstutz@scs.ch> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* yocto-check-layer: check for duplicate layers when finding layersRoss Burton2022-02-052-1/+26
| | | | | | | | | | | | | | | | | | | detect_layers() is very greedy and if it recurses into poky or bitbake it will find the test suite layers, such as bitbake/lib/layerindexlib/tests/testdata/layer4. This is a dummy layer which claims to be openembedded-layer, so if the real openembedded-layer is a dependency then layer4 may be used instead, which will cause errors: initially because it's only compatible with Sumo, but later because it doesn't contain any recipes. Add a check that the set of layers we've found doesn't contain any duplicate collection names with different patterns, and abort if that is the case as the test will be non-deterministic. (From OE-Core rev: 0df4bae4ec67d38442620fa08c839528b425e2a8) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/runqemu-ifdown: Don't treat the last iptables command as specialDaniel Müller2022-02-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | The runqemu-ifup script performs a bunch of setup steps that runqemu-ifdown attempts to undo later on. While a bunch of said setup operations are considered fatal should they fail, the iptables based NAT setup notably is not. The tear down procedure in runqemu-ifdown, however, has the iptables based tear down as the last operation, with the status of it determining the overall status of the script. Hence, if this step fails, the script is considered a failure overall. That is arguably inconsistent: If the NAT setup did not succeed, the tear down cannot succeed either. To ensure similarity of the two paths, let's not treat the last iptables tear down operation any special and allow it to fail the runqemu-ifdown script, but just ignore failures. Background: we have seen a NAT related setup problem on the ifup path (which didn't cause script failure), but then saw an issue bubbled up when this operation was meant to be undone on the ifdown path. (From OE-Core rev: 0ebcfb034bcad81efef5f746f0aa0b69772901a0) Signed-off-by: Daniel Müller <muellerd@fb.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool: Fix circular reference in SRC_URISaul Wold2022-02-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When creating a new recipe.bb file for a binary, don't use BP which includes the version information, instead use BPN which is just the name base Package Name. Since PB is not specified, it takes the default: PV = "1.0+git${SRCPV}" But SRCPV is defined in terms of the SRC_URI, which leads to infinite recursion (traceback below). Here are the pertinent variables which cause the recursion: SRC_URI = "git://github.com/lvc/abi-dumper;protocol=https;subdir=${BP}" BP = "${BPN}-${PV}" PV = "1.0+git${SRCPV}" SRCPV = "${@bb.fetch2.get_srcrev(d)}" def get_srcrev(d, method_name='sortable_revision'): # ... trimmed scms = [] fetcher = Fetch(d.getVar('SRC_URI').split(), d) # ... trimmed [YOCTO #14040] (From OE-Core rev: 3b8d43fc53ee13d39abc3b2a1f706a97fcf752aa) Signed-off-by: Saul Wold <saul.wold@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* prelink: Drop support for itRichard Purdie2022-02-051-12/+0
| | | | | | | | | | | | | | Prelink is being dropped by glibc in 2.36. It already causes issues with binary corruption, has a number of open bugs and is of questionable benefit without disabling load address randomization and PIE executables. We disabled it by default a while back but left people able to use it. We would be unable to maintain it alone without glibc support so remove the remaining pieces. (From OE-Core rev: 23c0be78106f1d1e2bb9c724174a1bb8c56c2469) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: sdk-update: Remove an unnecessary \n from SSTATE_MIRRORSPeter Kjellerstedt2022-02-031-1/+1
| | | | | | | | | | | Since commit 044fb04d in bitbake (fetch2: Allow whitespace only mirror entries) there is no need to separate the entries in SSTATE_MIRRORS with "\n". (From OE-Core rev: 6e66ec3cd201d32d3d97df2222f41bb8c475fb69) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* yocto-check-layer: add debug output for the layers that were foundRoss Burton2022-02-011-0/+13
| | | | | | | | | | When debugging weird yocto-check-layer output it is useful to know what the tool found when looking for layers. (From OE-Core rev: 711e2d4d7baf36f8497741c14268d7f72d0db016) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool/create_buildsys_python.py: less distutilsTim Orling2022-01-121-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 'distutils' is deprecated in Python 3.10 with removal in Python 3.12 (~October 2023). Replace 'distutils.command.build_py' with 'setuptools.command.build_py'. To avoid an AttributeError, we call super().__init__() which provides the missing 'distribution' attribute. However, for some reason, __init__() in 'setuptools.command.build_py.build_py' class requires a 'dist' positional argument which must be a 'Distribution' instance. It is not clear why 'distutils.command.build_py.build_py' class does not require this. There is still a check which decides to inherit setuptools3 vs distutils3 that will need to be refactored when we add pyproject.toml and setup.cfg support for more modern PEP 517 packaging. Once distutils3.bbclass is dropped, any recipe inheriting distutils3 will throw a parsing error. The plan is to move distutils*.bbclasses to meta-python. However if meta-python is not in bblayers, the parsing error would still occur. [YOCTO #14610] (From OE-Core rev: 619a3eb1266459daf16e10386113e9201fbf9cf5) Signed-off-by: Tim Orling <tim.orling@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* buildtools-installer: Update to use 3.4Richard Purdie2022-01-121-3/+3
| | | | | | | | | | This updates buildtools to use the tarball from the 3.4 release which contains some bug fixes and is what the autobuilder currently uses for testing on older distros. (From OE-Core rev: 7479861c60a1c205b9502c1a811ac3a9dc51cd07) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* qemuboot/runqemu: fully form the ip= kernel parameterAlexander Kanavin2022-01-111-1/+1
| | | | | | | | | | | New systemd is actually parsing this in systemd-network-generator and fails if it is not fully formed. 'off' means 'static ip, do nothing': https://www.kernel.org/doc/Documentation/filesystems/nfs/nfsroot.txt (From OE-Core rev: 2cf12c8dde0f05917797f8b4a80883dc0647b95d) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts: Update to use exec_module() instead of load_module()Richard Purdie2022-01-052-4/+11
| | | | | | | | | This is deprecated in python 3.12 and Fedora 35 is throwing warnings so move to the new functions. (From OE-Core rev: 655cd3f614d736416eab0d708b7c49674bf5c977) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/buildhistory-diff: drop use of distutilsTim Orling2022-01-041-5/+0
| | | | | | | | | | | | | | | | | The use of distutils.version.LooseVersion to check for GitPython > 0.3.1 is not really needed anymore since any supported distribution has at least 1.0.0 (centos-7 via epel7, debian-9, ubuntu-16.04) If we want to reinstate this check, alternatives would be to require python3-packaging on all hosts and use packaging.version.Version or use an imported LooseVersion in bb.version. [YOCTO #14610] (From OE-Core rev: bc90dcae9f53ddc246942f4d9b8ae8943e3b9754) Signed-off-by: Tim Orling <timothy.t.orling@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool: Separate licenses with & operatorStefan Herbrechtsmeier2021-12-201-9/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Separate licenses with & operator since it should be satisfied most use cases and it is a reasonable assumption that all the licenses apply. Furthermore flat, split and sort the licenses to minimize license string changes. Separate package licenses with & operator: -LICENSE:${PN} = "MIT ISC" +LICENSE:${PN} = "ISC & MIT" Respect | and brackets in LICENSE: -LICENSE = "BSD-3-Clause & (ISC & | & MIT)" +LICENSE = "BSD-3-Clause & (ISC | MIT)" Sort licenses: -LICENSE = "MIT & BSD-3-Clause & ISC" +LICENSE = "BSD-3-Clause & ISC & MIT" Remove duplicates: -LICENSE = "MIT & ISC & MIT" +LICENSE = "ISC & MIT" (From OE-Core rev: 60a84ecc53d20118c5e7f86dd3e3cafbfed1cf0a) Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool: Sort output of guess_license function to be deterministicStefan Herbrechtsmeier2021-12-201-1/+1
| | | | | | | | | | Sort the output of guess_license function by license file to be deterministic and to support self-testing. (From OE-Core rev: ff2a7520813b3f775f96879d1905222e08b8c83f) Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* runqemu: additional setting to force software rendering with sdl 2.0.18Alexander Kanavin2021-12-171-0/+1
| | | | | | | (From OE-Core rev: 282e28bec1419d4e34076234027f34af3a49e7b5) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool: Set master branch only as fallbackStefan Herbrechtsmeier2021-12-091-8/+7
| | | | | | | | | | | | | The commit 'meta/scripts: Manual git url branch additions (dc53fe75cc)' sets the branch= parameter too early to master and thereby breaks the -B/--srcbranch option. ERROR: branch= parameter and -B/--srcbranch option cannot both be specified - use one or the other (From OE-Core rev: 34ece8030e7a6a100b5e3e7b94e6c786c0e199a6) Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* runqemu: check the qemu PID has been set before kill()ing itRoss Burton2021-12-091-1/+2
| | | | | | | | | | | | If runqemu is killed, check that we have a valid PID for the qemu before sending a kill() to it. [ YOCTO #14651 ] (From OE-Core rev: 0f3afbd3a6a6bef668612f818517df7543c0a683) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* yocto-check-layer: Relax README case checksJoshua Watt2021-12-041-2/+2
| | | | | | | | | | Relaxes the case requirements for checks in the README file so that word like "Maintainer" and "Patch" are allowed (From OE-Core rev: fdedf94d406ad3da85cb45d43ef87d3fdc8c14d4) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* yocto-check-layer: disregard checks if referencing another README fileJon Mason2021-12-041-1/+6
| | | | | | | | | | | | | It is permissible to have a layer's README reference another README. If this is the case, avoid other checks. Do this by checking for the word README (case insensitive) in the README file. This might be too permissive, but follows the pattern of looking for exact words (like "patch" or "maintainer") in READMEs. (From OE-Core rev: 443c73d638519d6a7ea44d1c0e80d76306687ddc) Signed-off-by: Jon Mason <jdmason@kudzu.us> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* yocto-check-layer: Add additional README checksDhruva Gole2021-12-031-0/+6
| | | | | | | | | | | | | | This adds: - Test case to review if the README file specifies the maintainer. - Test case to review if the README file specifies the word patch. - Test case to review if the README file contains an email address. [YOCTO #11131] (From OE-Core rev: 5d4937bce191b7e22b807c0595d4845c88ecc560) Signed-off-by: Dhruva Gole <goledhruva@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool: extend curl detection when creating recipesRoss Burton2021-12-031-1/+2
| | | | | | | | | If a configure.ac uses LIBCURL_CHECK_CONFIG it wants curl. (From OE-Core rev: 16e830ca1352cee61e4ae4b98b1203f849bf71f3) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool: handle GitLab URLs like we do GitHubRoss Burton2021-12-031-1/+1
| | | | | | | | | | GitHub URLs are automatically transformed to git: fetches, so handle GitLab URLs too. (From OE-Core rev: 651fb951819840fe122458ddbd852ee6c7ec0455) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/checklayer/common.py: Fixed a minor grammatical errorDhruva Gole2021-12-011-1/+1
| | | | | | | (From OE-Core rev: 8ea17456ae5318ed7a3b4c8f75c8441456d8b979) Signed-off-by: Dhruva Gole <goledhruva@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* native/cross: Add ar wrapper for determinismJacob Kroon2021-11-262-0/+33
| | | | | | | | | | | | | | | | | Add a wrapper around ar calls for native/cross recipes. This wrapper adds the -D option so that deterministic archives are built for native/cross output. This improves the changes of hash equivalence matches and hence build artefact reuse. We don't need this in the target case since we compile binutils-cross with an option making this the default. We need a wrapper since we need to remove the "u" option and replace it with "D" but also allow things like "--version" to continue to work too. (From OE-Core rev: 59922c95fcb20c66634c5677012d490be2246b0b) Signed-off-by: Jacob Kroon <jacob.kroon@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* nativesdk: Handle chown/chgrp calls in nativesdk do_install tasksRichard Purdie2021-11-262-0/+54
| | | | | | | | | | | | | | We disable the useradd code for nativesdk targets since we don't support postinstalls or multiple users in those cases. This means any usage of chown/chgrp inside do_install tasks won't work and would have to be conditional. Rather than require all recipes to do that, add intercepts of the calls and map those to root/root user/groups. We can't just ignore them as some calls are used to remove host contamination from the host user ID so they need to be made, just as root. (From OE-Core rev: e1f40670c438e33cae87678425de72ca03566888) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: support rootdev identified by partition labelSchmidt, Adriaan2021-11-241-0/+2
| | | | | | | | | | We already support specifying the rootfs by PARTUUID. This adds general support for letting the kernel find the rootfs by PARTLABEL. (From OE-Core rev: 2fb247c5ecf057bb96649a3c0234794b4991c050) Signed-off-by: Adriaan Schmidt <adriaan.schmidt@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: use shutil.whichMingli Yu2021-11-213-7/+7
| | | | | | | | | | | | | | | | | Use shutil.which to find the executable instead to silence the below warning: $ cat tmp/work/intel_x86_64-poky-linux/core-image-base/1.0-r5/temp/log.do_image_wic [snip] DEBUG: Executing shell function do_image_wic /path/layers/oe-core/scripts/wic:27: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives from distutils import spawn INFO: Creating image(s)... [snip] [RP: Added conversion for missed function reference] (From OE-Core rev: 3966cbf5c8a2dbc3a4f0f3eefdbeeb83f522bf87) Signed-off-by: Mingli Yu <mingli.yu@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>