Commit graph

937 commits

Author SHA1 Message Date
Colin Walters
c57120ac52 build-sys: Make target dir for install-manifests configurable
For the use case of updating Konflux lockfiles we want
to be able to easily render the manifests to a tempdir without
installing to `/`.

Move the install of the build script to the main container
build so `install-manifests` only touches manifests.

Signed-off-by: Colin Walters <walters@verbum.org>
2025-03-12 09:29:12 -04:00
Colin Walters (Red Hat)
e0628d2124 Merge branch 'workaround-rpmostree' into 'main'
imagectl: Update mode for / if needed

See merge request fedora/bootc/base-images!107
2025-03-05 14:19:16 +00:00
Colin Walters
ccb2c22ecb imagectl: Update mode for / if needed
This works around https://github.com/coreos/rpm-ostree/pull/5322
so we can ship the fix faster.

Signed-off-by: Colin Walters <walters@verbum.org>
2025-03-04 17:31:56 -05:00
Colin Walters (Red Hat)
6a04cddf98 Merge branch 'test-vartmp' into 'main'
tests: Verify var/tmp

See merge request fedora/bootc/base-images!105
2025-03-04 19:24:37 +00:00
Colin Walters (Red Hat)
095ac90bc1 Merge branch 'use-build-arg-instead-of-from' into 'main'
Add an alternative method to set the repos image

See merge request fedora/bootc/base-images!106
2025-03-04 18:29:25 +00:00
Miguel Martín
aa9c6c2a50
Add an alternative method to set the repos image
Make it possible to set the repos image with a build argument, e.g.:
--build-arg=REPOS_IMAGE=quay.io/fedora/fedora:42

Currently it's only possible use the --from argument, e.g.:
--from=quay.io/fedora/fedora:42

Signed-off-by: Miguel Martín <mmartinv@redhat.com>
2025-03-04 14:10:55 +01:00
Colin Walters (Red Hat)
582f7efb8c Merge branch 'container-use-dev' into 'main'
container: Use copr rpm-ostree by default

See merge request fedora/bootc/base-images!104
2025-03-03 19:20:05 +00:00
Colin Walters (Red Hat)
cbe4415851 Merge branch 'exclude-iptables-legacy' into 'main'
minimal: Exclude iptables-legacy, don't include iptables-nft

See merge request fedora/bootc/base-images!103
2025-03-03 18:46:08 +00:00
Colin Walters
1a5ba8905a container: Use copr rpm-ostree by default
As we're now in a cycle of landing fixes there faster, then once
we stabilize we can drop this.

Signed-off-by: Colin Walters <walters@verbum.org>
2025-03-03 09:31:22 -05:00
Colin Walters
82a4e874a4 finalize.d: Ensure var/tmp in container root
There's a crazy history around this; what we really want is
to have this reliably generated by tmpfiles.d, the handling
for which I want to move to bootc. For now let's wedge this
into finalize.d alongside the few others here.

Signed-off-by: Colin Walters <walters@verbum.org>
2025-03-03 09:31:22 -05:00
Colin Walters
5d4936fd43 tests: Verify var/tmp
Somehow this went missing in a local build.

Signed-off-by: Colin Walters <walters@verbum.org>
2025-03-03 09:21:44 -05:00
Colin Walters (Red Hat)
f0ebf6250e Merge branch 'expose-rechunking' into 'main'
imagectl: Add rechunk verb

See merge request fedora/bootc/base-images!99
2025-02-28 22:39:24 +00:00
Colin Walters
55a8191604 imagectl: Add rechunk verb
This fronts the functionality currently implemented in rpm-ostree,
for the same reason as we have `build-rootfs`; the functionality
may move elsewhere in the future.

Signed-off-by: Colin Walters <walters@verbum.org>
2025-02-28 15:15:59 -05:00
Colin Walters
ed3ca02edf minimal: Exclude iptables-legacy, don't include iptables-nft
Motivated by trimming the package set of minimal to be smaller
to match its name.

But more generally, I think the solution most of the time we hit a
"multiple things have a provides" isn't to hardcode what we want,
but to exclude what we don't want.

Ideally of course...there'd be something like
`ProvidesDisfavored: iptables` that `iptables-legacy` could
use.

Signed-off-by: Colin Walters <walters@verbum.org>
2025-02-28 15:01:26 -05:00
Colin Walters (Red Hat)
b4469c1f50 Merge branch 'copytree-symlinks' into 'main'
imagectl: Copy symlinks as symlinks for manifests

See merge request fedora/bootc/base-images!101
2025-02-28 15:15:28 +00:00
Colin Walters (Red Hat)
77f33d9738 Merge branch 'rpmdb-normalize' into 'main'
Use rpmdb-normalize, add rootfs tests

See merge request fedora/bootc/base-images!102
2025-02-28 15:11:42 +00:00
Colin Walters
e89565789c Use rpmdb-normalize, add rootfs tests
I just saw the sqlite-shm corruption in
https://gitlab.com/redhat/centos-stream/containers/bootc/-/merge_requests/437#note_2372766792
so let's just go ahead and turn on rpmdb_normalize which
also aids the reproducibility of the rpmdb.

While we're here let's also add a long overdue "unit test" for
the rootfs. This operates as a container build that mounts
the container-under-test as part of a multi-stage build.

Signed-off-by: Colin Walters <walters@verbum.org>
2025-02-28 09:14:45 -05:00
Colin Walters
3f39d107e1 imagectl: Copy symlinks as symlinks for manifests
This fixes using `defaults.yaml` as a link, which we don't
want to list with the `list` verb.
2025-02-27 19:52:27 -05:00
Colin Walters (Red Hat)
d8e5834ce9 Merge branch 'no-separate-rootfs' into 'main'
imagectl: Default source-root to /

See merge request fedora/bootc/base-images!100
2025-02-27 19:35:44 +00:00
Colin Walters
cb36bccf74 imagectl: Default source-root to /
While "cross builds" and using a separate repos container can
feel very clean (instead of mutating the builder container)
it's actually much closer to our default intention to support building
a new version of the base image from the image itself.

So make the source root optional (i.e. it defaults to `/`).

This will improve the default UX, but also more specifically
will fix the issue that cachi2 breaks the separate source root flow.

Signed-off-by: Colin Walters <walters@verbum.org>
2025-02-25 16:37:40 -05:00
Colin Walters (Red Hat)
53282d73c9 Merge branch 'custom-base-target' into 'main'
Add bootc-base-imagectl onto the main branch

See merge request fedora/bootc/base-images!98
2025-02-25 15:11:53 +00:00
Colin Walters
d5810bcd7e ci: Drop tier-x build, do build test case
As part of all of this we're de-emphasizing "tier-x" and focusing
on making it ergonomic to either build up from minimal, or down+up
from standard.

Second, also add a CI test for our derived image.

Signed-off-by: Colin Walters <walters@verbum.org>
2025-02-25 08:27:20 -05:00
Colin Walters
c89b6f4298 Introduce bootc-base-imagectl
- Embed the manifests into the container image
- Add bootc-base-imagectl which is a tightly controlled frontend
  to execute on those manifests.

For now, we don't attempt to rework how we build the standard
image to actually look like `dnf install`, but we show that
it can work.

Signed-off-by: Colin Walters <walters@verbum.org>
2025-02-25 08:27:20 -05:00
Colin Walters
745c9eb6d3 Move fedora-generic to fedora-includes
I want to make it clearer which manifests are actually
"toplevels" versus which are just for inclusion.

Move fedora-generic to its own subdirectory for this reason.

Signed-off-by: Colin Walters <walters@verbum.org>
2025-02-25 08:27:20 -05:00
Colin Walters
8fbe774210 Swap symlink state for fedora-bootc -> fedora-standard
Followup to the naming standardization. Now `fedora-bootc.yaml`
is effectively a deprecated alias only used by the legacy pungi configs.

Signed-off-by: Colin Walters <walters@verbum.org>
2025-02-25 08:27:20 -05:00
Colin Walters
62b9f3e766 manifests: Drop metadata from fedora manifests
Let's inherit from the generic descriptions.

Signed-off-by: Colin Walters <walters@verbum.org>
2025-02-25 08:27:20 -05:00
Colin Walters
11a09f4c76 Rename "tier-1" to "standard"
Followup to the rename of "tier-0" to "minimal". The tiers nomenclature
didn't end up working out.

Signed-off-by: Colin Walters <walters@verbum.org>
2025-02-25 08:27:20 -05:00
Colin Walters
3950d19bdc manifests: Add descriptions
This is generally useful for the same reason dpkg/rpm packages
have descriptions. But it's also specifically preparation
for the base image builder having a list operation to show
available configurations.

Signed-off-by: Colin Walters <walters@verbum.org>
2025-02-25 08:27:20 -05:00
Colin Walters
e77e3dd0ac minimal: Require kernel.yaml
We have a legacy of trying to support using e.g. kernel-rt. But
it adds complexity in the inheritance because minimal/manifest.yaml
isn't standalone, it also needs a kernel.

As part of custom base images I want to simplify this.

In order to use kernel-rt, we'll just say that you build a
minimal base, and then swap to kernel-rt as a secondary step
for now.

Signed-off-by: Colin Walters <walters@verbum.org>
2025-02-25 08:27:20 -05:00
Colin Walters
d1a21ed159 tier-0: Rename to minimal
The "tiers" nomenclature ended up being unhelpful since
we introduced "tier-x" which is between tier-0 and tier-1.

We also never exposed the tier naming outside of our source
code. In preparation for doing so, rename to tier-0 to
"minimal" which is a bit more descriptive.

Renaming the other images will follow.

Signed-off-by: Colin Walters <walters@verbum.org>
2025-02-25 08:27:19 -05:00
Colin Walters
6f52311f70 ci: Bump to latest buildah
The platform-engineering include is using a truly ancient buildah
image. Stop including that and bump to the latest.

Signed-off-by: Colin Walters <walters@verbum.org>
2025-02-25 08:27:10 -05:00
Colin Walters (Red Hat)
f32c45268e Merge branch 'rpmstate-tmpfiles' into 'main'
tier-0: Add tmpfiles.d entry for /var/lib/rpm-state

See merge request fedora/bootc/base-images!97
2025-02-25 01:22:21 +00:00
Colin Walters
20a796e0fd tier-0: Add tmpfiles.d entry for /var/lib/rpm-state
Needed for https://github.com/containers/bootc/pull/1101
which will cross check /var and tmpfiles.d.
2025-02-25 00:41:20 +00:00
Colin Walters (Red Hat)
84f2ea2c99 Merge branch 'build-prep' into 'main'
build-sys: Rework to use new compose rootfs + FROM scratch pattern

See merge request fedora/bootc/base-images!96
2025-02-24 21:58:38 +00:00
Colin Walters (Red Hat)
682af93899 Merge branch 'drop-sudo' into 'main'
group: Drop sudo

Closes #41

See merge request fedora/bootc/base-images!94
2025-02-24 21:57:27 +00:00
Colin Walters
7676401abe build-sys: Rework to use new compose rootfs + FROM scratch pattern
This takes some of the logic from what's currently in custom base image branch
and applies it here for the main branch.

We need this in order to not depend on the logic that was
removed in https://github.com/containers/buildah/issues/5952

Note that with the latest rpm-ostree v2025.5 `--source-root`
is significantly improved and we don't need to manually copy
dnf variables or gpg keys.
2025-02-20 19:51:09 -05:00
Colin Walters
2c1d31a2a0 group: Drop sudo
This is only used by Fedora CoreOS derivatives, and
we don't include the corresponding sudo rule.

The motivation here is that this group in particular has
no corresponding systemd sysusers.d, and a future bootc
is going to check for that.

Closes: https://gitlab.com/fedora/bootc/base-images/-/issues/41
Signed-off-by: Colin Walters <walters@verbum.org>
2025-02-14 08:08:07 -05:00
Colin Walters (Red Hat)
7b4e013126 Merge branch 'branch-f42' into 'main'
tier-1: add f42 treefile after branching

See merge request fedora/bootc/base-images!87
2025-02-07 19:32:10 +00:00
Colin Walters (Red Hat)
c1a4b38c46 Merge branch 'drop-resolved-centos' into 'main'
tier-x: Drop systemd-resolved

See merge request fedora/bootc/base-images!88
2025-02-07 14:35:47 +00:00
Colin Walters
0ac5ee04ba tier-x: Drop systemd-resolved
It's not desired by default in RHEL 10 or below yet, ref
https://issues.redhat.com/browse/RHEL-77077

AFAICS, it's already explicitly specified in the fedora-coreos manifest,
so dropping it here shouldn't affect FCOS.

Of course I think what we *really* want here is distribution
conditionals.

Signed-off-by: Colin Walters <walters@verbum.org>
2025-02-07 09:23:38 -05:00
Paul Whalen
da3c6ef677 tier-1: add f42 treefile after branching
Signed-off-by: Paul Whalen <pwhalen@fedoraproject.org>
2025-02-05 16:44:49 -05:00
Colin Walters (Red Hat)
5276e451f4 Merge branch 'drop-ppc64le-bootloader-cruft' into 'main'
base/bootloader: Drop /usr/lib/ostree-boot/loader

See merge request fedora/bootc/base-images!86
2025-02-05 21:08:36 +00:00
Colin Walters
3ebf803f5f base/bootloader: Drop /usr/lib/ostree-boot/loader
A quick workaround for https://issues.redhat.com/browse/RHEL-78104
2025-02-05 15:16:59 -05:00
Joseph Marrero Corchado
e62452d096 Merge branch 'kernel-install-more-places' into 'main'
kernel-install: Enable everywhere

See merge request fedora/bootc/base-images!84
2025-02-03 19:05:14 +00:00
Colin Walters
d88208bfba kernel-install: Enable everywhere
Since we'll have the updated rpm-ostree and we believe this
works.

Signed-off-by: Colin Walters <walters@verbum.org>
2025-02-03 09:05:06 -05:00
Valentin Rothberg
3374cd8842 Merge branch 'rpmstate' into 'main'
tier-0: Add /var/lib/rpm-state by default

Closes tracker#58

See merge request fedora/bootc/base-images!82
2025-01-22 15:50:56 +00:00
Colin Walters
92e7c1b2e1 tier-0: Add /var/lib/rpm-state by default
This empty directory is required by some RPM scripts. Historically
rpm-ostree's script invocations made this by default, but that
doesn't happen with direct rpm or dnf.

Signed-off-by: Colin Walters <walters@verbum.org>
2025-01-22 10:24:48 -05:00
Colin Walters (Red Hat)
9bc06392c3 Merge branch 'kernel-install' into 'main'
tier-0: add kernel-install integration config

See merge request fedora/bootc/base-images!62
2025-01-21 22:51:34 +00:00
Joseph Marrero Corchado
7e65f01306 Containerfile: use rawhide as builder to get the latest rpm-ostree 2025-01-21 15:53:14 -05:00
Joseph Marrero Corchado
1003402e6f tier-0: add kernel-install integration config
This MR adds two configurations to enable kernel-install integration,
this will enable using dnf or rpm to install kernels.

- /usr/lib/kernel/install.conf: enables the hook that tells kernel-install
to defer the logic to rpm-ostree, this currently only on f42
- dnf.conf: ensures dnf only keeps one kernel package
2025-01-21 15:19:41 -05:00