summaryrefslogtreecommitdiffstats
path: root/scripts/send-error-report
Commit message (Collapse)AuthorAgeFilesLines
* meta/lib+scripts: Convert to SPDX license headersRichard Purdie2019-05-091-0/+3
| | | | | | | | | | | | | | | | | | | | | | | This adds SPDX license headers in place of the wide assortment of things currently in our script headers. We default to GPL-2.0-only except for the oeqa code where it was clearly submitted and marked as MIT on the most part or some scripts which had the "or later" GPL versioning. The patch also drops other obsolete bits of file headers where they were encoountered such as editor modelines, obsolete maintainer information or the phrase "All rights reserved" which is now obsolete and not required in copyright headers (in this case its actually confusing for licensing as all rights were not reserved). More work is needed for OE-Core but this takes care of the bulk of the scripts and meta/lib directories. The top level LICENSE files are tweaked to match the new structure and the SPDX naming. (From OE-Core rev: f8c9c511b5f1b7dbd45b77f345cb6c048ae6763e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* send-error-report: Add --no-ssl to use http protocolRobert Yang2019-03-061-3/+8
| | | | | | | | | | | The script use https protocol by default, but the error-report-web server's https connection may not work (e.g., doesn't work with python 2.7.6), so add an option --no-ssl to make it use http. (From OE-Core rev: a4c89902a24c0961657c8281425d480097aadfa6) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* send-error-report: Use https instead of http protocolKhem Raj2019-02-051-3/+3
| | | | | | | | | errors.yp.org can understand https (From OE-Core rev: f540fed0aec24e28eff8522fddbe3cf7ee45e30b) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* send-error-report: Fix test for name > 50 charsRichard Purdie2018-07-041-1/+1
| | | | | | | | | A name > 50 chars causes a 500 internal server error and should be warned to the user but the code to do so currently doesn't work. Fix the logic. (From OE-Core rev: 844f8d46f522a994dbff00245c4ffb07452577a8) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* send-error-report: Fix dubious error reportingRichard Purdie2018-07-041-1/+1
| | | | | | | | | | | | | | | | Currently this code prints things like: ERROR: OK which is unhelpful at best. After this change it would print: ERROR: HTTP Error 500 which at least gives us something to work on. (From OE-Core rev: 06079240e4eb0a3e1f528f6c8d6f3ea20754afee) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* send-error-report: decode response from serverRobert Yang2018-06-151-1/+1
| | | | | | | | | | | | | | Fixed: b'Your entry can be found here: http://<snip>' Now looks like: Your entry can be found here: http://<snip> (From OE-Core rev: 4510973fe12a61c21e12b46b8315c56f91eff5b7) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* send-error-report: encode data to bytesEd Bartosh2016-06-031-1/+1
| | | | | | | | | | | Encoded data before sending it through http as urllib expecting bytes. Fixed TypeError: POST data should be bytes or an iterable of bytes. It cannot be of type str. (From OE-Core rev: b3f4de76d1b32c5079b0b857655cc2baad088519) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts: python3: change python to python3 in shebangEd Bartosh2016-06-031-1/+1
| | | | | | | (From OE-Core rev: 4b544ff388497cac82b0585f237900595523e1cb) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts: python3: rename raw_input to inputEd Bartosh2016-06-031-3/+3
| | | | | | | | | | Renamed raw_input to input as raw_input does not exist in python 3. (From OE-Core rev: 32765150b860ecdea74b4494b9531f5bc40252bb) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts: python3: fix urllib importsEd Bartosh2016-06-031-7/+7
| | | | | | | | | | | | Some functions and classes have been moved from urllib[2] to urllib.request and urllib.error in python 3. Used new imports to make the code working in python 3. (From OE-Core rev: ec3f1759e8b491a44a1fc1ecb6f89919dd30da97) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts: python3: Use print functionEd Bartosh2016-06-011-3/+3
| | | | | | | | | | Used print function instead of print statement to make the code work in python 3. (From OE-Core rev: 80fecc44761fa38ccf2e4dc6897b9f1f0c9c1ed0) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts: print usage in argparse-using scripts when a command-line error occursPaul Eggleton2015-12-281-1/+5
| | | | | | | | | | | | | | For scripts that use Python's standard argparse module to parse command-line arguments, create a subclass which will show the usage the usage information when a command-line parsing error occurs. The most common case would be when the script is run with no arguments; at least then the user immediately gets to see what arguments they might need to pass instead of just an error message. (From OE-Core rev: d62fe7c9bc2df6a4464440a3cae0539074bf99aa) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/send-error-report: Rework script to support new featuresMichael Wood2015-03-101-96/+178
| | | | | | | | | | | | | | | | | | | | | | - Add arguments to allow for non-prompted sending, json encoded response and link backs. - Add feature to check the server's max_log_size - Add feature to allow reviewing of the final data - Be a bit more helpful if the expected fields aren't filled in instead of exiting. - Remove the redundant urlencode - Add a user-agent so that the server can identify the encoding method. - Remove custom proxy handling - urllib should 'just work' [YOCTO #6736] [YOCTO #7245] [YOCTO #7105] (From OE-Core rev: 5e036f3fd9caaedcd2759214766b3228299e929b) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/send-error-report: Set exit code if error occursRichard Purdie2015-01-291-1/+5
| | | | | | | | | | | If an error occurs, set an error exit code so the world knows about it. This fixes issues where the autobuilder doesn't notice these failures. [YOCTO #7265] (From OE-Core rev: b219377defc9517af360986352bd7da1a7906f10) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/send-error-report: fetch /Errors/ instead of /.Roxana Ciobanu2014-08-061-1/+1
| | | | | | | | | | | | | | | | | If HTTP_PROXY or http_proxy is set when the send-error-report script is run, it will check to see if fetching / on the specified server returns 200 without the proxy set. If it does it will assume that the proxy is not needed. However this check can never work because fetching / always redirects to /Errors/ in the current code and thus returns code 301. This is fixed by fetching /Errors/ instead of /. [YOCTO #YB6576] (From OE-Core rev: af93c89febcd186d7e31f1d15affc15f38e3379d) Signed-off-by: Roxana Ciobanu <roxana.ciobanu@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* report-error: Add posting in the public noteSaul Wold2014-04-241-1/+2
| | | | | | | (From OE-Core rev: c2eb5cd1aa4632f7ee8c261414e599dcb6f40a8b) Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/send-error-report: simple hack to use proxy from the enviromentStefan Stanacar2014-04-231-7/+36
| | | | | | | | | | | People behind a proxy couldn't send an error report to an upstream server, this should fix the issue if they use a proxy that doesn't require authentication, or one that uses basic http authentication and it's correctly exported in the enviroment. (From OE-Core rev: a8511ee80246b4e2caa353b87f4b586f1539e6d4) Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/send-error-report: use a real server as the defaultStefan Stanacar2014-04-191-1/+1
| | | | | | | | | | | | | Now that there is a public instance [1] of the error report web interface [2], we should set it as the default. [1] http://errors.yoctoproject.org/ [2] http://git.yoctoproject.org/cgit/cgit.cgi/error-report-web/ (From OE-Core rev: 90a955761db4724f0222527a129a3904d6d8aa6e) Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* send-error-report: show responseMartin Jansa2014-04-041-2/+4
| | | | | | | | | | * useful when debuging why it was refused by server (From OE-Core rev: 0b8ff2231a36755a71d8bf8c7854364d69ef2df8) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* report-error.bbclass: new class to save build information when errors occurAndreea Proca2014-02-141-0/+78
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. (From OE-Core rev: f186b4c7c6c975638e60b30a512d669dc6dc390f) Signed-off-by: Andreea Proca <andreea.b.proca@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>