summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch ↵Lars Wirzenius2013-08-133-55/+106
|\ | | | | | | | | | | | | 'origin/baserock/richardmaw/S8544/deploy-cleanup-v3' Reviewed-by: Lars Wirzenius Reviewed-by: Daniel Silverstone
| * deploy: Always cleanup deploy tempdir on failureRichard Maw2013-08-131-45/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a configuration extension or write extension fails, then it should abort then, not continue to run other configuration extensions. There was a period where this didn't happen, due to a missing feature of cliapp that was assumed to be there, so failure to run these extensions was not noticed. This has since been fixed, but this would cause deploy to fail to clean up its temporary directories. Now it will cleanup the contents of the temporary directory after any failures after it has been created. A small amount of re-ordering was performed to make this easier.
| * deploy: Parse arguments before unpackRichard Maw2013-08-131-3/+3
| | | | | | | | | | | | | | | | It's a waste of time to unpack the rootfs, only to have to clean it up again when you find out that you messed up the command line arguments. This also has the benefit of reducing the amount of resources that have to be considered for cleanup.
| * deploy: refactor environment argument parsingRichard Maw2013-08-133-7/+51
| | | | | | | | It is now a tested helper function in morphlib.util
| * deploy plugin: Clean up deployments' tempdirsRichard Maw2013-08-091-7/+7
|/ | | | | | | | | We can't assume an extension cleans up after itself, as they can be arbitrary shell scripts, and the best shell has to offer for cleanup is `trap`, which is difficult to use. So now, anything created with `mktemp` will get automatically cleaned up by morph.
* Merge commit '7819677343bb40e899fa2cd252c203013911fede'Lars Wirzenius2013-08-093-1/+56
|\
| * yarns: add a scenario for checking out a chunkRichard Maw2013-08-082-0/+30
| |
| * yarns: allow attempt checkout to sometimes workRichard Maw2013-08-081-1/+1
| | | | | | | | | | | | | | | | | | Checkout needs the branch repository and ref. It was previously only getting the ref. This was not noticed, since the implementation was only used in cases where it was expected to fail, and the nature of the error was not being checked.
| * workflow-tools: check branch roots have systemsRichard Maw2013-08-081-0/+25
| | | | | | | | | | | | | | | | It's rather easy to accidentally try to create a system branch of the `morph` repository rather than the `morphs` repository. This commit verifies that a checked out branch contains system morphologies, otherwise it aborts and cleans up.
* | Merge remote-tracking branch ↵Lars Wirzenius2013-08-095-15/+137
|\ \ | |/ |/| | | 'origin/baserock/richardmaw/S8532/validate-stratum-build-depends'
| * morphologyfactory: validate stratum build-dependsRichard Maw2013-08-072-0/+55
| | | | | | | | | | | | | | | | | | | | | | | | A stratum morphology must either have stratum build-depends, or have some bootstrap chunks, otherwise there's no way to have the required set of commands to be able to build chunks. A concession has been made to also allow strata that contain chunks built in test mode, but this opens a reproducibility hole. Unit tests for these failures have been added, and the stratum used by other unit tests has been fixed.
| * black-box-tests: Set build-mode: test in strataRichard Maw2013-08-072-0/+25
| | | | | | | | | | | | This is already needed elsewhere for tests that perform builds, however in future, validation will be more strict, so now these dummy strata need to be marked as tests as well.
| * morphologyfactory: move empty stratum check hereRichard Maw2013-08-073-10/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is better to test whether a straum is empty here, since it will be noticed earlier in the build, as soon as the morphologies are loaded, rather than after they have all been parsed. It is also conceptually nicer to put it here, since the morphologyfactory was written to perform this kind of validation. On a more practical note, the validation is moved here so that the test for this error isn't masked by the test for no build dependencies. To ensure tests still pass, we alter the stratum morphology used by other unit tests to no longer be empty, and add an empty one to test.
| * morphologyfactory: refactor chunk bdeps exceptionsRichard Maw2013-08-072-6/+30
| | | | | | | | | | | | | | | | | | This creates a small exception hierarchy for failures to validate stratum morphologies. This is currently a line rather than a tree, but it will be expanded later in the patch series. This also adds test coverage for chunk build dependencies being omitted.
* | workflow-tools: Fix typo in `morph help branch`Richard Maw2013-08-071-1/+1
|/ | | | Reviewed-by: Lars Wirzenius and Jonathan Maw on IRC
* Merge branch 'liw/refactor-checkout-etc-v2'Lars Wirzenius2013-08-0712-114/+985
|\ | | | | | | Reviewed-by: various
| * Re-implement "morph branch" using new infrastructureLars Wirzenius2013-08-062-42/+73
| |
| * Re-implement "morph show-branch-root" using new infrastructureLars Wirzenius2013-08-062-20/+18
| |
| * Re-implement "morph show-system-branch" using new infrastructureLars Wirzenius2013-08-062-8/+9
| |
| * Re-implement "morph checkout" using new infrastructureLars Wirzenius2013-08-062-37/+99
| |
| * Add SystemBranchDirectory classLars Wirzenius2013-08-063-0/+433
| |
| * Add GitDirectory classLars Wirzenius2013-08-063-0/+198
| |
| * Add LocalRepoCache.get_updated_repo methodLars Wirzenius2013-08-061-1/+13
| | | | | | | | | | This is a helper to avoid having the same code in other places. Have it in the one place it belongs.
| * Add Workspace.create_system_branch_directory methodLars Wirzenius2013-08-062-0/+27
| |
| * Add Workspace.get_default_system_branch_directory_name methodLars Wirzenius2013-08-062-0/+23
| | | | | | | | | | This will be useful later, when we start creating system branch directories.
| * Add morphlib.util.find_root and find_leaf functionsLars Wirzenius2013-08-062-6/+92
| | | | | | | | | | | | | | These will be used to find workspace and system branch root directories. Also accidentally removed some whitespace from ends of lines. Too lazy to split that into a separate commit.
* | Merge remote-tracking branch ↵Lars Wirzenius2013-08-064-12/+39
|\ \ | |/ |/| | | 'origin/baserock/richardmaw/S8530/atomic-hl-cache-creation'
| * stagingarea: move to failed on construction failRichard Maw2013-08-063-6/+21
| | | | | | | | | | | | | | | | | | This uses the same logic as when a build fails, so it's been consolidated into `StagingArea.abort()`. You could argue that if a build fails before any commands are run, then there's nothing interesting to see, but it will be useful if the hardlink/tarball extract algorithm fails in some corner case.
| * stagingarea: Construct hardlink cache atomicallyRichard Maw2013-08-061-6/+14
| | | | | | | | | | | | | | | | | | | | | | | | Paul had file system problems which led to a partially constructed chunk hardlink cache, which caused later builds to fail, since they got a partially extracted chunk. This patch fixes the case where the failed extract caused unreproducible builds, but it's possible to corrupt the hardlink cache in other ways. Read-only btrfs subvolumes would fix this, but either tie us further to btrfs, or complicates the codebase with fallback logic.
| * stagingarea tests: create chunks subdirectoryRichard Maw2013-08-061-0/+4
|/ | | | | | | | It is expected that the Application creates directories that will be used, to keep the code for using them cleaner. The FakeApplication wasn't updated to do this, as it was not yet needed, but changes for atomicity require it to exist.
* Merge commit '95a4918a471ad1dc7110d3d64eb7e6a89dea34a5'Lars Wirzenius2013-08-011-3/+9
|\
| * Set build-ref-prefix to be based on trove-id if the setting existsTiago Gomes2013-07-311-3/+9
| |
* | Merge branch 'liw/refactor-init-workspace'Lars Wirzenius2013-07-316-52/+264
|\ \ | |/ |/| | | Reviewed-by: Daniel Silverstone
| * Re-implement "morph workspace" using the Workspace classLars Wirzenius2013-07-313-8/+11
| | | | | | | | | | | | | | | | | | Put new implementation into new branch and merge plugin, and remove old implementation from the old plugin. Also change the error message for the NotInWorkspace exception, so that it matches what the test suite expects. It's a crappy error message, I think, but I don't want to change external behaviour during refactoring.
| * Re-implement "morph init" using the new Workspace classLars Wirzenius2013-07-313-45/+64
| | | | | | | | | | | | | | Move "morph init" into a plugin, and remove it from the previously existing plugin. This keeps all the old, tricky code in the old plugin, and moves new, clean code into a new plugin. Eventually the old plugin can be removed, since it'll be empty.
| * Add a Workspace classLars Wirzenius2013-07-313-0/+190
|/
* Merge branch 'liw/b-and-m-yarns'Lars Wirzenius2013-07-315-0/+875
|\ | | | | | | | | Briefly reviewed by Jonathan Maw and Tiago Gomes, but all responsibility is mine.
| * Refactor code for clarityLars Wirzenius2013-07-311-4/+4
| | | | | | | | Reported-by: Tiago Gomes
| * Remove commented out debug statementsLars Wirzenius2013-07-311-2/+0
| | | | | | | | Reported-by: Jonathan Maw
| * Add scenario (yarn) tests for most of branching and mergingLars Wirzenius2013-07-305-0/+877
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These scenarios test the basics of most of the subcommands the branch and merge plugin provides. They don't purport to be complete, but give some indication that things work, and form a basis upon which further things can be built. Yarn also isn't included in a Baserock release yet, so we need to keep the cmdtests until Baserock 10 has been released. The existing cmdtest tests are not modified by this: they are left intact, until they can analysed in detail for things to be added to the scenarios. After that, the cmdtest tests will start to go away. Merging is not covered by these tests: it is not clear how merge should work, and the current code is known to do the wrong thing in many cases. Scenarios for merge will be added later. Building is also not covered. Testing builds well needs some additional, careful thinking, and that isn't ready for this patch series. It will be added later.
* | Fix copyright yearLars Wirzenius2013-07-311-1/+1
| |
* | Merge remote-tracking branch 'origin/jonathan/cross-bootstrap-rebase'Lars Wirzenius2013-07-3119-217/+641
|\ \
| * | Add morph cross-bootstrapSam Thursfield2013-07-3019-217/+641
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cross-bootstrap is a way to build baserock on an architecture that does not currently have Baserock. It can be used by `morph cross-bootstrap <ARCH> <REPO> <REF> <MORPH>`, and will build an artifact that can be used as a root filesystem with a basic build environment with a script named `native-bootstrap` which will build and install every chunk in the system. If done with a devel system, this will give you a suitable environment for building a proper Baserock system. This does not currently provide a kernel for the target architecture. Apart from adding the cross-bootstrap plugin, it also makes the following changes: * Moves the lit of valid_archs into morphlib (instead of locally-scoped in MorphologyFactory) * BuildCommand takes an extra argument, build_env * split BuildCommand's get_artifact_object into create_source_pool and resolve_artifacts (plus changes things that use get_artifact_object to use the new way) * setup_mounts finds out whether to do so by whether build_mode is 'staging', instead of by whether the setting 'staging-chroot' is true. * Makes ChunkBuilder's get_sources use the morphlib.builder2.extract_sources() method, and moved set_mtime_recursively into morphlib.builder2, since it's not currently used anywhere else. * moved ChunkBuilder's get_commands into the Morphology class (plus changes to anything that used get_commands)
* | Merge branch 'jonathan/check-lorried-gitmodules-3'Jonathan Maw2013-07-251-0/+121
|\ \ | |/ |/| | | Reviewed-by: Richard Maw <richard.maw@codethink.co.uk>
| * Add a script to check every .gitmodules file in a system branchJonathan Maw2013-07-251-0/+121
|/
* Add ARGS to the foreach argument synopsisTiago Gomes2013-07-221-2/+2
|
* Fix up code formattingLars Wirzenius2013-07-221-3/+4
|
* show short sha of local cached artifactPaul Sherwood2013-07-221-2/+3
|
* Merge branch 'liw/copyright-years'Lars Wirzenius2013-07-183-3/+3
|\ | | | | | | Pre-reviewed by Daniel Silverstone.
| * Fix copyright yearsLars Wirzenius2013-07-183-3/+3
|/