| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This creates a gzipped cpio archive that may be used as an initramfs.
It is hard-coded to use gzip to compress the initramfs, since it's the
most common way to do it.
This is unfortunate, since the busybox gzip utility only allows maximum
compression, which is rather slow and doesn't give progress reporting,
so you can easily think it's gotten stuck.
It's possible to use other compression formats, but they need the kernel
to be built with them supported, and in the case of lz4, unusual userland
tools to create it, since the version of lz4 supported in the kernel is
not what the standard lz4 tools produce.
|
|\
| |
| |
| |
| | |
Reviewed-By: Richard Maw <richard.maw@codethink.co.uk>
Reviewed-By: Lars Wirzenius <lars.wirzenius@codethink.co.uk>
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
shutil.move() does not preserve permissions, file modes, ownerships etc,
resulting in much confusion when prepopulating a non-root user during
deployment. This change to `mv` fixes that.
|
|/
|
|
|
|
|
| |
Add support to the VirtualBox write extension to notice if we are
doing a Vagrant Basebox installation and not do the clever network
setup we normally do to allow machines to talk to one another since
this confuses Vagrant quite a bit if it is left in.
|
|
|
|
|
|
|
|
|
| |
This is useful to build releases using distbuild. It avoids having the
SHA1 fields in the artifact metadata files pointing to commits that
exist only on temporary build branches. It also avoids file:// URLs in
the repo fields. Note that the repo URL still points to the Trove used
by the distbuild network, rather than being an upstream URL pointing to
git.baserock.org.
|
|\
| |
| |
| |
| |
| |
| | |
Reviewed by:
Lars Wirzenius
Sam Thursfield
Daniel Silverstone
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We could just set stdout to subprocess.PIPE
then read from the pipe, but then we won't get the output
till the command's finished and some commands take a long time.
Using the logfile kwarg a file will be created by tee
and the output will be written to it in 'real time'.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We use tee to write the output to a file as well as to stdout.
Using Popen it should be straight forward to send the output to a pipe and
then read that pipe and write to wherever.
At the moment morph uses cliapp's runcmd rather than Popen. cliapp's runcmd
is a blocking call, so we're not able to read from the pipe until the
command has completed, which prevents real time logging to a number of files.
One solution to this problem might be to spawn a thread which opens a pipe
to the command being executed, the thread then reads from the pipe and writes
to our collection of logfiles.
|
| | |
|
| | |
|
| | |
|
|/
|
|
|
| |
Move the help out of the comment and into a help file,
and add a clearer example.
|
| |
|
|
|
|
|
| |
There's no longer any need to log the exception separately,
it will be logged with the MorphologySyntaxError
|
| |
|
|
|
|
|
| |
Test that a VM with the given name does not already exist, and check
that the files specified in ATTACH_DISKS do already exist.
|
|
|
|
|
| |
Also, change it to log the real error message in morph.log before
raising a more general exception to the user.
|
|
|
|
|
|
| |
Slight duplication is necessary, but it's only a few lines. We could
move the duplicated code into the base class in 'morphlib.writeexts' if
there was more duplication.
|
|
|
|
| |
Makes it easier to see what they mean at a glance.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The default Python __repr__() is useless for both developers and users,
so avoid using it in error messages.
The following message:
ERROR: Push to remote <morphlib.gitdir.Remote object at 0x905096c>,
push url None with refspecs (<morphlib.gitdir.RefSpec object at 0xf72fec2c>,)
failed with exit code 128
Becomes:
ERROR: Push to remote "origin", push url None failed with exit code 128
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| | |
Signed-off by: Adam Coldrick
Reviewed by:
Daniel Silverstone <daniel.silverstone@codethink.co.uk>
Richard Maw <richard.maw@codethink.co.uk>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Since git's parsing of .gitattributes can't deal with spaces, or
even with quotes, replace any whitespace with [[:space:]]. Also,
make sure to escape any glob metacharacters to avoid accidental
pattern matches.
Note:
This approach could cause a file "foo<tab>bar" to be treated
as a binary if a file "foo bar" has already been added with
morph add-binary. However this is as good of a workaround as
I can find.
Signed-off by: Adam Coldrick
|
| |
| |
| |
| |
| |
| | |
Begin adding help documentation for configuration
and write extensions starting with nfsboot.write,
rawdisk.write and tar.write.
|
| |
| |
| |
| |
| |
| | |
Add a command 'help-extensions' to list all extensions.
Add the ability to find help on an extension by calling
'morph help [extension name]'.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add a module to morphlib that can list all write
and configuration extensions either in morph itself
or the morphology repository.
The module also contains methods to find an extension
filename from the name and type.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Explicitly test that we get the same result twice when computing
ids and keys for the same artifact.
This has the effect of verifying that the memoisation code is
correctly operating.
Signed-Off-By: Daniel Silverstone <daniel.silverstone@codethink.co.uk>
|
|/
|
|
|
|
|
|
|
| |
We were previously memoising the computation of the dictionaries
but this patch adds support for memoising the computation of the
cache key itself (the SHA string). This massively improves cache
key computation performance.
Signed-Off-By: Daniel Silverstone <daniel.silverstone@codethink.co.uk>
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
morphlib/plugins/deploy_plugin.py
without-test-modules
Reviewed by:
Richard Maw
Lars Wirzenius
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
tarfile's open needs the file-like object
to have a tell() method, objects returned
from sockets don't have this method.
So instead we fetch the artifact from the
remote and cache it locally
|
| |
| |
| |
| |
| |
| |
| | |
The constructor for BuildCommand sets up the caches,
we want the caches to be set up for distbuild too
so that we can deploy a system (system artifact will be
fetched from the artifact cache)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
A semantic error in the BuildBranch class meant that it was not possible
to push temporary branches.
This escaped testing since BuildBranch interacts too tightly with
other components to be easily unit-tested, so testing was deferred to
a yarn test.
However, coverage isn't measured in yarn tests, so this code path was
forgotten.
|
| | |
|
| |
| |
| |
| |
| | |
This function causes a UnicodeDecodeError for some repositories
when building. Use os.path.isfile() when looking for .gitfat instead.
|
| | |
|
| |
| |
| |
| |
| | |
We were building it from a variable in some places and hardcoding it in
others; now we build it from a variable everywhere.
|
|\ \
| | |
| | |
| | |
| | |
| | | |
Reviewed by:
Richard Maw
Lars Wirzenius
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Move some code to the '.check' extension to verify that the deployment
can happen *before* spending 5 minutes unpacking and configuring the
rootfs.
This is not a perfect solution yet because when multiple systems are
being deployed in a cluster, we do not check all systems and then
deploy them all. Instead, we check one, then deploy it, then check the
second, etc.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
There is no longer a default /etc/fstab in the Baserock fhs-dirs chunk,
and the nfsboot.write extension does not use the default Btrfs system
layout so no entry is added for / to /etc/fstab at deploy-time.
We cannot have / in /etc/fstab for nfsboot deployments because it
causes systemd to remount / during bootup, which breaks everything.
|
|\ \ \
| | | |
| | | |
| | | | |
Reviewed-by: Richard Maw
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The scripts will be created into the folder:
/baserock/sytem-integration/
The system integration commands have the following
syntax:
name: linux
kind: chunk
...
install-commands:
...
system-integration:
linux-libs:
00-depmod:
- depmod -a
70-more-integration:
- touch /baserock/FILE
- |
for FOLDER in $(ls /)
do
echo "$FOLDER"
done
linux-misc:
70-more-integration:
- echo "Hello world"
In this concrete example, the following files will be created:
$DESTDIR/baserock/system-integration/
00-depmod-linux-libs-0000:
#!/bin/sh
set -xev
depmod -a
70-more-integration-linux-libs-0000
#!/bin/sh
set -xev
touch /baserock/FILE
70-more-integration-linux-libs-0001
#!/bin/sh
set -xev
for FOLDER in $(ls /)
do
echo "$FOLDER"
done
70-more-integration-linux-misc-0000
#!/bin/sh
set -xev
echo "Hello world"
|
| | | | |
|