aboutsummaryrefslogtreecommitdiffstats
path: root/bin
AgeCommit message (Collapse)Author
2014-08-22bitbake-worker: Improve sigterm handlerRichard Purdie
When processes terminate, we really want all of the child processes to terminate too. This was not happening for worker processes which spawned their own multiprocessing pools, leading to build hangs. This change ensures any sigterm gets passed to the whole process group. In local tests, this resolved some hanging process workloads I could generate. It does rely on signals being delivered in a timely fashion and there is a multiprocessing bug we have to work around there. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-24bitbake: remove choices for dump-signaturesRobert Yang
The SIGNATURE_HANDLER can be defined by the user, so we can't use choices. Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-23toaster-requirements.txt: document requirements for the python environmentAlexandru DAMIAN
Since Toaster adds a number of specific requirements managed by pip, we document these requirements in order to be able to run bitbake and toaster under virtualenv. The target here is to break the dependency on distro packages for specific python libraries. In order to start bitbake/Toaster in a distro-independent manner, we use virtualenv and pip. We add venv to the .gitignore list to make room for the virtualenv deployment in this directory. Use this command sequence to setup the virtualenv: $ virtualenv venv $ . venv/bin/activate $ cat toaster-requirements.txt | xargs pip install bitbake and Toaster will then run normally under virtualenv. We also fix bugs related to toaster starting in managed mode through this script: * toaster will not use bldcontrol application in interactive mode * a proper message will be displayed if toaster detects a managed start request in a build environment Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2014-07-23toaster: add fields for sourcedir and builddir pathsAlexandru DAMIAN
We add explicit absolute paths for a directory where the layer sources will be checked out (sourcedir) and where the build activities will take place. Adding minimal checking when starting the application in order to make sure that BuildEnvironment (BE) settings are usable. This check is ran by the toaster script at startup. Modify the localhost bbcontroller to use the BE settings instead of trying to self-configure on checked out sources. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2014-07-23"per-package" should say "per-recipe"Robert P. J. Day
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-21bitbake: update help message for dump-signaturesRobert Yang
The bitbake -S had been updated which always reuires an argument, so update the help info: - Add the two args in the help message: none and printdiff - Use type="choice" so that we can get more friendly error messages, for example: bitbake: error: option -S: invalid choice: 'printdiffX' (choose from 'none', 'printdiff') - dump-signatures=DUMP_SIGNATURES -> dump-signatures=SIGNATURE_HANDLER Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-04toaster: add project pagesAlexandru DAMIAN
We add the new project and project page skeletons. In the process, we add an identifier in the settings.py to detect whenever Toaster is running in managed mode, and a context processor to make this value available to the template processor. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2014-06-12toaster: build control functionalityAlexandru DAMIAN
We add the build control functionality to toaster. * The bldcontrol application gains bbcontroller classes that know how to manage a localhost build environment. * The toaster UI now detects it is running under build environment controller, and update the build controller database and will shut down the bitbake server once the build is complete. * The toaster script can now run in standalone mode, launching the build controller and the web interface instead of just monitoring the build, as in the interactive mode. * A fixture with the default build controller entry for localhost is provided. [YOCTO #5490] [YOCTO #5491] [YOCTO #5492] [YOCTO #5493] [YOCTO #5494] [YOCTO #5537] Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2014-06-12xmlrpc: add support for token reusingAlexandru DAMIAN
We add support to specify a connection token in the command line and in the environment variable BBTOKEN. When a client registers to a bitbake server, that client will have exclusive access to the server. The client is identified by a server-supplied token. If a client terminates, we cannot reconnect to the server as the token is lost. This patch adds the capability to specify the connection token in the command line for xmlrpc clients. This allows us to have bitbake work as an already-authenticated client with the server and resume sending commands to a server. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2014-06-12toaster: create models for bldcontrol and enable itAlexandru DAMIAN
We create the model classes that store information about triggering builds, and the available build environments. We add a fixture with a default build environment for build control, using a "build/" directory under the poky checkout directory. We enable the bldcontrol in toaster starting script and in the toaster settings as to allow the actual database to be kept in sync with the source code. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2014-06-11toaster: comment out bldcontrol migration commandAlexandru DAMIAN
This fixes toaster startup failing after the preparatory patches for bldcontrol application have been merged. I slipped a bldcontrol-specific line into the toaster startup script and this prevents toaster from starting. We comment out this line until the bldcontrol application have been merged. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-06bitbake: show wildcard appends for bitbake-layersAsh Charles
The 'bitbake-layers show-appends' command can use the built-in get_file_appends() method which correctly identifies bbappends that include a '%' wildcard in their filename. Signed-off-by: Ash Charles <ashcharles@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-06toaster: update toaster to run in managed modeAlexandru DAMIAN
We disable bitbake self start to prevent race condition. ToasterUI will shutdown the server when the build is done if running in managed mode. We fix usage of kill server flag in the bitbake binary. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-06toaster: startup script standalone modeAlexandru DAMIAN
The toaster starter script was designed to be sourced in a build environment and set up the build recording environment to be used in an interactive mode. For the standalone web server mode, we modify the toaster script to be run directly from the checked-out sources, without a build environment set up, and run the web server alone. In the standalone mode, the build environemnts and all build activities are controled through the web interface. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-06toaster: startup script noweb modeAlexandru DAMIAN
We add an option to the startup script, named "noweb" that will start toaster without the embedded web server. This is useful to start the system for build-only environments, where the web server code is running on a different machine. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-06xmlrpc: client - remove fatal errorsAlexandru DAMIAN
When we use the XMLRPC client API to connect to a bitbake server, we want to receive errors from the API instead of having the API exiting without warning. Thus the "bb.fatal" calls have been replaced with "bb.warn" calls, and we re-raise the original exception for handling by the original caller. The bitbake starting script has been modified to properly test for failures in calling the client API and handle them. Additional error handling added in the client, as to prevent fatal crashes. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-06bitbake: move configuration reading codeAlexandru DAMIAN
The configuration reading code should live in the main bitbake entry point, and the server modules should be supplied with correct configuration instead of attempting to parse from configuration files. This patch moves the endpoint address reading from XMLRPC to the bitbake main script. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-05-28bitbake-layers: show-cross-depends: add support for RRECOMMENDSPaul Eggleton
RRECOMMENDS must be satisfied at build time, and these could cross layer boundaries, so report these if they exist. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-05-28bitbake-layers: show-cross-depends: ignore self-satisfied RDEPENDSPaul Eggleton
Overlayed recipes caused this to show false positives because the overlaying version appeared to be satisfying the overlayed version's RDEPENDS; but you'd never be building both at the same time. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-05-28bitbake-layers: show-cross-depends: ignore global inheritsPaul Eggleton
It's not particularly useful to show globally inherited classes here since they do not normally represent a dependency. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-05-28bitbake-layers: show-cross-depends: add option to ignore a layerPaul Eggleton
By default, show-cross-depends shows dependencies on OE-Core (i.e. "meta") which is not particularly useful. Add an option to allow you to hide those. For example, to hide all dependencies on OE-Core: bitbake-layers show-cross-depends -i meta Multiple layers can be specified by using commas as separators (no spaces). Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-05-01bitbake: Bump version to 1.23.1Richard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-27bitbake-diffsigs: Fix runtime error when no arguments are givenJacob Kroon
If bitbake-diffsigs is run without arguments it will error: Traceback (most recent call last): File "./bin/bitbake-diffsigs", line 121, in <module> if output: NameError: name 'output' is not defined Fix this by moving the check for output into the inner else-clause. Signed-off-by: Jacob Kroon <jacob.kroon@mikrodidakt.se> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-21bitbake-worker: Drop BBHASH variablesRichard Purdie
Iterating through and calling setVar on this number of variables has significant overhead in the profiling data. By not setting this, we save 3,000 calls to setVar which gives a noticeable improvement to the speed of task execution. The BBHASH variables have since been replaced by accessing that data through the siggen code and going forward, that is the preferred way work with it. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-10bitbake: Update to version 1.23.0 for masterRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-10bitbake: Update to version 1.22.0Richard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-09bitbake-selftest: fix help message to include command linePaul Eggleton
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-30bin/bitbake: Only try and process an event_queue if it existsRichard Purdie
The connection may have failed before the event queue has been setup. Handle this correctly in the exception handler. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-28bitbake: toaster: do not trap SIGCHLDAlexandru DAMIAN
We remove trapping SIGCHLD due to a weird interaction with the bash version used with Ubuntu 14.04 LTS. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-28bin/bitbake/cooker: Ensure initial featureset is optimalRichard Purdie
If the featureset didn't match the defaults, we'd pay the price of two base configuration parses which showed up adversely in the performance benchmarks. This also passes the feature set into the cooker creation so in the common case we don't have to reset the server. This speeds up both knotty and hob startup. If the featureset doesn't match, the system will reset as before, this just streamlines the common case. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-26bitbake: Force -S option to take a parameterRichard Purdie
There is no easy way to make this change. We really need parameters for the -S (dump signatures) handling code. Such a parameter can then be used within the codebase to handle the signatures in different ways. For now, "none" is the recommended default and "printdiff" will execute the new (and more expensive) comparison algorithms. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-24toaster: clean exit on bb server shutdownAlexandru DAMIAN
This patch adds the capability to have the Toaster UI detect when the Bitbake server exited and cleanly trigger a clean shutdown of the system through the toaster starting script. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2014-03-11bitbake-worker: Ensure children have default sigterm handlerRichard Purdie
The children of the worker should have the default SIGTERM handler, else they'll try and do cleanup which should only happen in the parent leading to all kinds of bizarre build failures. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-11bitbake: fix typo in variable nameRoss Burton
When passing -t with an incorrect server type, the error message was using a variable that doesn't exist. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-11toaster: erase checks for stop commandAlexandru DAMIAN
We remove the checks for the stop command, since we assume the user really means it wants to shutdown the system when he issues the command. [YOCTO #5376] Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2014-03-09bitbake-worker: Gracefully handle SIGTERMRichard Purdie
Currently if bitbake-worker handles a SIGTERM, it leaves the child processes to complete or hang. It shouldn't do this so hook the SIGTERM event and gracefully shutdown any children. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-28bitbake-selftest: enable specifying tests to run on command linePaul Eggleton
If you are just trying to fix one test at a time, it can be useful to be able to specify an individual test(s) rather than running them all: bitbake-selftest bb.tests.codeparser bb.tests.cow You can even specify the test class or function to run, e.g.: bitbake-selftest bb.tests.fetch.URITest bitbake-selftest bb.tests.fetch.FetcherNetworkTest.test_fetch Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-01-07toaster: add two-stage commit startup logicAlexandru DAMIAN
Toaster start script lunches multiple process components of the toaster system. This patch adds logic into the startup script to safely fail startup and do proper cleanup on any error that may happen during system start. Bitbake needs to return 0 if it will successfully lunches the server-mode. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-20Update to version 1.21.1 for masterRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-09toaster: migrate orm models to SouthAlexandru DAMIAN
As Toaster advances, database schema alteration will force users to delete old versions and lose all data collected. In order to prevent this, and to allow database updates to happen without having to delete old data, we use South to handle migrations for the ORM application which stores the Toaster data. [YOCTO #5559] Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2013-12-09toaster: update to Django 1.5Alexandru DAMIAN
In order to remain up to date with the relevant technologies, Toaster is updated with this patch to Django 1.5. This also makes headways to allow usage of emerging Django-related technologies. Changes include the startup script Django version check, usage of TemplateView instead of deprecated simple function to do redirects, and update to the new form of the _url_ template tag. Support for Django 1.4.5 is now deprecated. [YOCTO #5558] Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2013-12-02bitbake.lock: Add host:port to bitbake.lock for memres serverJason Wessel
The idea is to build on the --status-only option for bitbake and expose a mechanism where the oe init scripts can easily switch between memres server and the non-memres server. In the case of the standard oe init script the following can shut down the server: if [ -z "$BBSERVER" ] && [ -f bitbake.lock ] ; then grep ":" bitbake.lock > /dev/null && BBSERVER=`cat bitbake.lock` bitbake --status-only if [ $? = 0 ] ; then echo "Shutting down bitbake memory resident server with bitbake -m" BBSERVER=`cat bitbake.lock` bitbake -m fi fi A similar function can be used to automatically detect if the server is already running for the oe memres init script. This new functionality allows for the memres init script to be started in a new shell and connect up to an alaready running server without seeing the error of trying to start the server multiple times. Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-02bitbake, xmlrpc.py: Implement memory resident auto port configuration/restartJason Wessel
This patch adds the ability to dynamically select a port for the bitbake memory resident server when the BBSERVER port is set to -1. This allows for running multiple instances of the bitbake memory resident server on the same system in different build directories. The client portion of the bitbake instance can also request that the server automatically start when using the auto port feature. This is to deal with a bitbake instance that eventually times out and exits or that has died for some unknown reason. The new functionality allows for lazy startup of the server after sourcing the init script for the memory resident functionality. Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-02bitbake: Add --status-only optionJason Wessel
The --status-only option is purely to check the health of the server. The idea is to use it from the oe environment script so as to know if the server needs to be started or not. Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-26bitbake: Share BB_TASKDEPDATA with tasksRichard Purdie
Currently tasks have no knowledge of which other tasks they depend upon. This makes it impossible to do at least two things which would be desirable/interesting: a) Have the ability to create per recipe sysroots b) Allow the aclocal files to be present only for the entries in DEPENDS (directly and indirectly) By exporting task data through this new variable, tasks can inspect their dependencies and then take actions based upon this. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-22bitbake-layers: avoid loading configuration when not neededPaul Eggleton
In recent versions of bitbake, it is not possible to initialise a BBCooker object without having it load the configuration first. Thus we should avoid creating the Tinfoil object here in bitbake-layers which does that internally until we actually need to, so you can run "bitbake-layers help" and not have to wait several seconds for the output. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-22runqueue/bitbake-worker: Fix dry run fakeroot issuesRichard Purdie
When using the dry run option (-n), bitbake would still try and fire a specific fakeroot worker. This is doomed to failure since it might well not have been built. Add in some checks to prevent the failures. [YOCTO #5367] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-01toaster: enable required classes in the toaster startup scriptAlexandru DAMIAN
In order to use toaster, now you have to set INHERIT+="toaster buildhistory" To keep it simple, I've done some changes in order to automate it. When toaster is started, this line is added to a new file called toaster.conf. This file is passed to the bitbake server with the --postread parameter. Based on a patch by Cristiana Voicu <cristiana.voicu@intel.com> Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-01toaster: server shutdown on terminal exitAlexandru DAMIAN
If the terminal where the server was started is closed, the bitbake server should shutdown. Currently the system is left in hanging state. This patch uses "trap" command to make sure the servers are closed on terminal exit. [YOCTO #5376] Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-18toaster: add toaster code to bitbakeAlexandru DAMIAN
This patch adds the Toaster component to Bitbake. Toaster is a module designed to record the progress of a Bitbake build, and data about the resultant artifacts. It contains a web-based interface and a REST API allowing post-facto inspection of the build process and artifacts. Features present in this build: * toaster start script * relational data model * Django boilerplate code * the REST API * the Simple UI web interface This patch has all the development history squashed together. Code portions contributed by Calin Dragomir <calindragomir@gmail.com>. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>