summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* tests: test that integration commands can use /devrichardmaw/fix-chroot-sandbox-devicesRichard Maw2018-09-182-0/+19
|
* FUSE: Mount with -odev in chroot sandboxRichard Maw2018-09-184-8/+18
| | | | | | | | | | | | | This is needed to permit access to the device nodes added to /dev on Linux when FUSE is used as root. The chroot sandbox only works with all privileges, so there's no explicit check for being root or having the appropriate capabilities. A check for whether it's running as root isn't needed on Linux with bubblewrap because /dev or its devices are mounted on top of the FUSE layer, so device nodes are accessed directly rather than through the FUSE layer.
* fuse: Report the correct device number for devicesRichard Maw2018-09-171-1/+1
| | | | | | This fixes all devices being mapped to the non-existant device 0, which prevents being able to use even safe devices like /dev/null through the hardlinks FUSE layer.
* Merge branch 'tristan/contributing-guide' into 'master'Tristan Van Berkom2018-09-176-4/+10
|\ | | | | | | | | Update contributing guide See merge request BuildStream/buildstream!801
| * update HACKING referencesAdam Jones2018-09-175-4/+4
| |
| * Rename HACKING.rst to CONTRIBUTING.rstAdam Jones2018-09-171-0/+0
| |
| * Add a section on how to raise an issueAdam Jones2018-09-171-0/+6
|/
* Merge branch 'richardmaw/subprocess-PWD' into 'master'Tristan Van Berkom2018-09-1633-63/+59
|\ | | | | | | | | Address post-merge review of Ensure PWD is set in process environment See merge request BuildStream/buildstream!788
| * Cachekey update helper: Document ensuring . in PYTHONPATHRichard Maw2018-09-161-1/+1
| | | | | | | | | | | | | | | | | | | | The current directory isn't always in the python module search path, so we have to ensure it is for the script to work. Strictly speaking, the user may already have a modified PYTHONPATH at which point PYTHONPATH=".${PYTHONPATH+:$PYTHONPATH}" is necessary, but it's probably premature to overcomplicate the documentation like that before we discover it's a problem.
| * Bump Artifact VersionRichard Maw2018-09-1629-29/+29
| | | | | | | | | | Since we now set PWD in the environment of builds existing builds may behave differently so must cache differently now.
| * sandbox: deduplicate default environment logicRichard Maw2018-09-163-33/+29
|/
* buildstream/_frontend/complete.py: Added missing click license complianceTristan Van Berkom2018-09-161-2/+17
| | | | | | Somehow I missed this when originally forking the file from the click library, now noticing that we should have followed what was written in: https://github.com/pallets/click/blob/master/LICENSE
* Merge branch 'tiagogomes/some-cleanups' into 'master'Tiago Gomes2018-09-147-27/+65
|\ | | | | | | | | Bunch of cleanups See merge request BuildStream/buildstream!798
| * scheduler: minor cleanups to CleanupJobTiago Gomes2018-09-142-10/+2
| | | | | | | | Remove unneeded cruft.
| * artifactcache: rename get_quota_exceeded()Tiago Gomes2018-09-143-5/+5
| |
| * artifactcache: improve _fetch_directory()Tiago Gomes2018-09-141-6/+19
| | | | | | | | | | | | * Rename tree to dir_digest to make it clear this is a Digest object, and not a Tree object. * Add documentation
| * artifactcache: improve _create_tree()Tiago Gomes2018-09-141-4/+19
| | | | | | | | | | | | | | | | * Rename it to _commit_directory() because… it is what it does; and also for symmetry with _fetch_directory(). * Rename digest to dir_digest to make it clear this is a digest for a directory. A following commit will also reuse the same variable name * Document method.
| * scheduler: add missing copyrightTiago Gomes2018-09-141-0/+19
| | | | | | | | Tristan Maat created the original file, so he is added as the author.
| * artifactcache: fix oversightTiago Gomes2018-09-141-1/+1
| | | | | | | | | | We want to check if some file is already cached here, not the parent directory.
| * core: remove unused variable on ContextTiago Gomes2018-09-141-1/+0
|/
* Merge branch 'tristan/fix-required-artifacts' into 'master'Tristan Van Berkom2018-09-147-89/+218
|\ | | | | | | | | Don't delete required artifacts when tracking is enabled See merge request BuildStream/buildstream!793
| * tests/artifactcache/expiry.py: Added test_never_delete_required_track()Tristan Van Berkom2018-09-141-1/+57
| | | | | | | | | | | | Same test as test_never_delete_required(), except that this test ensures that we never delete required artifacts when their cache keys are discovered dynamically during the build.
| * testutils/element_generators.py: Changing sized element functionsTristan Van Berkom2018-09-142-18/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | * create_element_size() Now uses a git Repo object instead of a local source, and returns the repo. * update_element_size() Added this function which can now resize the expected output of an element generated with create_element_size(), useful to allow testing sized elements with the tracking feature.
| * testutils/repo/git.py: Added modify_file() methodTristan Van Berkom2018-09-141-0/+7
| | | | | | | | | | This allows one to modify a file in an existing git repo, as opposed to adding a new one.
| * tests/artifactcache/expiry.py: Assert the expected errorsTristan Van Berkom2018-09-141-0/+2
| | | | | | | | | | | | | | These tests were not checking that we fail for the expected reasons. Added `res.assert_task_error(ErrorDomain.ARTIFACT, 'cache-too-full')` where we expect to fail because the cache is too full.
| * tests/artifactcache/expiry.py: Cleanup of test for required artifactsTristan Van Berkom2018-09-141-39/+23
| | | | | | | | | | | | | | This commit renames test_never_delete_dependencies() to test_never_delete_required(), renders the test more readable by renaming some elements and reordering some statements and makes the comments more straight forward and accurate.
| * _artifactcache/artifactcache.py: Changes to mark_required_elements()Tristan Van Berkom2018-09-143-32/+53
|/ | | | | | | | | This was previously append_required_artifacts(), which presumed that we knew at startup time what the cache keys of all elements in the loaded pipeline would be. This fixes unexpected deletions of required artifacts when dynamic tracking is enabled with `bst build --track-all target.bst`
* Merge branch 'richardmaw/test-config-fixes' into 'master'richardmaw-codethink2018-09-142-20/+23
|\ | | | | | | | | Fix tests that attempt to access the home directory See merge request BuildStream/buildstream!780
| * Tidy relative workspace testsRichard Maw2018-09-141-17/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | They were moving the whole tmpdir to move the project repository. This moves the cache directories etc. as well, meaning cli.run can't find them. This was worked around by setting configure=False, but this has the side-effect of making use of the user's caches, which it should not be doing for reproducibility reasons. By changing the tempdir layout to have the project in a subdirectory we can move the project around for the relative workspace tests without losing track of the configured state directories, so we can leave configure=True and avoid touching the user's caches.
| * tests: Use cli.configure for custom logging testRichard Maw2018-09-141-3/+2
|/ | | | | | Overriding the config with a custom config file on the command-line prevents it merging in the test-specific configuration and can permit it to attempt to initialise the user's cache.
* Merge branch 'richardmaw/builddir-sockets' into 'master'richardmaw-codethink2018-09-145-0/+77
|\ | | | | | | | | Fix: While caching build artifact: "Cannot extract [path to socket file] into staging-area. Unsupported type." See merge request BuildStream/buildstream!783
| * tests: cover builds that make socketsRichard Maw2018-09-143-0/+63
| |
| * Handle sockets when copying trees into artifactsRichard Maw2018-09-142-0/+14
|/ | | | | We can't include a socket in a CAS tree, but it's mostly meaningless to do so since there can't possibly be a process serving it.
* Merge branch 'richardmaw/element-cache-state-simplify' into 'master'richardmaw-codethink2018-09-131-4/+1
|\ | | | | | | | | Simplify element state by removing `__cached` See merge request BuildStream/buildstream!784
| * element: Remove __cached fieldRichard Maw2018-09-131-4/+1
|/ | | | | This can get out of sync with other two cache states, and we can do without it.
* Merge branch 'chandan/pypi-badge' into 'master'Chandan Singh2018-09-131-0/+3
|\ | | | | | | | | README.rst: Add status badges for PyPI release and Python versions See merge request BuildStream/buildstream!719
| * README.rst: Add status badges for PyPI release and Python versionsChandan Singh2018-09-131-0/+3
|/ | | | | | The first badge will work fine right away while the second badge will show "not found" until a release is made after merging this branch: https://gitlab.com/BuildStream/buildstream/merge_requests/718.
* Merge branch 'jjardon/pip_dependency' into 'master'Javier Jardón2018-09-131-0/+1
|\ | | | | | | | | source/install_source.rst: pip plugin depends on host pip See merge request BuildStream/buildstream!791
| * source/install_source.rst: pip plugin depends on host pipJavier Jardón2018-09-131-0/+1
|/
* Merge branch 'juerg/cas-batch' into 'master'Jürg Billeter2018-09-101-0/+49
|\ | | | | | | | | | | | | _artifactcache/casserver.py: Implement BatchReadBlobs Closes #632 See merge request BuildStream/buildstream!785
| * _artifactcache/casserver.py: Implement BatchReadBlobsJürg Billeter2018-09-101-0/+25
| | | | | | | | Fixes #632.
| * _artifactcache/casserver.py: Implement Capabilities serviceJürg Billeter2018-09-101-0/+24
|/
* Merge branch 'tiagogomes/issue-287' into 'master'Tiago Gomes2018-09-108-27/+140
|\ | | | | | | | | Add validation of configuration variables See merge request BuildStream/buildstream!678
| * Add tests for validating configuration variablesTiago Gomes2018-09-103-0/+101
| |
| * element: validate configuration variablesTiago Gomes2018-09-102-1/+12
| | | | | | | | Ensure that protected variables are not being redefined by the user.
| * docs: document protected variablesTiago Gomes2018-09-102-15/+22
| | | | | | | | | | And remove then from the defaults as they are dynamically set by BuildStream.
| * tests: avoid setting max-jobsTiago Gomes2018-09-101-11/+5
|/ | | | Setting "max-jobs" won't be allowed anymore in a following commit.
* Merge branch 'richardmaw/subprocess-PWD' into 'master'richardmaw-codethink2018-09-103-18/+34
|\ | | | | | | | | Ensure PWD is set in process environment See merge request BuildStream/buildstream!782
| * subprocesses: Ensure PWD is set in process environmentRichard Maw2018-09-103-18/+34
|/ | | | | | | | | | | | | | | Naive getcwd implementations (such as in bash 4.4) can break when bind-mounts to different paths on the same filesystem are present, since the algorithm needs to know whether it's a mount-point to know whether it can trust the inode value from the readdir result or to use stat on the directory. Less naive implementations (such as in glibc) iterate again using stat in the case of not finding the directory because the inode in readdir was wrong, though a Linux-specific implementation could use name_to_handle_at. Letting the command know what directory it is in makes it unnecessary for it to call the faulty getcwd in the first place.
* Merge branch 'tristan/fix-cache-exclusivity' into 'master'Tristan Van Berkom2018-09-1012-146/+198
|\ | | | | | | | | _scheduler/queues: Mark build and pull queue as requiring shared access to the CACHE See merge request BuildStream/buildstream!775