| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
The OSTree checkout uses hardlinks anyway, so this is thankfully now
redundant. Most of this work was done by Sam Thursfield
<sam.thursfield@codethink.co.uk>.
Change-Id: I5be211ad3034331834f7b0542721f1bfc024b863
|
|
|
|
|
|
|
| |
This commit also disables the cross-bootstrap test, as the
cross-bootstrap plugin needs rewriting to use OSTree.
Change-Id: I6183b1a396525f2e60dcbc2dbf5730acfb9df30b
|
|
|
|
| |
Change-Id: I37855e48a8ff099d4ea32d6ec4d44048f9eae077
|
|
|
|
|
|
|
|
|
| |
The cross-bootstrap plugin is currently full of hacks, so it makes sense
to rewrite it properly rather than extending these hacks to work with
OSTree. I don't have time to do this right now, so disable the
cross-bootstrap yarn.
Change-Id: I343e238778f7f6ab290a3e22ff930edf740bf27c
|
|
|
|
|
|
|
|
|
|
|
| |
OSTree can easily pull over HTTP. All that is necessary is to expose the
repo directory. This commit adds a simple HTTP server to do this in the
test suite. Actual implementations should use something better, like
lighttpd.
Also add some logging of the cache servers in this yarn to help debug.
Change-Id: Ic65390f550c972c5f1072bbca8d80e8b56723158
|
|
|
|
| |
Change-Id: I8409eb5816e5fbd6416437f51b97a703e3bddac4
|
|
|
|
| |
Change-Id: Ib2c8b0af414252acb5964eacae68f4dc692f85e3
|
|
|
|
|
|
|
|
|
|
|
| |
Now that we have an OSTree artifact cache, the deploy plugin needs to use
that to get the system to be deployed. Due to the changes in how we store
systems, we need to get the contents of each stratum then put the system
delta on top of that.
This is still much quicker than unpacking stuff from tarballs.
Change-Id: I209dc43a49bb00fa828907cb72715afc7061d43f
|
|
|
|
|
|
|
|
|
| |
The API of the OSTree artifact cache is slightly different to that of the
old tarball cache, so adjust things accordingly. Also, only store the
files changed at system-construction-time rather than everything in
system artifacts.
Change-Id: Iec74f37ed1ae769280c552a1d67f5f6c5fdae9e3
|
|
|
|
| |
Change-Id: I957e0b085e9aed3426b164b18e8b50fe47aa918f
|
|
|
|
|
|
|
| |
This commit updates RemoteArtifactCache to enable it to interact with
a remote OSTree artifact cache.
Change-Id: Icdb2d3071adb6532e54ab7f203c391b3a30a1c63
|
|
|
|
| |
Change-Id: Ie591875d0507b4f43da3e91d4ca63e0a4dc7cbf2
|
|
|
|
| |
Change-Id: I6c193597f136d1a0f4af14f3fd670c01f9ae2875
|
|
|
|
|
|
|
|
| |
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.
Change-Id: Ic8aab162fdbbc03ec92538759fef06f35ff0696e
|
|
|
|
|
|
|
|
| |
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.
Change-Id: I918a96cf210f9f8b7256493d9e544ffbca8c6d38
|
|
|
|
|
|
|
|
|
|
|
| |
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.
Change-Id: I423c5e4b8d6595b95894935329c3bf3517cfa475
|
|
|
|
|
|
|
|
| |
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.
Change-Id: I63f05265c645dfcc92f3987582bb3f06d853e740
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
Change-Id: Iafcb78feaa1d6d37be4f52420c03d5b96d5c81ee
|
|
|
|
|
|
|
| |
This will allow us to cache systems as a list of chunks and a small
filesystem delta, rather than a massive tarball.
Change-Id: Ic5182137ddd88dc9679e0941550d08954cb4d306
|
|
|
|
|
|
|
| |
In order to mount using overlayfs, fsutils.mount needs to take a
string of options to pass to the mount command.
Change-Id: Ic190784353ef8c841a1cd9ff632a7996351b436c
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I had a stratum artifact in my artifact cache which for some reason was
0 bytes long. When building a system that included this stratum, `morph
build` gave me the following output
2015-04-13 13:48:57 ERROR Traceback (most recent call last):
File "/src/morph/morphlib/builder.py", line 539, in build_and_cache
self.unpack_strata(fs_root)
File "/src/morph/morphlib/builder.py", line 600, in unpack_strata
chunks = [ArtifactCacheReference(c) for c in json.load(f)]
File "/usr/lib/python2.7/json/__init__.py", line 290, in load
**kw)
File "/usr/lib/python2.7/json/__init__.py", line 338, in loads
return _default_decoder.decode(s)
File "/usr/lib/python2.7/json/decoder.py", line 366, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python2.7/json/decoder.py", line 384, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
With this patch, I get a better error:
ERROR: Corruption detected: No JSON object could be decoded while
loading
/src/build/cache/artifacts/8b4422c58ecb2a085b142fbba74b760f501f65d4b2885bf707994973230e0c58.stratum.build-essential-minimal
Change-Id: I0ad359901c5da75bd26d5a1a8108ef4e6f1d7708
|
|
|
|
|
|
|
| |
Previously it was possible to have some strange values for
pluginmgr.locations if the same path was appeared twice
Change-Id: I3ec257e48e85c3fd30759c3dcc2064f0b151ec45
|
|
|
|
|
|
|
|
| |
Swap nested ifs for and
Also replace type() with isinstance()
Also fix doc string
Change-Id: I58177566f19b601bc734f7542c6a5dd52938063a
|
|
|
|
|
|
|
|
|
| |
This adds an optional 'template' option to the install-files manifest format.
A file declared as a template will be rendered using jinja2
with variables substituted in from the environment.
Change-Id: I2ed6fe58f5fff315b42b7e4ec478ada851e0a70d
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes a bug that allows stratum definitions
to carry paths to non-existent chunk morphs.
This fix changes the interpretation of definitions
so necessarily introduces a new definitions version (version 2)
Assuming a morph field defined in a stratum: "morph: strata/cats/xattr.morph"
and assuming "strata/cats/xattr.morph" does not exist, this patch will not
alter current behaviour for definitions versions 0 and 1,
besides producing a warning message like this:
"Warning! `strata/cats/xattr.morph' referenced in `strata/swift.morph' does not exist"
for definitions version 2 and greater the following error will be raised:
"ERROR: Couldn't find morphology: strata/cats/xattr.morph referenced in strata/swift.morph"
Change-Id: I4def5e92741cce25168f1038136503022ab27ffd
|
|
|
|
|
|
| |
Also add a distinct error message for an invalid version file
Change-Id: I674e6af284b33705ae8235054906f56b8cd8a130
|
|
|
|
| |
Change-Id: I1ffb63340d3facb608708d04a0a21c5a9e290c14
|
|
|
|
| |
Change-Id: I9344b9b80a6ec008715559390b63c9003f34bf90
|
|
|
|
|
|
|
|
|
|
| |
I propose putting it here instead:
<http://wiki.baserock.org/definitions/current>
I've also updated a few anachronisms in the README, but it could do with
further work.
Change-Id: I803246c123d99990e941afa66f96ba9fd210c28e
|
|
|
|
|
|
|
| |
A JsonMachine object can be set to log all messages that it sends, we
don't need to handle it in the WorkerConnection class as well.
Change-Id: Idfdc06953363a016708b5dda50c978eb93b1113c
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Worker log files are overly verbose with this enabled, each message is
dumped 6 times:
2015-03-19 11:00:11 DEBUG JsonMachine: Received: '"{...}\\n"\n'
2015-03-19 11:00:11 DEBUG JsonMachine: line: '"{...}\\n"'
2015-03-19 11:00:11 DEBUG JsonRouter: got msg: {...}
2015-03-19 11:00:11 DEBUG JsonMachine: Sending message {...}
2015-03-19 11:00:11 DEBUG JsonMachine: As '"{...}\\n"'
2015-03-19 11:00:11 DEBUG JsonRouter: sent to client: {...}
With this setting disabled, the message is only logged by the JsonRouter
class, so appears only twice:
2015-03-19 11:00:11 DEBUG JsonRouter: got msg: {...}
2015-03-19 11:00:11 DEBUG JsonRouter: sent to client: {...}
We've not seen any issues with message encoding/decoding recently so I
think it's safe to disable this debugging output by default.
Change-Id: I7d22ed29e81d6c594cb2c639abf3b40bfb27e3ad
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It's good to know which jobs are in progress and which are queued, when
reading morph-controller.log.
Old output:
2015-04-09 10:40:58 DEBUG Current jobs:
['3f647933a1effbb128c857225ba77e9aa775d92314ef0acf3e58e084a7248c73.chunk.stage1-binutils-misc',
'd7279e4179a31d8a3a98c27d5b01ad1bb7387c7fab623fee1086ab68af2784bb.chunk.stage2-fhs-dirs-misc']
New output:
2015-04-09 10:40:58 DEBUG Current jobs:
['3f647933a1effbb128c857225ba77e9aa775d92314ef0acf3e58e084a7248c73.chunk.stage1-binutils-misc (given to worker1:3434)',
'd7279e4179a31d8a3a98c27d5b01ad1bb7387c7fab623fee1086ab68af2784bb.chunk.stage2-fhs-dirs-misc (given to worker2:3434)']
Change-Id: Ie89e6723b0da5f930813591a3166301fd3966804
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
A cancel during the 'graphing' or 'annotating' stages would be ignored
as the BuildController was listening for the InitiatorDisconnect message
from the wrong event source. In 'building' state the actual build would
be stopped, but the BuildController instance would stick around due to
sending the message class instead of an instance of the message.
Change-Id: I222a8aa39bf7fffab4d89e12997ffd18cd1b54fc
|
|
|
|
| |
Change-Id: Ibc95fe1d78c8d68dd20a4d2187f93f363369dfec
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Change-Id: I63f0d9da8b12930bd9539710429756a0821ce884
|
|
|
|
| |
Change-Id: Ic6e613c21ed26c528ad7c75f41af01d7552729fd
|
|
|
|
| |
Change-Id: Ica2a270b254b01b9fb15956556efb74ee641e1b4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
Also ensure NIC_CONFIG begins with 'network=', 'bridge=' or is 'user'
Change-Id: I3bcbd25eb2c9a05b7fa276697f97a1080cb0316e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|