summaryrefslogtreecommitdiff
path: root/buildstream/plugins
Commit message (Collapse)AuthorAgeFilesLines
* plugins/sources/local.py: Consider symbolic link target in cache key.Tristan Van Berkom2018-01-101-1/+2
| | | | | | | | Technically this breaks cache keys for the local source, but as this comes in a branch which fixes local source cache keys to be stable (they were random before this branch), we wont bother with considering this enhancement a separate API break, the cache key breakage was inescapable anyway.
* plugins/sources/_downloadablefilesource.py: Exclude a line from coverageTristan Van Berkom2018-01-021-1/+6
| | | | | | | When fetching a downloadable source, we make a defensive check to avoid redundant download at fetch() time by checking if it's already cached, but fetch() will never be called if the source is already cached.
* plugins/sources/local.py: pragma nocover on unreachable codeTristan Van Berkom2018-01-021-3/+3
| | | | | | | | The local plugin is always Consistency.CACHED, this means that fetch(), set_ref() and get_ref() methods will never be called. Instead of omitting them, just "pragma: nocover" on the `pass` statements, making our coverage report more realistic.
* plugins/sources/patch.py: Removing unneeded checkTristan Van Berkom2018-01-021-7/+5
| | | | | | | | | The patch plugin was checking if the target directory exists, however this is automatically guaranteed by the Source abstract class and documented to be guaranteed as well. Since this error cannot be caught by the plugin (it will be caught in advance by the Source class), removing the check from patch.py.
* plugins/sources/patch.py: Added context to some errorsTristan Van Berkom2018-01-011-8/+12
|
* plugins/sources/tar.py: Dont manually reraise exceptionTristan Van Berkom2017-12-201-5/+4
| | | | | It's not required to raise SourceError() manually when calling utils.get_host_tool().
* plugins/sources/local.py: Cache the local element's unique keyAntoine Wacheux2017-12-131-10/+18
| | | | | This avoid multiple file system traversal when the key is requested multiple times.
* plugins/elements/script.py: Remove check for 'commands'Angelos Evripiotis2017-12-131-4/+0
| | | | | This isn't reachable as there's a default value in script.yaml, also it has an error in it - ElementError hasn't been declared in this scope.
* plugins/sources/git.py: Fix potential NameErrorGökçen Nurlu2017-12-121-1/+1
| | | | | | | The residual `from e` was probably left there after a refactoring from try-catch to exit-code-checking. While this could prevent the expected `SourceError` being thrown, I couldn't find a proper way to trigger it since `git show` has no documented return codes other than `0` and `128`.
* plugins/sources/bzr.py: Fix variable name typosGökçen Nurlu2017-12-111-3/+4
|
* Remove unused importsGökçen Nurlu2017-12-074-7/+6
|
* buildstream/plugins/elements/cmake.yaml: Always create build folderjjardon/cmake_buildJavier Jardón2017-12-051-3/+5
| | | | | | | | | | | | | This is the common practice with cmake Actually, some modules will fail to build if this is not follow. For example for llvm you wil get this error when configuring: " CMake would overwrite the makefiles distributed with LLVM. Please create a directory and run cmake from there, passing the path to this source directory as the last argument. "
* buildstream/plugins/elements: Add *-global and *-local configuration variablesJavier Jardón2017-11-303-3/+9
| | | | | | | | | This will allow to define: - global configuration parameters that will be used to all the elements using that build system - local configuration parameters that will override the global ones Left *-extra for compatibility
* Add support for lzip in tar source. Fix #158.Valentin David2017-11-301-1/+32
|
* Fix untar of symlinks. Only hardlinks are relative to top of archive and ↵Valentin David2017-11-291-3/+1
| | | | should be normalized.
* Remove all deleted paths from manifest after integration commands inValentin David2017-11-271-1/+3
| | | | | | | | | | compose plugin including paths still reachable through following of symbolic links. Keeping reachable paths through following of symbolic links in manifest. Can lead to ENOENT error when copying the file if target directory of a symbolic link is not yet created. The file is anyway copied since the real path of the file is also in the manifest.
* Replace call to legacy urllib.request.urlretrieve by urllib.request.urlopen ↵Valentin David2017-11-251-8/+12
| | | | and add accept header to avoid 406 error on some http servers (e.g alioth.debian.org).
* Removing unneeded str() statements in "{}".format() statementsTristan Van Berkom2017-11-211-4/+4
| | | | | Since these changes were effected in 3b17762a4cab23c238762ca32baa348788347473, these stringifications are now implied and no longer needed.
* plugins/elements/compose.py: post merge fixing of compose elementTristan Van Berkom2017-11-201-19/+27
| | | | | | | | | | o Some things changed in master since this patch, notably the keyword only arguments have changed o Enhanced the user feedback to mention removed, added and modified files resulting from running integration o Dont silence messages while integrating the sandbox
* Handle removed files from integration in compose pluginValentin David2017-11-201-20/+30
| | | | Fixes issue #147
* Switch old-style string formattings to new '.format()'Gökçen Nurlu2017-11-173-11/+11
|
* plugins/sources/tar.py: Consider link names in extractionTristan Van Berkom2017-11-171-0/+13
| | | | | | | | When extracting files from a base directory, we are normalizing the TarInfo file names so we need to also normalize the link names in the case of links and symlinks. Fixes issue #155
* compose.py: Use keyword args for utils.move_filesJonathan Maw2017-11-141-1/+1
|
* Make node_subst_member pass default values as positional argsJonathan Maw2017-11-141-1/+1
|
* autotools: Always run the autogen stepMathieu Bridon2017-11-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | BuildStream made the choice to unconditionally run the autogen step for autotools elements, even when building from tarballs. However, due to how the conditionals for what to do in that step were set up, some tarballs would fall through the crack and effectively skip that step. For example the Python tarballs and VCS checkouts both: * do not have an autogen/autogen.sh script * do not have a bootstrap/bootstrap.sh script * do have a configure script The conditionals we had before this change would not do anything for a project like that, and the first thing to actually be run would be the configure script. With this change, `autoreconf` gets run whether the configure script exists or not, ensuring we always effectively do the autogen step. More details on the mailing-list: https://mail.gnome.org/archives/buildstream-list/2017-November/msg00015.html
* Change origin to point at source repoDaniel Playle2017-11-111-2/+25
| | | | | | | | | | | | This changes workspaces created with the git source element so that the origin remote points to the source repository of the build element as opposed to the internal repository in the bst cache. This introduces an addition of the init_workspace method in the source API. This method, which defaults to calling stage, is for the setup of the workspace after the creation of the workspace directory. This is a part of issue #53
* git.py source plugin: Prune remote-tracking branches when fetchingsam/git-fetch-pruneSam Thursfield2017-11-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I noticed this issue when running `bst track` on a system that contained GLIBC. The following error occurred: [--:--:--] START [gnu-toolchain/stage2-glibc.bst]: Tracking release/2.25/master from git://git.baserock.org/delta/glibc Running host command /home/fedora/src/baserock/definitions/.cache/buildstream/sources/git/git___git_baserock_org_delta_glibc: /usr/bin/git fetch origin [--:--:--] STATUS [gnu-toolchain/stage2-glibc.bst]: Running host command /usr/bin/git fetch origin error: cannot lock ref 'refs/heads/hjl/memcpy/dpdk/master': 'refs/heads/hjl/memcpy' exists; cannot create 'refs/heads/hjl/memcpy/dpdk/master' From git://git.baserock.org/delta/glibc ! [new branch] hjl/memcpy/dpdk/master -> hjl/memcpy/dpdk/master (unable to update local ref) error: cannot lock ref 'refs/heads/hjl/x86/master': 'refs/heads/hjl/x86' exists; cannot create 'refs/heads/hjl/x86/master' ! [new branch] hjl/x86/master -> hjl/x86/master (unable to update local ref) error: cannot lock ref 'refs/heads/hjl/x86/math': 'refs/heads/hjl/x86' exists; cannot create 'refs/heads/hjl/x86/math' ! [new branch] hjl/x86/math -> hjl/x86/math (unable to update local ref) error: cannot lock ref 'refs/heads/hjl/x86/optimize': 'refs/heads/hjl/x86' exists; cannot create 'refs/heads/hjl/x86/optimize' ! [new branch] hjl/x86/optimize -> hjl/x86/optimize (unable to update local ref) error: some local refs could not be updated; try running 'git remote prune origin' to remove any old, conflicting branches git source at gnu-toolchain/stage2-glibc.bst [line 4 column 2]: Failed to fetch from remote git repository: git://git.baserock.org/delta/glibc The issue here is that my local clone had old remote-tracking refs which conflicted with newer upstream refs. For example, there used to be a ref named `hlj/memcpy` which I had mirrored locally. This has been deleted and now a ref exists named `hlj/memcpy/dpdk/master`. The new ref cannot be pulled because Git considers it to conflict with the old one. The solution is to use `git fetch --prune` when updating so that Git removes any outdated remote-tracking refs before trying to create any new ones.
* refactoring: Made Project option privateTristan Van Berkom2017-11-066-15/+7
| | | | | | | | | | | | | | This required adding two new APIs to make up for it on the Source o get_project_directory() Added here because elements should not be accessing external resources, Sources needed for local files and GPG keys and such o translate_url() Used by sources to mish-mash the project aliases and create real urls.
* plugins/sources/zip.py: Dont depend on python 3.6 methodTristan Van Berkom2017-11-061-8/+10
| | | | | | Also, restructured a bit to match tar source, there was never any need for the `dirs_only` parameter for listing the archive paths, the source is only interested in directories anyway.
* plugins/elements/script.py: Issue #121 - Remove traces of pre-/post- commandsTristan Van Berkom2017-11-061-8/+3
|
* plugins/sources/tar.py: Ignore leading ./ in tarball pathsTristan Van Berkom2017-11-031-9/+18
| | | | | | | This makes buildstream behave the same way with tarballs which were encoded with a leading `.` and those encoded without one. This fixes issue #145
* Add a new zip sourcezipMathieu Bridon2017-11-031-0/+147
| | | | This is equivalent to the tar source, but for Zip archives.
* tar: Move most of the code to a new base classMathieu Bridon2017-11-032-91/+114
| | | | | | | | | | | The new DownloadableFileSource will be used as a base for all sources which just download a file to use as source. The existing TarSource just keeps the code responsible to manage a Tar archive. This will help implemeting other types of single file downloaded sources, for example Zip archives.
* plugins/sources/tar.py: Ignore possible leading '.' directory.Tristan Van Berkom2017-11-021-0/+6
| | | | | | | | | | | | | | | To extract the full tarball, one should set base-dir to an empty string. By ignoring the leading '.' in any archive, we make the 'base-dir' API more predictable and reliable - the default behavior of '*' is to pickup the first directory in the tarball (usually source code tarballs are encoded with one leading directory) - in the off chance that a source tarball has a leading '.' in it; that would cause the 'base-dir' default '*' glob to extract the whole thing. It seems undesirable to behave differently depending on whether a tarball was encoded with, or without a leading '.'
* Remove dpkg and x86image elementsJonathan Maw2017-10-266-805/+0
|
* ostree.py source plugin: More informative error when missing track & refTristan Van Berkom2017-10-141-1/+1
|
* git.py source plugin: More informative error when missing track & refTristan Van Berkom2017-10-141-1/+1
|
* Fix timestamps in Python bytecodefix-pyc-timestampsMathieu Bridon2017-09-292-0/+4
| | | | | | | | | | | | | | | | | | When building Python modules, a bytecode `.pyc` file is generated from the source `.py` file. The former contains 4 bytes representing the timestamp of the latter at the time it was generated. Unfortunately, after building OSTree sets all the file timestamps to 0, which introduces a discrepency between the timestamp of the `.py` file and the 4 bytes stored inside the `.pyc` file. As a result, when running a Python module from a checkout, Python thinks the bytecode files are stale, which causes a dramatic performance penalty when starting an application. Fixes #94
* Add source plugin node validationsTristan Maat2017-09-145-0/+10
|
* Add element plugin node validationsTristan Maat2017-09-144-0/+18
|
* patch.py source plugin: Use utils.sha256sum()Tristan Van Berkom2017-09-121-11/+1
|
* tar.py source plugin: Use utils.sha256sum()Tristan Van Berkom2017-09-121-9/+1
|
* local.py source plugin: Use utils.sha256sum()Tristan Van Berkom2017-09-121-10/+6
|
* Add patch source pluginChandan Singh2017-09-091-0/+106
| | | | Fixes #63
* git.py source plugin: Consider submodules in cache keyTristan Van Berkom2017-09-011-1/+8
| | | | | | | | NOTE: This changes cache keys for existing sources which have submodules configured. Presence of submodules in the source configuration changes the configuration significantly, this should be considered in cache keys.
* bzr.py source plugin: Dont require a mirror to check for consistencyTristan Van Berkom2017-09-011-0/+4
| | | | | Here we were querying a non existing directory with bzr, we dont need this when the directory doesnt exist.
* element.py and plugins: Changed Element.strict_rebuild APITristan Van Berkom2017-08-301-1/+5
| | | | | | Instead use BST_STRICT_REBUILD and follow a new pattern we're using for any class attributes used for the plugin to communicate static data back to the core.
* compose.py plugin: Expose a new `exclude` option.compose-excludeTristan Van Berkom2017-08-292-19/+38
| | | | | | | | Using the new enhanced Element API for staging, allow the user to specify domains to exclude as well as domains to include. Fixes issue #78
* import.py: Implement generate_script() for source bundlesJürg Billeter2017-08-221-0/+26
| | | | Fixes #59
* Add a pip elementMathieu Bridon2017-08-102-0/+65
| | | | | | | | | | | | | | | | | | | Packaging is a big topic in the Python community these days. Things are evolving, but a consensus seems to have formed around the path forward. With PEP 518, Pip is becoming the primary tool to install Python modules. In turn, Pip will use the right underlying tool for the job. (distutils, setuptools, flint, ...) Given all this, it makes sense to have a pip element in BuildStream. This element installs a single Python module, telling Pip not to go and download its dependencies, to make builds reproducible and not rely on the network during builds. By default it will use the `pip` command which generally points to Pip for Python 2. Users can override the "pip" variable, for example to use the `pip3` command, which generally points to Pip for Python 3.