Commit Graph

35 Commits

Author SHA1 Message Date
Michael Vogt 8ee104d7bc basic-fixes: Tweak tmpfiles.d/provision.conf
As a followup for https://github.com/CentOS/centos-bootc/pull/371
this PR tweaks `tmpfiles.d/provision.conf` so
that there is only a single /var/roothome line for tmpfiles.d

As it is both provision.conf and rpm-ostree-0-integration.conf
define the same dir.

This should fix https://github.com/containers/bootc/issues/358
2024-03-18 12:52:21 +01:00
Colin Walters 86bc5473d3 ostree: Switch to composefs enabled = yes
This is the opposite workaround for
https://github.com/ostreedev/ostree-rs-ext/issues/612

However, we still need to finally make `/opt` a directory
to complete this, which currently wants changes in rpm-ostree.
(Or, we could tweak our build process to inject as a container
 afterwards)
2024-03-13 12:37:01 -04:00
Colin Walters 2257dd6cb5 Enable composefs root
This partially reverts commit 7977ead6e4 and
effectively migrates the change from 8f5be09371
and 14ab1c5847
to here.

Signed-off-by: Colin Walters <walters@verbum.org>
2024-03-01 13:52:11 -05:00
Colin Walters 1688a6f9cb basic-fixes: Tweak `/usr/lib/tmpfiles.d/provision.conf`
This ensures that systemd's creation of `/root` works instead
of falling back to what we have in
`/usr/lib/tmpfiles.d/rpm-ostree-0-integration.conf` for
`d /var/roothome 0700 root root -` which in turn ensures
that both the credential values as well as bootc's injection
of a tmpfiles.d snippet for root SSH key works.

https://github.com/containers/bootc/issues/358
Signed-off-by: Colin Walters <walters@verbum.org>
2024-02-28 08:23:06 -05:00
Colin Walters fb8efab43f tier-0: Enable tmp.mount by default
The long-carried-forward patch to disable `tmp.mount` for RHEL
rears its head again.
2024-02-12 15:06:34 -05:00
Colin Walters d933e13974 manifests/bootupd: Drop unnecessary /
It's not supported to pass anything other than `/` now, and
the argument has been optional for some time.
2024-02-07 08:33:21 -05:00
Colin Walters 93588bf969
Merge pull request #232 from cgwalters/machined-compat-true
Start with an empty `/etc/machine-id` to disable `ConditionFirstBoot`
2024-02-03 08:01:21 -05:00
Colin Walters 256852e764 Start with an empty `/etc/machine-id` to disable `ConditionFirstBoot`
The systemd firstboot process does several things, but notably
it runs a preset process.  This means that basically a plain
`RUN systemctl enable foo` won't work unless you *also* write
a preset file for it, and no one will know to do that.
2024-01-30 13:09:43 -05:00
Colin Walters 776e92256b initramfs: Add virtiofs
Today it's built as a module for Fedora derivatives, but
it's a relatively small kmod.

In particular I want to be able to use a virtiofs root as
a bootstrap mechanism to generate disk images in a situation
where we can't do nested containers, but we do have `/dev/kvm` -
which is the setup we have in e.g. OpenShift Prow on `build02`
with nested virt.
2024-01-27 10:57:47 -05:00
Colin Walters 2e56406003 autoupdates: Minor comment cleanup
Real motivation is to retrigger a build.
2024-01-23 12:55:27 -05:00
Colin Walters 7977ead6e4 tier-0: back off transient root
Until https://github.com/osbuild/bootc-image-builder/issues/149 is
fixed.
2024-01-23 08:11:35 -05:00
Colin Walters e456c289b5 autoupdates: Fix to use correct unit
Definitely a brown paper bag bug.
2024-01-19 17:43:05 -05:00
Colin Walters 67462b0dbc Enable `bootc-fetch-apply-updates.service` by default
This landed in c13c9eb8dc
And we want to come out emphasizing it.

Signed-off-by: Colin Walters <walters@verbum.org>
2024-01-18 18:21:44 -05:00
Colin Walters 7326c3686a tier-0: bootc is now in c9s
So drop the conditional.
2024-01-15 09:33:53 -05:00
Daniel J Walsh 528fb2329e
Merge pull request #98 from cgwalters/enable-transient-root
ostree: Enable root.transient = true by default
2023-12-22 08:02:50 -05:00
Colin Walters b65d2c5bdc
Merge pull request #105 from cgwalters/fix-bootc-to-eln
tier-0: bootc is only in eln
2023-12-13 13:53:30 -05:00
Colin Walters 6c9d3b8b62 tier-0: bootc is only in eln
Prep for building with non-stream9 distros.

(TODO: add a dedicated variable for this at the toplevel)
2023-12-12 15:38:10 -05:00
Colin Walters b943729fb2 initramfs: Also enable ostree module
rpm-ostree does this, but let's do it here too for
extra reliability.
2023-12-12 12:33:37 -05:00
Colin Walters ecbd78af68 initramfs: Consolidate and rename drop-initramfs
No reason to have the "base" settings in distinct files.
2023-12-12 11:32:49 -05:00
Colin Walters 48c85849e6 initramfs: Move our dracut config later
Our hostonly setting was conflicting with the default
`hostonly=yes` in `01-dist.conf`.
2023-12-12 11:31:05 -05:00
Colin Walters dd0a042a17 Always add bootc install config
bootc isn't in C9S yet, but it is in the -dev images.  Add
the install config unconditionally so that `bootc install`
works in the `centos-bootc-dev` image.
2023-12-08 12:45:42 -05:00
Colin Walters e6761c23bc ostree: Enable root.transient = true by default
This turns on the functionality added in
https://github.com/ostreedev/ostree/pull/3114
2023-12-08 08:08:05 -05:00
German Maglione 9cd73eb159 Fix cat redirection
Just a small fix, adding a missing redirection so that
'01-bootc-nohostonly.conf' is not created empty.
Since dracut's default is 'hostonly=no' this fix has
no impact on the initramfs contents.

Signed-off-by: German Maglione <gmaglione@redhat.com>
2023-11-29 14:18:13 +01:00
Liora Milbaum 03033108a5 Mass rename tier-1/boot => bootc 2023-11-23 14:42:56 +02:00
Liora Milbaum 6fe2272322 Squash sagano identifier 2023-11-07 09:05:21 +02:00
Colin Walters 05f8c0f10c Add bootc to eln
To do this though add a `distro` variable we can use to differentiate
between stream9 vs not-stream9 for now.

bootc exists now in eln since
- https://pagure.io/pungi-fedora/pull-request/1217
- https://github.com/minimization/content-resolver-input/pull/1006
2023-11-01 15:20:20 -04:00
Colin Walters 2ea1dcabc2 Enable readonly sysroot via config file
This is the more proper way to do it.
2023-10-21 16:03:18 -04:00
Colin Walters f84eba9267 bootc: Move install configuration here
Prep for dropping it out of upstream.
2023-10-14 14:46:38 -04:00
Colin Walters 43d8ee09de tier-0: Add container-selinux
Because currently trying to layer it on later causes issues.
2023-10-02 09:07:11 -04:00
Colin Walters 925d2a89cf Move container entrypoint to tier 0 2023-09-28 16:29:56 -04:00
Colin Walters 9dae26959c initramfs: Also add kernel-modules
Not sure why these basic things are being dropped.
2023-09-21 20:00:17 -04:00
Colin Walters 1f673cb118 Add bootc proper package to -dev
Because the rpm-ostree bootc wrapping breaks `bootc install`
2023-09-21 18:40:50 -04:00
Colin Walters 6a19fc44a9 initramfs: Enable more dracut modules
These get pulled in by something else it seems in larger
images...
2023-09-21 18:18:40 -04:00
Colin Walters 29f6c6fcd2 manifests: Split out firmware, do use bootable-rpm-ostree 2023-09-15 17:30:44 -04:00
Colin Walters 7361f26eeb Introduce a tier-0 image
This is basically just:

- kernel
- systemd
- selinux-policy-targeted
- bootc

Notably it doesn't have `rpm-ostree` or `rpm`, or many other things.
It also doesn't even have `linux-firmware`.

And no `openssh`!

It's almost certain that you need to derive from this, but
it should be a suitable starting point.

TODO: Add something like

```
$ dnf-system-bootstrap
Installing packaging tools from quay.io/fedora/fedora-boot-dnf@sha256:abcd...)
 # This would be basically all the packages not in tier-0 that
 # are enough to give `dnf install`
$ dnf install cowsay
 # Install critical stuff
$ dnf system-bootstrap remove
 # Remove everything that we added for the package system, that isn't
 # a dependency of what the user wants!
```

(In theory we could make this work with multi-stage builds, but
 it's a little hard)
2023-09-15 15:11:01 -04:00