summaryrefslogtreecommitdiffstats
path: root/bitbake
Commit message (Collapse)AuthorAgeFilesLines
* bitbake: data_smart: Add hasOverrides method to public datastore APIRichard Purdie2022-02-171-0/+2
| | | | | | | | | | | There are some cases where the metadata needs to check if a variable has any overrides set, even if they are currently inactive. That code currently pokes into datastore internals. Add API instead to replace and avoid that. (Bitbake rev: c885e5542dcf760b8fc5881e385abb4a10020874) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: msg: Ensure manually created loggers have the once filterJoshua Watt2022-02-171-0/+1
| | | | | | | | | | | | | Loggers created with a logging configuration file automatically get the once filter applied to ensure that warnonce()/erroronce() only appear a single time. The same filter needs to also be added to bb.msg.logger_create() to ensure that manually created loggers have the same behavior (Bitbake rev: bd93f7baff9d56de37a1af474189e0888b82d475) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: msg: Add bb.warnonce() and bb.erroronce() log methodsRichard Purdie2022-02-173-8/+51
| | | | | | | | | | | | | | | | | | | | | | This adds a log level and logging function call to use it where the warning or error will only be displayed once, regardless of how many times the message is logged. This has to be done either in the cooker or on the UI side. I've opted for the UI side since display control is really a UI issue but it uses a common library filter function to enable it which can be reused elsewhere. The knotty message displayed as the build summary is tweaked to make sense when the numbers won't match since it will still count the number of times it was logged and this is probably helpful for debugging in some cases so I've deliberately left it that way. (Bitbake rev: 7bd40e3003a043e3cb7efc276681054b563b5e7b) 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>
* bitbake: cooker: Improve parsing failure from handled exception usabilityRichard Purdie2022-02-171-1/+3
| | | | | | | | | | | | | When a recipe raises a BBHandledException, it means the error was already shown to the user. Adding an additional one here isn't helpful. What is helpful is to mention that parsing was halted. Tweak the code to do this with improves the messages the user sees and helps understand what happened. (Bitbake rev: fdf6ebc8b603fcfd3ed7c64baf486a4adabd25be) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: data_smart: Fix overrides file/line message additionsRichard Purdie2022-02-171-4/+4
| | | | | | | | | | The overrides warning message is meant to show filename and line numbers but the variable names are incorrect and this wasn't working. Fix it. (Bitbake rev: 551c1cb20fc9b9d0dab5d830182c2bf626e72845) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: asyncrpc: Fix attribute errorsDaniel Gomez2022-02-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Export ClientError and ServerError classes from bb.asyncrpc.serv as required by lib/hashserv/server.py module. Error: Client ('192.168.2.184', 51142) connected Error from client: module 'bb.asyncrpc' has no attribute 'ClientError' Traceback (most recent call last): File "/opt/bbhashserv/lib/bb/asyncrpc/serv.py", line 192, in handle_client await client.process_requests() File "/opt/bbhashserv/lib/hashserv/server.py", line 200, in process_requests await super().process_requests() File "/opt/bbhashserv/lib/bb/asyncrpc/serv.py", line 72, in process_requests await self.dispatch_message(d) File "/opt/bbhashserv/lib/hashserv/server.py", line 217, in dispatch_message raise bb.asyncrpc.ClientError("Unrecognized command %r" % msg) AttributeError: module 'bb.asyncrpc' has no attribute 'ClientError' (Bitbake rev: 8aca1d341500af8bbe788801c2df3da9bbfacaed) Signed-off-by: Daniel Gomez <daniel@qtec.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: contrib: Fix hash server Dockerfile dependenciesDaniel Gomez2022-02-171-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When building the Hash Equivalence server Dockerfile, some dependencies are missing in order to run the hash server properly: Traceback errors: Traceback (most recent call last): File "/opt/bbhashserv/bin/bitbake-hashserv", line 61, in <module> ret = main() File "/opt/bbhashserv/bin/bitbake-hashserv", line 54, in main server = hashserv.create_server(args.bind, args.database, upstream=args.upstream, read_only=args.read_only) File "/opt/bbhashserv/lib/hashserv/__init__.py", line 120, in create_server from . import server File "/opt/bbhashserv/lib/hashserv/server.py", line 14, in <module> import bb.asyncrpc ModuleNotFoundError: No module named 'bb' Traceback (most recent call last): File "/opt/bbhashserv/bin/bitbake-hashserv", line 61, in <module> ret = main() File "/opt/bbhashserv/bin/bitbake-hashserv", line 54, in main server = hashserv.create_server(args.bind, args.database, upstream=args.upstream, read_only=args.read_only) File "/opt/bbhashserv/lib/hashserv/__init__.py", line 120, in create_server from . import server File "/opt/bbhashserv/lib/hashserv/server.py", line 14, in <module> import bb.asyncrpc File "/opt/bbhashserv/lib/bb/__init__.py", line 128, in <module> from bb import fetch2 as fetch File "/opt/bbhashserv/lib/bb/fetch2/__init__.py", line 1930, in <module> from . import git File "/opt/bbhashserv/lib/bb/fetch2/git.py", line 70, in <module> import bb.progress File "/opt/bbhashserv/lib/bb/progress.py", line 14, in <module> import bb.build File "/opt/bbhashserv/lib/bb/build.py", line 27, in <module> from bb import data, event, utils File "/opt/bbhashserv/lib/bb/data.py", line 36, in <module> from bb import data_smart File "/opt/bbhashserv/lib/bb/data_smart.py", line 23, in <module> import bb, bb.codeparser File "/opt/bbhashserv/lib/bb/codeparser.py", line 26, in <module> import codegen ModuleNotFoundError: No module named 'codegen' Traceback (most recent call last): File "/opt/bbhashserv/bin/bitbake-hashserv", line 61, in <module> ret = main() File "/opt/bbhashserv/bin/bitbake-hashserv", line 54, in main server = hashserv.create_server(args.bind, args.database, upstream=args.upstream, read_only=args.read_only) File "/opt/bbhashserv/lib/hashserv/__init__.py", line 120, in create_server from . import server File "/opt/bbhashserv/lib/hashserv/server.py", line 14, in <module> import bb.asyncrpc File "/opt/bbhashserv/lib/bb/__init__.py", line 128, in <module> from bb import fetch2 as fetch File "/opt/bbhashserv/lib/bb/fetch2/__init__.py", line 1930, in <module> from . import git File "/opt/bbhashserv/lib/bb/fetch2/git.py", line 70, in <module> import bb.progress File "/opt/bbhashserv/lib/bb/progress.py", line 14, in <module> import bb.build File "/opt/bbhashserv/lib/bb/build.py", line 27, in <module> from bb import data, event, utils File "/opt/bbhashserv/lib/bb/data.py", line 36, in <module> from bb import data_smart File "/opt/bbhashserv/lib/bb/data_smart.py", line 23, in <module> import bb, bb.codeparser File "/opt/bbhashserv/lib/bb/codeparser.py", line 32, in <module> from bb.pysh import pyshyacc, pyshlex File "/opt/bbhashserv/lib/bb/pysh/pyshyacc.py", line 13, in <module> import bb.pysh.pyshlex as pyshlex File "/opt/bbhashserv/lib/bb/pysh/pyshlex.py", line 17, in <module> from ply import lex ModuleNotFoundError: No module named 'ply' Traceback (most recent call last): File "/opt/bbhashserv/bin/bitbake-hashserv", line 61, in <module> ret = main() File "/opt/bbhashserv/bin/bitbake-hashserv", line 54, in main server = hashserv.create_server(args.bind, args.database, upstream=args.upstream, read_only=args.read_only) File "/opt/bbhashserv/lib/hashserv/__init__.py", line 120, in create_server from . import server File "/opt/bbhashserv/lib/hashserv/server.py", line 14, in <module> import bb.asyncrpc File "/opt/bbhashserv/lib/bb/__init__.py", line 128, in <module> from bb import fetch2 as fetch File "/opt/bbhashserv/lib/bb/fetch2/__init__.py", line 1935, in <module> from . import wget File "/opt/bbhashserv/lib/bb/fetch2/wget.py", line 30, in <module> from bs4 import BeautifulSoup ModuleNotFoundError: No module named 'bs4' (Bitbake rev: 0bd637acfcba5a44230c291889d2a5ff571cb8c6) Signed-off-by: Daniel Gomez <daniel@qtec.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/cooker: Fix source revision handling with floating upstreamsRichard Purdie2022-02-175-3/+14
| | | | | | | | | | | | | | | | | | | | | | | | Where a git url uses a tag instead of a full source revision, breakage can currently occur in builds. Issues include: * the revision being looked up in multiple tasks (fetch and unpack) * the risk a different revision may be obtained in those tasks * that some tasks may not be allowed to access the network * that a revision may not be consistent throughout a given build * rerunning a specific task may given inconsistent results To fix this, stop the workers from cleaning out the source revision store. This should only be done in the cooker itself (based on current policy). Also, where the code "sees" an upstream access, mark the recipe as not to be cached. The reparse re-triggers the upstream lookup by the server. Add a test to ensure that if get_srcrev isn't called, the user is told they're using a configuration that is known to break. (Bitbake rev: 4b5eed1626709ef3dc06b32fd55d40a2a6edd179) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: tests/fetch: Add missing branch param for git urlsRichard Purdie2022-02-121-44/+44
| | | | | | | | | We started to require the branch parameter for git urls. This updates the tests to match and quieten some noise. (Bitbake rev: e5144887f2b6ae266f7b52151005619480e80ec6) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: npm: Put all downloaded files in the npm2 directoryPeter Kjellerstedt2022-02-053-5/+9
| | | | | | | | | | | | | Previously npm files that specify downloadfilename= in the SRC_URI would be downloaded to the root of ${DL_DIR} rather than in the ${DL_DIR}/npm2 directory where all other npm files are downloaded. This should make it simpler when setting up and configuring a premirror with the downloaded npm packages. (Bitbake rev: 73fa376d6502ab6f2cccfb25a1193d9b1c3c3bc8) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: Correct handling of replacing the basename in URIsPeter Kjellerstedt2022-02-052-22/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The solution implementated in commit 96c30007 (fetch2: fix downloadfilename issue with premirror) missed two corner cases. The first is if the basename of the original URI also appears somewhere else in the replacement URI, in which case it would also be replaced. The second is if the basename of the original URI partially matches the basename of the replacement URI, in which case the inital part of the basename from the replacement URI would be left behind. The second case caused test_npm_premirrors_with_specified_filename to fail. The solution is to prefix the basename with a slash when matching to avoid partial matches, and only replace the basename at the end of the URI. This also adds two test cases that test for these problems. Before this they would give the following errors: - ['file:///mirror/example/1.0.0/some-example-1.0.0.tgz;downloadfilename=some-example-1.0.0.tgz'] + ['file:///mirror/some-example-1.0.0.tgz/1.0.0/some-example-1.0.0.tgz;downloadfilename=some-example-1.0.0.tgz'] ? +++++ ++++++++++ - ['file:///mirror/some-example-1.0.0.tgz;downloadfilename=some-example-1.0.0.tgz'] + ['file:///mirror/some-some-example-1.0.0.tgz;downloadfilename=some-example-1.0.0.tgz'] ? +++++ (Bitbake rev: 5924c6f007519cd8ea6cc8b316814d17b43048ca) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: tests/fetch: Make test_npm_premirrors work with the current fetcherPeter Kjellerstedt2022-02-051-5/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are two totally opposite use cases for how a premirror is expected to behave in combination with specifying a downloadfilename= parameter in the SRC_URI. On the one hand there is the expectation that it works like any other mirror, which means the premirror is expected to contain a file with the original name specified in the SRC_URI. On the other hand there is the expectation that one can use the artefacts downloaded by bitbake in ${DL_DIR} as a premirror, in which case it is expected to contain a file with the name from the downloadfilename= parameter. The latter case has been how downloaded files have been handled until commit 8a3ff9f3 (fetch2: fix premirror URI when downloadfilename defined), where the fetcher was changed to store files as per the first case. This is also when the test_npm_premirrors test case was modified in commit 5ba191a0 (tests/fetch: add and fix npm tests) to expect the first case. The above change was later reverted in commit 96c30007 (fetch2: fix downloadfilename issue with premirror). However the test_npm_premirrors test case was not updated to match, and has been failing ever since. This has probably gone unnoticed because the npm related test cases require that npm is installed on the host. This commit updates test_npm_premirrors to expect that premirrors use the filenames specified by downloadfilename= as this matches the current fetcher implementation and also is the most likely use case for premirrors. It also tries to mimic how one typically might setup the premirror directory by simply copying the download directory. (Bitbake rev: 9e913ade70474aaeb928814d4763e7105569d63a) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: tests/fetch: Only set the Git user name/email if they are not ↵Peter Kjellerstedt2022-02-051-18/+13
| | | | | | | | | | | already set If they are set, assume they are correct. (Bitbake rev: a3a3a40b96c29051d97d0c96eb01784cbd1f5420) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: tests/fetch: Unify how git commands are runPeter Kjellerstedt2022-02-051-46/+27
| | | | | | | | | | | | This unifies the three separate implementations of git() from GitMakeShallowTest, GitShallowTest and GitLfsTest into one implementation in FetcherTest. It also makes use of this in FetcherLocalTest and FetcherNetworkTest. (Bitbake rev: 8c8b418c3e6f8ab2535ad405e8006ee1012f3484) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: tests/fetch: Improve the verbose messages for skipped testsPeter Kjellerstedt2022-02-051-2/+2
| | | | | | | | | | | | | | | | | | | This changes: test_foo .. skipped 'Network tests being skipped' test_foo .. skipped 'npm not installed, tests being skipped' to: test_foo .. skipped 'network test' test_foo .. skipped 'npm not installed' to avoid double "skipped" in the output. (Bitbake rev: e551328a4595c220b94ab5002d978ddb4deeebcf) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: tests/fetch: Remove unnecessary \n from mirror variablesPeter Kjellerstedt2022-02-051-0/+2
| | | | | | | | | | | Since commit 044fb04d (fetch2: Allow whitespace only mirror entries) there is no need to separate the entries in mirror variables with "\n". (Bitbake rev: ed22b078aae25e804ca5edf062e2c905d3e49426) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: tests/fetch: Skip the crate tests if network tests are disabledPeter Kjellerstedt2022-02-051-23/+23
| | | | | | | | | Both test_crate_url and test_crate_url_multi require Internet access. (Bitbake rev: 34e9daed6a7f766bb6e27c7e02c94b545f4791d8) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake-user-manual: Remove unnecessary \n from a PREMIRRORS examplePeter Kjellerstedt2022-02-051-4/+4
| | | | | | | | | | Since commit 044fb04d (fetch2: Allow whitespace only mirror entries) there is no need to separate the entries in PREMIRRORS with "\n". (Bitbake rev: 341746c7f7b8e04d3fad51ec1b9e462ced355bfc) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: bitbake-worker: Preserve network non-local uidRobert Yang2022-02-012-2/+21
| | | | | | | | | | | | | | | | The NIS can't work when network is dissable, so preserve network for it, the error is like: do_ypcall: clnt_call: RPC: Unable to send; errno = Network is unreachable Note, enable nscd on the build machine might be a solution, but that isn't reliable since it depends on whether the network function has been cached or not. (Bitbake rev: 4eafae7904bae6e5c6bc50356e8a9077f2e207fa) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: Add crate fetcherRichard Purdie2022-01-193-0/+174
| | | | | | | | | This imports the crate fetcher from OE-Core to resolve various module issues and adds some very very basic tests of that new fetcher. (Bitbake rev: 1f06f326fa8b47e2a4dce756d57a9369a2225201) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: build: Tweak exception handling for setscene tasksRichard Purdie2022-01-191-5/+9
| | | | | | | | | | | | | | | If an unexpected exception occurs in a setscene task, it is currently hidden from the user and not recorded in any logs. This isn't helpful to debug such failures. Change the code so that even in the "silent" or "quiet" task case (setscene tasks), a warning is shown with the traceback unless it was an "handled" exception. This means the failing function can show it's own warning/error instead if it wants to and then raise a handled event. (Bitbake rev: 41dcdc61eb40def8c14a42e8d7bb9ce5a34afa57) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: doc: Drop BB_STAMP_POLICY/BB_STAMP_WHITELISTRichard Purdie2022-01-182-29/+0
| | | | | | | | These variables were removed from the codebase, update the docs to match. (Bitbake rev: 32180d5057c818a69987aada482e82acf3c72ef2) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: doc: bitbake-user-manual: expand BB_HASHSERVE explanationsMichael Opdenacker2022-01-181-1/+4
| | | | | | | (Bitbake rev: 143070a647b7db902a68d81f0b488e45e4d3f6bb) Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: doc: bitbake-user-manual: specify the URL to be used with SSH over ↵Quentin Schulz2022-01-171-0/+14
| | | | | | | | | | | | | | | | git is different from `git clone`'s The URL expected by git fetcher when the SSH protocol is used differs from the one given by Git servers to be used with the `git clone` command. Add a note making this specificity known to users. Cc: Quentin Schulz <foss+yocto@0leil.net> (Bitbake rev: 81c09d434aed13fcfc4ba426ae6a0b849447eb5f) Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: runqueue: Drop BB_STAMP_POLICY/BB_STAMP_WHITELISTRichard Purdie2022-01-121-22/+1
| | | | | | | | | | | | The different stamp policies were poor versions of the siggen code and task hashes, predating it and being used by packaged staging. They had many limitations, hence their replacement. I'm not aware of any users of that code any more so I believe it and the assoicated stamp whitelist variable can simply be removed. (Bitbake rev: 98407efc8c670abd71d3fa88ec3776ee9b5c38f3) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake-worker: Add/support network task flagRichard Purdie2022-01-121-0/+8
| | | | | | | | | | | | | | | | This patch changes behaviour. After this change any task which does not have the network flag set will have networking disabled on systems that support that (kernel version dependent). Add a "network" task specific flag which then triggers networking to be enabled for this task, it is otherwise disabled. This needs to happen before we enter the fakeroot environment of the task due to the need for the real uid/gid which we save in the parent process. (Bitbake rev: 0746b6a2a32fec4c18bf1a52b1454ca4c04bf543) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: utils: Add disable_network functionRichard Purdie2022-01-121-0/+31
| | | | | | | | | | | | Add a function which uses the unshare glibc call to disable networking in the current process. This doesn't work on older distros/kernels but will on more recent ones so for now we simply ignore the cases we can't execute on. uid/gid can be passed in externally so this can work with pseudo/fakeroot contexts. (Bitbake rev: 9d6341df611a1725090444f6f8eb0244aed08213) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: utils: Update to use exec_module() instead of load_module()Richard Purdie2022-01-051-2/+5
| | | | | | | | | This is deprecated in python 3.12 and Fedora 35 is throwing warnings so move to the new functions. (Bitbake rev: 68a18fbcb5959e334cf307d7fa8dc63832edb942) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: tests/fetch: Drop gnu urls from wget connectivity testRichard Purdie2021-12-201-3/+0
| | | | | | | | | These urls are no longer adding much to the test coverage but the intermittent network issues connecting to them are painful. Drop the urls. (Bitbake rev: bdf5739c5d831dc97a7d81568f94a0953c71017f) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: doc: bitbake-user-manual: expand BB_HASHSERVE and document ↵Michael Opdenacker2021-12-201-2/+22
| | | | | | | | | BB_HASHSERVE_UPSTREAM (Bitbake rev: 23cb09108b3064e46e79f6644b802f3539069088) Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch: npm: Use temporary file for empty user configStefan Herbrechtsmeier2021-12-141-9/+5
| | | | | | | | | | | | Always use a temporary file for the user config 'NPM_CONFIG_USERCONFIG' because npm otherwise failed if configs and npmrc aren't set: double-loading config "/dev/null" as "global", previously loaded as "user" (Bitbake rev: 9f272ad7f76c1559e745e9af686d0a529f917659) Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch: npm: Quote destdir in run chmod commandStefan Herbrechtsmeier2021-12-141-1/+1
| | | | | | | | | | | Quote destdir in run chmod command to support special characters in package name and to avoid syntax error for packages like '@(._.)/execute'. (Bitbake rev: a701dfce3f0e74b4d7c687eeda83fe9c8e7240b1) Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: tests/runqueue: Improve lockfile handling raceRichard Purdie2021-12-141-2/+38
| | | | | | | | | | | | | | Internal bitbake shutdown timings must have changed recently as we're seeing race issues on the autobuilder around the removal of the bitbake.lock file. Improve the lockfile race code to cover bitbake's lockfile too and use it in all the tests. [YOCTO #14658] [YOCTO #14652] (Bitbake rev: bd1912bed64424f9fb28396b71bb49b6090ed087) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: process: Do not mix stderr with stdoutAnton Mikanovich2021-12-091-1/+1
| | | | | | | | | | We should not redirect stderr to stdout if we need to get separated stdout and stderr contents from Popen.communicate() later. (Bitbake rev: 1ecc1d9424877df89fcda2f23c306998998a65ff) Signed-off-by: Anton Mikanovich <amikan@ilbers.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch: add a test for version check where compression changesAlexander Kanavin2021-12-092-0/+65
| | | | | | | (Bitbake rev: b6f0c29346ad6463c0e521248633e71886bfb5dc) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: siggen: Ensure dumpsig output is deterministicRichard Purdie2021-12-091-8/+8
| | | | | | | | | Currently the console output for signature dumps e.g. with bitbake-dumpsig isn't deterministic. Add some sorting to improve that. (Bitbake rev: a663440b1623f97c9c169df5566e429fbc932a53) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/wget: do not hardcode tarball compressors in version checkAlexander Kanavin2021-12-081-1/+1
| | | | | | | (Bitbake rev: ba3aa8591327d43935f000c6884637997438ecb2) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/wget: add redirectauth parameterJustin Bronder2021-12-082-1/+16
| | | | | | | | | | | | | | | | | | | | Add a parameter that limits sending Basic authentication in the Authorization header to only the first host and not any that we're redirected to. Ignoring potential security concerns, temporary AWS URLs will reject any request that includes authentication details in both the query parameters (from the redirect) and in the Authorization header. Temporary AWS URLs are now being used for release assets from private Github repositories. According to the previous discussion linked below, they're also in use by bitbucket. See also: https://lore.kernel.org/bitbake-devel/CAC9ffDEuZL-k8199bUyN+8frjw6bg-g=vrumxxtvt+RVParQ8Q@mail.gmail.com/ (Bitbake rev: a6ab32013a4381a1b694ed46caf2c9da932644d0) Signed-off-by: Justin Bronder <jsbronder@cold-front.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: test/fetch: Add striplevel unpack parameter testStefan Herbrechtsmeier2021-11-261-0/+15
| | | | | | | (Bitbake rev: 7e1ca7ab50e3c6b642c3c11504c7c8f52cfa4528) Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake-user-manual: Add striplevel unpack parameterStefan Herbrechtsmeier2021-11-261-0/+3
| | | | | | | (Bitbake rev: f0442a30d3a8459195dbf51a778ffb6150688a0a) Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: Add striplevel support to unpackStefan Herbrechtsmeier2021-11-261-0/+2
| | | | | | | | | | | | | | | | | | | | Add a parameter `striplevel` to the SRC_URI to strip NUMBER leading components (levels) from file names on extraction. For example, if the archive `archive.tar.gz` contains `some/file`, the SRC_URI `https://.../archive.tar.gz;subdir=other;striplevel=1` will extract `some/file` to `other/file`. This is useful to extract archives to a specified directory instead of the original root component of the archive. The feature is required for the npm support. The npm package contents should reside in a subfolder inside a npm archive (usually it is called package/). npm strips one directory layer when installing the package. (Bitbake rev: aa4926e5d9c92f33b4434e2da709ff0bf3049f5b) Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: Unify tar command in unpackStefan Herbrechtsmeier2021-11-261-8/+9
| | | | | | | | | | | The tar command and its arguments are repeated for many archive types in the unpack function. Unify the common parts in a variable to prepare further extension. (Bitbake rev: a08e57c9eaec1d9740a96149bf4843e576da4e5c) Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: data_smart.py: Skip old override syntax checking for anonymous ↵Robert Yang2021-11-261-1/+1
| | | | | | | | | | | | | | | | | | | | | functions Fixed when oe-core's path contians append/prepend/remove, e.g.: /path/to/append_test/oe-core/ Initial a build in any build dirs: $ bitbake -p ERROR: Variable __anon_32__buildarea2_xhou_builds_append_test_layers_oe_core_meta_classes_patch_bbclass contains an operation using the old override syntax. Please convert this layer/metadata before attempting to use with a newer bitbake. The anonymous fuctions has no names, so skip checking for it to fix the issue. (Bitbake rev: ebd00330c41c75797529ff38d6a0955b93f05d1b) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake-user-manual: SRC_URI: mention gitsm fetcherMichael Opdenacker2021-11-251-0/+3
| | | | | | | (Bitbake rev: 0d0e552d87c52c1f90b601698c3d54eec427ee21) Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake-user-manual: fix backslash issuesMichael Opdenacker2021-11-211-5/+5
| | | | | | | (Bitbake rev: ffd87a89393f25924f53dbc86dcf5a98c3a8d0ff) Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake-user-manual: Remove newline string in MIRRORS/PREMIRRORSRichard Purdie2021-11-211-10/+10
| | | | | | | | This syntax is obsolete, update to the correct modern version. (Bitbake rev: 744e9a4c2b6f44116435feb62ac64ff256c752e9) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake-user-manual: add missing referenceMichael Opdenacker2021-11-211-1/+1
| | | | | | | (Bitbake rev: d05529cc322ba9198edc12954b982729fc628fa0) Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake-user-manual: fix typoMichael Opdenacker2021-11-211-1/+1
| | | | | | | (Bitbake rev: 3ebaba2b2eada35e26c1105291de0d85bd6d2bb8) Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake-user-manual: quoting fixesMichael Opdenacker2021-11-212-3/+3
| | | | | | | (Bitbake rev: 0ac887253e6b2df187bcbac0b060dd39920538af) Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: Fix url remap issue and add testcaseRichard Purdie2021-11-212-1/+2
| | | | | | | | | | Using "" as a target for .replace() is a really bad idea as it duplicates the replacement for every character in the string. Add a testcase which triggered this and correct the code to return the correct result. (Bitbake rev: 3af1ecf049d2eed56f6d319dc7df6eb4a3d4eebc) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>