summaryrefslogtreecommitdiff
path: root/morphlib/builder.py
Commit message (Collapse)AuthorAgeFilesLines
* Make copy_repository get a repo instead of treeishLars Wirzenius2012-04-121-1/+1
| | | | This helps refactoring morph to get rid of treeishes.
* builder: ensure working directory matches commitRichard Maw2012-04-111-0/+1
| | | | | | | | When making a copy of the repository to build from, builder copies the .git directory then checks out the ref it wants. However sometimes this doesn't add the files to the working directory, possibly because the files it is missing weren't changed in the difference between what the .git thought HEAD was and what is now checked out.
* Avoid setting the mtime of broken symlinks.Jannis Pohlmann2012-04-051-1/+3
|
* Fall back to 'manual' build system if none is specified.Jannis Pohlmann2012-04-021-4/+1
|
* Automatically deduce type of chunk if one doesn't existLars Wirzenius2012-03-301-1/+2
|
* Make use of the new build system class in ChunkBuilderLars Wirzenius2012-03-301-36/+2
|
* Refactor: remove unnecessary methodLars Wirzenius2012-03-271-7/+5
| | | | | | | I found the write_cache_metadata and prepare_binary_metadata methods be confusingly similar, when skimming code. Since write_cache_metadata was very short and only used from one place, inlined it, which removes the confusion without, I think, adding complexity.
* Add --target-cflags option; set arch/fp in baserock-bootstrap on ARM.Jannis Pohlmann2012-03-261-1/+1
| | | | | | | | The --target-cflags option is really just a temporary solution. At some point we will want to have a proper target architecture/device description that morph uses to define compiler flags etc. For now, I hope this will do.
* Fix a few typos and so on.Jannis Pohlmann2012-03-231-1/+1
|
* fix overly long linesRichard Maw2012-03-231-2/+4
|
* morphlib: move filesystem stuff out of builderRichard Maw2012-03-231-39/+8
| | | | | The system images will later need to be read, so useful commands want to be shared
* make get_cache_id not require a blob to be passedRichard Maw2012-03-231-15/+13
| | | | It only needs a morph, not a blob
* Squashme: Temporary changes to make boot with btrfs work.Jannis Pohlmann2012-03-221-26/+32
| | | | | This is achieved by copying vmlinuz, System.map and extlinux.conf to the default subvolume.
* Squashme: Switch to generating images using btrfs.Super user2012-03-221-9/+16
|
* Build system images using btrfs and factory/factory-run subvolumes.Jannis Pohlmann2012-03-221-16/+31
|
* Merge remote branch 'origin/master' into rm/morph-pass1Richard Maw2012-03-161-4/+4
|\
| * tar: add -h option to extractionRichard Maw2012-03-161-1/+1
| | | | | | | | | | | | This should stop tar from replacing symbolic links with directories and instead follow the symbolic links, extracting the files into the linked directories
| * SystemBuilder: add newlines to fstabRichard Maw2012-03-161-3/+3
| | | | | | | | f.write does not add them
* | Merge branch 'master' into rm/morph-pass1-mergeRichard Maw2012-03-161-20/+44
|\ \ | |/
| * Fix morph cache key to use morphology filename rather than declared nameLars Wirzenius2012-03-151-1/+1
| | | | | | | | | | | | | | Previously, we could get a situation where chunks named the same way in two morphologies could interfere with each other: they could generate the same cache key, resulting in their chunks overwriting each other. Now this won't happen anymore.
| * Fix system image building with morphLars Wirzenius2012-03-151-19/+43
| | | | | | | | The mkimage.sh script should now be unnecessary again.
* | build-system: autotools: use PREFIXRichard Maw2012-03-141-1/+1
| |
* | morphlib.builder.Builder: PREFIX changes cache-keyRichard Maw2012-03-131-1/+1
| | | | | | | | | | Add PREFIX to the whitelist of environment variables that can affect the cache keys.
* | morphlib.builder.Builder: fix sharing envRichard Maw2012-03-131-5/+8
| | | | | | | | | | | | | | | | | | | | Previous change would share the same environment between all Builders this may not have broken anything yet, but this change in behaviour was unintentional. The relevant cache keys are not altered by Builders and they are set at the time the Builder is created, so the build string can be cached rather than generated every time a cache key is needed
* | morphlib.builder.Builder: key depends on some envRichard Maw2012-03-131-2/+5
|/ | | | | | env is created in Builder's constructor from app.clean_env cache keys now contain parts of the environment that may cause chunks to be built differently
* morphlib/builder.py: bring it closer to mkimage.shRichard Maw2012-03-081-23/+21
| | | | | | | | | Use dd and sfdisk instead of qemu-img, parted and install-mbr Write files without using tee, that was only required when we were not expecting morph to be run as root partx has not been touched, I don't know enough about how to process the output in python and I don't speak awk
* Return nothing from do_build/build; fix unassigned built_items bug.Jannis Pohlmann2012-03-061-13/+5
|
* Remove unused argument from Builder.build and build_single methodsLars Wirzenius2012-03-021-2/+2
|
* Remove unnecessary Builder.settings attributeLars Wirzenius2012-03-021-2/+2
| | | | We can use self.app.settings instead.
* Move cleaning of environment into morphLars Wirzenius2012-03-021-87/+12
| | | | | This is better done in morph, I think, since it is clear policy, and should not be buried deep in the call stack.
* Simplify instantiation of BlobBuilder subclassesLars Wirzenius2012-03-021-27/+21
|
* Remove unused app parameter and attribute to BlobBuilderLars Wirzenius2012-03-021-5/+4
|
* Remove unnecessary variableLars Wirzenius2012-03-021-1/+0
|
* Remove unnecessary method (which also had an unhelpful name)Lars Wirzenius2012-03-021-4/+1
|
* Remove unused kwargs usage from prepare_binary_metadataLars Wirzenius2012-03-021-3/+1
|
* Refactor to clarify code a tiny bit by moving variable setting close to useLars Wirzenius2012-03-021-1/+1
|
* Simplify how files are created in the cache directoryLars Wirzenius2012-03-021-11/+6
| | | | | | | | | The "cache prefix" concept is not immediately clear, and it's generally speaking best to centralize the construction of filenames in the cache to the CacheDir class anyway. Also, use SaveFile for writing the log file, instead of writing it to a temporary file and then copying, which is unnecessary I/O.
* Simplify how BlobBuilder.builds gets implemented/inheritedLars Wirzenius2012-03-021-4/+10
| | | | | | | It needs to be different for each subclass, yet SystemBuilder was sharing the implementation with ChunkBuilder, which worked, but only by happenstance. Now each class has their own implementation and the base class has a NotImplemented implementation.
* Simplify what the BlobBuilder.build method doesLars Wirzenius2012-03-021-38/+38
| | | | | | It's not really the blob builder's job to unpack chunks, or determine whether something needs building or not. Moved those things to better places.
* Remove unnecessary variableLars Wirzenius2012-03-021-7/+2
|
* Refactor SystemBuilder and add helper classLars Wirzenius2012-03-021-125/+171
| | | | | | | | The helper class, Factory, has unit tests, which is why it's currently separate. It may later get integrated with BlobBuilder, or the other way around. Classes that don't have unit tests are marked out of coverage.
* Remove unnecessary import of time moduleLars Wirzenius2012-02-281-1/+1
|
* Add comment explaining PATH trickery when running ldconfigLars Wirzenius2012-02-281-0/+7
|
* Builder.build and build_single also do not need to return values anymoreLars Wirzenius2012-02-281-6/+1
|
* Remove unused needs_built methodLars Wirzenius2012-02-281-4/+0
|
* Set sensible defaults for git-base-url, bundle-server, cachedir, max-jobsLars Wirzenius2012-02-281-4/+1
| | | | | | | | | | | | | | Also, change builder.py to always obey the --max-jobs setting, unless a morphology has a max-jobs field. The defaults have been chosen so that they work for everyone equally well. It may be useful to have a local mirror and then set the options to point there, but it's not reasonable to try to guess such things, so the defaults can be adapated to that. Collect the defaults into one place so they're easier to overview. The cliapp interface for adding settings is verbose enough that the defaults were getting buried.
* Make ./check check for long lines (with excptions); fix long linesLars Wirzenius2012-02-271-1/+2
|
* Create chunks, strata in cache via temporary filesLars Wirzenius2012-02-271-5/+13
| | | | | This avoids problems with files with the right names but partial content, if morph is killed in the middle of writing the file.
* Hide git output from unit test outputLars Wirzenius2012-02-271-1/+1
| | | | | | | | | | | | This makes it easier to check the output with vgrep for errors or problems. Voluminous git output made that hard. The key is that "git bundle create" has no --quiet optio (meh), so we have to redirect stderr to /dev/null. However, that would hide real errors, which we want to catch. Luckily, we can just replace the call to subprocess.call with a call to subprocess.check_call, and then we'll at least abort if there's an error, instead of silently ignoring it.
* morph: drop special case .git in mtime settingRichard Maw2012-02-271-6/+4
| | | | | | | | | | | | | Either all .gits need to be left alone, including submodules, or all of them get changed. Doing all gets surprisingly complicated, as bottom-up traversal is needed for directories to have their mtimes set, which means that either we check the path for a .git component, or we do our own traversal function, to top-down exclude .git and bottom-up set mtimes. This is more effort than it is worth when git probably doesn't care so let's just drop it entirely.