summaryrefslogtreecommitdiffstats
path: root/meta/classes/report-error.bbclass
AgeCommit message (Collapse)Author
32 hoursreport-error.bbclass: replace angle brackets with < and >Changqing Li
when we have below content in local.conf or auto.conf: BUILDHISTORY_COMMIT_AUTHOR ?= "Khem Raj <raj.khem@gmail.com>" send-error-report will fail with "HTTP Error 500: OK" error-report-web do rudimentary check on all fields that are passed to the graphs page to avoid any XSS happening, if contains '<', the server will return error(Invalid characters in json). fixed by use escape of <> to replace it. NOTE: with this change, error-report-web need to add filter 'safe' for the string wanted to display to avoid further HTML escaping prior to output. Below is how the content displayed on webpage: with the filter 'safe': BUILDHISTORY_COMMIT_AUTHOR ?= "Khem Raj <raj.khem@gmail.com>" without the filter 'safe': BUILDHISTORY_COMMIT_AUTHOR ?= "Khem Raj &lt;raj.khem@gmail.com&gt;" Another patch for error-report-web will send to yocto mail list. [YOCTO #13252] Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
32 hoursreport-error: Allow to upload reports automaticallyMartin Jansa
* useful when distro wants to collect build statistics from all users/developers without any manual interaction from them Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2023-04-20report-error: make it catch ParseError errorMingli Yu
Make the report-error catch ParseError error as below and then we can check it directly via error report web. ParseError at /build/layers/oe-core/meta/recipes-support/curl/curl_7.88.1.bb:32: unparsed line: 'PACKAGECONFIG[ares] = "--enable-ares,--disable-ares,c-ares,,,threaded-resolver' Signed-off-by: Mingli Yu <mingli.yu@windriver.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
2023-04-03report-error: catch Nothing PROVIDES errorMingli Yu
Make the report-error catch Nothing PROVIDES error and then we can check it directly via error report web. Signed-off-by: Mingli Yu <mingli.yu@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-12classes: Add SPDX license identifiersRichard Purdie
As stated in our top level license files, the license is MIT unless otherwise stated. Add SPDX identifers accordingly. Replace older license statementa with the standardised syntax. Also drop "All Rights Reserved" expression as it isn't used now, doesn't mean anything and is confusing. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-06-11classes/buildcfg: Move git/layer revision code into new OE module buildcfgRichard Purdie
There is a load of duplicated git/layer/revision code which makes most sesne as a python library, not bbclass code. Start to refactor as such. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-07-10report-error: Drop pointless inheritRichard Purdie
The base class is always inherited, drop the unneeded inherit. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-02-23report-error.bbclass: Add layer and bitbake version info to error reportMilan Shah
Instead of just providing local.conf info, add layer names and their revisions with bitbake version information into error report makes it easier to understand and reproduce failed build. [YOCTO #9700] Signed-off-by: Milan Shah <mshah@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-23report-error.bbclass: Use with to control file handle lifetimeOla x Nilsson
Signed-off-by: Ola x Nilsson <olani@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-19report-error.bbclass: add local.conf/auto.conf into error reportChangqing Li
sometimes, it is not enough to reproduce a failed build with current info on error reports web, add local.conf/auto.conf into error report to make it more easier to reproduce failed build Note: this need work together with change in repo error-report-web, which will display local.conf and auto.conf as Error Details [YOCTO #13252] Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-18report-error: provide distro identifier string in case of uninative buildLeonardo Sandoval
Besides providing the NATIVELSBSTRING, include distro info when creating the (json) error report. This information provides better info than the standard 'universal*' string for uninative builds. [YOCTO #11824] Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-12-16meta: remove True option to getVar callsJoshua Lock
getVar() now defaults to expanding by default, thus remove the True option from getVar() calls with a regex search and replace. Search made with the following regex: getVar ?\(( ?[^,()]*), True\) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-08-17report-error: Fix tracebacksRichard Purdie
Currently the code gives tracebacks if there are no recipes to be built in a BuildStarted event. Parse the list into a string rather than just taking the first item. There is nothing special about the first time. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-20report-error: replace build paths with markers not whitespaceRoss Burton
To remove potentially personal information and reduce irrelevant noise when searching for similar reports the error reporting class removes ${TOPDIR} from the logs. Whilst this is valid intention, the replacement of ' ' results in potentially confusing logs as it appears that builds are happening in /tmp, or whitespace can appear in places where it isn't allowed which can look like a bug. Solve both of these by replacing the value of TOPDIR with the literal string TOPDIR. Also replace TMPDIR after TOPDIR, as it's not uncommon to have TMPDIR somewhere other than directly under TOPDIR. Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-06-02classes/lib: Complete transition to python3Richard Purdie
This patch contains all the other misc pieces of the transition to python3 which didn't make sense to be broken into individual patches. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-14report-error: Replace the build directory path in the error textMichael Wood
Replace the TOPDIR in the output error file so that the error report once submitted can then be more easily matched to find duplicate error reports. This also reduces the need to manually redact any information that might be in the error log path such as hostnames or home directories. Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-10-03report-error.bbclass: Support Unicode reportsMariano Lopez
Currently error-report doesn't manage Unicode because the files are opened with the default codec. This patch changes the codec of the files to UTF-8, this way the reports will include Unicode characters. This is useful for the qemu output when doing the testimage task. [YOCTO #8225] Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-06report-error: send only last 5242000 characters in error logsMartin Jansa
* otherwise whole build report submission is rejected because it's too big Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-08report-error: expand all variablesRoss Burton
BUILDNAME is now composed from ${DATE} and ${TIME} so needs to be expanded to useful. Whilst fixing this some other variables were explicitly not expanded for no clear reason, so expand those too. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-07report-error.bbclass: Added file syncronization.Mariano Lopez
errorreport_handler would fail if several errors are triggered at the same time because of two proccess writting to the same file. This patch add the required syncronization to handle concurrent process. [YP #7899] Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-06-23meta: Add explict getVar param for (non) expansionRichard Purdie
Rather than just use d.getVar(X), use the more explict d.getVar(X, False) since at some point in the future, having the default of expansion would be nice. This is the first step towards that. This patch was mostly made using the command: sed -e 's:\(getVar([^,()]*\)\s*):\1, False):g' -i `grep -ril getVar *` Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-03-09report-error: Update information on the submission processMichael Wood
The new send-error-report will prompt for review of items and the server is now specified by using the -s argument. Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-02-03report-error: Catch un-readable log dataMichael Wood
If a log data cannot be decoded to utf-8 or read then handle this gracefully. This can happen if a log file contains binary or something goes wrong with the file open process. Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-20report-error: Handle the case no logfile existsRichard Purdie
If the task fails early, no error log may exist. Currently we crash in that case, this handles the situation more gracefully. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-29classes/report-error: tweak summary messagePaul Eggleton
* We don't want everyone to remove their identifying info, just if they feel the need to * Split lines for clarity * A couple of grammar/spelling tweaks Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-24report-error: Add posting in the public noteSaul Wold
Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-14report-error.bbclass: new class to save build information when errors occurAndreea Proca
Class is used to save data about errors after every task that failed. Errors saved as json files in ERROR_REPORT_DIR (defaults to tmp/log/error-report). To use this class one has to add INHERIT += "report-error" to local.conf. scripts/send-error-report is a simple script that sends the json file to a HTTP server that collects data (git://git.yoctoproject.org/error-report-web is a Django web interface that can be used to receive and visualize the error reports). The script will give you an URL where you can find your report. Signed-off-by: Andreea Proca <andreea.b.proca@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>