summaryrefslogtreecommitdiffstats
path: root/scripts/lib
Commit message (Collapse)AuthorAgeFilesLines
* devtool: finish: handle patching when S points to subdir of a git repoPaul Eggleton2022-07-141-6/+19
| | | | | | | | | | | | If devtool finish needs to create a patch and have it applied to the sources for a recipe where S points to a subdirectory of the sources, then the patch needs to be applied at the root of the repo i.e. we need to add a patchdir= parameter to the SRC_URI entry. (From OE-Core rev: ad3736d9ca14cac14a7da22c1cfdeda219665e6f) Signed-off-by: Paul Eggleton <paul.eggleton@microsoft.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: ignore pn- overrides when determining SRC_URI overridesPaul Eggleton2022-07-121-1/+3
| | | | | | | | | | | | | | | | | | | | If (perhaps foolishly) at your configuration level you have e.g. SRC_URI_append_pn-recipename = " file://patchname.patch" and then run devtool modify on a different recipe, an error occurs: INFO: SRC_URI contains some conditional appends/prepends - will create branches to represent these ... ERROR: [Errno 2] No such file or directory: '/path/to/downloads/patchname.patch' pn- overrides would not constitute an alternative configuration that we should handle in this context, so just ignore them to avoid the issue. (From OE-Core rev: 3f2a812ade42ece0bb59b2d303125a91b29936dd) Signed-off-by: Paul Eggleton <paul.eggleton@microsoft.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scriptutils: fix style to be more PEP8 compliantMarius Kriegerowski2022-07-011-7/+5
| | | | | | | (From OE-Core rev: 61b346d6c309ebfef50c88260bf5a0650c74db16) Signed-off-by: Marius Kriegerowski <marius.kriegerowski@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool/devtool: Fix python egg whitespace issues in PACKAGECONFIGThomas Roos2022-07-011-0/+13
| | | | | | | | | | | | | | | | | | | Substitute expressions or whitespace from python egg requires.txt when generating PACKAGECONFIG Pysetuptools sees the uvicorn.egg-info/requires.txt as extra requirements. Recipetool parses this information to generate the PACKAGECONFIG. These extra requirements contain expressions and whitespace, which are not allowed in PACKGAGECONFIG. This patch substitute them by hyphens to make PACKAGECONFIG parsable and readable. Also adding an oe-selftest for this. [YOCTO #14446] (From OE-Core rev: a854d95a79e64f3f82abfa4cc1daec750abf4249) Signed-off-by: Thomas Roos <throos@amazon.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: Fix _copy_file() TypeErrorXiaobing Luo2022-06-111-1/+1
| | | | | | | | | | | | | | | | when devtool finish, the _copy_file() failed. -------------------------------------------- TypeError: _copy_file() got an unexpected keyword argument 'base_outdir' -------------------------------------------- Fixes: 05f2d5d2ce00 ("devtool: finish: add dry-run option") (From OE-Core rev: a45d9dc089fb2719ca69b92870917f8c0925f632) Signed-off-by: Xiaobing Luo <luoxiaobing0926@gmail.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic/plugins/images/direct: Allow changes in fstab on rootfsTobias Schmidl2022-05-271-1/+1
| | | | | | | | | | | | | | Allow wic to also manipulate the rootfs entry in fstab, which it currently refuses to write. Reasons one might want to do that include using systemd-growfs via --fsoptions on / With this change / is now handled exactly the same as other mountpoints, the former exception seemingly was not even documented. (From OE-Core rev: 20d43a2599d7622b96e2fb0da87a886da1a3794a) Signed-off-by: Tobias Schmidl <tobiasschmidl@siemens.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: added fspassno parameter to partitionClaudius Heine2022-05-164-1/+10
| | | | | | | | | | | | | The `fspassno` parameter allows to overwrite the value of the last column (`fs_passno`) in the /etc/fstab of the target root file system. This allows to have periodic file system checks. (From OE-Core rev: b9b9f71e6f37bfbf954ade518391b242669481e3) Signed-off-by: Claudius Heine <ch@denx.de> Signed-off-by: Vijai Kumar K <Vijaikumar_Kanagarajan@mentor.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic/plugins/rootfs: Fix permissions when splitting rootfs folders across ↵Felix Moessbauer2022-05-081-1/+4
| | | | | | | | | | | | | | | | | | partitions This patches makes locating the file database containing the file and folder usernames and permissions more reliable. In addition to locating it relative to the partition directory, we also try to locate it relative to the IMAGE_ROOTFS. Prior to this patch, the database was not found when using --rootfs-dir=${IMAGE_ROOTFS}/<x> in the WIC script, leading to erronous file permissions and ownership. (From OE-Core rev: 09e18ee246da8b56f446c4db548fb9c7e895142b) Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: Add dependencies for erofs-utilsSean Anderson2022-04-271-0/+1
| | | | | | | | | | | | In order to build erofs filesystems, wic must have the erofs-utils package installed into its sysroot. Fixes: 30375ce97 ("Add support for erofs filesystems") (From OE-Core rev: 68e364340c439a1341d37c3f7a2b0e6aad8e1e56) Signed-off-by: Sean Anderson <sean.anderson@seco.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: do not use PARTLABEL for msdos partition tablesHenning Schild2022-04-221-1/+1
| | | | | | | | | | | | | | | When using "msdos" partition tables and "--label" but not "--use-uuid" one can generate images which will not find their root, because PARTLABEL does not work for "msdos". Fix that by simply not going the PARTLABEL path in case of "msdos". Fixes: 2fb247c5ecf0 ("wic: support rootdev identified by partition label") (From OE-Core rev: 9ea1a838b946020e026edc032039552b723fcaa4) Signed-off-by: Henning Schild <henning.schild@siemens.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool: Do not use mutable default arguments in PythonStefan Herbrechtsmeier2022-04-191-2/+2
| | | | | | | | | | | | | | | | | Remove mutable default arguments in Python because they can lead to all sorts of nasty and horrible bugs. https://florimond.dev/en/posts/2018/08/python-mutable-defaults-are-the-source-of-all-evil/ Revert `recipetool: Change default paramter fallback_licenses of function split_pkg_licenses from None to []` and instead check fallback_licenses before use. (From OE-Core rev: 99dee60b8db557f54783bf0f61098587badc683c) Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta/scripts: Improve internal variable namingSaul Wold2022-03-101-1/+1
| | | | | | | | | 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>
* 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>
* 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>
* meta/scripts: Change BB_ENV_EXTRA_WHITE -> BB_ENV_PASSTHROUGH_ADDITIONSRichard Purdie2022-02-212-2/+2
| | | | | | | | 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>
* 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>
* 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-051-0/+21
| | | | | | | | | | | | | | | | | | | 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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-212-5/+5
| | | | | | | | | | | | | | | | | 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>
* scripts/lib/wic/help.py: Update Fedora Kickstart URLsJon Mason2021-11-111-2/+2
| | | | | | | | | | The URLs describing Kickstart are no longer valid and do not redirect to the correct location. Update them with the correct location. (From OE-Core rev: e5ac75f93c8128b0761af5fee99e8603ddd1657d) Signed-off-by: Jon Mason <jdmason@kudzu.us> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: Use os.rename instead of bb.utils.renameKhem Raj2021-11-101-1/+1
| | | | | | | | | | | | | | | This is not invoked with bitbake context as a result bb.utils is not visible when this function is called during image creation and builds fail e.g. NameError: name 'bb' is not defined (From OE-Core rev: df9dca9fe4dd1abfe5f3986389a8e8ff524da5d7) Signed-off-by: Khem Raj <raj.khem@gmail.com> Cc: Joshua Watt <JPEWhacker@gmail.com> Cc: Devendra Tewari <devendra.tewari@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta/scripts: Manual git url branch additionsRichard Purdie2021-10-301-0/+3
| | | | | | | | | | Following the scripted conversion adding branches to git:// SRC_URI entries, add the remaining references, mainly in the selftests and recipetool. (From OE-Core rev: 5340c0d688036c1be6c938f05d8a8c1e3b49ec38) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool: Simplify common source files skip in guess_licenseStefan Herbrechtsmeier2021-10-231-1/+2
| | | | | | | | (From OE-Core rev: 189c0297632968900715d7a4a5edcdf3a56e25f5) Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool: Rework crunch_license to recognize more variantsStefan Herbrechtsmeier2021-10-141-24/+97
| | | | | | | | (From OE-Core rev: 6c70f5bd2acd036c21be5b03df89d3a8f381a822) Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool: npm: Use README as license fallbackStefan Herbrechtsmeier2021-10-141-1/+51
| | | | | | | | | | | | Use the README as license fallback if a license file is missing. Use the linenumbers parameter of get_license_md5sums function to determine the license text inside the README. (From OE-Core rev: eff85c86f36673a1cb5a5dc8c66598e0dc457374) Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool: npm: Do not add package.json files to LIC_FILES_CHKSUMStefan Herbrechtsmeier2021-10-141-10/+0
| | | | | | | | | | | The package.json files doesn't contain any licenses. The name of the license doesn't comply the license requirements of most liceneses. (From OE-Core rev: 194df9c240378b6befeb10183889093ec7bb4d5f) Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool: Add support for linenumbers to licenses.csvStefan Herbrechtsmeier2021-10-141-4/+8
| | | | | | | | | | | | Add support for linenumbers (begin and end lines) to licenses.csv. Add an optional linenumbers parameter to get_license_md5sums to support different use cases. (From OE-Core rev: d5c4979669f125e73c24dcc73fa3c4f3787bbb62) Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool: Add logger info for missing license entriesStefan Herbrechtsmeier2021-10-141-0/+3
| | | | | | | | (From OE-Core rev: 0548a5d8eeee682a6e250ddc1886279f52747db2) Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool: ignore empty license filesStefan Herbrechtsmeier2021-10-141-2/+3
| | | | | | | | (From OE-Core rev: a00720344d1996db9e4afff1c974b3158fb8dae7) Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool: Change default paramter fallback_licenses of function ↵Stefan Herbrechtsmeier2021-10-141-1/+1
| | | | | | | | | | split_pkg_licenses from None to [] (From OE-Core rev: ab06305bf9a8ee2250aae8043e37119df2fbfc15) Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool: Skip common source files in guess_licenseStefan Herbrechtsmeier2021-10-141-0/+2
| | | | | | | | (From OE-Core rev: a930d39787dd77e10dfa7b7297af5fa04ca731ea) Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>