Commit Graph

3452 Commits

Author SHA1 Message Date
Richard Purdie 97d44bf526 bitbake: cache/fetch2/siggen: Ensure we track include history for file checksums
Currently, if you reference a file url, its checksum is included in the
task hash, however if you change to a different file at a different
location, perhaps taking advantage of the FILESPATH functionality, the
system will not reparse the file in question and change its checksum to
match the new file.

To correctly handle this, the system not only needs to know if the
existing file still exists or not, but also check the existance
of every file it would have looked at when computing the original file.

We already do this in the bitbake parsing code for class inclusion. This
change uses the same technique to log the file list we looked at and
if files in these locations exist when they previously did not, to
invalidate and reparse the file.

Since data stored in the cache is flattened text, we have to use a string
form of the data and split on the ":" character which is ugly, but is
an internal detail we can improve later if a better method is found.

The cache version changes to trigger a reparse since the previous
cache data is now incompatible.

[YOCTO #7019]

(Bitbake rev: 6c0706a28d72c591f1b75b6e3f3b645859387c7e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-08 09:52:52 +00:00
Richard Purdie 26cd67e63a bitbake: wget: Add localpaths method which gives localpath with history
In some cases for cache purpoes we not only need to know which file
is going to be used but also which paths were considered. Add a
localpaths method which includes the history.

The core which() funciton already supports this, this just extends
the function to preserve the extra data we need. localpath becomes
just a special case of the case with history.

(Bitbake rev: ea5efeac5c1f7986666c979f789786f29fc1619a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-08 09:52:52 +00:00
Richard Purdie 130958cc24 bitbake: bitbake-worker: Use setsid() rather than setpgid()
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]

(Bitbake rev: 461aa73fff0ab616032d28c4fd0322eb88838be6)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-08 09:46:58 +00:00
Richard Purdie 1393e224b5 bitbake: cooker: Shut down the parser in error state
If the cooker is in an error state, we shouldn't continue to try parsing.
This fixes an issue where an invalid PR server is detected when bitbake
is started and ensures bitbake exits cleanly rather than hanging.

[YOCTO #6934]

(Bitbake rev: 294bb9cad294423d4f8998405ceff58655f12660)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-08 09:42:24 +00:00
Paul Eggleton 8b8d46f31e bitbake: utils: make edit_metadata_file() handle VARIABLE +=
This is a little crude as the usage basically ignores that you're doing
an append operation, but for a lot of cases it will be sufficient.

(Bitbake rev: 24a28205ab680b6cc645d97b76c9855920608229)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-30 09:21:42 +00:00
Paul Eggleton b264f5629b bitbake: bitbake-layers: fix error handling in add-layer / remove-layer
* 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

(Bitbake rev: 1c743fd2103730e27699dd55efc6914d3b0c3702)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-30 09:21:42 +00:00
Richard Purdie e75139cc9d bitbake: fetch2/wget: Fix horrible temp file handling
Hardcoding a temp directory is bad practice and leads to races between
the tests. There is no longer any good reason for doing this, drop it
and ensure the files get cleaned up correctly.

(Bitbake rev: 10a47b1ec7470c9e8c4ffe0bb35cdf6d1bb2ee2e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-25 08:18:14 +00:00
Richard Purdie 1d4908ddb2 bitbake: tests/data: Add a key deletion test
If you copy the datastore, then delete a key, it should not exist in
d.keys(). This adds a test to cover the recently found data store bug.

(Bitbake rev: 16d5f40ad20fd08bf7a4d0e36200c739b5a9f59e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-25 08:18:14 +00:00
Richard Purdie 4d06fb7307 bitbake: tests/fetch: Add versionstring tests to network tests list, fix print()
The versionstring tests hit the network so should only run when
network tests are enabled.

Also remove the print statement which confuses the test output and
add it to the test failure message instead.

(Bitbake rev: 6c046660cfc4fb3792a42aeafff91a13f68a2e89)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-25 08:18:14 +00:00
Richard Purdie 544533922d bitbake: data_smart: Ensure d.keys() doesn't list deleted variables
If you copy the datastore, then delete a variable, it still shows up
in d.keys() when it should not. This patch addresses the issue.

(Bitbake rev: f28ee1bb03cb32d3757fbef67c9fbe143e3dadfa)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-25 08:18:13 +00:00
Aníbal Limón 8c906632e7 bitbake: bb/fetch2/wget.py: latest_versionstring fix multithread and remove deprecated code
In order to fix multithread usage of latest_versionstring moves package_custom_regex_comp
from class to method level because need to be defined by package.

Remove code for build url's with /download suffix because it's deprecated since you can
specify the download directory using package_regex.inc file.

(Bitbake rev: 231cae9f9b552ec6737795c098d1de426b5adcbc)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-23 10:18:21 +00:00
Andy Voltz 6b33e1a840 bitbake: ui/ncurses: Update ncurses ui to accept configParams
(Bitbake rev: 730b4c50364fba7173309278d670eda02e0ce38e)

Signed-off-by: Andy Voltz <andy.voltz@timesys.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-23 10:18:21 +00:00
Paul Eggleton d31b7bdf11 bitbake: cooker: add ability to ignore unmatched regexes in BBFILE_PATTERN
Add a BBFILE_PATTERN_IGNORE_EMPTY variable to allow ignoring the fact
that a regex specified in BBFILE_PATTERN for a particular collection
doesn't match any recipes. This will be used in OpenEmbedded in the
workspace layers created by "devtool" which may not always contain any
recipes (which is not cause for warning the user).

(Bitbake rev: 19c74aaa2836a88d666f0032452fac521689ab6b)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-23 10:18:21 +00:00
Paul Eggleton db3f589f49 bitbake: bitbake-layers: add commands for adding and removing layers
Add add-layer and remove-layer commands for easily adding and removing
layers to/from bblayers.conf.

(Bitbake rev: 0e94aed033917b91ea6ba0522b14a040c3bdc987)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-23 10:18:21 +00:00
Paul Eggleton b1e5a6794f bitbake: utils: add basic metadata manipulation functions
* Add a generic edit_metadata_file() function to modify variable
  assignments in any metadata file (conf, bb, bbappend) using a callback
  for flexibility
* Add a specific edit_bblayers_conf() function to modify
  conf/bblayers.conf and add and/or remove layers from the BBLAYERS
  value within it.

(Bitbake rev: aa03a28b442549dd8ffe92ae4d6390f62202a76a)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-23 10:18:20 +00:00
Paul Eggleton 7b70d5e8a4 bitbake: siggen: ensure nostamp tasks force dependent tasks to re-execute
If a nostamp task is depended on by a non-nostamp task, then we want the
signature of that task to change such that it re-executes afterwards.
This is an unusual situation, but we want this to work in OE in
externalsrc.bbclass so that compilation happens every time it is
requested.

(Bitbake rev: 73498afc3d45beede5b8f24a9acd523a1663b793)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-23 10:18:20 +00:00
Richard Tollerton 0a791e91e5 bitbake: data: escape '$' in shell variable assignment
Running bitbake inside make results in the exported environment variable
MAKEOVERRIDES="${-*-command-variables-*-}", which the shell chokes on
when trying to expand it. But of course, it probably shouldn't have been
trying to expand it in the first place -- so just escape the dollar
sign.

(Bitbake rev: 18cd0ce6a55c9065c3f1bf223b47d817b5efcd8f)

Signed-off-by: Richard Tollerton <rich.tollerton@ni.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-18 10:28:44 +00:00
Michael Wood bb83fccb4b bitbake: toaster: importlayer Tidy up the page initialisation
Tidy up the page initialisation and change the error logging so that
it's consistent with other pages.

(Bitbake rev: 3a5b78af4f3cab203824d933a73e82a41ab377e3)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-18 10:24:08 +00:00
Belen Barros Pena 641c50d79b bitbake: toaster: Change the full stop to a colon
In the import layers notification for multiple layers
there was a full stop where there should be a colon.

(Bitbake rev: c23736003b788f2b45ae7cbcd7c7250ead2e5724)

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-18 10:24:08 +00:00
Belen Barros Pena 6f3f05936c bitbake: toaster: Formatting changes to error messages
Just giving a bit of space to the content of the error
messages we show when you try to import a layer that
already exists.

(Bitbake rev: 19b8ff1949072691dade96038af529200175843a)

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-18 10:24:08 +00:00
Michael Wood c89fd79398 bitbake: toaster: projectapp Add links to the imported layers notify
Adds links to layer details for each of the layers that has been added
to the project.

(Bitbake rev: 07e5c7c82519604501feb7d892db330c610978e9)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-18 10:24:07 +00:00
Michael Wood 8d96256c39 bitbake: toaster: importlayer Avoid namespace clash with layer name
This was causing validation issues as the layer name was being picked up
from a different location in the dom.

(Bitbake rev: 54165dd929ef304357806411cd70caf85b6132f0)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-18 10:24:07 +00:00
Michael Wood dadc11a52f bitbake: toaster: Importlayer add notify exactly which layers changed
This changes when the dependencies are added to the project so that we
can know which ones were successfully added by waiting for the server to
respond with a list. This is more reliable because we may have specified
dependencies which are already in the project.

To pass this information to the project page a temporary cookie is used
with the values for the notification.

(Bitbake rev: 23ca89dc3e0f0ea387649f1e9e8d7d50846048d6)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-18 10:24:07 +00:00
Belen Barros Pena bd6b8796a1 bitbake: toaster: tweaking the import layers form
This commit makes the following changes to the import
layers form:

* In the explanatory text at the top of the page, show only
the release description (to match the information shown in all
other pages)

* Make sure the spacing between form fields and labels is
consistent across the form

* Change the 'Branch, tag or commit' label to 'Revision'
and add some help text to the label

* Change the help text and the input type in the layer
 description

* Change the help text next to the form actions to match
the new field ordering in the form

(Bitbake rev: 1fae3ef8f87a836758519c85afb2762768c29efc)

Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com>
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-18 10:24:07 +00:00
Michael Wood 1605cd37db bitbake: toaster: Add import layer feature.
This feature allows users to import layers from git into their current
project and associate it with the release of the current project and the
dependencies for the newly imported layer with existing layers.
It will also resolve the child dependencies of the dependencies added.

[YOCTO #6595]

(Bitbake rev: 017f5c746e894f9d87d927c848386459ea332378)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-18 10:24:07 +00:00
Alexandru DAMIAN 13141af708 bitbake: toasterui: refactor project layer finding logic
This is a basic refactoring of the code computing
the layer equivalence classes for a project, in order to
bring common bits of logic in a single place.

(Bitbake rev: 9bdd0a687ba74577f2c0f0b6c696433ea662d38f)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-18 10:24:07 +00:00
Michael Wood 7d5cd68a7d bitbake: toaster: libtoaster Add editProject and getLayerDepsForProject
Add two utility functions for editing project settings and returning the
layer "dependencies" for a specified layer.

(Bitbake rev: 5f98f245bdd381a141a018a7f9953a5510fbb4df)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-18 10:24:07 +00:00
Michael Wood d5fc4f7f13 bitbake: toaster: libtoaster Add a error handler to GET in makeTypehead
If the JSON data comes back from the request with an error set, have a
default handler which logs the error to the console.

(Bitbake rev: 9e3f2e2d985a575adb5520d8b517eac5ad6a15ed)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-18 10:24:07 +00:00
Belen Barros Pena c058c373f6 bitbake: toaster: Initialise the 'change' icon tooltips
All 'change' icons should have a tooltip that appears
when you hover over them. The tootlip says (fittingly):
"Change". Initialise those icons in the libtoaster.js
file so that they work outside the project page.

(Bitbake rev: c635dd71670030da78c52545d2bb32b8c485c1af)

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-18 10:24:07 +00:00
Belen Barros Pena 3910763db7 bitbake: toaster: base Only show change project icon when > one project
In the new build button, it only makes sense to change
the selected project when there is more than one project
in the Toaster instance. If the number of projects is 1,
we hide the change project icon.

(Bitbake rev: e354a40d7dbcd85fea9d37d3983428e4470df2dd)

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-18 10:24:07 +00:00
Alexandru DAMIAN 4061fcdeeb bitbake: add POST endpoint for uploading eventlog files
This patch adds a simple UI-less POST endpoint, where
bitbake_eventlog.json files generated by a bitbake run can be
uploaded to the running toaster instance for insertion into
the database.

(Bitbake rev: cf98a8cbc5dd7a41bbe5fdebcd81e29b1621ff35)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-18 10:24:06 +00:00
Alexandru DAMIAN aa9816ad79 bitbake: toastergui: implement UI changes to allow file download
This patchset adds download links in the build analisys pages
if toaster runs in managed mode. This allows the user to access
data directly from the web interface.

[YOCTO #6837]

(Bitbake rev: 6000e1ae5c846e51932ecd0dc21e0fa02eb10357)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-18 10:24:06 +00:00
Alexandru DAMIAN 85a17f86ea bitbake: add option to write offline event log file
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.

(Bitbake rev: 1befb4a783bb7b7b387d4b5ee08830d9516f1ac2)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-18 10:24:06 +00:00
Alexandru DAMIAN d086fa3aed bitbake: toasterui: add extra debug and development infos
We update and add logs throughout the code in order to help
with development. The extra logging is turned off by default,
but it can be enabled by using environment variables.

All logging happens through the Python logging facilities.

The toaster UI will save a log of all incoming events if the
TOASTER_EVENTLOG variable is set.

If TOASTER_SQLDEBUG is set all DB queries will be logged.

If TOASTER_DEVEL is set and the django-fresh module is available,
the module is enabled to allow auto-reload of pages when the
source is changed.

(Bitbake rev: 10c27450601b4d24bbb273bd0e053498807d1060)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-18 10:24:06 +00:00
Alexandru DAMIAN f99f2cdd69 bitbake: add build artifacts table and other improvements
We add a BuildArtifacts class to store data about files
discovered during the build process and not stored anywhere
else.

Small cosmetic changes in the toasterui.

Add model methods to return file path display data relative
to the build environment instead of absolute file paths.

[YOCTO #6834]

(Bitbake rev: bbe24d912869312d561be199b2c029b0c898e049)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-18 10:24:06 +00:00
Robert P. J. Day ec6377bcf5 bitbake: bitbake-user-manual-metadata.xml: Updated do_package_write example
Given that the "do_package_write" task doesn't exist in OE anymore,
steal another, existing example to demonstrate the "rdeptask" flag.

(Bitbake rev: 9e27bb2869e8ec6781d2f68d0585ebbf9ca6f3d8)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-09 22:25:36 +00:00
Scott Rifenbark d5a808d6b3 bitbake: bitbake-user-manual-metadata.xml: Added [eventmask] flag information.
Reported-by: Laszlo Papp <lpapp@kde.org>
(Bitbake rev: 38150bc53c6bda5be7194f9acd112d362506d2ea)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-09 22:25:36 +00:00
Richard Purdie 1aae44787c bitbake: runqueue: Fix 100% cpu use after keyboard interrupt
After Ctrl+C is pressed to interrupt bitbake, it loops continually, running
at 100% cpu. This patch selects on the correct file descriptors resolving
the excess cpu usage.

(Bitbake rev: 497404e8484b7ca7c11e459bf0845642156eb677)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-09 22:15:49 +00:00
Richard Purdie eb2ea6fd2d bitbake: data: Handle BASH_FUNC shellshock implication
The shellshock patches changed the way bash functions are exported.
Unfortunately different distros used slightly different formats,
Fedora went with BASH_FUNC_XXX()=() { echo foo; } and Ubuntu went with
BASH_FUNC_foo%%=() {  echo foo; }.

The former causes errors in dealing with out output from emit_env,
the functions are not exported in either case any more.

This patch handles things so the functions work as expected in either
case.

[YOCTO #6880]

(Bitbake rev: f28f37220e7787721a31b659521a1c44ebea92bf)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-09 22:15:49 +00:00
Paul Eggleton 9c02ad9fc9 bitbake: event: fix resetting class handlers object
If you don't explicitly specify to use a global variable when doing an
assignment, you will be setting a local variable instead, which means
this function wasn't working at all. It explains some odd behaviour we
have seen in the layer index where event handlers were sometimes
bleeding into other contexts where they should not have been.

(Bitbake rev: ac45ea848901b0f6cd23087b662dde8ce9cd807e)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-09 22:15:49 +00:00
Paul Eggleton c1ef10afb6 bitbake: event: add a means of filtering events internally
When using external tinfoil-based utilities, it is useful to be able to
turn off most of the event handlers; for example sstate_eventhandler
doesn't like being sent events for any recipe which has been skipped.

(Bitbake rev: 41236c28985a3b66b3737382a94e39dbf6480160)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-09 22:15:48 +00:00
Paul Eggleton eb0a6fc210 bitbake: fetch2: add means of disabling SRC_URI checksums
If we're fetching outside of the context of a recipe, it's handy to be
able to disable checksum functionality so you don't get a meaningless
warning about the signatures being missing.

(Bitbake rev: 49dbcfbc56a206964acc5de761bba31be0283ba1)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-09 22:15:48 +00:00
Paul Eggleton cde28486b0 bitbake: utils: add exec_flat_python_func()
Add a function that allows executing a flat python function (defined
with def funcname(args): ...).

(Bitbake rev: 20e6939ebcb62e08a9a7ad586a915dfe368136a0)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-09 22:15:48 +00:00
Scott Rifenbark 8ff0840412 bitbake: bitbake-user-manual: Updated copyright to 2015.
(Bitbake rev: be8f0076667f17587dbcff4b6b6467a7ec29d2b8)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-09 22:14:47 +00:00
Richard Purdie 9315a2b645 bitbake: bitbake: Update to 1.25.0 as development version after release
(Bitbake rev: 94d9590a4310f96396e8e782bcf65918f4dcdb36)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-03 12:24:01 +00:00
Ross Burton b92ec90ea4 bitbake: data: rename defaultval to _defaultval
The defaultval field is intended to be internal and the only use of that field
outside of data.py is to skip over it when iterating over a value's flags.

For clarity and convenience, rename the field to _defaultval so that it is
considered internal and not exposed through the data API.

(Bitbake rev: 2800958dadaa5c055ba21d52c98d842d360f0785)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-03 12:24:00 +00:00
Richard Purdie 2fc06a12a1 bitbake: cooker: Allow featureset in error state
Currently, if an invalid PR service is selected the server will error
with a traceback. This is because its set into the error state and the
setFeature code will then fail since its not in the initial state.

Modifying the featureset in the error state is acceptable, we just need
to ensure we don't trigger a reset, that would happen from whichever
code handles the error.

[YOCTO #6934]

(Bitbake rev: c52841445d8db8f84c4da34203b195fea5874247)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-28 14:03:02 +00:00
Aníbal Limón b585c4b8b8 bitbake: fetch/wget: latest_versionstring clean improvments minor
Update documentation strings in _check_latest_dir and _check_latest_version
methods with  the correct return types.

_check_latest_version method remove unused testversion variable.

(Bitbake rev: e30c11af7bc8a1f3d8c9198ee3c0065bd6b447cc)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-28 14:03:02 +00:00
Aníbal Limón 0ce833dfa2 bitbake: tests/fetch: Update wget latest_versionstring cups case
Update test case for cups is needed because match only 2.0.0
versions see VERSION=2\.0\.0 in the previous string.

(Bitbake rev: 148aba30155f4de17f6c6fb9b4c37f08a2db202b)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-28 14:03:02 +00:00
Aníbal Limón 158aee79f6 bitbake: fetch/wget: latest_versionstring remove newuri set because is previous set
(Bitbake rev: d2890c8868281cb7d89a8dc66e5db589cddb3363)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-28 14:03:02 +00:00
Aníbal Limón 75b82b03b0 bitbake: fetch/wget: latest_versionstring add support for search in RAW html lines
Some upstream sites put the name of the package in the body of href tags,
i.e. <a href="#43">somepackage-v1.4.10.tar.gz </a>.

(Bitbake rev: 4fa8542a8880d5749fbb3382706e011b012024d0)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-28 14:03:01 +00:00
Aníbal Limón aa35076f34 bitbake: fetch/wget: latest_versionstring remove unnecessary usage for name in version comparision
(Bitbake rev: 91b6b38ccee5e9d5bb27e4cd1578356c3b3dc607)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-28 14:03:01 +00:00
Aníbal Limón 4b2932906c bitbake: fetch/wget: latest_versionstring improvments in searching
Validate if package contain version string if not return the current
version cases for spectrum-fw and corpus recipes.

_check_latest_version return the latest version available don't
take into account the current version previous this only return
the upstream version if it greater than the current version.

(Bitbake rev: 91a7ac8c7f87f98e366585cf9720ec35b0790bae)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-28 14:03:01 +00:00
Aníbal Limón af47f14c71 bitbake: fetch/wget: latest_versionstring add package_custom_regex_comp
package_custom_regex_comp is built with the current package name and
then used to search upstream version this reduces custom regex'es in
sites that have different packages in the same directory.

(Bitbake rev: a69d5d48c4bf9a3df3121cc4e69ba5d7e947ad8d)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-28 14:03:01 +00:00
Aníbal Limón cd40af6b1d bitbake: fetch/wget: Improve REGEX_URI handling
Latest version string only try to find latest directory when REGEX_URI
isn't specified to avoid unnecessary processing and makes code easier

(Bitbake rev: afc33ec7cdb7d8ee3602a23fa973551ca5510ac4)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-28 14:03:01 +00:00
Aníbal Limón a7bdd0eb29 bitbake: fetch/wget: _init_regexes rename variables to be more consistent and move dirver_regex into it
(Bitbake rev: 583e5d9c1c3cb8a25d34648078200faadc597e9c)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-28 14:03:00 +00:00
Aníbal Limón 35b7089b34 bitbake: fetch/wget: latest_versionstring create _init_regex method for have one place when regex'es are defined
(Bitbake rev: 6989193a875afd0b1f0f88c95e28cb81bfdb4eaf)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-28 14:03:00 +00:00
Belen Barros Pena 6cecdd1f36 bitbake: toaster: remove the word 'project' from layers and machine
Remove the word 'project' from the 'Layers' and 'Machine'
sections of the project page, following feedback from the
QA team, who suggested that the word 'project'
raised questions regarding the scope of the configuration,

(Bitbake rev: 1bf19f66260aaca2caa300e976bf90479e2c48f3)

Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-28 14:03:00 +00:00
Belen Barros Pena fee87cdd57 bitbake: toaster: release name consistency
Small changes to the project, new project and all layers
pages to ensure consitency in release naming across the
interface.

The changes are:

* In the new project page, change the label 'release version' to
'release'

* In the new project page, sort the releases in the dropdown menu
in ascending alphabetical order

* In the new project page, remove the release name that was
showing between brackets after the release description in the
dropdown menu

* In the project page, make sure the release information
shows the release description field instead of the release name,
to keep consistency with the new project page

* In the all layers page, provide some help text for the branch 'HEAD'

(Bitbake rev: 9a90bf201dab83060f0bdd6ac08c72b8d62f6060)

Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-28 14:03:00 +00:00
Alexandru DAMIAN af51fb0674 bitbake: toasterui: Compatibility patch for daisy and dizzy
This patch brings in changes that allow a toasterUI coming in
from 'master' branch to record data from a 'daisy' or 'dizzy'
bitbake server.

This is needed to allow Toaster to record builds running
on older branch releases.

(Bitbake rev: 8d75e28e0688a6520311afce36543175f36910b3)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-28 14:03:00 +00:00
Belen Barros Pena dc1be9c438 bitbake: toaster: fix padding of build notifications
In managed mode, we show the name of the project in the build
notifications of the all builds page. The way we show the
project requires modifying the default padding of the .alert
class. This patch makes sure the padding modification is
only applied in managed mode, i.e., when the project name
needs to be shown.

(Bitbake rev: d1cd8b229c402fae3499e35415ad79c0e11ee517)

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-28 14:02:59 +00:00
Belen Barros Pena c31f30918b bitbake: toaster: make 'latest builds' section consistent across pages
Make sure that the 'latest builds' sections in the all builds
page and the project page are identical:

* no icon to represent build outcome
* remove machine name
* show date only when the build is more than 24 hours old
* same date and time format

(Bitbake rev: 99ac7379e5df6c5cc491c2be591b15ad7ec04caa)

Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com>
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-28 14:02:59 +00:00
Belen Barros Pena be2475b409 bitbake: toaster: fix errors and warnings display
In the 'Latest builds' section of the project page,
show number of errors and number of warnings as we
show them in the all builds page.

(Bitbake rev: 3f6b33472820e339c0f057c2e30f25ec2a04366b)

Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com>
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-28 14:02:59 +00:00
Alexandru DAMIAN 126bca43b7 bitbake: toastergui: new project page
Patch that brings in to new project page according to specifications.

[YOCTO #6596]

(Bitbake rev: be357d147d525ac3d6b7bd33ca0aa594728ffedd)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-28 14:02:59 +00:00
Alexandru DAMIAN 5790337cec bitbake: toaster: fix loadconf path calculation
Fixing the path calculation for local layer sources, as the
path need to be absolute.

Added tests for pieces of code.

(Bitbake rev: e764834f3c7c7da9356fa11b62e1fa8f643986fc)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-28 14:02:58 +00:00
Alexandru DAMIAN d9644d49fd bitbake: toasterui: fix layer identification for managed builds
If we have a managed build, we match the layers used for build
with the layers configured for project, as we know where the layers
are coming from

[YOCTO #6962]

(Bitbake rev: e02ec052a62cbc476bdac65cb7cea1167ce04781)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-28 14:02:58 +00:00
Alexandru DAMIAN af1f9fda8b bitbake: toaster: display Toaster exceptions and other fixes
Changing ToasterUI to log toaster exceptions on a different level than
build errors.

Updating the build dashboard to show Toaster exceptions.

We add extra logging to console for exceptions.

Fixed a problem where packages database entries were created instead of
being looked up in the database, conficting with entries created to
satisfy dependency information.

Toaster now checks for invalid states at startup and performs needed
cleanups.

Removed loading reference to jquery-ui.min.css as we do not have this
file.

(Bitbake rev: 2378812bc24d433125fb940f110154f0ce638448)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-28 14:02:58 +00:00
Alexandru DAMIAN 707a960ffa bitbake: toastergui: do not show project info in interactive mode
The most recent builds section showed the project name and the Run Again
buttons regardless whenever the Toaster was in interactive or managed
modes. These widgets have no meaning in interactive mode, and this
patch disables the widgets if toaster is not running in Managed mode.

[YOCTO #6776]

(Bitbake rev: 86dced90db666aa73ebb7ebb48d64fc08f66e7e2)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-28 14:02:58 +00:00
Alexandru DAMIAN 4c82dfbb70 bitbake: toastergui: update layer search criteria
In order to accomodate the designs around imported layer,
we add a "project" field for in the layer versions.

The field must be set if and only if the layer is manually
imported in the project. This will prevent information leakage
between different projects.

The views have been updated to perform relevant layer queries
in a single location.

(Bitbake rev: e1f7ec868b0702dfd27d5708581c134aaa6f4ae8)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-28 14:02:58 +00:00
Michael Wood 152e2d9cc5 bitbake: toaster: base Only show New Build button when there are > 0 projects
Only show new build button if we have defined at least one project as we
can't select a project to build against if there are no projects created
yet.

(Bitbake rev: 6daada59ee846c4e957bba3574dc262a0c79854d)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-28 14:02:57 +00:00
Alexandru DAMIAN 49ac18dd0f bitbake: toaster: use http proxies to fetch data
Under some network configurations http proxies are used
for Internet access. This patch makes Toaster obey
the http_proxy environment variable when fetching
information from layer indexes.

(Bitbake rev: 9f3cf52b3a96768e5b9764dde02833b078fe61e4)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-28 14:02:57 +00:00
Belen Barros Pena 39bace01e2 bitbake: toaster: do not show target if target name is empty
In the all targets table, all entries should have a target
name. If a target does not have a name, something has not
gone to plan, so don't show it.

(Bitbake rev: 27023ce2d264ce05008ef9af33982b054c6a87b5)

Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-21 11:49:24 +00:00
Belen Barros Pena f3ffeba4a7 bitbake: toaster: fix dependencies dialog layout
Remove the bottom margin of forms inside dependencies
modal dialogs.

(Bitbake rev: dc9b4a4ab06ed49f3fcab4f644b8bc136f19fdb0)

Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com>
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-21 11:49:24 +00:00
Belen Barros Pena 57b8ccc670 bitbake: toaster: add no results state to all layers page
When you search for a layer and your search returns no results,
we should show you an alert and a link to show back all layers,
as we do in all other tables.

(Bitbake rev: c67a5dd8026833e167c58a17643febee130dbb35)

Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-21 11:49:24 +00:00
Belen Barros Pena 2066b9b47f bitbake: toaster: Tiny refinements to the new build button dialog
* Get rid of the display:block attribute for the "View
all projects" link, to stop it from firing when you
click outside (but next to) the link

* Give some margin to the incomplete configuration
alert

(Bitbake rev: 83af0db872ea28965cd6007ad72ff210f67a4f30)

Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-21 11:49:24 +00:00
Michael Wood 3530316f9b bitbake: toaster: project page remove additional tooltip for Change pencil
We have a global pencil icon tooltip so avoid two tooltips appearing by
removing them from the project page. This also means it's one less place to
update it.

(Bitbake rev: c2021dda953db51f59fb115542ea4a329a854f76)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-21 11:49:24 +00:00
Michael Wood f26c3cd6f1 bitbake: toaster: Add New Build Button feature
This adds a quick access dropdown menu feature for running builds on a
selected project.

[YOCTO #6677]

(Bitbake rev: e92769b43b00764082a7cb2207e314b40510ef62)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-21 11:49:24 +00:00
Michael Wood 5b8a62dad7 bitbake: toaster: libtoaster: Add getProjectInfo utility function
Add a utility function to return a specified project's info/config
This re-uses the existing server code path for the project edit
except that it allows any project id to be used as a parameter

(Bitbake rev: af42ea5f006c5cf55a7c57a42904f412639d261f)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-21 11:49:23 +00:00
Michael Wood fa9206e427 bitbake: toaster: Create libtoaster.js with some utility functions
Replace main.js with libtoaster. This can be a place for common
functionality for toaster. Calling it lib... makes it more obvious as
well as helps with code readability due to the namespacing.

(Bitbake rev: cdf6178ae3675b40afca9f08d491ca1b7e45914e)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-21 11:49:23 +00:00
Alexandru DAMIAN 0b6859cdf3 bitbake: toastergui: layer name correlation
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.

(Bitbake rev: 4357200aed522ad56cfd84917f877645b83b6a70)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-21 11:49:23 +00:00
Michael Wood 5b0616ad7d bitbake: toaster: skip virtualenv when searching for django apps
If we are using a virtualenv in the current search path we end up trying
to add modules to the django apps list which do not have the correct
load path or are internal to other modules. Fix this by skipping the
virtualenv path.

[YOCTO #6896]

(Bitbake rev: 3f614295d688c33b690f63ff7eb28e6988707919)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-21 11:49:23 +00:00
Belen Barros Pena 2f3e40c5d8 bitbake: toaster: fix file name collision
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.

(Bitbake rev: d4a47bc84f762666a847f1152cc2e75c9ef36092)

Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-21 11:49:23 +00:00
Robert Yang c09e56168e bitbake: bitbake-worker: exit normally when SIGHUP
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.

(Bitbake rev: 40d2ae0723de2bf5fee343faafb4afda40546839)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-20 14:15:32 +00:00
Otavio Salvador 3c7cf5dc33 bitbake: bb.codeparser.py: Remove reference for oe.utils.contains
The oe.utils.contains function has been removed from OE-Core metadata
as the references for it has been replaced to use the
bb.utils.contains.

(Bitbake rev: 5cfdebe7a67dccc7552ff80c1ccc970e36d562df)

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-20 13:27:52 +00:00
Ross Burton d895e9632d bitbake: depexp: use stateForceShutdown instead of stateStop
This state was renamed in bitbake 12e9d3 but this use of it wasn't changed.

[ YOCTO #5445 ]

(Bitbake rev: 196106100e2dedfacce95be0ee6def94c5a80f27)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-20 13:27:52 +00:00
Brendan Le Foll edaeb89408 bitbake: cooker.py: fix loginfo op being set to an invalid value
loginfo "op" was being set to invalid values in saveConfigurationVar it was
working because set is a python global but append is not. This replaces both
the "op" with strings and removes the crash when calling appendConfigurationVar

(Bitbake rev: 2a8e847de85546d43600a561f9c63aa36bd69222)

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-12 17:04:50 +00:00
Alexandru DAMIAN c5d19aae55 bitbake: toastergui: fix XSS injection points in projects page
We close XSS injection points in Projects page.

* modify the json filter to properly escape HTML tags in strings
* enable $sanitize to automatically sanitize dangerous HTML in
user-supplied input
* clean dangerous characters in targets field, as that field contents
will be directly passed to a shell command

Based on the vulnerability discovered and the patch provided by Michael Wood.

(Bitbake rev: 23c440db9c076ca37e651bdbbdbefee54998e1dc)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-12 17:04:50 +00:00
Alexandru DAMIAN 326d5b1a28 bitbake: toaster: importing angular service
We import angular services ngRoute and
ngSanitize that helps performing user-input
sanitization in order to prevent XSS.

Both services are version 1.2.23.

License is MIT.

(Bitbake rev: 4165895329b3a5e439a38ee749b089637dc502d7)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-12 17:04:50 +00:00
Belen Barros 76f1800f11 bitbake: toastergui: Silly UI fixes
Small fixes to the UI of the project.html and targets.html templates.

In project.html:

* Remove some inline styles and replace them with declarations
in default.css

* Make sure that the 'add' and 'build' buttons in the project
configuration areas have nice, rounded corners

* Add some space between the machine name and the change icon

* Remove the input-prepend class from the build form (we don't
need it)

* Apply the success class to target names in completed builds

* Bold machine and project name in the change notifications to
match all other notifications

* There is a bug in Twitter Boostrap in tooltips inside buttons, so
moving the tooltip in the 'build' button outside the button tag

In targets.html, just add a missing space between the semicolon
and the first layer name in the add layer notification.

(Bitbake rev: 19113c4fe915be7db51ab06dfab5ea0797faea84)

Signed-off-by: Belen Barros <belen.barros.pena@intel.com>
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-12 17:04:50 +00:00
Michael Wood 3a338a2be7 bitbake: toaster: Replace bootstrap js with the correct version
The bootstrap version we are working with is 2.3 not 3

(Bitbake rev: 76c90fe9dcd6fc1aa7e82d9dca0ea9e653d322a1)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-12 17:04:50 +00:00
Alexandru DAMIAN 7b65fa9bbb bitbake: toastergui: changes for the Project page, round 3 of reviews
This patch implements the round 3 of reviews for the Project
page, including fixing the time display, fixing the build list
display, with fade-in and fade-out animations, and various
small layout fixes.

[YOCTO #6587]
[YOCTO #6731]

(Bitbake rev: 09e3ba8f800a03de731b022543cae33a46be17ef)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-12 17:04:49 +00:00
Alexandru DAMIAN abf7551f60 bitbake: toaster: separate the load configuration file command
We separate the load configuration command as to allow
system administrators load toasterconf.json file as part of the
setup process.

[YOCTO #6895]

(Bitbake rev: 3ed596ac4e21a4494fd7f6cd8739d460fd98512f)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-12 17:04:49 +00:00
Michael Wood 6f0496ef55 bitbake: toaster: Update filter count labels when Add/Remove layers
When the user has added/removed a layer but no page reload/requery has
happened we need to update the filter count labels client side.

[YOCTO #6861]

(Bitbake rev: d17e8425de6c609394b9a029afa2dcb455df0b3c)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-12 17:04:49 +00:00
Michael Wood 6cfd8aa148 bitbake: toaster: Fix the table data so that it matches the column order
This fixes the issue where the column is under the wrong table header.

[YOCTO #6684]

(Bitbake rev: 4ef276e379d58130bb50024d7b74b7774fce6fdd)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-12 17:04:49 +00:00
Alexandru DAMIAN 42afeb422e bitbake: toastergui: Various fixes for projects, layers and targets page
This is a combined set of fixes for the project, layers and targets
pages in the project section of toaster.

The fixes correct behaviour and look in various parts of the page,
including submitting XHR commands and updating the DOM with the correct
info.

(Bitbake rev: 96d7738f964784871c928c376cb9fbc9a275cf00)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-12 17:04:48 +00:00
Alexandru DAMIAN 46f1fbe3ab bitbake: adding angular-animate plugin
We add a static copy of the Angular's animate plugin,
version 1.2.23

Licensed under MIT.

(Bitbake rev: 12162fda32af4bc805d6ff5b0348d93befe2f623)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-12 17:04:48 +00:00
Alexandru DAMIAN 78e3a7877b bitbake: toaster: update Release model to pinpoint to specific Branch
We update the release model to pinpoint to specific branch,
instead of holding a branch name that needs to be matched.

This is needed because we move away from mixing branches on different
layer sources.

Various minor changes to models file.

(Bitbake rev: d58aacc69b1832f99758b941803123329e06082d)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-12 17:04:48 +00:00
Alexandru DAMIAN 990fb9ed6c bitbake: toaster: SQL query logging
We add a logger, enabled through the settings.py, that
logs all SQL queries, with timestamp and duration, to console.

This is helpful in profiling the SQL queries.

The facility is disabled by default.

(Bitbake rev: 54fd0a76fa3154adfab5688ecc96963f42cded11)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-12 17:04:48 +00:00
Alexandru DAMIAN 3e9fc8d091 bitbake: toasterui: performance improvements
Improve the performance of data logging in toasterui.
We modify the data queries used to:

 * cache searching in memory
 * insert in bulk (i.e. multiple values per insert, where possible)

On development test rig (networked mysql), on no-op build,
time for data recording is reduced from 4:10 to 1:30 (minutes).

We also improve the logging, so it is easier to detect
toasterui errors.

(Bitbake rev: d42784432f927f58730caf80546c66772e0fec89)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-12 17:04:48 +00:00
Alexandru DAMIAN 0ca70ce37a bitbake: toaster script: webport option and other improvements
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]

(Bitbake rev: cd3eb5b051743463cfe51dba97cae4da75420048)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-12 17:04:48 +00:00
Martin Hundebøll 3e068831a1 bitbake: progressbar: use '/usr/bin/env' in shebangs with python
To support yocto on systems with python3 as default version, scripts
should use /usr/bin/env python in the shebang, as this allows the use of
a fake env to mimic python2 as default version.

This patch simply replaces occurrences of #!/usr/bin/python with
 #!/usr/bin/env python and was done with this oneliner:

     git grep -lE '^#!/usr/bin/python' | xargs \
         sed -i 's|/usr/bin/python|/usr/bin/env python|'

(Bitbake rev: 90d9bf1bda282fb5d053a42438a8cfd02475b9cd)

Signed-off-by: Martin Hundebøll <martin@hundeboll.net>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-12 15:25:17 +00:00
Aníbal Limón 6bb241a278 bitbake: fetch/wget: Add latest_versionstring method
Being able to query whether updated versions of a url are available
is useful, not least for the package reporting system. Since such code
is closely linked to the url type and the url itself, the fetcher
makes a locical place to contain this code.

For wget based urls this means taking upstream directory listings
and searching those for later versions, returning those that are
found.

The patch also adds unittests for this function so that if
improvements are made, the original test urls can be used
to evaulate the those changes.

This is based on code from Irina Patru <irina.patru@intel.com>.

(Bitbake rev: a8272e22b7819e0e8afd8e291d276f5f28fc0007)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-12 15:25:17 +00:00
Aníbal Limón 7587877e5d bitbake: fetch/git: Add latest_versionstring method
Being able to generate a version string representing the most recent git commit
given git is useful, not least for the package reporting system.

This adds in a latest_versionstring method to the git fetcher
which allows users to query the latest version using ls-remote
and filtering the responses.

The patch also adds unittests for this function so that if
improvements are made, the original test urls can be used
to evaulate the those changes.

This is based on code from Irina Patru <irina.patru@intel.com>.

(Bitbake rev: f71c8c0354e87fed80bc845db6728e6e18ce9c4d)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-12 15:25:17 +00:00
Stefan Müller-Klieser 2f17b2ce7f bitbake: data_smart.py: fix variable splitting at _remove mechanism
If we split variables only at whitespaces, a slipped in tab will render
a value unremovable.

(Bitbake rev: 9f171ea755644ecd9d2b3d7ed13bf8ec09ec917a)

Signed-off-by: Stefan Müller-Klieser <s.mueller-klieser@phytec.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-08 11:14:31 +00:00
Richard Purdie 01a61c8e6e bitbake: siggen: Fix shared work checksum mismatch/rebuild issues
Similar to the last shared work task signature bug, we've found another
one. Looking at the improved output of diffsigs in this case:

runtaskdeps changed from [
'autoconf_2.69.bb.do_populate_sysroot:virtual:native',
'gnu-config_20120814.bb.do_populate_sysroot:virtual:native',
'libgcc-initial_4.9.bb.do_patch:virtual:nativesdk'
] to [
'autoconf_2.69.bb.do_populate_sysroot:virtual:native',
'gcc-crosssdk-initial_4.9.bb.do_patch',
'gnu-config_20120814.bb.do_populate_sysroot:virtual:native'
]

so we can get a different task hash since libgcc sorts before gnu-config
and gcc sorts after it. We could do with a way of fixing this, the best
I can come up with is to include a single parent directory. Since
recipes are never at the top of any metadata trees I've seen, this
should suffice for now.

I'm planning to burn the concept of shared work within bitbake
and do something at the metadata level in the 1.8 timeframe as its just
too fragile as things stand and hard to fix well.

(Bitbake rev: d753644c67d163f338f2bdc3d600203e8b1a5734)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-08 11:14:31 +00:00
Richard Purdie 2db07ca8a3 bitbake: siggen: Add computed hash code to verify hash computation to dumpsig
This is useful code to double check the computed checksum value if nothing
else. Might as well have it in tree.

(Bitbake rev: 54ecf96c6f031927ee2410f6efde4e16f19bbf66)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-08 11:14:31 +00:00
Richard Purdie 636dcb84fe bitbake: siggen: Ensure we output if the ordering of runtaskdeps changes
Order of runtaskdeps is important. If the hashes differ we should print output.
This is complicated by shared work where the filenames themselves can differ,
but the checksum should not.

This fixes a case where two different checksums could show no output with
bitbake-diffsigs.

(Bitbake rev: 40c95cb9def282dc88234cd72ff462d7a01e47c1)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-08 11:14:31 +00:00
Alexandru DAMIAN 7bd03ac241 bitbake: toastergui: fix invalid build url usage
We need to pass the URL for the build action as javascript
parameter, since the project ID is different for each build,
instead of using the project id of the most-recently-used project.

(Bitbake rev: 35c1de4b05c64ee1c436be2dfbd97dcf9ed9ed71)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-06 16:45:23 +00:00
Alexandru DAMIAN fc75011506 bitbake: toasterui: improvements in data reading
We add improvements in data reading, following
issues discovered in testing.

- elapsed_time is now read from buildstats
- we add safeguards to not fail logging if the build was triggered
with a toaster_brbe configuration, but it's running in
1.6 mode
- added log markups for build finish to let other programs
known when the work is done.

[YOCTO #6833]
[YOCTO #6685]
[YOCTO #6887]

(Bitbake rev: 0b225035cefee3d3713a93f9a432e5e4d4e174f1)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-06 16:45:23 +00:00
Richard Purdie 7105d44d87 bitbake: prserv: Use WAL mode
Ideally, we want the PR service to have minimal influence from
queued disk IO. sqlite tends to be paranoid about data loss and
locks/fsync calls. There is a "WAL mode" which changes the journalling
mechanism and would appear much better suited to our use case.

This patch therefore switches the database to use WAL mode. With this
change, write overhead appears significantly reduced.

(Bitbake rev: 0cdd48261daeb17efc528b5de0ac81c8836e8565)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-06 16:45:23 +00:00
Gary Thomas 5dca71bc2a bitbake: bitbake: Make printed 'runqueue' be consistently capitalized
This has always bothered me:
  NOTE: Preparing runqueue
  NOTE: Executing RunQueue Tasks

This patch changes the messages to be consistent.

(Bitbake rev: 72ac9f9227fbfb4dc8b933b357d21aa0e4060959)

Signed-off-by: Gary Thomas <gary@mlbassoc.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-06 16:45:23 +00:00
Aníbal Limón 25e3e57c55 bitbake: bs4: Add beautifulsoup 4.3.2 to assist the fetcher
Added Beautifulsoup module because fetch/wget latest_versionstring
method depends on it.

This provides support to fetch/wget.py module for search new package
versions in upstream sites.

(Bitbake rev: 4626c9b77e5eded97507b6f9ca0d891f9a54bb8a)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-06 16:45:23 +00:00
Fredrik Svensson bc6330cb7f bitbake: fetch2/git: Allow other namespaces than refs/heads to be searched.
This makes it possble to fetch Gerrit review references which are
normally stored under refs/changes.

Please disregard previous patch with the same topic.

(Bitbake rev: 268e9c0c6830e8e621c418f20c2ca12dc840e48b)

Signed-off-by: Fredrik Svensson <fredrik.svensson@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-06 16:45:22 +00:00
Richard Purdie 2380ebecd1 bitbake: prserv/serv: Ensure sync happens in the correct thread
The sync/commit calls are happening in the submission thread which can
race against the handler. The handler may start new transactions which
then causes the submission thread to error with "cannot start a
transaction within a transaction".

The fix is to move the calls to the correct thread.

(Bitbake rev: 92e128a0e331e563cfe48827e95939041c16c88e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-04 15:00:19 +00:00
Alexandru DAMIAN f19b4e995e bitbake: bitbake: clarify startup message
Fix the startup message by making clear which
server runs on which port.

(Bitbake rev: 26d601ab2a677a422bab425696a2cf6357ff3576)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-30 13:39:52 +00:00
Alexandru DAMIAN 24dab21567 bitbake: toaster: update web vcs fields for layers
We update the layer vcs web fields to record extra URLs
for directory and file viewing. Updating the layers
view to show this data.

(Bitbake rev: 14762e182c8af22fd0fa96f0ba0db1ecd2495fbc)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-30 13:39:51 +00:00
Alexandru DAMIAN 298c3d52ba bitbake: toastergui: provide download file capability
We add, for the localhost environments, the capability to
download build artifacts. This is a pontentially dangerous API,
because it gives unrestricted read access to the build environment
file system - do not expose the functionality directly to the
web layer, but use filtering/translation code, such as
exemplified in the build_artifact view.

The capability for remote build environments is dependent
on bug 6835, as to use the collect storage as intermediary
storage for serving files.

[YOCTO #6834]

(Bitbake rev: 5fce7f6e83c6143244faa9618b7ed20c1106e08f)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-30 13:39:51 +00:00
Alexandru DAMIAN 2837b110ae bitbake: toaster: change startup parameter passing to avoid race
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.

(Bitbake rev: 7c333350418c4140e6c988c5272940f8057d327d)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-30 13:39:51 +00:00
Alexandru DAMIAN a0660718e6 bitbake: toaster: improvements for admin pages
The default django URL validator marks git URLs as not valid,
so we change the default validators to a URLValidator-derived
that adds git and ssh protocol schemas and inhibits the
frontend URL validator.

We update the branch names based on the white-listed
branch names in the Releases name.

Adds proper class string to ease usage in admin section.

Other small improvements.

(Bitbake rev: 7d51f895bd56bd18f2258059b377851c2ce82114)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>

Conflicts:
	bitbake/lib/toaster/orm/admin.py
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-30 13:39:51 +00:00
Alexandru DAMIAN 97c0beb0eb bitbake: toaster: use modified validators for git url fields
The default django URL validator marks git URLs as not valid,
so we change the default validators to a URLValidator-derived
that adds git and ssh protocol schemas and inhibits the
frontend URL validator.

(Bitbake rev: 7223619505c0939358287e5baf84da0a91cb8d34)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-30 13:39:51 +00:00
Alexandru DAMIAN a1f7a09801 bitbake: toaster: changes to the landing page
This patch brings in a new landing page to be shown
when there are no builds and no projects available.

The builds page now displays only only the builds part,
without the landing page bits.

There is a new projects page that displays the All Projects
table as specified in the design.

[YOCTO #6682]

(Bitbake rev: c6c7c05521daa9bf16c122d7d472330ca4c05e88)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-30 13:39:50 +00:00
Alexandru DAMIAN c7382dbd8b bitbake: toastergui: protect variable value reads
We make sure we don't throw an exception when reading
non-existent variables from the database, and we return
empty data that can be displayed without ill effects.

This fixes the Configuration page on empty builds.

(Bitbake rev: 5b13eabdec1e8a052d343fd67654d7fe8974224f)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-30 13:39:50 +00:00
Alexandru DAMIAN 477587b996 bitbake: toastergui: refactor objects get in views.py
We refactor the objects.filter()[0] pattern to the proper
Django QuerySet usage of objects.get() to make sure we
get one and only one object for a query.

(Bitbake rev: 6abec6631fbadaecc474f2a4e7981fde3c58657c)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-30 13:39:50 +00:00
Alexandru DAMIAN 1b109c7908 bitbake: toastergui: project edit capabilities in all layers page
This patch definitivates the all layers page, providing interactivity
for adding and removing layers inside the project from this page.

[YOCTO #6590]

(Bitbake rev: e690080f83ad53c5e4a31e8c0fba2cc744eea1eb)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-30 13:39:50 +00:00
Alexandru DAMIAN 960580cb70 bitbake: toaster: fix Project page in order to trigger builds
This patch rewrites the Project page and the additional
infrastructure in order to fix a bug that makes triggering
builds through UI impossible, and to introduce data feeds
for suggestions for the user.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-30 13:39:49 +00:00
Alexandru DAMIAN 1a463ab98e bitbake: toaster: fix layer source update code
We fix problems in the layer source update code related to
non-null field restrictions.

We add missing layer dependency update.

(Bitbake rev: e1169127405ce10a044ac9cdf4a892838a99d01f)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-30 13:39:49 +00:00
Alexandru DAMIAN b27fc6f18f bitbake: toaster: we add static copies of AngularJS and related libraries
We add the Angular JS library, release 1.2.23
https://angularjs.org/

We add the Bootstrap directives for AngularUI, release 0.11.0
http://angular-ui.github.io/bootstrap/

The license ued for all libraries is MIT

(Bitbake rev: 8b4d33a6182486795cca53b2832967de583281e1)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-30 13:39:49 +00:00
Alexandru DAMIAN f16f434bf2 bitbake: toastergui: update breadcrumb in analysis pages
If we are in managed mode, and we inspect a build that comes
from a project, we modify the breadcrumb as to display
the project from where the build originated.

[YOCTO #6776]

(Bitbake rev: fe568c9350a691c863f9f5bf8703d639c12a9961)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-30 13:39:49 +00:00
Alexandru DAMIAN 4f1390cd23 bitbake: toasterui: save build id in build request on first chance
We change the saving of the build id to the build request as
soon is the build is created, as to allow for a consistent
display of build data while build is in progress.

(Bitbake rev: 9504ca6a69ba6da21f88b3cc77fa5910d886b6c3)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-30 13:39:49 +00:00
Belen Barros Pena 14e5b27324 bitbake: toastergui: Show failed tasks in the build dashboard
The build dashboard is supposed to show failed
tasks (if any) in the "Tasks" section.

(Bitbake rev: fc2a7be3982ea5441beef1b7e9e187caf5df2beb)

Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com>
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-30 13:39:48 +00:00
Belen Barros Pena 324b277336 bitbake: toastergui: Tiny change to help text
Modify the help text we show for the "Task covered by"
information to indicate that a task can be covered by
more than one task.

(Bitbake rev: cad45dfebaabe1875f786ba7ceeb3ee377e926b3)

Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-30 13:39:48 +00:00
Belen Barros Pena 754f3e7e0a bitbake: toastergui: Remove extra <div> from build dashboard
For builds that generate no rootfs files, an extra <div>
was being added between the build status and the build
summary section. This commit removes the extra <div> and the
white space it created.

(Bitbake rev: e84db294f733464b4952a3c92120e5b19e8c2750)

Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-30 13:39:48 +00:00
Belen Barros Pena ceb113971a bitbake: toastergui: Remove sorting from "Size over total" column
The sorting in this column is tied to the sorting by
"Size". If we make both columns sortable, when you sort
by one of them it also sorts the other, and the table looks
as if you have sorted by 2 columns at the same time.

This was fixed in YOCTO #6061, but turned up again.

(Bitbake rev: acf372eb5a083451ab1507dd24e3a84380420c9a)

Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-30 13:39:48 +00:00
Belen Barros Pena 719f5e41b3 bitbake: toastergui: Fix blue highlight for failed tasks
Change the background colour of table rows with the .error
class from white to transparent, to make sure the blue
highlight animation works when you click on the order
number in the task details page.

(Bitbake rev: 25fd347b6a972164af9a0b5b56f803a296290246)

Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-30 13:39:48 +00:00
Belen Barros Pena 927943bd9e bitbake: toastergui: Fix reverse dependencies tab for packages included
Make sure the reverse dependencies tab for included packages
shows a notification when the number of reverse dependencies
is 0, instead of an empty table.

(Bitbake rev: 8dc3e582eb5f1d6e9a79de59a53014495a48e862)

Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-30 13:39:47 +00:00
Belen Barros Pena 7aaedc2004 bitbake: toastergui: Add missing task descriptions
The "Prebuilt task could be based on" table we provide in the task
details page for prebuilt tasks is missing the task descriptions.
This patch adds them.

[YOCTO #6328]

(Bitbake rev: 64894d640ee70a301f6f399db118ed17c0ccde08)

Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com>
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-30 13:39:47 +00:00
Belen Barros 93835e78c0 bitbake: toastergui: Amend show rows options
In the templates basetable_bottom.html and basetable_top.html
remove the '2' and '5' options from the 'show rows' menu, and
add the '150' option as per design specs.

Alex edited conflicts.

(Bitbake rev: 03f7ba3d8a101e05c106e5fb65eb379a6e4cb476)

Signed-off-by: Belen Barros <belen.barros.pena@intel.com>
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-30 13:39:47 +00:00
Belen Barros Pena daad086438 bitbake: toastergui: Fix help text in packages 'Reverse runtime dependencies' tab
For those packages renamed at packaging time, the help text
in the 'Reverse runtime dependencies' tab was missing the
original package name.

[YOCTO #6327]

(Bitbake rev: ca8fc7bd4ad940c8eeefa57619a6c8423f116fc7)

Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-30 13:39:47 +00:00
Alexandru DAMIAN 83edc576b2 bitbake: toasterbld: update checksettings command
We update the checksettings command to allow for upstream
git url detection at runtime by looking up a named remote
of a local repository.

Also various small fixes in check settings.

(Bitbake rev: c127ecb3b5b27b705b8714af063d910b944c8bbc)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-30 13:39:47 +00:00
Michael Wood 87dec81de6 bitbake: buildinfohelper: Make sure we use the orm defined value for loglevel
We need to consistently use LogMessage.INFO/WARNING/ERROR to make sure toaster knows
how to categories these rather than passing in the "raw" loglevel value
which in best case comes from python logging but worst case any value.

[YOCTO 6885]

(Bitbake rev: 3aa13bc1d8218c97c76581a895fa5f03ff807fbe)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-30 13:01:22 +00:00
Ben Shelton cf82c6756b bitbake: prserv: don't wait until exit to sync
In the commit 'prserv: Ensure data is committed', the PR server moved to
only committing transactions to the database when the PR server is
stopped.  This improves performance, but it means that if the machine
running the PR server loses power unexpectedly or if the PR server
process gets SIGKILL, the uncommitted package revision data is lost.

To fix this issue, sync the database periodically, once per 30 seconds
by default, if it has been marked as dirty.  To be safe, continue to
sync the database at exit regardless of its status.

(Bitbake rev: 424df64f2e9679043f0ce2b4f7dfc59c3d404304)

Signed-off-by: Ben Shelton <ben.shelton@ni.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-28 15:00:39 +00:00
Oscar Utbult 2794f916ff bitbake: utils.py: don't use len() for truth value testing.
(Bitbake rev: 4bdfeab7845bdcd62a4928200dd13701414a464e)

Signed-off-by: Oscar Utbult <oscar@oscr.io>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-28 14:58:34 +00:00
Koen Kooi f5b9b389c0 bitbake: fetch2: add .lz compression support
See http://www.nongnu.org/lzip/lzip.html for details on the compression
format.

(Bitbake rev: 9027b1273b5405c7269b013604ab417771b5eafe)

Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-28 14:58:26 +00:00
Alejandro Hernandez ef3755b739 bitbake: fetcher: fix getVar call due to incorrect argument datatype
(Bitbake rev: 2ac33aac3446cb12227f1b8daa5f27f417c9bb9e)

Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-11 08:11:03 +01:00
Alejandro Hernandez 505a6b696a bitbake: fetcher: fix BB_STRICT_CHECKSUM datatype check
Forcing strict to be a string, to avoid problems when performing comparisons

[YOCTO #6762]

(Bitbake rev: b8ed2098bdea2afd93ab4e3e1b834f3a31cb60de)

Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-06 16:09:53 +01:00
Alexandru DAMIAN 39ca8b429b bitbake: toastergui fix size rendering in dirinfo page
We fix the rendering of the size field in dirinfo-related pages
by directly calling filtered_filesizeformat and not rendering
it through the template engine.

Additionally, we enable error dumping into logs if an
Exception happens.

[YOCTO #6669]

(Bitbake rev: afa2431c21b8271b05dc4cca4265f98d9f338007)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-29 14:11:59 +01:00
Konrad Scherer e92e8009a1 bitbake: prserv/serv: Improve error message when prserver cannot bind to supplied host address
If localhost resolves to a remote address (due to a misconfigured network),
starting the pr server will fail without useful information.

To reproduce, add '<bogus ip> localhost' to /etc/hosts and run
'bitbake -p'. The error message will be:

ERROR: Timeout while attempting to communicate with bitbake server
ERROR: Could not connect to server False:

Running 'bitbake-prserv --host=localhost --port=0 --start' will fail with:

error: [Errno 99] Cannot assign requested address

Since these errors does not show the IP address of the attempted socket
binding, this results in a lot of wasted time looking at firewall rules, etc.

This patch results in the following error message if the socket binding fails:

PR Server unable to bind to <bogus ip>:0

(Bitbake rev: fae5914030bcf4c061c22fc61034c40c87b7121a)

Signed-off-by: Konrad Scherer <Konrad.Scherer@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-29 12:08:48 +01:00
Richard Purdie 438a508442 bitbake: hob: Fix sstate mirrors mangling
hob was adding the redundant characters "\1" in SSTATE_MIRRORS variable. If
needed it is expected the user will add this instead so remove the code
that was doing this.

[YOCTO #6600]

(Bitbake rev: 73bf120062fc00c7e26dc4e77a7d140658d89daf)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-29 12:08:48 +01:00
Richard Purdie 8e4e03c2a3 bitbake: fetch: Extend testing of subdir unpack parameter and fix
This fixes urls of the form file://some/path/file;subdir=b. It also
adds in a couple of tests so we now tests these corner cases.

(Bitbake rev: 46306912a96444790efa9418d934dfdd36773ba1)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-29 12:08:48 +01:00
Roxana 1f4e75143a bitbake: fetch: SRC_URI parameter "subdir" does not work for local files
Check if the 'subdir' parameter exists and assign it to 'destdir' so that
files are copied in ${WORKDIR}/destdir. This fixes urls that are of the form
file://a;subdir=b.

(Bitbake rev: 836a986b365eb9798563ec08d90b346596de7791)

Signed-off-by: Roxana Ciobanu <roxana.ciobanu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-29 12:08:48 +01:00
Ross Burton 249a0e937d bitbake: monitordisk: don't log when not monitoring a filesystem for inodes
Writing a log that the filesystem isn't being monitored for inode usage just
confuses users who are not aware about the nature of inodes in their filesystem,
so don't say anything, just silently disable the monitor.  In general this only
happens on filesystems which don't have a limit on inodes.

(Bitbake rev: ca93bc84ee5fb94a50c11c47e4d212d7da649e24)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-29 12:08:48 +01:00
Richard Purdie c84b0c0b73 bitbake: bin/bitbake: Update to version 1.24.0
(Bitbake rev: 637ce8df2658e4905fab8a0600a45505596bf472)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-23 22:10:12 +01:00
Chad Nelson a94574f189 bitbake: fetch2/perforce: Use replace (1 line) instead of find (3 lines)
(Bitbake rev: 5bf5a937b26896bedbfea78dd1d62bce5a26ac2a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-23 20:21:12 +01:00
Chad Nelson 7ca8b65c3c bitbake: fetch2/perforce: Fix localfile name if labels are used
I could apply the label "release_1.0" to a super project that contains
many sub projects.  If my recipes have SRC_URI's that use that label but
grab different sub-folders, than there's a bug where the cached localfile
(tar.gz) will not be unique and reused at the wrong times.

SRC_URI = "p4://perforce::1234@//depot/SuperProject/MiniProjectAAA/...;label=release_1.0 \
                     p4://perforce::1234@//depot/SuperProject/MiniProjectBBB/...;label=release_1.0"

(Bitbake rev: 3b5b1703b77490116dda895b29737cea51a3d6a0)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-23 20:21:11 +01:00
Richard Purdie ff5fba8462 bitbake: knotty: Ensure commandline parameters are updated in memres server
When using options like -k, -f, -v and so on with the memory resident
server, they'd currently only be set on the initial values passed to
the original command. This ensures they now match those specified
on the commandline for the options where this makes sense.

To make this work, a command to update the options on the server side
is required so this is added.

[YOCTO #5292]

(Bitbake rev: 1c75cc4d0c8b606c1fe76e6bf60bf6a32298b105)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-23 20:06:06 +01:00
Richard Purdie afdbe3112b bitbake: bitbake-worker: Fix bitbake -n
Without this you see:

File "bitbake/bin/bitbake-worker", line 201, in fork_off_task
    os._exit(child())
TypeError: an integer is required

(Bitbake rev: cd477b5e77ab0373248b8a8fa30e1c7b8ea984fd)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-22 15:54:40 +01:00
Richard Purdie 7d80f8e946 bitbake: data_smart: Clarify what 'computed' means in the data store history context
(Bitbake rev: a2ca038dd1d0be4e0a0b20ae16a467d5a0075514)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-16 22:15:24 +01:00
Richard Purdie fceef0cace bitbake: data_smart: Fix remove operator and its interaction with data expansion
If you have:

FOO = "${bindir}/X Y"
FOO_remove = "${bindir}/X"

the expected result is "Y". Currently this doesn't work since the removed
expressions are not expanded first. This patch adjusts things so the
expressions are expanded before being processed for removal.

Also add a test to ensure this case continues to work.

[YOCTO #6624]

(Bitbake rev: 72a1ca4a104ccab73d6abcbd44db9c2636a58572)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-13 08:52:49 +01:00
Richard Purdie 51e392106e bitbake: bin/bitbake: Update to version 1.23.2
(Bitbake rev: e24095f54c52a547c0462836586a5d716249036e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-11 17:31:17 +01:00
Richard Purdie bb54fd0570 bitbake: siggen/runqueue/bitbake-worker: Improve siggen data transfer interface
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.

(Bitbake rev: cf2d642052979d236185c5b8ca2c5478c06e62ae)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-11 17:31:17 +01:00
Paul Eggleton 1894522f35 bitbake: tinfoil: add a means of enabling variable history tracking
Unfortunately it seems like the external use of the cooker
enableDataTracking() function broke at some point since the code that
reads it now runs within BBCooker's constructor. Since this now has to
be done early, add a parameter to Tinfoil's constructor to allow
enabling variable history tracking.

Fixes [YOCTO #6676].

(Bitbake rev: a9439b136f55f3f0e80ff053cd3b159da69ba362)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-05 10:14:25 +01:00
Marius Avram dfbb546492 bitbake: toaster: fix some code spacing issues
Code is related to the basetable templates files.
It had mixed tabs and spaces and was miss aligned in various places,
making it hard to read.

(Bitbake rev: cdaea8951df6b707afd1fefbf22295088256dd6f)

Signed-off-by: Marius Avram <marius.avram@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-05 10:14:25 +01:00
Marius Avram 69e5cbdac5 bitbake: toaster: use cookies for count and sorting in templates tables
Until now cookies were used to save which columns were shown and which
were hidden in toaster tables. The tables from the templates also have
functionalities like sorting the entries on a certain column and
limiting the number of entries displayed on a page. The later however
were not saved using cookies. This patch brings this new feature.

The cookies are not saved only in the front-end. They are saved both
in the frontend in case the user uses the inputs/buttons to change
a parameter and also in the backend in case the user specifies manually
using GET variables the value of the parameters.

When no GET parameters are given the views will redirect the url to one
containg the parameters saved as cookies. When no cookies exist, default
values will be used.

[YOCTO #6126]

(Bitbake rev: 880b58c845e3a501fa90d24e1bd89c87ca84b709)

Signed-off-by: Marius Avram <marius.avram@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-05 10:14:25 +01:00
Alexandru DAMIAN a6f1e31721 bitbake: toaster: do not save objects in session
In order to avoid problems when using JSON serializer for
saving sessions, we move from storing the objects themselves
in the session to storing the object id and reloading the
object when retrieved.

This allows, for example, to use cookie-storage sessions if the
infrastructure owner so desires.

(Bitbake rev: 39d0f0c2e87d4b161f1eeaa2657e61b5a6bc9ee2)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-05 10:14:25 +01:00
Alexandru DAMIAN 32a27931db bitbake: toaster: enable SSH-based remote build support
We enable support for starting builds on remote machines
through SSH. The support is limited to poky-based distributions.

We refactor localhost build support and we update
bldcontrol application tests to uniformely test the APIs
of localhost and SSH build controllers.

[YOCTO #6240]

(Bitbake rev: c2ad9c9bb83f61c171434324df8c4d5ee655a556)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-05 10:14:25 +01:00
Alexandru DAMIAN 5bd2b3f9a6 bitbake: toaster: bitbake server listen on all interface
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.

(Bitbake rev: 137179eafca8d1a5a69b6302f8cc8961be3b45c4)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-05 10:14:24 +01:00
Alexandru DAMIAN a287a6d9c1 bitbake: toaster: rename bldviewer projecttags custom tagset
We rename the projecttags in bldviewer.templatetags to
simple_projecttags in order to avoid conflict with the
similarly named tagset in toastergui.

The conflict leads to an intermittent bug where proper
tags are not read correctly since Django uses only the
module name as global tag library identificator.

(Bitbake rev: a37f2c194d7e59611177cb8755524b7ad702fe91)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-05 10:14:24 +01:00
Richard Purdie 83ebcb1f0c bitbake: process: Ensure abnormal exits set an error level
(Bitbake rev: 8f5c1cdae1ee6ce04ae0d04d0b95bd80efbf7534)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-02 18:10:37 +01:00
Dan McGregor 50a8400b72 bitbake: knotty: ignore interrupted system calls
With the improved exception handling added in an earlier commit bitbake
now stops when recieving a SIGWINCH. This happens frequently when
disconnecting and reconnecting tmux sessions and bitbake didn't survive.
Restore old behaviour of ignoring interrupted system calls but keep
proper exception handling for other errors.

(Bitbake rev: 418358a595c75f45b8d15160ec42bbe569562d91)

Signed-off-by: Dan McGregor <dan.mcgregor@usask.ca>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-01 08:51:33 +01:00
Alexandru DAMIAN 372c9d144e bitbake: toastergui: added pages for project details
We add new pages for the layer importing, layer details,
showing project builds and project configuration.

The pages are  in read-only mode, but they're needed as
to be able to verify the quality of data in the system.

Write capabilities will be added in a subsequent patch.

[YOCTO #6595]
[YOCTO #6590]
[YOCTO #6591]
[YOCTO #6588]
[YOCTO #6589]

(Bitbake rev: eed9ae5c2a2bd7567e12ae9a4f02a5a966a1e1a3)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-01 08:51:33 +01:00
Alexandru DAMIAN acd4a1799d bitbake: toaster: add project pages for machines, targets, layers
We add new pages for the all-machines and all-targets
project-related views.

We update the existing template structure to create
a base project view, similar to a base build view, that includes
a breadcrumb.

Updating existing all layers view to use the new structure.

We update methods in the models to provide corrent
information display.

[YOCTO #6592]
[YOCTO #6593]

(Bitbake rev: 973f582a19441c1ec67061160e4c50ce03ed7b68)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-01 08:51:32 +01:00
Alexandru DAMIAN fe2e53ba30 bitbake: toaster: create Build methods for calculating progress and ETA
We move the code to calculate build progress as percent
and the ETA of the build to the model, so that they can be
reused across different pages.

(Bitbake rev: c2ced09e7ea4a1762d2788bb12a761734d20fd8e)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-29 13:56:50 +01:00
Alexandru DAMIAN 69955c7b42 bitbake: buildinfohelper: BuildRequest project file update soft linked
(Bitbake rev: 93887dadd5ee35557d320e96059c466d2e541065)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-29 13:56:50 +01:00
Alexandru DAMIAN 25a715a119 bitbake: toatergui: update pages to match project models
We update pages and queries to match the new project
models.

(Bitbake rev: 8f47ec259106da714260c7388cee75a6c1f4622d)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-29 13:56:50 +01:00
Alexandru DAMIAN ee250eb7e4 bitbake: toaster: update the bldcontrol to the new orm models
We update the build controller application to make proper
use of the bitbake specification in project settings.

Added heuristic to detect when the meta* layers and bitbake
are checked out from Yocto Project poky, and use a single
git checkout.

Building without a proper oe-init-build-env is not yet supported.

(Bitbake rev: 9eafe14956013f5af39b68fc93e1b03e7ea1f5c2)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-29 13:56:50 +01:00
Alexandru DAMIAN 95df54238b bitbake: toaster: update checksettings command for auto-detection
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.

(Bitbake rev: 2aab77dfccb538e2b09829841ea6c464d40cafb1)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-29 13:56:50 +01:00
Alexandru DAMIAN 565f69205f bitbake: toaster: add all layers page
We add a page where the user can browse
and import layers from all the layers known
by Toaster.

[YOCTO #6590]

(Bitbake rev: 59f4a9750a6c4f5360a91e3a4d1c03ceb42da086)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-29 13:56:49 +01:00
Alexandru DAMIAN 3a4356dbfe bitbake: toaster: create project section navigation structure
We create the navigation structure for the project section.
This includes adding URLs for configuration, builds, all layers,
layer details and all targets pages.

Changes to existing pages to exemplify navigation links.

(Bitbake rev: 6f0cb9d106129eb496a4c009d95b0727378e97c1)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-29 13:56:49 +01:00
Alexandru DAMIAN 54530006b7 bitbake: toaster: enable admin interface on select models
We enable the admin interface in Toaster.

We add admin models for Build Environments (where the
sysadmin can configure where the builds take place)
and for Layer Sources (marking the upstream provider
for layer information).

The admin interface and associated data are enabled
only for the MANAGED version.

(Bitbake rev: 6618613c9210fb44d36d90f5f2404b435f10dfc8)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-29 13:56:49 +01:00
Alexandru DAMIAN 234226b905 bitbake: toaster: update orm models for layerindex compatibility
We add a ToasterSettings table that will keep
installation-wide settings.

We update the models for the layer-related data storage to
make them compatible with the layerindex application API.

We add a LayerSource class that can update local data from
a LayerIndex-like compatible API.

Adding a command line option to perform information update
from all upstream layer sources.

Fair warning - there is no backward migration from 0013.

(Bitbake rev: 89e13579e1b44b738f10fadec8454aa0e6f073af)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-29 13:56:49 +01:00
Alexandru DAMIAN 10019a652f bitbake: toaster: fix application discovery in settings.py
We fix application discovery, tuples don't have .append().

Other minor fixes.

(Bitbake rev: a6f18aac3e6bb448d89a3425a2f756c6514ee595)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-29 13:56:49 +01:00
Alexandru DAMIAN 7eb3e45a33 bitbake: toasterui: refactor log saving and save out-of-build errors
We refactor log saving to go through only one code path.

All logs that happened outside the build (i.e. before build
starting) now will be logged to either toaster_ui.log if the
build command ran in interactive mode, or to the build request
errors if the command ran in managed mode.

This enables proper display of error logs in project page.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-29 13:56:48 +01:00
Richard Purdie 669c07d602 bitbake: build/data: Write out more complete python run files
Currently the output in the python task/function run files is rather
incomplete and effectively useless. This enhances the code to take
advantage of the bitbake's dependency tracking and extend the output to
include dependencies. This makes the files more usable for debugging
purposes. Since this only happens at python function execution time, the
overhead is minimal in the grand scheme of things.

(Bitbake rev: 02667e048c3e632f857c87177c0022eaf5481802)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-28 15:12:45 +01:00
Richard Purdie 34226b82da bitbake: bitbake-worker: Extra profiling data dump
Currently we get no profiling oversight into either the main bitbake worker
process, or the overall parsing before task execution. This adds in extra
profiling hooks so we can truly capture all parts of bitbake's execution
into the profile data.

To do this we modify the 'magic' value passed to bitbake-worker to trigger
the profiling, before the configuration data is sent over to the worker.

(Bitbake rev: 446e490bf485b712e5cee733dab5805254cdcad0)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-28 15:12:45 +01:00
Richard Purdie ac66e15f5c bitbake: utils: Improve profile log processing
This stream redirection of stdout is horrible. pstats takes a stream argument
so lets use that instead.

(Bitbake rev: 93d155f4766e27e7b004d13569aa03961fe89e3b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-28 15:12:45 +01:00
Richard Purdie c79b7f06af bitbake: fetch2/hg: Fix username/password handling
We should only add user/password options if they're specified as in the
fetch case. Patch from Volker Vogelhuber <v.vogelhuber@digitalendoscopy.de>

(Bitbake rev: 303e6256947f4df4f283b75b7ccfdffa72864d67)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-28 15:12:45 +01:00
Richard Purdie d1a133a670 bitbake: runqueue: Fix setscene tasks not running
Currently, if you have hard dependencies between setscene tasks (like avahi on
base-passwd through useradd.bbclass), other dependencies may not be installed
even if these exist in sstate. For example, avahi -> expat -> pigz-native
(and avahi -> base-passwd) yet if you cleansstate base-passwd:

bitbake gzip-native:do_clean avahi:do_clean expat:do_clean pigz-native:do_clean base-passwd:do_cleansstate
bitbake avahi | tee

you will currently see pigz-native being rebuilt even though it was in
sstate. The fix for this is to continue to iterate dependency chains
around hard blocked dependencies as per this patch.

After this patch is applied, you will see pigz-native installed from sstate.

(Bitbake rev: f787957a224e8c2682a19e5c4a4d9c86bdce52ba)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-28 15:12:45 +01:00
Robert P. J. Day 6d08e5bb09 bitbake: lib/bb/*.py: Typo fixes/grammar/comment fixes, nothing functional.
(Bitbake rev: 587b144ee409d444494d8d7f2d1c53ede8f7c953)

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-25 08:57:45 +01:00
Olof Johansson 91083de4cb bitbake: depexp: don't use undefined variable 'logging'
This fixes an issue when trying to use depexp without specifying a
recipe. Before change:

  $ bitbake -g -udepexp
  Traceback (most recent call last):
    File ".../bitbake/bin/bitbake", line 382, in <module>
      ret = main()
    File ".../bitbake/bin/bitbake", line 370, in main
      return ui_module.main(server_connection.connection, server_connection.events, configParams)
    File ".../bitbake/lib/bb/ui/depexp.py", line 201, in main
      logger.error(cmdline['msg'])
  NameError: global name 'logger' is not defined

After change:

  $ bitbake -g -udepexp
  Please specify a package name for dependency graph generation.

(Bitbake rev: 984ad90b2f1e29634dc79803a4a0404ab0534039)

Signed-off-by: Olof Johansson <olof.johansson@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-25 08:57:45 +01:00
Bernhard Reutner-Fischer 21f41f6c43 bitbake: cooker: tweak CookerCollectFiles::find_bbfiles
since python-2.5 string.endswith() takes a tuple

(Bitbake rev: 86a67a1fd4244da9343dbf14deed1ad0d3003f32)

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-23 23:02:00 +01:00
Richard Purdie 5a3a7e0f74 bitbake: siggen: Fix a subtle bug in hash calculation for shared work tasks
With a shared work task like gcc, the task can be run from a variety of
different recipes which may have different virtual extensions in place.

Depending on whether gcc-runtime or nativesdk-gcc-runtime's do_preconfigure
task is called for example will change the sorting of the task hashes due
to the way clean_basename currently works.

The correct thing to do here is sort on the base filename first, then any
extension when ordering the hashes. This means we do account for things
like recipes with both a native and non-native dependency but we also fix
the shared work case where we don't care whether it was a virtual version
or not.

(Bitbake rev: 2e80b5d10a5037ed6f0bc227a1f9b42529c87086)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-23 09:31:42 +01:00
Richard Purdie d33cc89e53 bitbake: process: Further improve robustness against server shutdown
Currently, if an exception occurs in an event handler, the server shuts
down but the UI simply hangs. This happens in two places, firstly waiting
for events and secondly, sending events to a server which no longer exists.

The latter does time out, the former does not. These patches improve
both code sections to check if the main server process is alive and if not,
trigger things to shut down gracefully. This avoids the timeout in the
command sending case too.

This resolves various cases where the UI would simply hang indefintely.

(Bitbake rev: ac418e1112ff5f9c3157569316902f7a27fba4b4)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-23 09:31:42 +01:00
Richard Purdie 8683c244c1 bitbake: utils: Add workaround for multiprocessing bug
Our usage of multitprocessing is problematic. In particular, there is a bug
in python 2.7 multiprocessing where signals are not handled until command
completion instead of immediately.

This adds a workaround into our wrapper function to deal with the issue.

(Bitbake rev: a16185e602b39b71475aa7e9ee80ad2b1f28d0f7)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-23 09:31:42 +01:00
Richard Purdie ecf72a7132 bitbake: command: Trigger updateCache to shut down any active parser threads
If we trigger a shutdown whilst parsing for whatever reason, in some
cases we were not closing down the parser threads. This change
ensures we do so. The function names are not entirely intuitive
but the behaviour is more correct (and commented). The previous bug
with the stdout failure would trigger this one, if there was a cold
cache and parsing was required (but not otherwise).

(Bitbake rev: 25bfa2478f1c3a8eb695e1e5760e06db5be8f2fc)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-23 09:31:42 +01:00
Richard Purdie c501492132 bitbake: bitbake-worker: Improve sigterm handler
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.

(Bitbake rev: 96f8ea07ace1379380fab2d78eb592fa40c867d4)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-23 09:31:42 +01:00
Richard Purdie a4f077b1fe bitbake: knotty: Improve exception handling
Currently, IOErrors are just passed over due to the broken Exception
clause. A command like "bitbake X | <invalid command>" would break stdout
triggering a traceback. With these changes we print the exceptions, shut down
the server gracefully and exit which is a much nicer behaviour and is less
confusion to the user.

(Bitbake rev: 9544108f7b413038d871ce6ca88232de2f2434d9)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-23 09:31:42 +01:00
Richard Purdie db50630948 bitbake: process: Deal with infinite looping of the server
Currently if an exception occurs, we just run the idle handler again and
again, usually looping indefintely. Chances are the exception that occurred
will keep occuring and this is not a good place to be.

This was breaking the autobuilders with gigabytes of logs.

At least improve things so the cooker shuts down gracefully when this happens.
Some trace of the original problem may still be present on the console too!

(Bitbake rev: 1f28d8d3311262427938180435b68f0a35c2b330)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-23 09:31:42 +01:00
Robert P. J. Day 34436672f3 bitbake: runqueue.py: Fix typoes/grammar in comments.
(Bitbake rev: 000fa81013205dd9bc907ff7a61f06f57637212d)

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-19 20:41:26 +01:00
Andre McCurdy 02455ebfbb bitbake: fetch2/local.py: fix first line indent of search path debug output
Make OE do_unpack logs slightly prettier.

(Bitbake rev: cec5859dec56529d76a0a685cc67b8da29453c69)

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-19 20:41:26 +01:00
Robert P. J. Day f1dc26ebf4 bitbake: daemonize.py: Non-functional comment/aesthetic fixes.
(Bitbake rev: fd293c5fcc89bc7a541d09e88a6aec5e0b2a1db2)

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-19 20:41:26 +01:00