Commit graph

16 commits

Author SHA1 Message Date
Tom Gundersen
fc72b5cd03 stages/untargz: add a stage to populate a tree from a tar.gz
Signed-off-by: Tom Gundersen <teg@jklm.no>
2019-06-12 19:46:39 +02:00
Tom Gundersen
35917303c8 stages/targz: add a targz stage
This generates a tarball of the tree.

Signed-off-by: Tom Gundersen <teg@jklm.no>
2019-06-12 18:55:49 +02:00
Tom Gundersen
34de8e0274 osbuild: always pass an input_dir argument
All stages must be able to handle an input_dir argument, as we now
either pass it to all or none for agiven run. Simply set it to
'None' if it is not provided.

Signed-off-by: Tom Gundersen <teg@jklm.no>
2019-06-12 18:54:31 +02:00
Lars Karlitski
01aa00837f osbuild: drop state
Stages should be as stateless as possible. Don't provide an easy way out
of that.

Only the dnf stage used stage to save the dnf cache. That's only useful
during development and can be solved by pointing to a local repo mirror.
2019-06-12 15:23:45 +02:00
Lars Karlitski
5e7a111120 osbuild: run further setup in build environment
Introduce `run-stage` script, which sets up the build environment before
running the stage. Run `ldconfig`, `systemd-sysusers`, and
`systemd-tmpfiles` in it.
2019-06-07 21:33:31 +02:00
Lars Karlitski
7999ef9f9d anaconda: don't fail when systemd-tmpfiles returns !0 2019-06-07 13:34:23 +02:00
Lars Karlitski
5f59cc0cb4 osbuild: only use /usr from the host
Use systemd-nspawn's "volatile" mode, which creates a tmpfs for the root
directory. This ensures that we're not accidentally using configuration
from the host.

The only remaining hole is `/etc/pki`.

Anaconda cannot run without its configuation in `/etc`. Recreate the
defaults.
2019-06-07 13:14:21 +02:00
Tom Gundersen
cdcfa1277e osbuild: make state handling generic
Rather than treating the dnf-cache specially, give each stage its
own state directory that they can reuse. This should obviously be
used with care by the stages in order to make the builds
reproducible.
2019-06-06 19:37:49 +02:00
Tom Gundersen
d557784c8c osbuild: do not set up API VFS in the target tree
Some stages will be chrooting into the target to run things there,
and they will require the standard API VFS to be mounted. Some
tools do that themselves, other do not. In all cases, we would like
to discourage running things in the target tree.

For these reasons do not pre-mount the API VFS, but require the
stages who need it to do the mounting themselves. This is a partial
revert of f6023ed78b.
2019-06-06 16:52:03 +02:00
Lars Karlitski
a04ec2c4b0 Add some more stages 2019-06-05 17:29:08 +02:00
Lars Karlitski
f6023ed78b Bind-mount vfs directories for each stage
Many of the stages need it anyway.
2019-05-06 00:23:56 +02:00
Lars Karlitski
61a59b7ad0 dnf: Simplify writing dnf.conf
Every stage gets its own private /tmp. There's no need to find unique
names or cleaning up.
2019-05-05 23:54:07 +02:00
Lars Karlitski
3a3c35ba99 anaconda: Remove unused import 2019-05-05 23:33:21 +02:00
Lars Karlitski
c6e45d4357 Add io.weldr.qcow2
A stage that makes a bootable .qcow2 image out of the tree.
2019-04-09 18:43:21 +02:00
Lars Karlitski
a1d9272866 Add io.weldr.ansible
Run an Ansible playbook on the tree, using Ansible's chroot connection
type.
2019-04-09 16:57:25 +02:00
Lars Karlitski
ae1afef209 osbuild 2019-04-08 13:03:13 +02:00