summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Read files from a local clone of definitions where possiblebaserock/adamcoldrick/use-local-definitionsAdam Coldrick2015-01-151-50/+79
| | | | | | | | | We normally store morphologies in definitions.git rather than in the chunk's source repository now. We currently read these using `git cat-file`, which is slow. Since our morphologies are mostly in a single repository, it will be quicker to check out all the files in one go into a temporary directory and then read them from there.
* Move MorphologyFactory into SourceResolverSam Thursfield2015-01-154-387/+74
| | | | | | | There's no need for this stuff to be in a separate class. This allows integrating it with the caching in the SourceResolver class. Contains some work from Adam Coldrick <adam.coldrick@codethink.co.uk>.
* Add a mechanism for extracting all files from a given commit to a dirSam Thursfield2015-01-154-6/+85
| | | | | | This is nice because it's fast. We don't have to copy all the Git history along with it like we do with a clone. And it doesn't touch any files in the cached repo.
* Convert the empty-stratum test into a yarnAdam Coldrick2015-01-145-38/+35
| | | | | | | We will use MorphologyLoader.load_from_file() to load morphologies from a temporary file, so the output will be unpredictable. That will break this test, so we may as well convert it into a yarn to fix it.
* Fix some yarns to shut down their git servers when finishedAdam Coldrick2015-01-143-0/+3
| | | | | | This commit fixes an issue where running morph's yarn tests would leave behind a number of scripts/git-daemon-wrap processes due to some tests not stopping their git server properly.
* Fix copyright yearsSam Thursfield2015-01-122-2/+2
|
* Merge branch 'sam/cached-repo-cleanup'Sam Thursfield2015-01-1217-318/+214
|\ | | | | | | | | Reviewed-By: Adam Coldrick <adam.coldrick@codethink.co.uk> Reviewed-By: Richard Maw <richard.maw@codethink.co.uk>
| * Remove unused code from morphlib.gitSam Thursfield2014-12-031-24/+0
| | | | | | | | | | There is still code here that duplicates stuff the GitDirectory class should be doing, I think.
| * Rework CachedRepo to use the GitDirectory class where possibleSam Thursfield2014-12-0317-287/+199
| | | | | | | | | | | | | | | | | | | | | | | | | | This consolidates a bunch of code paths that were previously duplicated. This also changes the API for local cached repos to match the function names GitDirectory uses. Note that the remote repo cache still uses the old names, and should be fixed when time permits. Some unit tests that use the CachedRepo module required a bit of inelegant monkey-patching in order that they continue to work. A better way to do this would be with the 'mock' library (which would need to be added to Baserock 'build' and 'devel' systems before we could use it).
| * Separate resolution of ref->commit and commit->treeSam Thursfield2014-12-021-7/+15
| |
* | Merge remote-tracking branch 'origin/sam/rename-builder2'Sam Thursfield2015-01-055-10/+10
|\ \ | | | | | | | | | | | | Reviewed-By: Pedro Alvarez <pedro.alvarez@codethink.co.uk> Reviewed-By: Richard Ipsum <richard.ipsum@codethink.co.uk>
| * | Rename builder2 module to builderSam Thursfield2014-12-195-9/+9
| | |
* | | Merge remote-tracking branch 'origin/baserock/tiagogomes/sysroot-checks'Sam Thursfield2015-01-022-3/+31
|\ \ \ | | | | | | | | | | | | | | | | Reviewed-By: Paul Sherwood <paul.sherwood@codethink.co.uk> Reviewed-By: Sam Thursfield <sam.thursfield@codethink.co.uk>
| * | | Add some checks to the sysroot deployment extensionTiago Gomes2015-01-022-3/+31
| | | | | | | | | | | | | | | | | | | | | | | | Ensure that a) the deployment directory must not exist b) the extension can not be used to upgrade a system
* | | | Merge branch 'sam/fix-command-logging'Sam Thursfield2015-01-021-16/+25
|\ \ \ \ | |/ / / |/| | | | | | | | | | | Reviewed-By: Paul Sherwood <paul.sherwood@codethink.co.uk> Reviewed-By: Mike Smith <mike.smith@codethink.co.uk>
| * | | Improve logic for displaying command execution to userSam Thursfield2015-01-021-16/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This avoids writing each command to the log file twice, as we did previously. Also, the user-visible message is now only constructed if we are definitely going to write it to the screen (a tiny optimisation). Hopefully the logic is clearer now too.
| * | | Fix logging and display of commandlines being executed by MorphSam Thursfield2015-01-021-6/+7
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We were attempting to display commandlines with correct shell-escaping, but the logic was super broken so users would end up seeing this sort of thing instead: 2015-01-02 10:25:42 # g | i | t | | r | e | v | - | p | a | r | s | e | | - | - | v | e | r | i | f | y | | ' | 9 | 8 | f | e | a | 8 | 7 | b | 7 | 2 | 7 | 2 | 5 | 3 | e | 7 | f | f | 8 | 1 | 0 | 5 | 4 | 3 | 4 | c | 9 | e | a | 9 | 0 | 2 | b | b | 6 | a | 6 | f | 7 | e | ^ | { | c | o | m | m | i | t | } | ' Commandlines should now display as intended, more like this: 2015-01-02 10:57:17 # git rev-parse --verify '9df9643842e4b4d8ece710fe6105f32fa38a0d22^{commit}' This broken logic was introduced as a post-review fixup in merge commit c57952ef44a0f1f161441970fcf2f27a39b0de7c.
* | | Merge branch 'emmet/armv8'Sam Thursfield2014-12-192-5/+19
|\ \ \ | | | | | | | | | | | | | | | | | | | | Reviewed-By: Richard Ipsum <richard.ipsum@codethink.co.uk> Reviewed-By: Richard Maw <richard.maw@codethink.co.uk> Reviewed-By: Sam Thursfield <sam.thursfield@codethink.co.uk>
| * | | Support armv8l, armv8b, aarch64, and aarch64bEmmet Hikory2014-12-192-5/+19
|/ / / | | | | | | | | | | | | | | | Also add support to allow building compatible architectures on armv8 machines, as per the rationale in the comment in _validate_architecture().
* | | Merge branch 'baserock/richardmaw/bugfix/stagingarea-mounts-inside-destdir-v2'Sam Thursfield2014-12-191-3/+10
|\ \ \ | |/ / |/| | | | | Reviewed-By: Sam Thursfield <sam.thursfield@codethink.co.uk>
| * | Don't mount /dev/shm in bootstrap mode.Sam Thursfield2014-12-191-3/+4
| | | | | | | | | | | | | | | | | | There's no chroot used in bootstrap mode, so the host's /dev/shm can be used, and nothing in the world will be looking to /src/tmp/staging/tmpXXX/dev/shm for anything.
| * | stagingarea: Mount things inside dirnamebaserock/richardmaw/bugfix/stagingarea-mounts-inside-destdir-v2Richard Maw2014-12-121-1/+6
| | |
* | | Merge remote-tracking branch 'petefoth/petefoth/generic-params2'Sam Thursfield2014-12-186-15/+125
|\ \ \ | | | | | | | | | | | | | | | | Reviewed-By: James Thomas <james.thomas@codethink.co.uk> Reviewed-By: Sam Thursfield <sam.thursfield@codethink.co.uk>
| * | | Add 'do not use' warnings to nfsboot write extensionPete Fotheringham2014-12-152-3/+19
| | | |
| * | | Document KERNEL_ARGS write extension parameterPete Fotheringham2014-12-154-0/+33
| | | |
| * | | Whitespace removalPete Fotheringham2014-12-151-8/+8
| | | |
| * | | Document BOOTLOADER_INSTALL and BOOTLOADER_CONFIG_FORMAT write extension ↵Pete Fotheringham2014-12-154-3/+50
| | | | | | | | | | | | | | | | parameters
| * | | Document DTB_PATH write extension parameterPete Fotheringham2014-12-153-1/+15
| |/ /
* | | Merge branch 'sam/improve-command-failure-errors'Sam Thursfield2014-12-184-35/+76
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Reviewed-By: Richard Ipsum <richard.ipsum@codethink.co.uk> Reviewed-By: Richard Maw <richard.maw@codethink.co.uk> Reviewed-By: Daniel Silverstone <daniel.silverstone@codethink.co.uk> Reviewed-By: Mike Smith <mike.smith@codethink.co.uk>
| * | | Tiny optimisation of app.runcmd code pathSam Thursfield2014-12-091-9/+8
| | | |
| * | | Give a useful path to failed staging areasSam Thursfield2014-12-091-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | Morph tells the user that an error occurred in the staging area, then moves the staging area somewhere else. Giving the old path rather than the new path is pretty annoying.
| * | | Remove duplicate 'import' statementSam Thursfield2014-12-091-1/+0
| | | |
| * | | Give less scary error messages when a containerised command failsSam Thursfield2014-12-094-22/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This affects errors encountered at build time and at system-integration time. New errors look like this: ERROR: Command failed: baserock/system-integration/02-install-gerrit-gerrit-installation-binaries-misc-0000: Containerisation settings: {'mounts': (('dev/shm', 'tmpfs', 'none'), ('tmp', 'tmpfs', 'none')), 'mount_proc': True, 'root': '/var/tmp/staging/tmp1YQ2yN/minimal-system-x86_64-generic.inst'} Error output: + install -D /usr/share/gerrit/gerrit-2.9.war /home/gerrit2/gerrit/gerrit-2.9.war -o gerrit2 -g gerrit2 -m 644 install: can't change ownership of /home/gerrit2/gerrit/gerrit-2.9.war: Operation not permitted Previously the error message would have been this: Command failed: unshare --mount -- sh -ec. mount --make-rprivate / root="$1" shift while true; do case "$1" in --) shift break ;; *) mount_point="$1" mount_type="$2" mount_source="$3" shift 3 path="$root/$mount_point" mount -t "$mount_type" "$mount_source" "$path" ;; esac done exec "$@" - /var/tmp/staging/tmppeA1Iw/gerrit-x86_64.inst/ dev/shm tmpfs none tmp tmpfs none -- linux-user-chroot --chdir . --mount-proc proc /var/tmp/staging/tmppeA1Iw/gerrit-x86_64.inst/ baserock/system-integration/02-install-gerrit-gerrit-installation-binaries-misc-0000 + install -D /usr/share/gerrit/gerrit-2.9.war /home/gerrit2/gerrit/gerrit-2.9.war -o gerrit2 -g gerrit2 -m 644 install: can't change ownership of /home/gerrit2/gerrit/gerrit-2.9.war: Operation not permitted
* | | | Remove trailing \Sam Thursfield2014-12-181-1/+1
| |/ / |/| | | | | | | | I meant to do this as part of the previous merge.
* | | Merge branch 'sam/fix-openstack-credentials-check'Sam Thursfield2014-12-101-4/+11
|\ \ \ | | | | | | | | | | | | | | | | Reviewed-By: Richard Ipsum <richard.ipsum@codethink.co.uk> Reviewed-By: Francisco Redondo Marchena <francisco.marchena@codethink.co.uk>
| * | | openstack.check: Be more careful when claiming credentials are invalidSam Thursfield2014-12-091-4/+11
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to check the user's credentials at the start of deployment, we try to run `glance image-list`. I found a situation where this command failed despite my credentials being correct. Morph outputted a misleading error message that said 'Wrong OpenStack credentials' The code now checks that the error returned by 'glance' does indeed look like a credentials error. If it doesn't, the full error output is displayed. The error I encountered now gets a message like this: ERROR: openstack.check failed with code 1: ERROR: Failed to connect to OpenStack instance at https://example.com:5000/v2.0: [('SSL routines', 'SSL3_GET_SERVER_CERTIFICATE', 'certificate verify failed')] (If you are curious, I fixed this by running `update-ca-certificates`.)
* | | deploy: Note that some of the extensions listed live in definitions.gitSam Thursfield2014-12-094-14/+18
| | | | | | | | | | | | | | | | | | | | | | | | The user should be aware of this because if they aren't building baserock:baserock/definitions or a repo forked from it, those extensions won't be available. Also fix some long lines that I seem to have failed to commit already.
* | | Merge remote-tracking branch 'petefoth/pf-document-extensions'Sam Thursfield2014-12-098-59/+147
|\ \ \ | |/ / |/| | | | | | | | Reviewed-By: Adam Coldrick <adam.coldrick@codethink.co.uk> Reviewed-By: Sam Thursfield <sam.thursfield@codethink.co.uk>
| * | Add a reference to write.help filePete Fotheringham2014-12-083-18/+5
| | |
| * | initramfs write extension documentationPete Fotheringham2014-12-081-0/+6
| | |
| * | rawdisk write extension documentationPete Fotheringham2014-12-081-8/+34
| | |
| * | ssh-rsync write extension documentationPete Fotheringham2014-12-081-0/+36
| | |
| * | OpenStack write extension documentationPete Fotheringham2014-12-052-32/+39
| | |
| * | Add missing types to the docstring in the DeployPlugin.deploy() functionPete Fotheringham2014-12-051-1/+27
| | |
* | | Merge branch 'sam/fix-help-extensions'Sam Thursfield2014-12-082-2/+4
|\ \ \ | |/ / |/| | | | | | | | Reviewed-By: Pedro Alvarez <pedro.alvarez@codethink.co.uk> Reviewed-By: Emmet Hikory <emmet.hikory@codethink.co.uk>
| * | Fix `morph help-extensions` run outside a workspaceSam Thursfield2014-12-051-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | This command would use the sysbranchdir.open_from_within() function call to search for a system branch, which traverses all subdirectories looking for a directory. This is useful behaviour, but if the user ran `morph help-extensions` in / it'd traverse their whole filesystem before returning, which is stupid. This change means it only does the traverse if it already detected a workspace.
| * | Fix `morph help-extensions` returning no itemsSam Thursfield2014-12-051-1/+1
|/ / | | | | | | | | We were passing a nonsensical value for the 'kind' parameter so it would always return an empty list.
* | Merge branch 'sam/build-branch-fixes'Sam Thursfield2014-12-043-6/+26
|\ \ | |/ |/| | | | | Reviewed-By: Richard Maw <richard.maw@codethink.co.uk> Reviewed-By: Francisco Redondo Marchena <francisco.marchena@codethink.co.uk>
| * Give a better error when no repos are found in a system branchSam Thursfield2014-12-041-1/+13
| | | | | | | | | | Previously, if no repos were found Morph would raise 'ValueError: need more than 0 values to unpack' and leave the user with a traceback.
| * Fix finding Git directories to include in a temporary build refSam Thursfield2014-12-041-1/+1
| | | | | | | | | | | | | | | | | | | | When running 'morph build' the code looks through all the Git repos in a system branch, to see which are involved in the build. These are then checked for local changes and have temporary build refs created in them. Due to a mistake in the logic, this would give up if it found a repo that came from elsewhere but was inside the system branch directory. So in the past some legitimate repos might have been ignored sometimes.