summaryrefslogtreecommitdiff
path: root/morphlib
Commit message (Collapse)AuthorAgeFilesLines
* Make morph use OSTreeArtifactCache instead of LocalArtifactCacheAdam Coldrick2015-04-101-2/+4
|
* RemoteArtifactCache: Support multiple cache methodsAdam Coldrick2015-04-101-0/+25
| | | | | This commit updates RemoteArtifactCache to enable it to interact with a remote OSTree artifact cache.
* Add an artifact cache which uses OSTreeAdam Coldrick2015-04-103-5/+231
|
* Add a class to wrap the OSTree APIAdam Coldrick2015-04-102-0/+140
|
* bins: We no longer want chunks to be tarballsAdam Coldrick2015-04-102-120/+37
| | | | | | Change create_chunk to put the contents of an artifact into a directory rather than storing them in a tarball, as we want to store chunks as directory trees in OSTree rather than tarballs now.
* Move the chunk cache logic into buildcommandAdam Coldrick2015-04-102-23/+23
| | | | | | This avoids needing to pass the cache to the staging area since lac.get returns a path to a directory tree rather than a file handle now, so we also don't need to do any unpacking.
* Create device nodes in staging areaAdam Coldrick2015-04-103-35/+39
| | | | | | | | | We can't store devices nodes in OSTree, so we can't create them at artifact build time and store them in the chunk artifacts anymore. Instead, we should create them in the staging area when installing an artifact with a source which has a morphology which defines them into the staging area.
* Add support for unionfs-fuseAdam Coldrick2015-04-104-16/+40
| | | | | | Overlayfs is new in version 3.18 of the kernel, so add support for a different implementation of a union/overlay filesystem in order to allow morph to work on older kernels.
* Use overlayfs when deployingAdam Coldrick2015-04-101-4/+34
| | | | | | | | | | | | When deploying, configuration extensions are run against the unpacked tarball of a system created by a build. If we are to use OSTree to store systems (rather than tarballs) this will not be possible as the result of `ostree checkout` would be read-only. To solve this, we use overlayfs to mount the unpacked tarball underneath a temporary directory somewhere, and run the configuration extensions on that mount point. This means that the changes are made in the temporary directory rather than directly on the tarball.
* Use overlayfs when building systemsAdam Coldrick2015-04-103-5/+45
| | | | | This will allow us to cache systems as a list of chunks and a small filesystem delta, rather than a massive tarball.
* Allow the passing of options to fsutils.mountAdam Coldrick2015-04-101-2/+5
| | | | | In order to mount using overlayfs, fsutils.mount needs to take a string of options to pass to the mount command.
* Fix _env_for_arch()Paul Martin2015-04-101-1/+1
| | | | Change-Id: I1ffb63340d3facb608708d04a0a21c5a9e290c14
* Change build environment to support MIPS32/64 BE and LESimon Hoinkis2015-04-103-6/+36
| | | | Change-Id: I9344b9b80a6ec008715559390b63c9003f34bf90
* Make kvm deploy check that host has virt-installRichard Ipsum2015-04-071-0/+9
| | | | | | | This allows us to catch a case where virt-install hasn't been installed on the host we're deploying to much earlier in the deployment process. Change-Id: I413ad804a7e8bef4fc2d1231411e01d30d0cb9e8
* Make source resolver pass filenameRichard Ipsum2015-04-041-1/+1
| | | | | | | | | | | | | Passing the filename when loading a morphology lets us give a more useful error message: e.g. ERROR: Missing field name from morphology strata/build-essential.morph instead of ERROR: Missing field name from morphology string Change-Id: I2e5b33e8154567469aa56adbf942fb7b6e9dd1ac
* Implement partial distbuildsAdam Coldrick2015-04-022-6/+24
| | | | | | | | | | | | | | In addition to partial builds we also want to be able to do partial distbuilds, and distbuild uses a different codepath. This commit updates the distbuild code to know what to do if a partial build is requested. It only builds up to the latest chunk/stratum that was requested, and displays where to find the artifacts for each of the chunks/strata requested upon completion of the build. The usage is the same as for local builds. Change-Id: I0537f74e2e65c7aefe5e71795f17999e2415fce5
* Add `morph certify` plugin to check for build reproducibility.Michael Drake2015-04-011-0/+140
| | | | | | | | | | | Currently does three checks: 1. Checks that all chunks in given system(s) have sha1 refs. 2. Checks that all sha1 refs are anchored. Unanchored refs can be removed on `git gc`. 3. Checks that all chunk repos are on the trove-host. Change-Id: Iaf105b1614a45616684e68a08f28b8529d4321fa
* Make warning messages more user friendly.Michael Drake2015-04-011-0/+7
| | | | | | | | Printing the file and line number of the warning's origin makes the warning itself harder to spot, and can make it appear as if something has actually gone wrong. Change-Id: Ie77357d9a061d31e234e6e434521d2d274409773
* Functions for checking if ref is in branches/tags of a cached repoMichael Drake2015-04-011-0/+20
| | | | Change-Id: I63f0d9da8b12930bd9539710429756a0821ce884
* Add functions for checking which tags/branches contain a refMichael Drake2015-04-012-0/+58
| | | | Change-Id: Ic6e613c21ed26c528ad7c75f41af01d7552729fd
* Improve build starting outputAdam Coldrick2015-04-011-1/+2
| | | | Change-Id: Ica2a270b254b01b9fb15956556efb74ee641e1b4
* Implement partial buildsAdam Coldrick2015-04-012-21/+92
| | | | | | | | | | | | | | | | | | This commit allows you to build only a single chunk or stratum and its dependencies, instead of a whole system. This will be useful for developers who want to quickly check the build commands of a chunk for example. You can give more than one chunk or stratum to the command, and the build will run up to the latest one, building the dependencies of both. An example of the usage: morph build systems/devel-system-x86_64-generic.morph \ strata/build-essential.morph strata/core/curl.morph This will only build up to curl in the core stratum. Change-Id: Id55b8335fc61e8fdf847f5e383cfedd13d07e6d2
* Fix: strip 'network=' from NIC_CONFIGRichard Ipsum2015-04-011-3/+11
| | | | | | Also ensure NIC_CONFIG begins with 'network=', 'bridge=' or is 'user' Change-Id: I3bcbd25eb2c9a05b7fa276697f97a1080cb0316e
* build: Clearer messages when creating temporary build branchesSam Thursfield2015-03-312-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | The temporary build branch (--local-changes=include) feature can be convenient, but it is also slow, and causes the resulting system to be 'unreproducible' (built from temporary commits). Before: $ morph build systems/devel-system-x86_64-generic.morph 2015-03-31 10:47:18 Starting build 53546647f92a4283bf96e33ea93e767e 2015-03-31 10:47:18 Collecting morphologies involved in building systems/devel-system-x86_64-generic.morph from master 2015-03-31 10:47:25 Building file:///src/ws/master/baserock/baserock/definitions 7735ec20d13490058a3d7758f79471637ce1ae71 systems/devel-system-x86_64-generic.morph 2015-03-31 10:47:25 Deciding on task order ... After: $ morph build systems/devel-system-x86_64-generic.morph 2015-03-31 10:46:21 Looking for uncommitted changes (pass --local-changes=ignore to skip) 2015-03-31 10:46:21 Creating temporary branch in /src/ws/master/baserock/baserock/definitions named refs/heads/baserock/builds/f0b21fe240b244edb7e4142b6e201658/8df11f234ab24d22a9616ce911542332 2015-03-31 10:46:28 Building file:///src/ws/master/baserock/baserock/definitions 7735ec20d13490058a3d7758f79471637ce1ae71 systems/devel-system-x86_64-generic.morph 2015-03-31 10:46:28 Deciding on task order ... Change-Id: I21a3e65c29adf0b07f743289c6b3f0f4dddc34be
* build: Print the correct name of the temporary build branchSam Thursfield2015-03-311-1/+1
| | | | | | | | | | | | | | | | | | | | Before: $ morph build systems/devel-system-x86_64-generic.morph --verbose 2015-03-31 09:35:36 new environment variable GIT_NO_REPLACE_OBJECTS = "1" 2015-03-31 09:35:36 Starting build 3fba9406f75242afbfdb413bf9658516 2015-03-31 09:35:36 Collecting morphologies involved in building systems/devel-system-x86_64-generic.morph from master 2015-03-31 09:25:08 Adding uncommitted changes in /src/ws/master/baserock/baserock/definitions to <morphlib.gitdir.GitDirectory object at 0x7f6137060cd0> After: $ morph build systems/devel-system-x86_64-generic.morph --verbose 2015-03-31 09:35:36 new environment variable GIT_NO_REPLACE_OBJECTS = "1" 2015-03-31 09:35:36 Starting build 3fba9406f75242afbfdb413bf9658516 2015-03-31 09:35:36 Collecting morphologies involved in building systems/devel-system-x86_64-generic.morph from master 2015-03-31 09:35:37 Adding uncommitted changes in /src/ws/master/baserock/baserock/definitions to refs/heads/baserock/builds/f0b21fe240b244edb7e4142b6e201658/8df11f234ab24d22a9616ce911542332 Change-Id: I5b61ae6f10b26458178ead551e7ec12c1926014e
* Reduce the number of 'new environment variable' logs on startupSam Thursfield2015-03-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reduces noise on the console when using `morph build --verbose`. Before (example from my current chroot): $ morph build systems/devel-system-x86_64-generic.morph --verbose 2015-03-31 09:25:08 new environment variable SCHROOT_UID = "0" 2015-03-31 09:25:08 new environment variable SCHROOT_CHROOT_NAME = "baserock-2015-03-24-ostree" 2015-03-31 09:25:08 new environment variable LOGNAME = "root" 2015-03-31 09:25:08 new environment variable XDG_SEAT = "seat0" 2015-03-31 09:25:08 new environment variable PATH = "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" 2015-03-31 09:25:08 new environment variable XDG_VTNR = "1" 2015-03-31 09:25:08 new environment variable HOME = "/root" 2015-03-31 09:25:08 new environment variable SCHROOT_ALIAS_NAME = "baserock-2015-03-24-ostree" 2015-03-31 09:25:08 new environment variable TERM = "xterm" 2015-03-31 09:25:08 new environment variable SHELL = "/bin/bash" 2015-03-31 09:25:08 new environment variable SHLVL = "1" 2015-03-31 09:25:08 new environment variable SCHROOT_USER = "root" 2015-03-31 09:25:08 new environment variable EDITOR = "vim" 2015-03-31 09:25:08 new environment variable SCHROOT_GID = "0" 2015-03-31 09:25:08 new environment variable SCHROOT_GROUP = "root" 2015-03-31 09:25:08 new environment variable GIT_NO_REPLACE_OBJECTS = "1" 2015-03-31 09:25:08 new environment variable SCHROOT_COMMAND = "/usr/bin/env SSH_AUTH_SOCK=/tmp/tmp.eVw95CcpjS/auth-sock /bin/bash -l" 2015-03-31 09:25:08 new environment variable PYTHONPATH = "/src/morph/" 2015-03-31 09:25:08 new environment variable SSH_AUTH_SOCK = "/tmp/tmp.eVw95CcpjS/auth-sock" 2015-03-31 09:25:08 new environment variable SCHROOT_SESSION_ID = "baserock-2015-03-24-ostree-f3c36e20-c3db-4404-8808-e805ca0c1ac4" 2015-03-31 09:25:08 new environment variable MANPAGER = "less -R" 2015-03-31 09:25:08 new environment variable XDG_SESSION_ID = "2" 2015-03-31 09:25:08 new environment variable _ = "/src/morph/morph" 2015-03-31 09:25:08 new environment variable OLDPWD = "/src/morph" 2015-03-31 09:25:08 new environment variable PWD = "/src/ws/master/baserock/baserock/definitions" 2015-03-31 09:25:08 new environment variable USER = "root" 2015-03-31 09:25:08 Starting build 8f80a816dfe44f6c8352a4242b84bf48 2015-03-31 09:25:08 Collecting morphologies involved in building systems/devel-system-x86_64-generic.morph from master 2015-03-31 09:25:08 Adding uncommitted changes in /src/ws/master/baserock/baserock/definitions to <morphlib.gitdir.GitDirectory object at 0x7f6137060cd0> 2015-03-31 09:25:15 Building file:///src/ws/master/baserock/baserock/definitions 7735ec20d13490058a3d7758f79471637ce1ae71 systems/devel-system-x86_64-generic.morph ... After: $ morph build systems/devel-system-x86_64-generic.morph --verbose 2015-03-31 09:23:38 new environment variable GIT_NO_REPLACE_OBJECTS = "1" 2015-03-31 09:23:38 Starting build acfdf9a405384e1ea4e1b62cd1bce27f 2015-03-31 09:23:38 Collecting morphologies involved in building systems/devel-system-x86_64-generic.morph from master 2015-03-31 09:23:38 Adding uncommitted changes in /src/ws/master/baserock/baserock/definitions to <morphlib.gitdir.GitDirectory object at 0x7f8fcbe86bd0> 2015-03-31 09:23:45 Building file:///src/ws/master/baserock/baserock/definitions 7735ec20d13490058a3d7758f79471637ce1ae71 systems/devel-system-x86_64-generic.morph ... Change-Id: I20bbdf35b280ccd305bc7e4a70b5f3de7679a368
* Set PATH to fixed valueKejia Hu (Terry)2015-03-301-1/+1
| | | | | | | In the native build phase, building of cmake will fail if the order of pathes in $PATH is twisted. So we set it to fixed to avoid problem. Change-Id: I6b4d3ed3d5331c2db4f5f3324207fabb4310985c
* Add plugin to get details of given chunk name.Michael Drake2015-03-301-0/+79
| | | | | | | | | | | | | | | | | | | | | Usefully, this provides the resolved repo URL, which may be aliased in the actual defintions. This makes it easier to use a workflow that avoids `morph edit`. Resolved repo URLs can be git cloned. It also provides other info about the chunk. In the case of multiple strata containing the same chunk name, the tool lists them all, saying which stratum they come from. Example output: # morph get-chunk-details libpng In stratum graphics-common: Chunk: libpng Repo: git://git.baserock.org/delta/libpng Ref: 259fb7761d747655c607efcec7a12ff1f3c24561 Change-Id: I6b540e38d9521f3f473b51c9031e508ddcb458ee
* % escape all % charactersRichard Ipsum2015-03-271-1/+1
|
* Merge "Let morph recognise big-endian kernel on ARMv8"Sam Thursfield2015-03-251-1/+1
|\
| * Let morph recognise big-endian kernel on ARMv8Edward Cragg2015-03-251-1/+1
| | | | | | | | | | | | | | Let morph recognise the architecture string reported by a big-endian ARMv8 kernel. Change-Id: I64323e6c2a4675a8cc34f185b10fa04754ebe8c8
* | simple-network: only try to rename "10-dhcp.network" if it actually existJavier Jardon2015-03-241-6/+8
| | | | | | | | Change-Id: I1521c0bdec4d7a6812f8988a2349e66b08161de8
* | simple-network: Use function to ensure directory path will existJavier Jardon2015-03-241-0/+2
| | | | | | | | Change-Id: I44693d15aa5e92d5f09720065788adff34f8685c
* | simple-network: Add functionn to create a path if it doesnt existJavier Jardon2015-03-241-0/+11
| | | | | | | | Change-Id: If011a5518fd30914c89b00099b9d05cff5cd3959
* | simple-network: separate creation of directory and file pathJavier Jardon2015-03-241-4/+8
|/ | | | Change-Id: Ic715815bbad3ef1ee9ab457b62a194eaef45744c
* Merge "deploy: Tighten SSH connectivity check"Javier Jardón2015-03-191-1/+5
|\
| * deploy: Tighten SSH connectivity checkSam Thursfield2015-03-191-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I accidentally tried to deploy a Baserock upgrade to a Fedora cloud machine. Every SSH command that Morph ran got the following output: Please login as the user "fedora" rather than the user "root". The existing implementation of check_ssh_connectivity() didn't raise an exception, leading to confusing errors further down. The new implementation produces this error: ERROR: Unexpected output from remote machine: Please login as the user "fedora" rather than the user "root". Change-Id: Ida5a82b25d759167aa842194b0d833d0565b4acf
* | Merge "morphlib/sourceresolver.py: parse VERSION file in a function"Javier Jardón2015-03-181-6/+22
|\ \
| * | morphlib/sourceresolver.py: parse VERSION file in a functionJavier Jardón2015-03-171-6/+22
| | | | | | | | | | | | Change-Id: I6e714d1994632875a5a15f840fe8ab3a66dddc77
* | | Merge "morphlib/sourceresolver.py: Fail if morph doesnt support the version ↵Javier Jardón2015-03-181-8/+12
|\ \ \ | |/ / | | | | | | of definitions format"
| * | morphlib/sourceresolver.py: Fail if morph doesnt support the version of ↵baserock-definitions-v1Javier Jardón2015-03-171-8/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | definitions format This patch will add the following restriction: if VERSION exist and its a YAML file and its a dict and has the key 'version' and the type stored in the 'version' key is an int and that int is not in the supported format, then fail. So, if someone is using 'version: 4' in VERSION, morph will fail (as opposed to current morph, that will not fail in the check but will likely fail when it tries to compile) Change-Id: I555f7e6018b9bdf18c80039df92a253acbd51c8c
* | | Add hosts.configureRichard Ipsum2015-03-181-0/+48
| | | | | | | | | | | | | | | | | | This adds a new config extension to allow deployments to write to /etc/hosts by adding HOSTS_x: </etc/hosts line> to a cluster morph in a similar manner to the fstab.configure extension.
* | | Make fstab.configure use write_from_dictRichard Ipsum2015-03-181-18/+7
| | |
* | | Add write_from_dict to utilRichard Ipsum2015-03-181-0/+32
| | | | | | | | | | | | A function to read lines from a dictionary and append them to a file
* | | Fix line lengths in morphlib/exts/simple-network.configureAdam Coldrick2015-03-171-5/+9
|/ / | | | | | | | | | | | | | | Some lines were more than 79 characters long. This was causing ./check --full to fail on master of morph. This commit fixes the lines in question. Change-Id: I80969d2d89d3922e021b716c250796188d7a7f4c
* | Merge "Use python3 compatible notation for catching exceptions"Javier Jardón2015-03-1717-34/+34
|\ \
| * | Use python3 compatible notation for catching exceptionsJavier Jardón2015-03-1617-34/+34
| | | | | | | | | | | | Change-Id: Ibda7a938cd16e35517a531140f39ef4664d85c72
| * | Merge "Use the modern way of the GPL copyright header: URL instead real address"Javier Jardón2015-03-16117-319/+202
| |\ \
| | * | Use the modern way of the GPL copyright header: URL instead real addressJavier Jardón2015-03-16117-322/+205
| | | | | | | | | | | | | | | | Change-Id: I992dc0c1d40f563ade56a833162d409b02be90a0
* | | | simple-network.configure: Rename networkd file generated by systemd chunkjjardon/simple-network-networkd2Javier Jardón2015-03-161-0/+29
| | | | | | | | | | | | | | | | | | | | Rename instead removal in case the user is already using a 10-dhcp.network file