summaryrefslogtreecommitdiff
path: root/morphlib
Commit message (Collapse)AuthorAgeFilesLines
* Make rootfs-tarball build only the tarball also on ARMLars Wirzenius2013-02-202-13/+2
|
* Add clarifying commentSam Thursfield2013-02-191-1/+3
| | | | | Making the changes mentioned in the comment would be quite invasive, and we don't have to do so quite yet.
* Rewrite show-dependencies to work without BuildOrderLars Wirzenius2013-02-191-15/+7
|
* Stop computing the old build orderingLars Wirzenius2013-02-194-267/+17
|
* Replace builder order graph with just a single artifactLars Wirzenius2013-02-194-36/+54
| | | | | The artifact's build dependencies replace the build order graph from previously.
* Merge branch 'baserock/richardmaw/fix-edit-build-depends'Sam Thursfield2013-02-131-33/+66
|\
| * morph edit: Recursively edit strataRichard Maw2013-02-131-33/+66
| | | | | | | | | | | | | | | | | | | | | | Previously the code would edit strata that dependended on the stratum being edited, but would ignore the dependency chain beyond that. In fact, we need to edit all strata in the dependency chain to avoid having two different versions of a stratum in the same build. This splits the modification into two steps: changing the stratum that points to the chunk, and recursively changing references to any strata that have been altered.
* | Improve message phrasingLars Wirzenius2013-02-121-2/+2
| | | | | | | | Suggested-By: Richard Maw
* | Add missing "import sys" to fix error messagesLars Wirzenius2013-02-121-0/+1
| | | | | | | | Reported-By: Richard Maw
* | Merge branch 'liw/deployment-refactor' of ↵Richard Maw2013-02-1210-1/+714
|\ \ | | | | | | | | | git://git.baserock.org/baserock/baserock/morph
| * | Add missing argument to create_local_system methodLars Wirzenius2013-02-071-1/+1
| | | | | | | | | | | | Reported-By: Richard Maw
| * | Refactor: Add WriteExtension.create_local_system methodLars Wirzenius2013-02-074-69/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows code sharing amongst all the places that create a system in a raw disk image. This also adds the creation of a factory-run subvolume, and fixes error messages for errors that happen during a disk image creation. Suggested-By: Richard Maw Suggested-By: Sam Thursfield
| * | Remove debugging outputLars Wirzenius2013-02-073-29/+0
| | | | | | | | | | | | Suggested-By: Richard Maw
| * | Do away with unnecessary fstab entries for proc, sysLars Wirzenius2013-02-071-2/+0
| | | | | | | | | | | | Suggested-By: Richard Maw
| * | Let mount choose loop deviceLars Wirzenius2013-02-071-2/+1
| | | | | | | | | | | | Suggested-By: Richard Maw
| * | Create hole in-process without executing dd(1)Lars Wirzenius2013-02-071-7/+4
| | | | | | | | | | | | Suggested-By: Richard Maw
| * | Comment logic in _run_extensionLars Wirzenius2013-02-071-0/+3
| | | | | | | | | | | | Suggested-By: Sam Thursfield
| * | Make configuration-extensions have a default valueLars Wirzenius2013-02-072-12/+11
| | | | | | | | | | | | | | | | | | | | | This saves a check (and an indentation) in the deployment plugin, making the code a tiny bit simpler. Suggested-By: Sam Thursfield
| * | Fix docstring and error messageLars Wirzenius2013-02-071-3/+3
| | | | | | | | | | | | Suggested-By: Sam Thursfield
| * | Describe how we re-use code from branch+merge pluginLars Wirzenius2013-02-071-0/+6
| | | | | | | | | | | | Suggested-By: Sam Thursfield
| * | Add cmdtest for "morph deploy" and rawdisk.writeLars Wirzenius2013-02-061-5/+7
| | |
| * | Add a write extension for kvm+libvirtLars Wirzenius2013-02-061-0/+140
| | |
| * | Add a write extension for VirtualBoxLars Wirzenius2013-02-061-0/+158
| | |
| * | Add a write extension for raw disk imagesLars Wirzenius2013-02-061-0/+70
| | |
| * | Add a configuration extension for setting hostnameLars Wirzenius2013-02-061-0/+27
| | |
| * | Add morphlib module for common write extension codeLars Wirzenius2013-02-062-0/+159
| | |
| * | Add deployment pluginLars Wirzenius2013-02-063-0/+201
| |/ | | | | | | | | | | | | | | | | | | | | This adds a new optional field to system morphologies: "configuration-extensions". The deployment plugin relies heavily on code from the branch and merge plugin. This needs to be eventually fixed by refactoring the codebase so that the shared code is in morphlib and not in plugins. However, doing that is beyond the scope of adding a deployment plugin.
* | git: clone then checkout instead of clone -bRichard Maw2013-02-111-1/+5
| | | | | | | | | | | | | | | | | | Newer versions of git have changed the behaviour when cloning with --branch=$sha1. It used to be nearly synonamous with clone then checkout. The clone then checkout logic is different to the clone with branch logic, since they have different behaviour with regard to the branches that are checked out in the workspace.
* | branch and merge: add branch-from-image commandRichard Maw2013-02-111-0/+128
| | | | | | | | | | | | Branch from image takes a directory containing metadata, then creates a branch of what the System was built from and petrifies it to when the System was built.
* | branch and merge: combine checkout and branch logicRichard Maw2013-02-111-48/+37
| |
* | Make petrify more versatile than just making tagsRichard Maw2013-02-111-8/+18
| | | | | | | | | | | | | | | | Pass resolved_refs in with the key as a repo, ref pair to petrify to the value, rather than petrifying to the current state of the ref. Set update_working_tree to also change files in the working tree, instead of just the index.
* | RepoAliasResolver: gimp logging during testsRichard Maw2013-02-111-0/+2
| | | | | | | | | | | | Applications default to logging to console, which causes unwanted output during tests, and I thought this was tidier than allowing tests to override the logger per-call.
* | RepoAliasResolver: Add aliases_from_url methodRichard Maw2013-02-112-0/+63
| | | | | | | | This returns a sorted list of possible aliases for a url.
* | repoaliasresolver: compile patterns on creationRichard Maw2013-02-112-19/+43
| | | | | | | | | | | | | | | | | | This also involved codifying it ignoring malformed aliases. Such behaviour was implemented before, but wasn't obvious. The restructuring made it have a line of code of its own, which meant it needed unit testing.
* | Make metadata include the repo-alias.Richard Maw2013-02-112-1/+3
| | | | | | | | | | | | | | | | | | This is required for reproducing the morphologies that created the artifacts. It is possible, but expensive, to `unexpand` a url, provided your repository aliases are the same as the morphology's, but this may not always be the case.
* | Merge remote-tracking branch 'origin/samthursfield/morph-name-equals-filename'Lars Wirzenius2013-02-112-24/+37
|\ \
| * | Require morphology name to match filenameSam Thursfield2013-02-082-24/+37
| |/ | | | | | | | | | | | | Allowing differences causes only confusion. Whether or not the 'name' field should surive at all is up for debate: it's very useful when seeing the contents of the morphology out of context (e.g. in documentation or pastebins), but is that worth the extra effort?
* | yaml: use Safe Loaders and DumpersRichard Maw2013-02-111-4/+4
|/ | | | | This is equivalent to using yaml.safe_load(), but lets us customise how yaml is parsed.
* Remove deprecated functionsSam Thursfield2013-02-061-24/+0
|
* Avoid confusing error when staging area is emptySam Thursfield2013-02-061-2/+3
| | | | | | | | | | | | | | | | | | For Morph to work it's necessary for the staging area to contain a full FHS heirarchy. However, if the staging area is empty we want to give the user an obvious error. Previously we would say something like: OSError: [Errno 2] No such file or directory: '/tmp/ccache' This makes it seem like the problem is with ccache. With this patch, we will instead get as far as: /bin/sh: No such file or directory This should make the real problem clearer. Also, aborting while trying to mount the ccache directory causes the /proc and /dev/shm mounts to persist which is fixed by this patch.
* Tidy up create_cachedir()Sam Thursfield2013-02-062-19/+15
|
* Merge branch 'liw/soft-pyyaml-dep'Sam Thursfield2013-01-296-110/+142
|\ | | | | | | Merge commit fixes up a copyright year and removes EOL whitespace
| * Make yaml be an optional dependencyLars Wirzenius2013-01-296-110/+143
| | | | | | | | | | This can go away when we have made a release with yaml in it, and its staging filler.
* | Fix copyright yearSam Thursfield2013-01-291-1/+1
| |
* | Disable distcc by defaultSam Thursfield2013-01-291-2/+3
|/ | | | | | | | | | | | | | | Current versions of build-essential in the Baserock morphologies don't contain distcc, but Morph tries to use distcc anyway. Since useful operation of distcc requires setting up a distcc network, there's no reason for it to be on by default. This change fixes bootstrap, and means that users of the build-essential staging filler no longer have to set no-distcc=true manually. In the future, cliapp will grow automatic boolean negation, which will allow us to turn this setting into a 'distcc' setting that defaults to false rather than the current rather ugly double negative.
* Merge branch 'jjardon/yaml-v2'Sam Thursfield2013-01-2810-26/+247
|\
| * Remove unneded json module importsJavier Jardón2013-01-282-3/+1
| |
| * Fix testsRichard Maw2013-01-223-5/+89
| | | | | | | | | | | | | | | | Invalid text changed to be something that doesn't parse as YAML either, and catch convert the YAMLError to the expected exception. Ideally there wouldn't be any `#pragma: no cover`s, but I could not trigger these code paths.
| * Parse as YAML if not valid JSONRichard Maw2013-01-224-8/+146
| | | | | | | | | | Tests are currently broken, one because invalid JSON can be valid YAML, and coverage is incomplete.
| * Move OrderedDict and json loading to morphlib.utilRichard Maw2013-01-222-11/+12
| | | | | | | | | | | | | | | | This way everyone who needs json or an OrderedDict doesn't have to worry about it. Currently morph2 is the only one that needs this complex behaviour, other users of the json module don't need object_pairs_hook.