summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2019-11-23tests/fetch: add test for fetching shallow revsChristopher Larson
[YOCTO #13586] Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2019-11-23fetch2/git: fetch shallow revs when neededChristopher Larson
When bitbake determines if a git clone needs updating, it only checks for the needed srcrevs, not the revs listed in BB_GIT_SHALLOW_REVS, which will fail if using shallow and the needed rev was added to the upstream git repo after a previous fetch. Ensure that we also check for shallow revs. [YOCTO #13586] Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2019-11-13fetch2: Ensure cached url data is matched to a datastoreRichard Purdie
There was a weird error in OE-Core where "devtool modify virtual/kernel" was showing basehash mismatch errors. This was due to SRCPV sometimes being: AUTOINC+b867b78b50_47b80ef7bd and sometimes AUTOINC+b867b78b50_255a750d28. The latter hash comes from KBRANCH and meant sometimes the correct branch was seen, sometimes it was not. The issue was complicated by the execution using a remote datastore over tinfoil. The problem turns out to be a fetcher caching error. If the datastore changes, the cached url data may not be valid. We therefore ensure we match cached url data against the datastore that generated it, which appears to fix this issue. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-07bitbake-worker child process create group before registering SIGTERM handlerIvan Efimov
The bitbake-worker child on the SIGTERM signal handling send the SIGTERM to all processes in it's process group. In cases when the bitbake-worker child got SIGTERM after registering own SIGTERM handler and before the os.setsid() call it can send SIGTERM to unwanted processes. In the worst case during SIGTERM processing the bitbake-worker child can be in the group of the process that started BitBake itself. As a result it can kill processes that not related to BitBake at all. Signed-off-by: Ivan Efimov <i.efimov@inango-systems.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-09bitbake: Update to version 1.44.0yocto-3.02019-10-zeus1.44.0Richard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-09bitbake-user-manual: Update multiconfig syntax and explanation of BBMULTICONFIGAlejandro Enedino Hernandez Samaniego
The syntax to use multiconfig builds changed from multiconfig:foo:target to mc:foo:target, change the syntax on bitbakes documentation. Clarify that BBMULTICONFIG defines additional configurations along with the one coming from local.conf. Signed-off-by: Alejandro Enedino Hernandez Samaniego <aehs29@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-08toaster: Enable Zeus branch in place of ThudDavid Reyna
Toaster directly supports the last two stable branches of Yocto Project. With "Zeus" being released, it is time to replace "Thud". [YOCTO #13579] Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-02bitbake: Bump verison 1.43.1 -> 1.43.21.43.2Richard Purdie
This allows metadata to depend on SignatureGeneratorUniHashMixIn which was recently added. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-02toaster: improve warnings when adding dependency to packagesDavid Reyna
Some of the objects that bitbake reports to Toaster as dependencies to packages are known objects that are not packages, for example library files and kernel modules. In the Toaster logs, mark these as "Info" instead of "Warning". [YOCTO #13386] Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-02toaster: issues in import layer when clicking 'add layer'David Reyna
There were three issues in this one bug. 1) The Add Layer button allows empty layers 2) The internal XHR URL was wrong, which caused a hidden AJAX error and did not correctly complete the action nor disable the button after an add. 3) There was a race condition between typing in the dependent layer select text box (which would normally disable the add button), and the typeahead pull-down selection (which would normally enable the add button). This forced the user to select the typedahead layer twice. [YOCTO #13385] Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-02tests/runqueue: Fix hashserve shutdown raceRichard Purdie
The hashserve can delete its socket whilst the cleanup us happening leading to backtraces and test failures. Add code to avoid this race condition. [YOCTO #13542] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-27siggen: Remove full path from unitaskhashes keysRichard Purdie
The full paths make the cache useless in the sdk. They also bloat the cache size. They're for human debugging benefit only so compromise and reduce this to the filename. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-27runqueue: Small performance optimisationRichard Purdie
A minor performance optmisation to keep lists smaller when running large builds. We can do this since once a task has been built, we don't need to worry about it. This improves a major bottleneck that shows up on performance profile charts in dryruns. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-27runqueue: Save unihashes more frequentlyRichard Purdie
There are some runqueue code paths where the unihash cache would not be saved where for example only parsing or an occurred. Save the cache at the end of runqueue generation to ensure entries are cached. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-27siggen: Avoid writing misleading sigdata filesRichard Purdie
Use the unihash in the output filename of sigdata files else the contents of stamp directories is misleading. Write the unihash into the singature to make it clear what happened. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-27siggen/runqueue: Fix signature mismatch issuesRichard Purdie
We need to set the setscene tasklist before we call into the taskhash/unihash code else the behaviour is inconsistent. Avoid reporting hashes for non setscene tasks since we'd never query that. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-27runqueue: Change task migration behaviour for rerunning setscene tasksRichard Purdie
Currently runqueue will rerun setscene tasks multiple times as hashes change. This has caused numerous problems since a setscene task may become "unavailable" for some future signature combination and the code then can't easily "unskip" tasks its already passed into the execution queue. At least for now, only run setscene once and assume they're equivalent at that point. In practise that has been much more stable in testing. Tweak the test to match the change in behaviour. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-27siggen: Ensure setscenetasks list is available to worker contextRichard Purdie
The setscenetasks list needs to be available in the worker contexts else the signature behaviour there mismatches what the server does. Add the data to get/set_taskdata to ensure this happens. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-27runqueue: Fix task migration problemsRichard Purdie
Tasks were not migrating consistently, particularly: * if a task was rehashed which had already run * if a task which was valid became invalid due to a rehash We need to always run the migration code for rehashed tasks and then reprocess them for hash validity. This means rearranging the code. It also means several tests are no longer correct and can't be written correctly to work on all possible workflows so those are removed. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-27hashserv: Don't daemonize server processJoshua Watt
The hash server process is terminated and waited on with join(), so it should not be a daemon. Daemonizing it cause races with the server cleanup, especially in the selftest because the process may not have terminated and cleanup up its socket before the test cleanup runs and tries to do it. [YOCTO #13542] Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-27siggen: Fix attribute error when hashserver failsJoshua Watt
The HashConnectionError class was moved to the client module and needs to be updated. [YOCTO #13537] Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-27hashserve: Add missing importJoshua Watt
The os module is required to connect to a unix domain socket Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-27cookerdata: Add mc conffiles hashes to cache hashJoshua Watt
The variable values that result from parsing multiconfig should be included in the cooker data hash, otherwise changes to these files won't be detected, which will allow the parsing cache to be loaded with the old values for the multiconfigs. This can either manifest as the variable values simply not updating, or getting basehash changed errors when building. This bug was previously undetected because all of the multiconfig base files were a direct file dependency in all parsed recipes. This was fixed in 34137a00f60 ("bitbake: bitbake: cooker: Rename __depends in all multiconfigs"), exposing this bug. [YOCTO #13541] Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-27tests/data: Test combinations of _append together with overrideJacob Kroon
Signed-off-by: Jacob Kroon <jacob.kroon@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-27tests/fetch: add test case for git-lfs handlingRoss Burton
Add a test case to exercise the detection of git-lfs repositories and the behaviour of the lfs parameter. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-27fetch2/git: refactor check for git-lfs commandRoss Burton
Refactor the git-lfs checking: this means both clearer code in the download() function and allows unit testing to monkeypatch the functionality. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-19utils: Add ionice option to prunedirRichard Purdie
Autobuilder type infrastructure can benefit from deletion of certain files as background IO due to the way Linux filesystem priority works. We have problems where build directories as part of oe-selftest being delete starves the running tasks of IO to the point builds take much longer to compelte. Having this option of running the deletion at "idle" helps a lot with that. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-19runqueue: validate_hashes(): currentcount should be a numberRobert Yang
According to sstate_checkhashes which is defined in sstate.bbclass, the currentcoun should be a number (0, not None). Fixed: $ bitbake base-files -Sprintdiff > bb.plain("Sstate summary: Wanted %d Found %d Missed %d Current %d (%d%% match, %d%% complete)" % (total, len(found), len(missed), currentcount, match, complete)) TypeError: %d format: a number is required, not NoneType Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-19fetch2/git: add git-lfs toggle optionRoss Burton
Add a new 'lfs' option to the git fetcher so that we can optionally not fetch git-lfs content, for repositories that contain LFS data that we don't actually need for building. By default lfs is set to 1, so if the repository has LFS content then git-lfs is required. Setting lfs to 0 will mean that git-lfs won't be required to fetch, and some files will be missing. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-19bitbake-layers: show-recipes: Enable bare outputYeoh Ee Peng
Currently, show-recipes will append "(skipped)" marker to recipes which were skipped due these recipes does not satisfied the configurations. Example: $ bitbake-layers show-recipes -r ace backport-iwlwifi core-image-rt (skipped) core-image-rt-sdk (skipped) core-image-tiny Add -b/--bare to enable output names without "(skipped)" marker. Example: $ bitbake-layers show-recipes -r -b ace backport-iwlwifi core-image-rt core-image-rt-sdk core-image-tiny Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-19bitbake-layers: show-recipes: Select recipes from selected layerYeoh Ee Peng
Currently, show-recipes will show recipes from all configured layers. Assume, meta-intel layer was added to conf/bblayers.conf. Example of default $ bitbake-layers show-recipes: core-image-rt: meta-intel unknown (skipped) meta unknown (skipped) Add -l/--layer to enable showing recipes from user selected layer. Example: $ bitbake-layers show-recipes -l meta-intel core-image-rt: meta-intel unknown (skipped) Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-19bitbake-layers: show-recipes: Show recipes onlyYeoh Ee Peng
Currently, show-recipes will show all recipes available (both recipes with different version and recipes provided by more than one layer). Example of default $ bitbake-layers show-recipes: core-image-rt: meta-intel unknown (skipped) meta unknown (skipped) yajl: meta-oe 2.1.0 meta-oe 1.0.12 Add -r/--recipes-only to enable showing recipes only. This provide a focus view on unique recipes available. Example of $ bitbake-layers show-recipes -r: core-image-rt (skipped) yajl Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-18svn fetcher: allow "svn propget svn:externals" to failMikko Rapeli
Not all servers and repositories have this property set which results in failures like this when actual svn checkout command succeeded: svn: warning: W200017: Property 'svn:externals' not found on '' svn: E200000: A problem occurred; see other errors for details Signed-off-by: Mikko Rapeli <mikko.rapeli@bmw.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-18bitbake: Rework hash equivalenceJoshua Watt
Reworks the hash equivalence server to address performance issues that were encountered with the REST mechanism used previously, particularly during the heavy request load encountered during signature generation. Notable changes are: 1) The server protocol is no longer HTTP based. Instead, it uses a simpler JSON over a streaming protocol link. This protocol has much lower overhead than HTTP since it eliminates the HTTP headers. 2) The hash equivalence server can either bind to a TCP port, or a Unix domain socket. Unix domain sockets are more efficient for local communication, and so are preferred if the user enables hash equivalence only for the local build. The arguments to the 'bitbake-hashserve' command have been updated accordingly. 3) The value to which BB_HASHSERVE should be set to enable a local hash equivalence server is changed to "auto" instead of "localhost:0". The latter didn't make sense when the local server was using a Unix domain socket. 4) Clients are expected to keep a persistent connection to the server instead of creating a new connection each time a request is made for optimal performance. 5) Most of the client logic has been moved to the hashserve module in bitbake. This makes it easier to share the client code. 6) A new bitbake command has been added called 'bitbake-hashclient'. This command can be used to query a hash equivalence server, including fetching the statistics and running a performance stress test. 7) The table indexes in the SQLite database have been updated to optimize hash lookups. This change is backward compatible, as the database will delete the old indexes first if they exist. 8) The server has been reworked to use python async to maximize performance with persistently connected clients. This requires Python 3.5 or later. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-16runqueue/siggen: Optimise hash equiv queriesRichard Purdie
We only have hash equivalence for setscene tasks so only query the server for those, reducing the number of connections needed. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-16Revert "bitbake: cooker: Ensure bbappends are found in stable order"Martin Jansa
This reverts commit 94c0c7f15c7a6244a8576ed948ffc21afb96ba82. This ignores the layer priority, making the issue much worse. E.g. I'm seeing a lot of failures caused by missing users, because base-passwd bbappends applied in unexpected order caused different passwd.master to be found in re-ordered FILESPATH. Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-10bitbake-user-manual: key-expansion: Don't refer to overridesJacob Kroon
Nowadays bitbake applies overrides dynamically, not at a single specific point in time during parsing. Signed-off-by: Jacob Kroon <jacob.kroon@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-10bitbake-user-manual: Correct description for _append/_prepend/_removeJacob Kroon
The effects of _append/_prepend/_remove are applied when a variable is expanded, not after parsing has completed. Signed-off-by: Jacob Kroon <jacob.kroon@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-07bitbake-user-manual: Improve the example for Removal (Override Style Syntax)Martin Jansa
* to better show how it works with spaces and multiple values Signed-off-by: Herb Kuta <herb.kuta@lge.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-07bitbake: cooker: Ensure bbappends are found in stable orderWes Lindauer
Thanks to wildcards in bbappend filenames, it's possible to have multiple bbappends that apply to the same recipe in the same directory. In order to get sstate hits between different workspaces, we want to apply those bbappend files in a consistent order. Since readdir() returns files in a non-deterministic order between workspaces (based on inode number and/or time of creation), we'll need to sort its result in order to have any consistency. Signed-off-by: Wes Lindauer <wesley.lindauer@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-03fetch2: show warning when renaming the archive with bad checksum failedMartin Jansa
* noticed on read-only sshfs premirror * it was showing the warning about renaming the file: WARNING: laser-geometry-1.6.4-r0 do_fetch: Renaming /jenkins/mjansa/sshfs/webos-ose-thud/downloads/laser_geometry-1.6.4.tar.gz to /jenkins/mjansa/sshfs/webos-ose-thud/downloads/laser_geometry-1.6.4.tar.gz_bad-checksum_1ee7479b8c5914b4ffae996945121441 and then failed because of movefile() issue with python3 (fixed in previous commit): ERROR: laser-geometry-1.6.4-r0 do_fetch: Error executing a python function in exec_python_func() autogenerated: with movefile() fixed, it let do_fetch continue and re-fetch locally with the right checksum, but still the renamed file didn't exist, because of movefile failure - add another warning when the movefile fails - for whatever reason - unfortunately movefile prints error messages with just print() so the real error is hidden only in log.do_fetch in this case: movefile: Failed to move /jenkins/mjansa/sshfs/webos-ose-thud/downloads/laser_geometry-1.6.4.tar.gz to /jenkins/mjansa/sshfs/webos-ose-thud/downloads/laser_geometry-1.6.4.tar.gz_bad-checksum_1ee7479b8c5914b4ffae996945121441 [Errno 30] Read-only file system: '/jenkins/mjansa/sshfs/webos-ose-thud/downloads/laser_geometry-1.6.4.tar.gz' -> '/jenkins/mjansa/sshfs/webos-ose-thud/downloads/laser_geometry-1.6.4.tar.gz_bad-checksum_1ee7479b8c5914b4ffae996945121441' Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-03utils: Fix movefile() exception handling with python3Martin Jansa
* with python3 this fails with: File: 'bitbake/lib/bb/utils.py', lineno: 799, function: movefile 0795: try: 0796: os.rename(src, destpath) 0797: renamefailed = 0 0798: except Exception as e: *** 0799: if e[0] != errno.EXDEV: 0800: # Some random error. 0801: print("movefile: Failed to move", src, "to", dest, e) 0802: return None 0803: # Invalid cross-device-link 'bind' mounted or actually Cross-Device Exception: TypeError: 'OSError' object is not subscriptable Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-01tests/fetch: Resolve fetch error in bitbake-selftestArmin Kuster
FAIL: test_wget_latest_versionstring (bb.tests.fetch.FetchLatestVersionTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/pokybuild/yocto-worker/oe-selftest/build/bitbake/lib/bb/tests/fetch.py", line 1229, in test_wget_latest_versionstring self.assertTrue(verstring, msg="Could not find upstream version for %s" % k[0]) AssertionError: '' is not true : Could not find upstream version for db [YOCTO #13496] The Oracle UPSTREAM_CHECK_URI used changed and does not work with logic in wget. Update UPSTREAM_CHECK_URI and UPSTREAM_CHECK_REGEX to match the ones used in the recipe. Also change the version being checked. Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-28cooker.py: remove generation of recipe-depends.dotChen Qi
The information of recipe-depends.dot is misleading. e.g. $ grep xz recipe-depends.dot | grep bzip2 "bzip2" -> "xz" "xz" -> "bzip2" Users would wonder why they get some circular dependency. The information is derived from removing the task names of task-depends.dot. It's not giving people any additonal information, and it's misleading. So we remove the generation of this file. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-28bitbake: respect force flag in runall and runonlyJoshua Watt
Specifying the force flag will now cause runall and runonly to invalidate the tasks before running them. This allows a --runall or --runonly to force the tasks to run, even if they would have otherwise been skipped, e.g.: bitbake -f --runall fetch Will run all do_fetch tasks even if they wouldn't be necessary (for example, skipped by setscene) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-21runqueue: Optimise build_taskdepdata slightlyRichard Purdie
Rather than repeatedly calling mc_from_tid() do this in the parent, removing around a million function calls. Takes time spent in this function from 40s to 36s. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-21runqueue: Further optimise holdoff tasksRichard Purdie
There are other data structures which can be reprocessed at the same time as holdoff_tasks, further improving build efficiency in various places. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-21runqueue: Optimise holdoff task handlingRichard Purdie
We don't need to process the holdoff task list until we're executing tasks which saves some data manipulation, at the cost of some data structures not being correct at all times. This saves significant amounts of time in various profile charts of larger builds. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-21runqueue: Small but critical fixRichard Purdie
We've observed do_package and do_package_setscene running in parallel. The reason is that holdoff_tasks wasn't getting updated. Looking at the code, it would seem the reason is that the task was in pending_migrations and hence changed wasn't set and holdoff_tasks wasn't updated. Fix this. It only affects builds with rehashing enabled. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-21cookerdata: Delay the setup of the siggen slightly to allow metadata defined ↵Richard Purdie
siggens If we define a metadata siggen it can fail due to the early init here. Move slightly later to avoid those failures which allows fixes in OE to the check-layer script related to the hash equiv siggen. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>