aboutsummaryrefslogtreecommitdiffstats
path: root/bin
AgeCommit message (Collapse)Author
2015-06-10toaster: Make toaster script to work in dashEd Bartosh
Made it working in dash. Note, that due to dash limitations script will not work if sourced. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2015-06-10toaster: Code cleanup: bashismsEd Bartosh
Fixed the following bashisms: replaced echo -e -> printf removed 'function' from function definitions replaced $(< ${file}) -> `cat ${file}` Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2015-06-09bitbake: Bump version to 1.27.1Richard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-29toaster: enable no browser startAlexandru DAMIAN
We enable a "nobrowser" parameter that inhibits the launch of a browser when toaster starts. This is useful for integration with automated startup scripts and enables headless testing. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2015-05-29toaster: enable server-side sessions for all usagesAlexandru DAMIAN
In an effort to fix client-side session storage using cookies, we enable server-side session support for all pages. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2015-05-24bitbake-worker: Fix regression with unbuffered logsJason Wessel
I noticed that I was seeing loss of the log files when hitting control-c while debugging a function in bitbake. In fact if you take a recipe and replace its compile function as shown below let it run for a few seconds and hit control-c, you will see first hand that log data is not there. do_compile () { while [ 1 ] ; do echo -n "Output date: " date sleep 1 done } It turns out there was a regression introduced by commit: d0f0e5d9e69 which created the bitbake worker. Since the bitbake worker is started in its own process space, it needs the exact same code added from commit: 88429f018b where the problem was fixed the first time around. Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-19toaster: Remove dependency on daemon applicationRandy Witt
The bitbake observer is now started using python subprocess. This should allow for toaster to run without installing the "daemon" application. [Yocto #7271] Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-14tests/parse: Add very basic start of parse testsRichard Purdie
This tests very basic usage of the parser and then adds a test to ensure that incomplete functions raise an exception. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-12toaster: Code cleanup: indentEd Bartosh
Replaced tabs with 4 spaces. Removed useless semicolons at the end of lines. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2015-05-12toaster: Make toaster script working in zshEd Bartosh
Fixed shell syntax not understood by zsh. Made toaster script to work for both shells in both modes: sourced and directly called. [YOCTO #6964] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2015-05-12toaster: clear up toaster shutdown for mac osxAlexander Kanevskiy
This patch properly shuts down toaster in interactive mode under Mac OSx. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2015-05-01toasterui: proper exit code on toaster errorsAlexandru DAMIAN
This patch modifies the toasterui to properly return the exit code based on the errors found in the toaster itself. The upload event file API call will not delete event logs for which toasterui showed an error. This will facilitate debugging. Minor enhancement in the buildinfohelper to reduce the number of lookups on unknown layer objects (prevented testing of the patch). Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2015-04-28bitbake: use sys.exit to simplify the codeEd Bartosh
Used sys.exit instead of assigning exit code to variable. This way it's more clear when bitbake exists and which exit code is used. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-28bitbake: Check if bitbake versions matchEd Bartosh
Bitbake program and core versions must match. Moved __version__ from main.py back to bin/bitbake. Implemented check for version match in bin/bitbake. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> tbs Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-28bitbake: Handle BBMainExceptionEd Bartosh
Some error messages were lost because BBMainException was inherited from bb.BBHandledException. When bb.BBHandledException is processed error messages are not printed as they suppose to be printed before raising this exception. Stopped to inherit BBMainException from bb.BBHandledException. Handled BBMainException in bin/bitbake and printed error message to the stderr. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-17bitbake-diffsigs: consider the situation where sigdata and siginfo files ↵Chen Qi
having the same hash values For now, `bitbake-diffsigs -t <recipe> <task>' doesn't work. It always outputs nothing. The problem is that bitbake-diffsigs are comparing sigdata and siginfo files that have the same hash value. This is not what we want. These two files are actually duplicates considering the purpose of bitbake-diffsigs. So we need to remove one of them so that bitbake-diffsigs could actually compare the correct signature files. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-11bitbake-layers: ensure non-extended recipe name is preferredRichard Purdie
In show-recipes and show-overlayed, we only list one variant of each recipe where multiple exist, therefore we should show the main one (e.g. in OpenEmbedded, we now show openssl and not nativesdk-openssl which would otherwise sort first.) Fixes [YOCTO #7514]. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-03-31bin/image-writer: Add ext4 as a deployable image typeRichard Purdie
This is particularly problematic since qemu images switched to ext4 by default and now cannot work properly with UIs like hob. This patch adds in ext4 to the appropriate variable fixing this. [YOCTO #7426] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-03-24bin/bitbake: Create bitbake_main APIEd Bartosh
Moved most of functionality of bin/bitbake to lib/bb/main.py to be able to call bitbake from python code. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-03-16bitbake-layers: use stdout instead of stderr for loggingPaul Eggleton
We use logger.plain() to produce actual output which needs to go to stdout. We could use more advanced filtering (and probably should in future) but for the moment let's just fix the regression. Fixes [YOCTO #7458]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-25bitbake-layers: fix wildcard support in remove-layerPaul Eggleton
The recent refactoring caused use of wildcards to trigger a traceback because the old variable name was being used. Fixes [YOCTO #7367]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-24toaster: update requirement for Django 1.6Alexandru Damian
In order to bring in transaction.set_commit support, we need Django 1.6, discarding support for Django 1.5 This patch removes 1.5 from the list of acceptable Django versions. Signed-off-by: Alexandru Damian <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-20bitbake-layers: add ability to fetch layers and their dependencies from ↵Chong Lu
layer index Add a command to query layer dependencies from a layer index such as the OpenEmbedded Layer Index at http://layers.openembedded.org. Fetches the layer and its dependencies and adds them into conf/bblayers.conf. [YOCTO #5348] Signed-off-by: Chong Lu <Chong.Lu@windriver.com> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-20bitbake-layers: fix loggingPaul Eggleton
Logging output was simply not getting printed. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-20bitbake-layers: refactor to use argparse instead of cmdPaul Eggleton
This makes help formatting and option handling a lot more standardised and allows us to drop a bunch of code. We also gain slightly more straightforward error handling. One side-effect however is that the old subcommand syntax using underscores is no longer supported. The dashed form has been supported (and displayed in the help text) for quite a while now so I wouldn't imagine that will be much of an issue. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-09toaster: improve logging facilities for toasterAlexandru DAMIAN
This patch improves the logging facilities for toaster in order to help diagnose bugs that happen on user machines. The logs are stored now under "/tmp/toaster_$$" where $$ is a PID-based unique identifier. On shutdown, toaster will automatically erase all logs unless errors are listed in the log file. On error, Toaster provides suggestions on what to do. This patch includes a minor fix found as a result of logging improvements. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2015-02-09toaster: enhancements for the startup sequenceAlexandru DAMIAN
This patch brings fixes and enhancements in the startup sequence. - the dependency version checking is now correctly enforced when starting in both modes - fixed errors in looking up environment variables - added message with 'daemon' program start location - presenting menu for selecting config file [YOCTO #7283] [YOCTO #7291] [YOCTO #7273] Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2015-02-09toaster: correct typo in toaster scriptBelen Barros Pena
A small typo slipped in the message included in the fix for [YOCTO #6023]. Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
2015-02-02toaster: proper setup for build configurationAlexandru DAMIAN
This patch makes sure that all the toaster conf files are actually written from the build enviroment controllers. Additionally, toaster checks that the 'daemon' program, which is used to start the build system, is available (currently for localhost). [YOCTO #7171] Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-30toaster: update texts for the startup sequenceAlexandru DAMIAN
This patch updates the prompts to the user to better explain what Toaster is doing and the information it needs from the user. Additionally, fixes a check in loadconf command. [YOCTO #6785] [YOCTO #7251] Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2015-01-21bin/bitbake: only check that /dev/shm is writable on LinuxRoss Burton
Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-08toaster: do not launch web browser on noweb optionAlexandru DAMIAN
This patch makes Toaster managed mode obey the "noweb" parameter by not starting the web server and launching the web browser command if the "noweb" parameter is specified. The web browser will be pointed at 127.0.0.1 instead of 0.0.0.0 [YOCTO #7039] Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-08toaster: write pre-read conf file for build variablesAlexandru DAMIAN
We change the setting of variables from directly injection into the set-up cooker to writing a conf file that is pre-read on bitbake server startup. This is needed because the injection can only happen after the variable set is parsed, and the variables already inferred, so setting up variables happens too late. [YOCTO #7045] Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-08bitbake-worker: Use setsid() rather than setpgid()Richard Purdie
The bug has a long discussion of this. Basically, in some environments, the exact details of which aren't understood, a Ctrl+C signal to the UI is being transmitted to all the process children. Looking at the output of "ps ax -O tpgid", its clear the main process is still the terminal owner of these processes. stty -a on a problematic system shows: "-ignbrk brkint" and on a working system shows: "-ignbrk -brkint" The description of brkint would suggest this is the problem, setting up that terminal environment wasn't able to reproduce the problem though. It was confirmed that using setsid() caused the problem to be resolved and is probably the right thing to be doing anyway, so lets do it. [YOCTO #6949] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-30bitbake-layers: fix error handling in add-layer / remove-layerPaul Eggleton
* Fix add-layer error message when a layer is already in BBLAYERS * Ensure we show an error message if we can't find BBLAYERS at all Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-21bitbake-layers: add commands for adding and removing layersPaul Eggleton
Add add-layer and remove-layer commands for easily adding and removing layers to/from bblayers.conf. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-12add option to write offline event log fileAlexandru DAMIAN
This patch adds a "-w/--write-log" option to bitbake that writes an event log file for the current build. The name of the file is passed as a parameter to the "-w" argument. If the parameter is the empty string '', the file name is generated in the form bitbake_eventlog_DATE.json, where DATE is the current date and time, with second precision. The "-w" option can also be supplied as the BBEVENTLOG environment variable. We add a script, toater-eventreplay, that reads an event log file and loads the data into a Toaster database, creating a build entry. We modify the toasterui to fix minor issues with reading events from an event log file. Performance impact is undetectable under no-task executed builds. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2014-12-03bitbake: Update to 1.25.0 as development version after releaseRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-20toastergui: layer name correlationAlexandru DAMIAN
This patch modifies how layers are identified and matched. Layers were primarely organized by the source of layer information, and Releases were separated by both layer git branches and originating source of layer information. This setup prevented mixing layers from different sources for a certain release, which didn't match the way people use Yocto Project / bitbake. This patch brings name-based indentification, where layers with the same name are assumed to be equivalent, in the sense of being able to substitute one another. To facilitate this identification to humans, layers are differentiated by GIT URI instead of layer sources, which was a rather arbitrary abstraction. Additional changes include modification to models in order accomodate for the new data structure, and to config file loading to match the new toasterconf.json layout. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2014-11-20toaster: fix file name collisionBelen Barros Pena
When toaster is used by multiple users on the same machine, it is possible that files in /tmp have a name race. This patch makes sure that the files have unique names. Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com>
2014-11-20bitbake-worker: exit normally when SIGHUPRobert Yang
Fixed: 1) Run "bitbake recipe" in the terminal 2) Close the terminal while building 3) $ ps aux | grep bitbake-worker There will be many processes, and they will keep the resources (e.g., memory), and won't exit unless kill or kill -9. Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-12toaster script: webport option and other improvementsAlexandru DAMIAN
We add the "webport=" command line option as to allow starting the web server on a custom port. The bitbake server port is now auto-allocated. This is needed to be able to run multiple toaster environments on a single machine. We tackle bug 6023 (toaster refusing to start when lock file is present) by using more specific checks, and automatically recover from bitbake server down / webserver up error mode. Command line parameters are now read on both interactive and managed modes. The localhost and ssh controllers are updated to work with the modified toaster launcher script. [YOCTO #6023] Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2014-10-30bitbake: clarify startup messageAlexandru DAMIAN
Fix the startup message by making clear which server runs on which port. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2014-10-30toaster: change startup parameter passing to avoid raceAlexandru DAMIAN
We avoid a race between the setting the TOASTER_BRBE variable and reading the variable in toaster ui by supplying the variable at server startup time through the toaster.conf post-read file. Additional small changes are included, including marking the build request with the environment id of where the build took place. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2014-09-23bin/bitbake: Update to version 1.24.0Richard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-22bitbake-worker: Fix bitbake -nRichard Purdie
Without this you see: File "bitbake/bin/bitbake-worker", line 201, in fork_off_task os._exit(child()) TypeError: an integer is required Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-11bin/bitbake: Update to version 1.23.2Richard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-11siggen/runqueue/bitbake-worker: Improve siggen data transfer interfaceRichard Purdie
We need to transfer some of the siggen data from the core/cooker into the worker instances. There was a partial API created for this but its ugly and its not possible to extend it from the siggen class. This patch completes the interface/abstraction for the data and means the class can extend/customise it in any siggen class. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-04toaster: bitbake server listen on all interfaceAlexandru DAMIAN
We change the toaster starting script to make the bitbake server listen on all interfaces on the local machine. This is needed to be able to receive a controlling client running on a remote machine. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2014-08-29toaster: update checksettings command for auto-detectionAlexandru DAMIAN
We enhance the checksettings command to try to automatically detect settings for running on localhost. The checksettings will look for a nearby poky layer source, for a nearby build directory, and will try to import settings from "toasterconf.json" files found in the local layer. On new configuration, it will also perform updates from the layer source. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>