summaryrefslogtreecommitdiff
path: root/morphlib/builder2.py
Commit message (Collapse)AuthorAgeFilesLines
* SystemBuild: remove check for if arch == NoneRichard Maw2012-07-111-4/+4
| | | | | | This should never happen any more, so the check is now redundant. This may have a negligible performance benefit, but it prevents the code implying that None is a valid architecture.
* SystemBuilder: mount rootfs rw initiallyRichard Maw2012-07-091-1/+1
| | | | | | | | | | This is required for systemd's journald to start. This is probably a bad dependency in systemd, trying to start the journal before it has mounted everything properly. This required a compat change, it is a string to make it more noticeable that it's a temporary version.
* ChunkBuilder: runcmd, redirect err to outRichard Maw2012-07-061-1/+2
| | | | | Data buffers can get confused if two file handles are writing to the same file, python's subprocess module has subprocess.STDOUT for this.
* ChunkBuilder: dump build log on errorRichard Maw2012-07-061-4/+20
|
* ChunkBuilder: write output of build to cacheRichard Maw2012-07-061-3/+9
|
* Merge remote branch 'origin/baserock/bugfix/S2528-remount-rw'Lars Wirzenius2012-07-021-2/+2
|\
| * 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.
* | Fix test suite to deal with morph output changesLars Wirzenius2012-06-261-7/+9
| | | | | | | | | | | | | | | | Also, some bug fixes. Also, when handling a BaseException, log the exception (with traceback) that we're handling, in case there is an error while handling it, because the second error will otherwise mask the first one.
* | Fix problems found by Richard in reviewLars Wirzenius2012-06-261-3/+3
| |
* | Be more usefully verbose for chunk buildingLars Wirzenius2012-06-251-2/+6
| |
* | Add status message for unpacking chunksLars Wirzenius2012-06-251-1/+3
| |
* | Replace Morph.msg with Morph.statusLars Wirzenius2012-06-251-22/+48
| | | | | | | | | | | | | | | | | | The new method takes a list of keyword arguments. This is more useful than the old way of giving just a string, since now the presentation layer may transmogrify the status update. For example, it can usefully translate the message to another language. Add --verbose option to allow more control over what the user sees.
* | SystemBuilder: create a new artifact for kernelRichard Maw2012-06-211-8/+6
|/ | | | | | | The kernel should be considered a full artifact, not just metadata. The rootfs is now suffixed by -rootfs and the kernel is named $name-kernel. This is similar to how chunk splitting works.
* 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-201-7/+7
| | | | | This change is purely cosmetic, but reflects the fact that we need to mount more than just proc sometimes.
* Return list of built artifacts from builderLars Wirzenius2012-06-151-2/+9
|
* fix tabs and line widths so ./check passesRichard Maw2012-06-141-11/+11
|
* 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.
* morphlib.builder2: write stratum metadataRichard Maw2012-06-141-5/+25
| | | | | | 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.
* morphlib.builder2: fix unit testsRichard Maw2012-06-141-4/+4
|
* morphlib.builder2: write overlaps to cacheRichard Maw2012-06-141-15/+38
| | | | Rather than just log the overlaps, write them to the cache as well
* 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.
* Merge branch 'richardmaw/arm-hack'Richard Maw2012-06-131-14/+35
|\
| * 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-131-13/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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'
* | Add setup_proc as initializer argument to BuilderLars Wirzenius2012-06-111-2/+3
|/ | | | | Setting it via direct attribute access, when everything else is set via initializer arguments, is just strange.
* morph: remove dead code and replace Execute with app.runcmdRichard Maw2012-05-301-35/+33
|
* SystemBuilder: expect rootfs to be /dev/sda1Richard Maw2012-05-171-3/+3
| | | | | vmware doesn't support virtio, so to be compatible, we have to use /dev/sda1
* Build chunk artifacts in a deterministic orderLars Wirzenius2012-05-171-1/+3
| | | | | | | | Previously, we were building them in whatever order a Python dict returned the names of the artifacts, and that is not deterministic. Fixes bug S2192.
* builder: use the same tar extract logic for all artifactsRichard Maw2012-05-141-1/+1
| | | | | Before only the staging area had symbolic links handled, now strata and systems will have the same logic.
* builder: log to warnings when artifacts overlapRichard Maw2012-05-141-4/+43
| | | | | It may be better to print it to the console, but that requires getting self.msg set
* Remove spurious empty line from the sourceLars Wirzenius2012-05-111-1/+0
|
* Use documented interface to get filename rather than SaveFile's internalsLars Wirzenius2012-05-091-1/+1
|
* First unmap devices for system image, then close (=rename) the fileLars Wirzenius2012-05-091-1/+1
|
* Fix long lines being too long for tests to pass.Jannis Pohlmann2012-05-091-1/+1
|
* Create system images directly in the artifact cache using SaveFile.Jannis Pohlmann2012-05-091-16/+5
| | | | | This avoids having to copy the generated image files to the cache later, which can take (almost) forever.
* StratumBuilder: log which chunks are unpackedRichard Maw2012-05-091-0/+3
| | | | | | | I had a corrupt chunk, finding out which one would have been difficult if it hadn't been logged. Proper chunk corruption detection would be better, but this is still useful.
* system image use systemd on vda1 and build in tmpRichard Maw2012-05-091-5/+5
| | | | | | | | | | | | | | | | Use the tempdir of the staging area instead of the chroot directory as the basedir for building system images. It would be better to create it directly in the cache, then rename it when finished, but commands need a filename and the cache provides an open file handle. Change the generated fstab and extlinux.conf to use systemd as the init and expect the root filesystem to be on vda1 instead of sda1. vda1 is slightly more efficient and is the default storage device for libvirt. This is safe to add before systemd is fully integrated, as if the kernel can't find that file it run /sbin/init, which is busybox
* Integrate RemoteArtifactCache into the building process.Jannis Pohlmann2012-05-031-15/+37
| | | | | | | | | For now we do not provide an option to avoid downloading artifacts during build. Unsetting --cache-server is an option but it's not user-friendly. Of course if there is no network connection, then downloading will fail and things will be built locally. We may want to add a generic --no-network switch to replace/extend --no-git-update later.
* Get rid of the old internal morph APIsLars Wirzenius2012-05-021-1/+39
|
* Fix unmounting /proc in staging so it works when /proc wasn't mountedLars Wirzenius2012-04-261-2/+2
|
* Fix how unmounting of /proc inside chroot is doneLars Wirzenius2012-04-261-5/+8
| | | | | Note to self, everyone: /path/to/chroot/proc does not actually exist inside the chroot.
* Unmounted /proc in staging before assembling chunks, and only if it is thereLars Wirzenius2012-04-251-3/+2
| | | | | We have no use for /proc while building chunk artifacts, and hopefully this will prevent accidentally including /proc in them.
* Log /proc pathname in chroot when unmountingLars Wirzenius2012-04-251-1/+1
| | | | This is to make debugging easier.
* Setup /proc in staging only if using chroot; install staging-fillersLars Wirzenius2012-04-251-19/+27
|
* Add logging to /proc mounting and unmounting, and create /procLars Wirzenius2012-04-241-0/+4
|
* Mount /proc while building a chunkLars Wirzenius2012-04-241-0/+14
|
* builder2: fix line widthRichard Maw2012-04-241-1/+2
|