summaryrefslogtreecommitdiffstats
path: root/bin
AgeCommit message (Collapse)Author
2021-05-04bitbake-server: ensure server timeout is a floatRoss Burton
bitbake-server is spawned by process.py and passes the arguments it is given to ProcessServer. There's some type confusion here: bitbake-server is called with a string representation of the timeout, which may be None. If the timeout is not set, pass 0 instead of None. Inside bitbake-server a ProcessServer is created which expects the timeout to be a float not a string, so always float() the value. [ YOCTO #14350 ] Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit c93ae1f861208f6d39fd15c84fbcd0e2b54331f5) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-10-19bitbake: Bump version to 1.48.0 ready for the new releaseRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-24Revert "bitbake-layers: add signal hander to avoid exception"Richard Purdie
This reverts commit 4fca9a07f2d6b0544977112672b786982d7bb8f2. The default python handler is to ignore SIGPIPE errors yet by adding this line, we see: 2020-09-23 22:10:20,325 - oe-selftest - INFO - recipetool.RecipetoolTests.test_recipetool_appendfile_subdir (subunit.RemotedTestCase) 2020-09-23 22:10:20,325 - oe-selftest - INFO - ... FAIL 2020-09-23 22:10:20,325 - oe-selftest - INFO - 11: 30/44 227/415 (14.85s) (recipetool.RecipetoolTests.test_recipetool_appendfile_subdir) 2020-09-23 22:10:20,325 - oe-selftest - INFO - testtools.testresult.real._StringException: Traceback (most recent call last): File "/home/pokybuild/yocto-worker/oe-selftest-ubuntu/build/meta/lib/oeqa/selftest/cases/recipetool.py", line 226, in test_recipetool_appendfile_subdir _, output = self._try_recipetool_appendfile('selftest-recipetool-appendfile', '/usr/share/selftest-replaceme-subdir', self.testfile, '', expectedlines, ['testfile']) File "/home/pokybuild/yocto-worker/oe-selftest-ubuntu/build/meta/lib/oeqa/selftest/cases/recipetool.py", line 85, in _try_recipetool_appendfile return self._try_recipetool_appendcmd(cmd, testrecipe, expectedfiles, expectedlines) File "/home/pokybuild/yocto-worker/oe-selftest-ubuntu/build/meta/lib/oeqa/selftest/cases/recipetool.py", line 49, in _try_recipetool_appendcmd bbappendfile = self._check_bbappend(testrecipe, recipefile, self.templayerdir) File "/home/pokybuild/yocto-worker/oe-selftest-ubuntu/build/meta/lib/oeqa/selftest/cases/devtool.py", line 186, in _check_bbappend result = runCmd('bitbake-layers show-appends', cwd=self.builddir) File "/home/pokybuild/yocto-worker/oe-selftest-ubuntu/build/meta/lib/oeqa/utils/commands.py", line 201, in runCmd raise AssertionError("Command '%s' returned non-zero exit status %d:\n%s" % (command, result.status, exc_output)) AssertionError: Command 'bitbake-layers show-appends' returned non-zero exit status 141: NOTE: Reconnecting to bitbake server... where status 141 is SIGPIPE. We expect SIGPIPE not to be raised like this. I tried the commands in the original commit to pipe through less with the change reverted and I don't see the error shown. I therefore believe this is safe to revert. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-23bitbake: tests/siggen: introduce clean_basepath testcasesJean-Francois Dagenais
While discussing with Richard we thought these might help document and safeguard the basic requirements of clean_basepath. A 'bonus' performance testcase is added but commented out since its runtime is long and test machine specific. It is intended for developers to test before and after their changes to the target function as a due diligence verification. Signed-off-by: Jean-Francois Dagenais <jeff.dagenais@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-25server/process: Add bitbake-server and exec() a new server processRichard Purdie
Trying to have a new python process forked off an original doesn't work out well and ends up having race issues. To avoid this, exec() a new bitbake server process. This starts with a fresh python interpreter and resolves various atexit and other multiprocessing issues once and for all. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-24build/msg: Cleanup verbose option handlingRichard Purdie
The levels of indirection to set these verbose logging options is rather crazy. This attempts to turn things into two specific options with much more specific meanings. For now its all still controlled by the commandline verbose option and should funciton as previously, with the addition that the BB_VERBOSE_LOGS option can now be task specific. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-07tests/color: add test suite for ANSI color code filteringChris Laplante
Includes tests for bb.progress integration. Signed-off-by: Chris Laplante <chris.laplante@agilent.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-06-16bin/bitbake: Update to next series release versionRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-05-02bitdoc: Remove itRichard Purdie
This script took a documentation.conf and generated an HTML index of each of the variables. The data in the yocto-docs manuals is now far superior to this. The script has bitrotted and doesn't run, hasn't for some time and wasn't reported until recently. Easiest is just to remove it as anyone would reimplement it quite differently now. The referenced bug does have a patch which cleans up the code but I don't see value in keeping this around. [YOCTO #13881] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-04-06bitbake: Update to version 1.46Richard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-03-29toaster: support environment-safe manage commandsReyna, David
Directly support the various 'manage' commands from the Toaster executable, so that users do not have to manually set up the required environment and paths. Examples: $ . toaster manage createsuperuser $ . toaster manage lsupdates [YOCTO #13170] Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-03-12bitbake-worker: Remove unnecessary addDefaultLogFilterJoshua Watt
Adding the default log filter here is unnecessary because there are no defined logging domains when it is called, which means it does no actual filtering. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-03-12lib/bb/msg: Use log level instead of debug countJoshua Watt
Passes around the actual logging level as the default log level variable instead of the debug count. This makes it easier to deal with logging levels since the conversion from debug count and verbose flag only has to occur once when logging is initialized and after that actual log levels can be used Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-12-30bitbake-layers: Keep loglevel in colored loggerOla x Nilsson
Signed-off-by: Ola x Nilsson <olani@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-06bitbake-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-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-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-08-06bitbake: Bump version to 1.43.1 for API changes1.43.1Richard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-06cooker/hashserv: Allow autostarting of a local hash server using BB_HASHSERVERichard Purdie
Its useful, particularly in the local developer model of usage, for bitbake to start and stop a hash equivalence server on local port, rather than relying on one being started by the user before the build. The new BB_HASHSERVE variable supports this. The database handling is moved internally into the hashserv code so that different threads/processes can be used for the server without errors. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-06runqueue: Enable dynamic task adjustment to hash equivalencyRichard Purdie
There is a compelling usecase for tasks being able to notify runqueue that their "unihash" has changed. When this is recieved, the hashes of all subsequent tasks should be recomputed and their new hashes checked against existing setscene validity. Any newly available setscene tasks should then be executed. Making this work effectively needs several pieces. An event is added which the cooker listen for. If a new hash becomes available it can send an event to notify of this. When such an event is seen, hash recomputations are made. A setscene task can't be run until all the tasks it "covers" are stopped. The notion of "holdoff" tasks is therefore added, these are removed from the buildable list with the assumption that some setscene task will run and cover them. The workers need to be notified when taskhashes change to update their own internal siggen data stores. A new worker command is added to do this which will affect all newly spawned worker processes from that worker. An example workflow which tests this code is: Configuration: BB_SIGNATURE_HANDLER = "OEEquivHash" SSTATE_HASHEQUIV_SERVER = "http://localhost:8686" $ bitbake-hashserv & $ bitbake automake-native $ bitbake autoconf-native automake-native -c clean $ bitbake m4-native -c install -f $ bitbake automake-native with the test being whether automake-native is installed from sstate. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-07-15tests: Add initial scenario based test for runqueueRichard Purdie
We need some tests for runqueue, its been something which has been hard to test for a long time. Add some dummy metadata to allow this, mirroring the OE structure in spirit. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-04bitbake: Strip old editor directives from file headersRichard Purdie
There are much better ways to handle this and most editors shouldn't need this in modern times, drop the noise from the files. Its not consitently applied anyway. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-04bitbake: Drop duplicate license boilerplace textRichard Purdie
With the introduction of SPDX-License-Identifier headers, we don't need a ton of header boilerplate in every file. Simplify the files and rely on the top level for the full licence text. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-04bitbake: Add initial pass of SPDX license headers to source codeRichard Purdie
This adds the SPDX-License-Identifier license headers to the majority of our source files to make it clearer exactly which license files are under. The bulk of the files are under GPL v2.0 with one found to be under V2.0 or later, some under MIT and some have dual license. There are some files which are potentially harder to classify where we've imported upstream code and those can be handled specifically in later commits. The COPYING file is replaced with LICENSE.X files which contain the full license texts. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-23bitbake-diffsigs: Use 4 spaces as indent for recursecbRobert Yang
It used 2 spaces as indent which wasn't clear enough, and might cause confusions, people might think it was in wrong format. Fixed: $ bitbake bc-native -ccleansstate -Snone $ bitbake bc-native -ccleansstate -Snone $ bitbake-diffsigs tmp/stamps/x86_64-linux/bc-native/1.07.1-r0.do_cleansstate.sigdata.* * Before: Hash for dependent task bc/bc_1.07.1.bb.do_clean:virtual:native changed from [foo] Taint (by forced/invalidated task) changed from [foo] Taint (by forced/invalidated task) changed from [foo] * Now Hash for dependent task bc/bc_1.07.1.bb.do_clean:virtual:native changed from [foo] Taint (by forced/invalidated task) changed from [foo] Taint (by forced/invalidated task) changed from [foo] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-12bitbake: Post release version bumnp to 1.43Richard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-12bitbake: Update version to 1.42.0Richard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-01-08bitbake: hashserv: Add hash equivalence reference serverJoshua Watt
Implements a reference implementation of the hash equivalence server. This server has minimal dependencies (and no dependencies outside of the standard Python library), and implements the minimum required to be a conforming hash equivalence server. [YOCTO #13030] Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-01-03runqueue: Pass unique hash to taskJoshua Watt
The unique hash is now passed to the task in the BB_UNIHASH variable [YOCTO #13030] Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-01-03bitbake-diffsigs: Support recursive deps with signature filesPeter Kjellerstedt
Follow dependent hash changes recursively also when specifying two signature files explicitly. Previously this was only done when using the --task option. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-01-03bitbake-diffsigs: Merge with bitbake-dumpsigPeter Kjellerstedt
The functionalities of bitbake-diffsigs and bitbake-dumpsig are so similar that they can be merged into one. Add an option --dump to make bitbake-diffsigs dump the last signature data instead of comparing it. Keep bitbake-dumpsig as a symbolic link to bitbake-diffsigs. When it is called as bitbake-dumpsig, it behaves as if --dump was specified. Also make -D the short option for --debug again (the way it used to be, and still was for bitbake-dumpsig), so that -d can be used as the short option for --dump. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-26tests/persist_data: Add testsJoshua Watt
Adds a test suite for testing the persistent data cache [YOCTO #13030] Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-07bitbake-worker: Pass taskhash as runtask parameterJoshua Watt
Pass the task hash as a parameter to the 'runtask' message instead of passing the entire dictionary of hashes when the worker is setup. This is possible less efficient, but prevents the worker taskhashes from being out of sync with the runqueue in the event that the taskhashes in the runqueue change. [YOCTO #13030] Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-02bitbake: toaster: allow OE_ROOT to be provided through environmentAwais Belal
Updates for YOCTO #12891 allowed a user to have a directory structure different to that of yocto (bitbake isn't inside oe-core) whereas the definition of OE_ROOT in the main toaster binary still assumes the same while checking for .templateconf and hence we see an error on the cmdline in such cases: bash: <repo-path>/bitbake/bin/../../.templateconf: No such file or directory The change here now allows the user to provide OE_ROOT through the environment in such cases and otherwise defaults to the older mechanism to fix this issue. Signed-off-by: Awais Belal <awais_belal@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-20bitbake: Bump version to 1.40.0Richard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-09-04cooker.py: Fix incorrect bb files matched warningMark Hatle
In the case of a sublayer of an existing layer, where the sublayer and main layer share a path, the system may not match the paths properly resulting in: No bb files matched BBFILE_PATTERN_sublayer '^/path/main/sublayer' because it has already matched the main layer. Fix this issue by sorting the collection items based on the pattern, using longest to shortest. Obviously regex wildcards could still be an issue but these are typically not used, so this simply fix should work in the existing cases. Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-28toaster: allow TOASTER_DIR to be overridden from cmdlineAwais Belal
TOASTER_DIR is used for higher level toaster artifacts such the SQL DB and creating toaster internal build directories for projects. Prior to this change it was evaluated as `dirname $BUILDDIR` and user had no control over it. This change allows to override this variable from the command line for more flexibility. The variable defaults to its original setting if the optional argument is not passed. [YOCTO #12891] Signed-off-by: Awais Belal <awais_belal@mentor.com> Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-23bitbake: Bump version 1.39.0 -> 1.39.11.39.1Richard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-01layerindexlib: Initial layer index processing module implementationMark Hatle
The layer index module is expected to be used by various parts of the system in order to access a layerindex-web (such as layers.openembedded.org) and perform basic processing on the information, such as dependency scanning. Along with the layerindex implementation are associated tests. The tests properly honor BB_SKIP_NETTESTS='yes' to prevent test failures. Tests Implemented: - Branch, LayerItem, LayerBranch, LayerDependency, Recipe, Machine and Distro objects - LayerIndex setup using the layers.openembedded.org restapi - LayerIndex storing and retrieving from a file - LayerIndex verify dependency resolution ordering - LayerIndex setup using simulated cooker data Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-06-06bitbake: Update version to post release 1.39Richard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-03-28Toaster: fix shutdown and extra threadsDavid Reyna
Fix typo in shutdown code to kill threads when "kill -0" is not enough. Use the '--noreload' flag for 'runserver' so that there are no extra and unaccounted threads. [YOCTO #12555] Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-18toaster: add 'nobuild' option to ToasterDavid Reyna
Add a 'nobuild' option for starting Toaster without the project and hosted builds support. This allows a Toaster host to provide local build statistics without opening the host to external users building projects. [YOCTO #12315] Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-07bitbake: be more explicit when warning about locale choiceRoss Burton
Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-10-31bitbake: Update version to 1.37.0 for developmentKhem Raj
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-10-31bitbake: Update version to 1.36.0 for stable releaseKhem Raj
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-22Toaster: custom start and stop actionsDavid Reyna
Toaster needs the ability to allow custom extensions to execute when Toaster is started and stopped. Toaster will look for a custom extension script in the fixtures directory and execute any applicable hooks. [YOCTO #11938] Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-27bitbake-diffsigs: fix regression after recent server changesPaul Eggleton
We were bridging the gap between the server and UI here by calling a bb.siggen.find_siginfo, a function defined and set on that module from the metadata. This worked from the UI side before but since the recent server changes is no longer accessible. Create a new command so this can execute on the server side and return the result by way of a new event. (We're still running compare_sigfiles() on the signature generator but that isn't quite the same thing and does still work.) Fixes [YOCTO #11844]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21Update to version 1.35.0 (development version with server rework changes)Richard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21tinfoil: add a parse_recipes() functionPaul Eggleton
Python style recommends underscore based naming rather than camelCase, and thus the former has been used for most of tinfoil's functions. Add an underscored version of parseRecipes() for consistency and change the one place we call it to use the new version. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>