summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* CacheKeyComputer: increment compat-versionRichard Maw2012-07-021-0/+2
| | | | | | | | | This will prevent systems that don't have the right mount options being cache hits. Having fstab be in some System configuration morphology, which is also included in the cache key would prevent this being needed if the fstab format changes again.
* SystemBuilder: fix mounting optionsRichard Maw2012-06-251-2/+2
| | | | | | | | | | | | fstab had errors=remount-ro, this is an ext option, btrfs doesn't support it. However it should be mounted noatime, to prevent the metadata trees being duplicated because they were read. extlinux.conf also has its mounting options changed so that the rootfs is mounted read-only initially. This should prevent the metadata trees being updated by reading them until it is remounted with noatime.
* Merge branch 'liw/distbuild-refactor' of ↵Richard Maw2012-06-223-9/+25
|\ | | | | | | git://roadtrain.codethink.co.uk/baserock/morph
| * Merge branch 'liw/distbuild-refactor' of ↵Lars Wirzenius2012-06-220-0/+0
| |\ | | | | | | | | | | | | | | | | | | roadtrain.codethink.co.uk:baserock/morph into liw/distbuild-refactor Conflicts: morphlib/app.py
| | * Handle only the urllib2.URLError exceptionsLars Wirzenius2012-06-222-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | Handling all exceptions in a way that assumes they're all related to the URL fetching hides unrelated errors, such as missing imports, or bad types, or such. Also, add more logging for debugging.
| | * Add logging, for debuggingLars Wirzenius2012-06-221-0/+1
| | |
| | * Prettify str(RemoteArtifactCache) to be the server URLLars Wirzenius2012-06-221-0/+3
| | |
| | * Include cache id in error messageLars Wirzenius2012-06-221-2/+3
| | | | | | | | | | | | For usefulness when tracing why artifact isn't being found.
| | * Change install_artifacts to fetch missing artifactsLars Wirzenius2012-06-221-3/+9
| |/ |/|
| * Use shutil.copyfileobj to avoid excessive memory useLars Wirzenius2012-06-221-1/+1
| | | | | | | | | | | | Thanks to Richard Maw for pointing this out! I need to get out of my ancient habits and use the modern Python stdlib and rember that files in these degenerate modern times can be larger than 64 KiB.
| * Handle only the urllib2.URLError exceptionsLars Wirzenius2012-06-222-4/+9
| | | | | | | | | | | | | | | | Handling all exceptions in a way that assumes they're all related to the URL fetching hides unrelated errors, such as missing imports, or bad types, or such. Also, add more logging for debugging.
| * Add logging, for debuggingLars Wirzenius2012-06-221-0/+1
| |
| * Prettify str(RemoteArtifactCache) to be the server URLLars Wirzenius2012-06-221-0/+3
| | | | | | | | | | This makes error messages that print the artifact cache object be useful to the reader.
| * Include cache id in error messageLars Wirzenius2012-06-221-2/+3
| | | | | | | | For usefulness when tracing why artifact isn't being found.
| * Change install_artifacts to fetch missing artifactsLars Wirzenius2012-06-221-3/+9
|/ | | | | | | | | | | | This is a behavioral change, and is useful when building and having access to an artifact cache server. Previously, nothing was actually fetching artifacts from the remote server when the staging area was being crafted. Morph could do with a bit of cleanup where we separate more cleanly the acts of fetching stuff to the local artifact cache from the remote one, when possible, and then using artifacts from the local cache. Currently this stuff is spread around a bit too much. I did not do that in this patch, however, to keep undiscussed changes small.
* Merge remote branch ↵Lars Wirzenius2012-06-201-10/+8
|\ | | | | | | 'origin/baserock/bugfix/S2907-bootstrap-expects-tarball-strata'
| * bootstrap: turn stratum into tarball for fillerRichard Maw2012-06-201-10/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The change of strata into chunk lists broke being able to use the strata as staging filler. The assemble-stratum script should be able to provide this stratum This requires not removing the built chunks from the artifact cache any more, and preferably not moving them around. Removing them should no longer be required, since cache keys have become more advanced since it used to reuse chunks build in prior stages. If it reuses them now, they should actually be usable.
* | Merge remote branch 'origin/baserock/feature/S3005-mount-shm'Lars Wirzenius2012-06-202-30/+35
|\ \ | |/ |/|
| * ChunkBuilder: mount /dev/shm as wellRichard Maw2012-06-201-19/+24
| | | | | | | | | | | | This required refactoring mount_proc and unmount_proc into more generic mounting functions. do_mounts returns the paths that were mounted instead of just one
| * app: rename setup_proc to setup_mountsRichard Maw2012-06-202-13/+13
|/ | | | | This change is purely cosmetic, but reflects the fact that we need to mount more than just proc sometimes.
* Remove dead code (dependencies in Source objects)Lars Wirzenius2012-06-182-34/+0
|
* Change source-stats to take directories instead of morph filenamesLars Wirzenius2012-06-181-12/+4
|
* Make source-stats read chunk morphologiesLars Wirzenius2012-06-181-6/+12
| | | | Non-chunks are skipped.
* Return list of built artifacts from builderLars Wirzenius2012-06-151-2/+9
|
* remove testsRichard Maw2012-06-144-70/+0
| | | | | They fail on squeeze and should be tested either at system assembly or in a unit test.
* Merge branch 'richardmaw/strata-chunk-lists'Richard Maw2012-06-1424-116/+378
|\
| * fix tabs and line widths so ./check passesRichard Maw2012-06-143-22/+22
| |
| * tests: fix root scriptsRichard Maw2012-06-143-13/+15
| | | | | | | | | | make-patch expected a tarball system-overlap was parsing logs rather than using a stable format
| * tests: fix missing baserock meta filesRichard Maw2012-06-146-5/+10
| | | | | | | | | | This adds the ability to do this to the script, and fixes use of the script to add the new parameter.
| * morphlib.builder2: check in local cache firstRichard Maw2012-06-141-2/+2
| | | | | | | | | | | | It's possible to work without a remote artifact cache, sadly there is not an explicit check for a None remote artifact cache to prevent it downloading dependencies.
| * tests: amend to not consider stratum metadataRichard Maw2012-06-144-5/+5
| | | | | | | | | | These tests were failing because the stratum metadata was added to the cache.
| * morphlib.builder2: write stratum metadataRichard Maw2012-06-142-9/+45
| | | | | | | | | | | | Stratum metadata was getting lost because it is not part of the chunks. Now metadata is written to the cache, then when the system builder assembles the strata it copies the metadata in.
| * tests: fix some that expected tarball strataRichard Maw2012-06-146-7/+71
| | | | | | | | | | | | | | This required functionality to create a tarball from a json file. This should probably be rewritten as a morph plugin and refactor it to consolidate the creation logic, so e.g. the stratum metadata is kept.
| * tests: verify overlaps are written to the cacheRichard Maw2012-06-144-0/+83
| | | | | | | | | | | | | | This adds a new script called list-overlaps, which when given a json dump of the overlap can be used to query what is overlapping The tests use this script to check that the overlaps are detected
| * stratum-overlap-warns: make test more looseRichard Maw2012-06-142-6/+11
| | | | | | | | | | the exact format of the logging may change, so just check that the artifact, the chunks and the files are mentioned
| * morphlib.builder2: fix unit testsRichard Maw2012-06-142-5/+23
| |
| * morphlib.builder2: write overlaps to cacheRichard Maw2012-06-141-15/+38
| | | | | | | | Rather than just log the overlaps, write them to the cache as well
| * morphlib.bins: remove create_stratumRichard Maw2012-06-142-35/+0
| | | | | | | | create_stratum is no longer used, since strata are now chunk lists
| * CacheKeyComputer: add stratum-format-versionRichard Maw2012-06-141-0/+2
| | | | | | | | | | | | Since strata aren't tarballs any more, it's simpler to make tarball strata cache misses than have the system build code behave differently for tarballs and json chunk lists.
| * builder2: write json to cache instead of tarballRichard Maw2012-06-141-33/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Note that this has no way to deal with an old cached stratum being a tarball yet. Strata are now json files listing basenames, which get converted into ArtifactCacheReferences. SystemBuilders now have to ensure they download the chunks as well, since having the strata doesn't imply that the chunks are also available. Overlap checking is slightly more complicated by strata not being tarballs any more, but this is dealt with by looking at the chunks' tarballs.
| * ArtifactCacheReference: remove from_artifactRichard Maw2012-06-141-4/+0
| | | | | | | | | | | | | | | | This convenience method is pointless, since it's trivial to make an ArtifactCacheReference from an Artifact with ref = ArtifactCacheReference(artifact.basename()) and it's actually shorter than ref = ArtifactCacheReference.from_artifact(artifact)
| * morphlib.artifactcachereference: store basenameRichard Maw2012-06-141-15/+13
| | | | | | | | | | | | | | | | This is not to make it easier, but to make it not miss if the algorithm for generating cache names changes. Strictly speaking it should store the format string for accessing metadata as well to be compatible, but missing an artifact's metadata is less important.
| * morphlib: add artifact cache reference classRichard Maw2012-06-133-0/+45
| | | | | | | | | | | | | | The artifact cache doesn't need to know the whole of an artifact object to be able to retrieve something from the cache, just the basename. This can be generated from the contents, or just saved itself.
* | Remove assert for checking type of argumentLars Wirzenius2012-06-141-1/+0
|/ | | | | | It's not Pythonic, and isn't catching any errors anymore. It was useful during a transition period when refactoring things to use the new class for morphologies.
* Merge branch 'richardmaw/arm-hack'Richard Maw2012-06-134-15/+116
|\
| * tests.as-root: arm systems write kernel to cacheRichard Maw2012-06-131-0/+79
| |
| * SystemBuilder ARM: write kernel as System metadataRichard Maw2012-06-131-0/+13
| | | | | | | | | | This should really be an artifact, but it is assumed that systems only generate one artifact, so this may be difficult.
| * SystemBuilder: pass missing parameter to install_boot_filesRichard Maw2012-06-131-1/+1
| |
| * SystemBuilder: __getitem__ is for indexing not propertiesRichard Maw2012-06-131-1/+1
| | | | | | | | Note to self, remember python is not lua
| * morphlib: add 'arch' field to morphologiesRichard Maw2012-06-133-14/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is an ugly, ugly way to do this, but time is pressing. SystemBuilder checks what arch is defined in the morphology, if it is an x86 (or None for compatibility) then it will do the syslinux install stuff. This hack is needed because syslinux is x86 specific and arm often has different requirements for where the kernel must be loaded from, sometimes it is flash, sometimes it is a different partition. This will likely become board specific, but for a qemu-system-arm, the kernel should be a separate file, to be passed on the command line. Having a different 'kind' for each architecture would be a nicer way, but would require more changes, since there are various checks for morphology['kind'] == 'system'