summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* README: Hopefully we won't silently ignore invalid keys foreverSam Thursfield2012-09-031-1/+1
|
* README: Fix example system to use full triples for strataSam Thursfield2012-09-031-2/+10
|
* README: Fix example stratum to use "repo" for chunksSam Thursfield2012-09-031-1/+4
|
* Merge remote-tracking branch 'origin/liw/joe-ioerror-filenames'Daniel Silverstone2012-09-031-7/+6
|\
| * Fix error reporting from tar extract errorsLars Wirzenius2012-08-311-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mutliple issues here: * tarfile can throw IOErrors in addition to OSErrors, and both may need the filename attribute set * tarfile needs to be told to raise exceptions for errors, rather than ignoring them (errorlevel=1 to the constructor) * tarfile needs to be told to raise exceptions for tar format corruptions and not just I/O errors (errorlevel=2) * the exception should be re-raised with a plain "raise" instead of "raise e" to preserve the stack trace correctly; it's OK to modify the exception before re-raising it Also moved the creating of tf to the rest of the code that sets it up, for clarity. I've tested these changes manually, but not written a test case, since a test case is tricky to write for this. Originally found by Joe Burmeister.
* | Merge branch 'joeldillon/documentation'Lars Wirzenius2012-08-311-5/+35
|\ \ | |/ |/| | | | | Made some tweaks to fix a markup problem and to clarify the wording of what chunks are and to add a link to the baserock.com site.
| * Modified man page to go into more detail about what morph doesJoel Dillon2012-08-311-5/+29
|/
* Rename 'minedir' to 'workspace' in testsSam Thursfield2012-08-305-0/+0
|
* Merge branch 'jannis/show-branch-root-and-cwd-fixes'Sam Thursfield2012-08-3012-11/+354
|\
| * Fix branch/checkout to always create branches in the workspace directoryJannis Pohlmann2012-08-306-11/+250
| | | | | | | | | | | | | | | | | | Doing this rather than creating the system branches in the current working directory allows "morph branch" and "morph checkout" to be run anywhere in the workspace (e.g. in a different branch). This commit also adds two tests to verify that new branches are always created in the toplevel workspace directory.
| * Add "morph show-branch-root" commandJannis Pohlmann2012-08-307-0/+104
|/ | | | | | | | This commit introduces a new "morph show-branch-root" command to print the repository that the user branched off from with "morph branch" or that he or she checked out with "morph checkout". Also add tests for this new command.
* Avoid editing a list while iterating itSam Thursfield2012-08-301-1/+2
| | | | | Fixes previous commit where multiple hidden directories need to be removed.
* Correctly ignore hidden dirs when searching for system branchSam Thursfield2012-08-301-1/+4
| | | | Fixes test failures after merging previous branch
* Fix spelling errorSam Thursfield2012-08-301-1/+1
|
* Merge branch 'jannis/initial-branch-and-merge-work'Sam Thursfield2012-08-3042-257/+572
|\ | | | | | | | | Conflicts: morphlib/plugins/branch_and_merge_plugin.py
| * Rename internal function added in a previous commitJannis Pohlmann2012-08-291-6/+6
| |
| * Add mandatory repository parameter to "morph branch"Jannis Pohlmann2012-08-2915-54/+51
| | | | | | | | | | | | | | | | | | This is complementary to adding a repository parameter to the "morph checkout" command. It allows to branch off arbitrary repositories rather than always branching off baserock:morphs. All affected tests are updated to provide and work with this new parameter.
| * Remember repository that was branched off from for merging and editingJannis Pohlmann2012-08-2910-36/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With this commit, "morph branch" and "morph checkout" remember the repository that was branched off from (the "branch root") in a special file called $workspace/$branch/.morph-system-branch/branch-root This information is later used when checking out individual repositories using "morph edit" instead of using the previously hard-coded "$workspace/$branch/morphs" repository as the branch root. This commit also updates the "morph merge" code to handle repositories specified with aliases or as full URLs in the same way "morph checkout" does. All affected tests are updated.
| * Make "morph checkout" require a repository parameterJannis Pohlmann2012-08-299-21/+143
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of hard-coding "baserock:morphs" as the repository we check out from, we want to allow people to check out from arbitrary repositories with system and stratum morphologies. This commit adds a mandatory repository parameter to "morph checkout". This parameter can either be an aliased repo, e.g. baserock:morphs, or a full repo URL such as ssh://gitano@git.baserock.org/baserock/morphs. When cloning the actual repository into a local directory, the following happens: For alias repos baserock:morphs and baserock:foo/bar, the repositories would be cloned into the directories $workspace/$branch/baserock:morphs and $workspace/$branch/baserock:foo/bar. For repos specified using full URLs, the scheme and .git suffix (if present) are stripped off. The above ssh example would be cloned into the following directory: $workspace/$branch/gitano@git.baserock.org/baserock/morphs This commit also adjusts all affected tests and adds a new test to verify that checking out from full repo URLs works as expected.
| * Make "morph show-system-branch" anywhere in a workspace, if possibleJannis Pohlmann2012-08-2930-68/+225
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are mainly three situations to deal with: 1. We are outside a workspace and cannot deduce the system branch. 2. We are inside a workspace and inside a branch. We can detect this by walking up from the working directory towards the workspace. If we find a .morph-system-branch in one of the parent directories, we know the branch name. If we don't find one, something is wrong. 3. We are inside a workspace but outside a branch (or partially into a branch, e.g. in foo/ where the branch is foo/bar). We can deduce the branch if we recurse into subdirectories to find a .morph-system-branch directory. Care needs to be taken to not recurse infinitely. We may also not recurse if there are multiple subdirectories as these could belong to two different branches. This commit makes "morph show-system-branch" work in all of the above scenarios. It also adds tests for all of them.
| * Use .morph-system-branch directories to identify branch directoriesJannis Pohlmann2012-08-294-25/+22
| | | | | | | | | | | | | | | | | | | | The commands "morph branch" and "morph checkout" now create a .morph-system-branch directory for each system branch. This is the per-branch analogue to the .morph directory for a workspace. The .morph-system-branch directories make it possible to store state and other information for system branches. They also make deducing the current system branch more robust and clear.
| * Rename the "morph minedir" command to "morph workspace"Jannis Pohlmann2012-08-2924-84/+88
| | | | | | | | | | | | | | | | | | | | | | | | Mine may be a nice metaphor but it is not very intuitive. Hence, this commit renames "mine" to "workspace". This affects not just the branch and merge plugin (the only code that changes) but also documentation and tests, which are updated along with the code in this commit. I decided to omit the "dir" suffix in the command because I think people know well that a workspace will be a directory in this case and that allows us to refer to this concept with one word ("workspace") instead of two words ("workspace directory").
| * Create mine directory if it does not exists when running "morph init"Jannis Pohlmann2012-08-285-7/+12
| | | | | | | | | | Until now, morph failed when the mine directory did not exist. However, there is no good reason why it can't attempt to create it.
* | Remove unused files in test/Sam Thursfield2012-08-302-10/+0
| |
* | ArtifactResolverTests: use keyword args for FakeStratumMorphologySam Thursfield2012-08-301-34/+43
| | | | | | | | Helps avoid parameter-list-blindness when reading the testcases
* | Display expected filename in "Failed to determine build system" errorSam Thursfield2012-08-301-3/+3
| | | | | | | | | | This allows a few more diagnostics of what went wrong when the error is inside the baserock:morphs repository.
* | Log a clear error if creating an empty stratumSam Thursfield2012-08-301-0/+2
| | | | | | | | | | This is mostly useful for diagnosing Morph bugs. Currently empty strata just cause confusing errors when building systems.
* | Strata should be referred to with full repo/ref/morph tripletsSam Thursfield2012-08-3016-48/+124
| | | | | | | | | | | | | | | | This removes the requirement that all strata must be in the same repo as the system morphology. Both the system "strata" field and the stratum "build-depends" field are affected.
* | Strata contain "chunks", not "sources"Sam Thursfield2012-08-2926-57/+57
|/ | | | Rename "sources" field of stratum morphologies to "chunks".
* Break long lineLars Wirzenius2012-08-281-1/+2
|
* Merge remote branch 'origin/samthursfield/S4350-faster-build-system-autodetect'Lars Wirzenius2012-08-288-115/+159
|\
| * Always ls-tree before trying to cat-fileSam Thursfield2012-08-242-36/+35
| | | | | | | | | | This provides much better performance in cases where most of the repos do not have a .morph included.
| * Refactor build system code for easier testingSam Thursfield2012-08-242-31/+16
| |
| * Use git ls-tree to autodetect build systemSam Thursfield2012-08-244-72/+41
| | | | | | | | | | | | | | The cost of one git ls-tree call is roughly the same as one git cat-file call. Therefore, when autodetecting the build system, it is much faster to list the tree once and then search for the required files than to call git cat-file for every possible one.
| * Support 'git ls-tree' in local and remote reposSam Thursfield2012-08-244-0/+91
| |
| * buildsystem: Fix incorrect testcaseSam Thursfield2012-08-241-2/+2
| |
* | Expand TAB charactersLars Wirzenius2012-08-281-41/+41
|/
* scripts/clean-git-cache: Fix 2 small issuesSam Thursfield2012-08-231-2/+4
| | | | | 1) print message if no unused gits were found 2) avoid eating baserock:morphs repository every time
* Add scripts/clean-git-cacheSam Thursfield2012-08-221-0/+238
| | | | | | | This removes local repository clones that are not referenced by anything in the baserock:morphs repository. It would be useful for Morph to do this itself in the long term.
* Add scripts/clean-artifact-cacheSam Thursfield2012-08-221-0/+94
| | | | | | | | | | | | This removes all but the latest build of a chunk from the cache, which can free up a significant amount of disk space for large chunks. Ideally Morph should handle cleaning up the artifact cache itself, there are some ideas floating around including using git to store the artifacts; either way, reference counting items in the cache and only requiring the user to manually delete the final system images when they are no longer required is probably the best way.
* Allow setting ARCH explicitly for bootstrappingSam Thursfield2012-08-221-1/+13
| | | | | This is required to bootstrap on Fedora, where debootstrap fails to autodetect the architecture due to dpkg not being present.
* Fix test coverage for squeeze coverage.pyLars Wirzenius2012-08-151-3/+3
| | | | | | | | The squeeze version of coverage.py seems to have problems with methods that consist of a single pass statement. This patch replaces those statements with placeholder docstrings so that ./check passes on squeeze. Reviewed-By: Daniel Silverstone (on irc)
* Merge remote branch 'origin/danielsilverstone/repo-alias-update'Lars Wirzenius2012-08-151-5/+5
|\
| * Change default repo-aliases to git.baserock.orgDaniel Silverstone2012-08-151-5/+5
|/ | | | | | | Sanitise the git repo aliases to use git.baserock.org instead of the old roadtrain.codethink.co.uk hostname. This will cause a re-fetch of gits, unless you fix up your cache first
* Merge branch 'danielsilverstone/no-syslinux-disk-image' of ↵Richard Maw2012-08-145-134/+269
|\ | | | | | | git://git.baserock.org/baserock/morph
| * Add a non-x86 disk image testDaniel Silverstone2012-08-141-0/+94
| | | | | | | | | | The Disk image builder can work on non-x86 and as such we should let it test anywhere.
| * Make SyslinuxDiskBuilder inherit from DiskImageBuilderDaniel Silverstone2012-08-141-134/+11
| | | | | | | | | | | | Since the vast majority of the SyslinuxDiskBuilder functionality is now in morphlib.builder2.DiskImageBuilder, inherit from that and override the bootloader related methods so that extlinux is correctly installed.
| * Initial non-syslinux disk image kindDaniel Silverstone2012-08-143-0/+164
|/ | | | | | | This adds a disk system image kind which does everything the syslinux-disk one does, but without syslinux. It deliberately carries stubbed bootloader operations so that we can later make syslinux-disk inherit from this one and override it.
* Add support for autogen in addition to autogen.shLars Wirzenius2012-08-081-1/+3
| | | | | | | | This is needed to support Colin Walters's suggested build API (http://people.gnome.org/~walters/docs/build-api.txt). In fact, it's all we need to support it, I think. Reviewed-By: Richard Maw (on irc)
* Merge branch 'liw/fix-deprecation'Lars Wirzenius2012-08-071-1/+1
|\ | | | | | | Reviewed-By: Richard Maw (on irc)