summaryrefslogtreecommitdiff
path: root/buildstream
Commit message (Collapse)AuthorAgeFilesLines
* _project.py: Add fatal-warnings configuration itemJosh Smith2018-08-155-32/+108
| | | | | | | | | | | | | | | | | | | | This allows for users to configure fatal-warnings to be either a list of warnings. This commit deprecates the use of fail-on-overlap within project.conf, this will now use the fatal-warnings configuration item. element.py: Cache key calculation now takes into account all of the fatal-warnings tests: This modifys the tests/frontend/overlaps.py tests to support the new fatal-warnings configuration. Backwards compatibility is also tested for `fail-on-overlap` _versions.py: BST_FORMAT_VERSION bumped to 15 for fatal-warnings BST_CORE_ARTIFACT_VERSION bumpted to 5 for fatal-warnings Fixes: #526
* buildstream/plugins/sources/git.py: Fix clone side effect in getting fetchersValentin David2018-08-141-1/+3
| | | | | | | We now delay refreshing submodules until we have a clone, that is after we have fetched the main fetcher. Fixes #537
* versions: Bump format version to 14Jonathan Maw2018-08-141-1/+1
| | | | Format version raised because of a change to the core element format.
* loader: Add 'build-depends' and 'runtime-depends' fields to elementsJonathan Maw2018-08-142-18/+39
|
* Fix tracking of junctions used in project.conf.Valentin David2018-08-131-2/+15
| | | | | | | | | | | | | | Stream._load() now returns early without resolving build pipeline when only tracking. Resolving track pipelines does not require to fully load project configurations when when elements to track are only junctions. However build pipelines require to fully load project configurations. This might not be possible in the case a project configuration includes a file from a junction that yet needs to be tracked. Fixes #565.
* Bump BST_CORE_ARTIFACT_VERSION for deterministic source pluginsValentin David2018-08-121-1/+1
|
* buildstream/plugins/sources/zip.py: Fix non-determism in staging.Valentin David2018-08-121-2/+30
| | | | | Staging could end-up with file with different rights depending on the umask. The extracted files need to get their access rights fixed.
* Use deterministic umask when staging sources.Valentin David2018-08-121-1/+10
| | | | | | This fix is applied to plugins bzr, git, patch. Fixes #543 #544 #555.
* buildstream/plugins/sources/local.py: Make staging deterministic.Valentin David2018-08-121-1/+25
| | | | | | | | | | | | | | Instead of copying metadata on files staged by local, we manually set mode to 0755 or 0644 depending on whether user execution was enabled on source file. This makes file modes deterministic independently on the way source was distributed. Non-deterministic mode copying all metadata can still be enabled by disable 'deterministic' Boolean configuration on the plugin. Fixes #527.
* Set environment in bwrap command line instead of its environmentValentin David2018-08-101-3/+7
| | | | Fixes #498
* Implementing relative workspacesrelative_workspacesPhillip Smyth2018-08-104-43/+41
| | | | | | | This fixes #191 A note has been added to NEWS explaining backwards compatibility issues
* buildstream/_project.py: Restrict max-jobsJavier Jardón2018-08-091-1/+4
| | | | | | even if the machine have mores cores available Patch taken from YBD: https://gitlab.com/baserock/ybd/blob/master/ybd/app.py#L227
* buildstream/_project.py:Javier Jardón2018-08-091-2/+1
| | | | | | | | | Multiprocessing with n_jobs given by multiprocessing.cpu_count() is not optimal for systems where not all CPU can be used (in particular, Docker, CI etc). As suggested in the multiprocessing docs (http://docs.python.org/3/library/multiprocessing.html#multiprocessing.cpu_count) using len(os.sched_getaffinity(0)) might be better.
* Keep original flags for create in SafeHardlinks.Valentin David2018-08-092-3/+7
| | | | | | | | | | When open(2) is used with flags O_CREAT|O_RDWR, the file descriptor must be readable. Unfortunately O_RDWR was not passed which made read fail with EBADF and mmap to signal SIGBUS. This issue happened with man-db for example. Fixes #143.
* cascache: move tmp directory one level uptiagogomes/issue-520Tiago Gomes2018-08-093-8/+10
| | | | | | | | | | | | | The CAS uses a temp directory while manipulating the cache, temporary files can be added and removed while adding artifacts to the cache here. Since calculation of the cache size happens in parallel to artifact cache additions, this causes race conditions in the size calculation job, as we end up calling `stat` on temporary files which are being removed in parallel. Handle this by moving the temporary directory out of the way, and avoid considering the tmp directory when calculating the cache size
* _artifactcache/cascache.py: Fix for PEP 479 / Python 3.7Jürg Billeter2018-08-071-2/+5
| | | | | | Do not rely on `StopIteration` bubbling up. https://www.python.org/dev/peps/pep-0479/
* Add warning to git track if track and ref are not presentWilliam Salmon2018-08-072-3/+23
| | | | | This is to address https://gitlab.com/BuildStream/buildstream/issues/471 that documented unhelpfull behavour when tracking git sources.
* remote.py: Add support for marking downloaded files executableEd Baunton2018-08-072-3/+18
| | | | | | | | | | Add an optional flag to make files executable after having downloaded them. Instead of leaving the permissioning of downloaded file in remote.py up to the user's umask; expressly set permissions to 0644 or 0755 if executable. Bump format version to 13.
* PullQueue: fix resource usedTiago Gomes2018-08-062-3/+3
| | | | | | Improve fetchers, builders and pushers documentation. Closes #550.
* __main__.py: Adding private entry point so we can run BuildStream without ↵Tristan Van Berkom2018-08-051-0/+17
| | | | | | installing This is needed to build docs without installing BuildStream.
* element.py (docs): dashes not underscores for build and install rootEd Baunton2018-08-041-2/+2
| | | | Fix small error in docs in relation to `get_variable` documentation.
* Add support for include '(@)' in project.conf and .bst filesValentin David2018-08-0214-202/+550
| | | | Fixes #331.
* Refactor plugin factory creationValentin David2018-08-024-73/+95
|
* Make Project owner of Loader.Valentin David2018-08-028-86/+121
|
* Pass targets to Loader.load() instead of its constructor.Valentin David2018-08-022-19/+18
| | | | | This is required to be able to build a Loader before the list of targets is known.
* project: validate project paths (local plugin paths)Tiago Gomes2018-08-021-1/+4
|
* project: validate project paths (element-path)Tiago Gomes2018-08-021-1/+3
|
* ostree plugin: validate project pathsTiago Gomes2018-08-021-3/+5
|
* patch plugin: validate project pathsTiago Gomes2018-08-021-9/+4
|
* local plugin: validate project pathsTiago Gomes2018-08-021-7/+5
| | | | | | The autotools example had to be copied over inside of the junction example, as referring to a path outside of the project directory is now disallowed.
* plugin: bake API to get and validate a project pathTiago Gomes2018-08-023-3/+146
| | | | | | | | A project path is a path relative to a project directory. A project path can not also refer to the parent directory in the first path component, or point to symbolic links, fifos, sockets and block/character devices.
* _stream.py: Print details on checkout failuremablanch/447-stack-trace-checkoutMartin Blanchard2018-08-011-1/+1
|
* element.py: Raise an exception on unbuilt element checkoutMartin Blanchard2018-08-011-0/+6
| | | | | Trying to checkout an element that has no cached artifacts should be and handled failure. See BuildStream/buildstream#447.
* cascache.py: Display SKIPPED message for each remote skippedQinusty/481Josh Smith2018-08-011-3/+10
|
* message.py: MessagesType.SKIPPED addedJosh Smith2018-08-012-0/+2
|
* sandbox.py: Use _root in _has_commandjmac/virtual_directoriesJim MacArthur2018-08-011-2/+2
| | | | | | | This will need more attention when we bring in another virtual directory backend, however, we've said it is acceptable for the sandbox itself to access the underlying directory, and this is the best fix in the meantime.
* compose.py: Remove unused getmtime()Jim MacArthur2018-08-011-7/+0
|
* scriptelement.py: Convert to virtual directoriesJim MacArthur2018-08-011-5/+4
|
* plugins/elements/stack.py: Convert to virtual directoriesJim MacArthur2018-08-011-6/+5
|
* sandbox: Remove instances of get_directoryJim MacArthur2018-08-012-2/+5
| | | | | sandbox/_mount.py, sandbox/_sandboxbwrap.py: Remove instances of get_directory
* plugins/elements/import.py: Convert to virtual directoriesJim MacArthur2018-08-011-13/+10
|
* plugins/elements/compose.py: Convert to virtual directoriesJim MacArthur2018-08-011-25/+13
|
* element.py: Conversion to use virtual directoriesJim MacArthur2018-08-011-51/+62
|
* _stream.py: Convert to virtual directories.Jim MacArthur2018-08-011-43/+9
| | | | | This removes _add_directory_to_tarfile since it is now implemented in _filebaseddirectory.py.
* sandbox.py: Add function to get virtual directory.Jim MacArthur2018-08-011-0/+15
|
* storage: Add __init__.pyJim MacArthur2018-08-011-0/+22
|
* Add the virtual directory class 'Directory' and one implementation.Jim MacArthur2018-08-014-1/+372
| | | | | | buildstream/storage/Directory.py: New file. buildstream/storage/_filebaseddirectory.py: New file. buildstream/_exceptions.py: New VIRTUAL_FS exception source.
* Sandbox.py: Rename __root to _root.Jim MacArthur2018-08-012-5/+6
| | | | | | | | This is to allow to allow its use by subclasses. Since access to get_directories is now blocked for some plugins, and the subclasses of Sandbox do not have configuration defined by YAML files, they need another way to get at the root directory.
* utils.py: add getmtime() and magic_timestampJim MacArthur2018-08-011-5/+13
| | | | | magic_timestamp is moved into file scope so other classes can use it.
* Add BST_VIRTUAL_DIRECTORY flag for element pluginsJim MacArthur2018-08-012-4/+19
|