aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2020-09-08fetch2: Change git fetcher not to destroy old references1.36Richard Purdie
It looks like we're about to see a lot of changes in branch names in repos. If we have the prune option here, those old names are lost, the changes propagate to our source mirrors and our old releases break. We have the force option so any replaced references should be replaced, its only orphaned branches which will now be preserved. I believe this behaviour will cause us fewer problems given the changes that look likely to happen. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-07tests/fetch: Resolve fetch error in bitbake-selftestArmin Kuster
FAIL: test_wget_latest_versionstring (bb.tests.fetch.FetchLatestVersionTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/pokybuild/yocto-worker/oe-selftest/build/bitbake/lib/bb/tests/fetch.py", line 1229, in test_wget_latest_versionstring self.assertTrue(verstring, msg="Could not find upstream version for %s" % k[0]) AssertionError: '' is not true : Could not find upstream version for db [YOCTO #13496] The Oracle UPSTREAM_CHECK_URI used changed and does not work with logic in wget. Update UPSTREAM_CHECK_URI and UPSTREAM_CHECK_REGEX to match the ones used in the recipe. Also change the version being checked. Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-02-12bitbake-user-manual: Fixed section head typoScott Rifenbark
Unseting -> Unsetting Signed-off-by: Scott Rifenbark <srifenbark@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-10bitbake-user-manual: Added "usehead" parameter.Yong, Jonathan
Signed-off-by: Scott Rifenbark <srifenbark@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-23main: Fix environment handling for UI module importsRichard Purdie
The environment was being cleared before the UI imports occurred which caused problems for graphical UIs like taskexp. The full environment was intended to be available to UI clients and it was only meant to be cleared for the server/cooker, so tweak the code order so this is the case. This fixes problems reported for taskexp. [YOCTO #12670] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-29checksum: sanity check path when recursively checksummingRoss Burton
In case something goes tragically wrong, catch a request to checksum / and refuse. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-29utils/md5_file: don't iterate line-by-lineRoss Burton
Opening a file in binary mode and iterating it seems like the simple solution but will still break on newlines, which for binary files isn't really useful as the size of the chunks could be huge or tiny. Instead, let's be a bit more clever: we'll be MD5ing lots of files, but we don't want to fill up memory: use mmap() to open the file and read the file in 8k blocks. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-29tests/fetch: Update gnome.org urls after upstream changesRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-02fetch2/__init__: Disable pseudo in runfetchcmd()Peter Kjellerstedt
If a fetcher, e.g., git, is run when pseudo is active it will think it is running as root. If it in turn uses ssh (as git does), ssh too will think it is running as root. This will cause it to try to read root's ssh configuration from /root/.ssh which will fail. If ssh then needs to ask for credentials it will hang indefinitely as there is nowhere for it to ask the user for them (and even if there was it would not access the correct private keys). The solution to the above is to temporarily disable pseudo while executing any fetcher commands. There should be no reason for them to be executed under pseudo anyway so this should not be a problem. RP Ammendum: We finally did get more information about how to reproduce this problem, something needs to trigger bb.fetch2.get_srcrev() in a pseudo context, for example when AUTOREV is in use or the recipe doesn't have a defined SRCREV. That SRC_URI needs to be using protocol=ssh. This would trigger an ls-remote of the remote repo and if that happens under pseudo, the wrong ssh credentials may be attempted which can hang. [YOCTO #12464] Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-02fetch2: fix import error for Python 3.6.5Tzu Hsiang Lin
When running bitbake command with Python 3.6.5 always result in import error causing by the change of distutils module. This patch replaces the method to search executable in PATH by "/usr/bin/env <command>". Signed-off-by: Tzu Hsiang Lin <t9360341@ntut.org.tw> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-05-29toaster: do not fail on optional 'custom.xml' fileDavid Reyna
Explicitly capture and ignore errors when trying to load the optional 'custom.xml' fixture file. [YOCTO #12554] Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-05-29Toaster: fix shutdown and extra threadsDavid Reyna
Fix typo in shutdown code to kill threads when "kill -0" is not enough. Use the '--noreload' flag for 'runserver' so that there are no extra and unaccounted threads. [YOCTO #12555] Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-03-09providers: Fix determinism issueRichard Purdie
We saw builds where runtime providers were sometimes changing order and the build result was therefore non-deterministic. For example it could show: DEBUG: providers for lib32-initd-functions are: ['lib32-lsbinitscripts', 'lib32-initscripts'] or DEBUG: providers for lib32-initd-functions are: ['lib32-initscripts', 'lib32-lsbinitscripts'] which could cause a test to pass or fail. This change ensures we don't rely on the random order of dictonaries in memory and act deterministically. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-18toaster: add 'nobuild' option to ToasterDavid Reyna
Add a 'nobuild' option for starting Toaster without the project and hosted builds support. This allows a Toaster host to provide local build statistics without opening the host to external users building projects. [YOCTO #12315] Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-18toaster: landing page show cmdline captureDavid Reyna
The Toaster initial landing page needs to show that it still has the command line build capture support in addition to the new project support. [YOCTO #12316] Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-18toaster: enable custom env support for shell callsDavid Reyna
Allow for custom environment additions for git cloning, for example for anspass support. [YOCTO #12193] Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-18toaster: some recipe events do not include packagesDavid Reyna
Allow for "SinglePackageInfo" events that do not include package data, for example OPKGN equal 'lib32-*' or 'lib64-*'. [YOCTO #12204] Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-18toaster: update Toaster for Django 1.11David Reyna
Toaster needs to accomodate API changes in Django 1.11. [YOCTO #12192] Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-18toaster: unset BBPATH before starting bbserver for backwards compatibilityDavid Reyna
The latest build enviroment script is now setting BBPATH. This breaks building previous releases from a master-based Toaster, because with this newly inherited BBPATH value the 'bitbake.lock' file ends up in the Toaster build directory instead of the project's build directory. Toaster should always clear BBPATH so that the bbserver's environment is clean (enough). [YOCTO #12363] Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-04tinfoil: Ensure we clean up loggersRichard Purdie
This is primarily paranoid but ensure we remove any loggers we setup either directly or indirectly so the initial state is restored after we exit. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit af7d63b1f76fd3f7fa92ed15ae61ca47d9e13472) Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-04event: Ensure we clean up loggersRichard Purdie
Whilst we're likely exiting in this case, clean up the loggers we add so that in the case of certain server retries there is no possibility multiple loggers stack up. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 25b7bf6672be66bcbfe5760610dce7d3e866cdcc) Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-04tests/fetch: Add ftp test urlRichard Purdie
Add in a tets ftp url so we ensure ftp urls contnue to work after the loss of the ftp.gnu.org ones. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit e1e8565b5e19dd3f7ef6e7e41932456adaa3df81) Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-04tests/fetch: use subtests in the wget testsRoss Burton
As we test multiple URLs in this these tests and one failing abandons the test, use subtests so all URLs are tested. This should help us identify patterns in the failing URLs. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit c4c4465b32e82d4b6e46a44e776be5039aef6b18) Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-04tests/fetch: Switch gnu.org urls from ftp -> http/httpsRichard Purdie
The ftp server at ftp.gnu.org is likely to be retired at some point soon so siwtch over to the http/https services. This means bitbake-selftest doesn't have ftp test urls, however finding stable ftp test servers is proving increasingly hard. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 892a08245ddb21a464aeb37d3e32377e99dd7e2b) Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-04bitbake: be more explicit when warning about locale choiceRoss Burton
Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 286dce008d6e0bd3121393b28ca02de1385519fb) Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-04tests/fetch: skip network tests the idiomatic wayRoss Burton
Instead of not even having the test functions if network tests are disabled, use a custom decorator to mark the network tests and skip them. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit cc420f430b1dafd9ca944bea259a564aaab34595) Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-04fetch2: Fix missing logger import in repo fetcherOleksandr Andrushchenko
After cleaning deprecated API usage repo fetcher is missing logger as it was indirectly imported via deprecated bb.data. Fix this by importing logger directly. Fixes: 9752fd1c10b8 ("fetch2: don't use deprecated bb.data APIs") Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit f8e027d26603db2f1fe757dca767ea35d95174c7) Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-10-31main: Give a user readable error if we can't locate topdirRichard Purdie
Currently if you run bitbake in an invalid directory, the user experience is poor: birbake/lib/bb/main.py", line 427, in setup_bitbake topdir, lock = lockBitbake() File "./bitbake/lib/bb/main.py", line 494, in lockBitbake lockfile = topdir + "/bitbake.lock" TypeError: unsupported operand type(s) for +: 'NoneType' and 'str' This ensures we exit straight away with a better error message. [YOCTO #12163] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-10-31cooker: fix watching directories with Python 3.6+Paul Eggleton
In Python 3.6, glob.glob() was reimplemented to use os.scandir() (which itself appeared in Python 3.5), thus our monkey patching of os.listdir() here was no longer effective. The end result was not only that bitbake wouldn't notice added recipes or bbappends with BB_SERVER_TIMEOUT set when being run with Python 3.6 (the shipped Python version on Fedora 26 and some other distribution versions), it also broke devtool modify, devtool upgrade and devtool extract since they rely on the ability to create a bbappend on the fly and have bitbake pick it up. To fix it, do the same monkey patching for os.scandir(), which needs to be conditional upon that actually existing since we have to support Python 3.4 that doesn't have it. Long term we should probably look for a better way to handle this that doesn't involve monkey patching Python library code. Fixes [YOCTO #12185]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-10-31bitbake: Update version to 1.36.0 for stable releaseKhem Raj
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-10-10toaster/highlight.pack.js: Fix corrupted fileyocto-2.42017-10-rocko1.36.0Richard Purdie
The newly added file in the last commit was corrupted, fix it. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-10-10toaster: Remove prettifyDavid Reyna
Remove "prettify.js" and "prettify.css" due to license issues with Apache2. Replace with "highlight.pack.js" with its BSD3 License. [YOCTO #12206] Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Brian Avery <brian.avery@intel.com> Signed-off-by: David Reyna <david.reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-10-07README: new readme file including main aspects of the projectLeonardo Sandoval
Includes brief description of the project, pointers to website, documentation, mailing list and source code. Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-10-07bitbake-user-manual-metadata: include a space on a append exampleLeonardo Sandoval
By definition, the override operator "_append" does not include a space, so include it. Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-10-07bitbake-user-manual/bitbake-user-manual: remove YP as build systemLeonardo Sandoval
YP is not a build system, so it can not be used as build system example. Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-10-06Add args.force to localargs before do_add_layerJeremy A. Puhlman
Adding layer "meta-signing-key" to conf/bblayers.conf Traceback (most recent call last): File "/local/build/project/build/poky/bitbake/bin/bitbake-layers", line 103, in <module> ret = main() File "/local/build/project/build/poky/bitbake/bin/bitbake-layers", line 96, in main return args.func(args) File "/local/build/project/build/poky/bitbake/lib/bblayers/layerindex.py", line 250, in do_layerindex_fetch self.do_add_layer(localargs) File "/local/build/project/build/poky/bitbake/lib/bblayers/action.py", line 44, in do_add_layer if not (args.force or notadded): AttributeError: 'Namespace' object has no attribute 'force' Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-10-06bitbake-user-manual: add more gitsm fetcher limitationsMikko Ylinen
The submodule sources fetched by the gitsm fetcher are not automatically tracked by the licensing and archiver infrastructures. Add these limitations to the existing 'warnings' sections for gitsm. [YOCTO #11594] Signed-off-by: Mikko Ylinen <mikko.ylinen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-10-06toaster: build missing toaster.conf settingsDavid Reyna
The bitbake server changed such that the Toaster custom settings from 'toaster.conf' and 'toaster-bblayers.conf' that were set when the '--server-only' mode was started were lost when the subsequent build request happened, resulting in builds missing all custom changes. This patch asserts those environment settings in both server calls. [YOCTO #12194] Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-26bitbake-user-manual: Updated kernel version in PREFERRED_VERSION exampleScott Rifenbark
Signed-off-by: Scott Rifenbark <srifenbark@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-22bitbake: lib/bb/utils: fix movefile() copy to dir fallbackMardegan, Alberto
When the destination is a directory, building the the destination file path is always needed. That's because even if the copy fallback is taken, it's always followed by a rename. Signed-off-by: Alberto Mardegan <amardegan@luxoft.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-22server/process: Increase runCommand timeoutRichard Purdie
We were seeing cases where we could hit the 5s timeout on large/fast machines running many different tasks at once. Increase this to 30s since the main connection timeout path should no longer hit this slow path. [YOCTO #12116] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-17toaster: allow dots in user path namesDavid Reyna
The dot '.' character should be allowed in the user paths for local non-git layers, DL_DIR, and SSTATE_DIR. [YOCTO #10650] Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-17toaster: reserve HEAD from imported layersDavid Reyna
The HEAD reference in Toaster layers are reserved for the "Local Yocto Project" layers, stored at the top directory. Imported layers are not allowed to use this since they are managed differently - for example the 'remotes' will collide. Fix the add layer handler to not drop the data fields when it is a git repo. Explicitly inform the user when an internal Toaster error is returned via AJAX, so that they know why clicking the layer add button did not do anything. [YOCTO #9924] Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-14cooker: ensure monkey-patching in collect_bbfiles() gets undone on errorPaul Eggleton
In collect_bbfiles() we're monkey-patching os.listdir in order to find which directories to watch, and then undoing that when we're finished - however if an exception occurred for any reason there was nothing to ensure the latter occurred. This may not have caused any issues, but as this kind of thing really ought to be secured using try...finally just in case, so do that. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-14cooker: fix watching empty directoriesPaul Eggleton
The code that was supposed to watch directories along BBFILES for creation of new files wasn't working in the case where the directory did not initially contain any matching files - since in updateCache() we are passing the directory path to add_filewatch() and the latter function calls os.path.dirname() on the path on the assumption that it is a file path, and thus the parent of the directory got watched but not the directory itself. (If the directory wasn't empty everything worked fine since add_filewatch() was called elsewhere with the path to one of the files in that directory, and thus the directory got watched). Add a parameter to add_filewatch() to tell it we are passing it directory path(s) rather than file path(s). Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-13bitbake-user-manual: Edits to "inherit" section.Scott Rifenbark
Fixes [YOCTO #12031] Applied minor wording changes based on review feedback. Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
2017-09-13bitbake-user-manual: Removed bad linksScott Rifenbark
Fixes [YOCTO #12029] There were four links to an old blog post that was leveraged for the hello world example. The post has evidently been removed and the links no longer resolved. I have taken them out. Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
2017-09-13bitbake-user-manual: Updated inherit and INHERIT sectionsScott Rifenbark
Fixes [YOCTO #12031] Moved an inappropriate example from the bottom of the INHERIT Configuration Directive section up into the inherit directive section. Updated the example at the end of the INHERIT Configuration Directive section to apply to INHERIT. Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
2017-09-13bitbake-user-manual: Clarified inherit, include, require relationshipsScott Rifenbark
Fixes [YOCTO #12032] I applied some re-writing to help clarify the relationships between the inherit, include, and require directives. Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
2017-09-12server/process: ensure server failure log is limited to current sessionPaul Eggleton
Printing the last 10 lines of bitbake-cookerdaemon.log when the server fails to start can sometimes result in printing the output from a previous run, which could lead the user completely down the wrong path in terms of the cause of the failure. Use a known start text containing the time which we can then look for when scanning through the log, and then grab the last 10 lines of that part instead. Fixes [YOCTO #11903]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>