Commit graph

23 commits

Author SHA1 Message Date
904a1d01ba initial debian support 2025-08-30 12:36:18 -07:00
Colin Walters (Red Hat)
1538c12f38 Merge branch 'F43-enable-bootloader-update' into 'main'
Enable `bootloader-update.service` since F43

See merge request fedora/bootc/base-images!257
2025-08-12 15:05:51 +00:00
Colin Walters
2cfaaf7788 initramfs: Default to DRACUT_NO_XATTR=1
See the linked issue https://github.com/dracut-ng/dracut-ng/issues/1561

Signed-off-by: Colin Walters <walters@verbum.org>
2025-08-12 12:38:42 +02:00
Huijing Hei
6af3341f80
Enable bootloader-update.service since F43
Required by https://fedoraproject.org/wiki/Changes/AutomaticBootloaderUpdatesBootc

Inspired by Dusty's comment https://github.com/coreos/fedora-coreos-config/pull/3653#issuecomment-3156107015

`bootloader-update.service` is shipped in `rust-bootupd-0.2.26-3`
(https://src.fedoraproject.org/rpms/rust-bootupd/c/28a98663eabd21cb9e9ff334700d554d36c0b0aa?branch=rawhide)
but it is disabled by default.

Track issue: https://github.com/coreos/fedora-coreos-tracker/issues/1468
2025-08-06 11:06:41 +08:00
Jonathan Lebon
4eb52e5483
bootc-base-imagectl: add --nobody-99 for use with --sysusers
The `nobody` user/group is special and can't be driven from a sysusers
dropin because Fedora's systemd has a compiled-in default value
for naming the overflow user that same name and that always takes
precedence.

The problem is that due to legacy and cargo-culting, we have to deal
with a bunch of systems with the `nobody` user set to 99:99 that we
can't just ignore. We need to migrate those, but for now at least to
make `--sysusers` usable in these environments, let's add a new hidden
`--nobody-99` option which defines _only_ that entry in the hardcoded
passwd/group. This _is_ respected by systemd-sysusers.

See also: https://github.com/coreos/fedora-coreos-tracker/issues/1201
See also: https://github.com/systemd/systemd/issues/7717
2025-07-15 14:32:42 -04:00
Dusty Mabe
489bcd8ca1
minimal/basic-fixes: redirect sed commands stdout > /dev/null
Not sure why but when you try to build c9s with rpm-ostree from
git main the change in [1] causes the sed commands here to exit
with a weird error:

```
sed: couldn't close stdout: Bad file descriptor
```

Let's just redirect to /dev/null for now and maybe we can drop
it longer term when c9s goes away. See also [2] where this was
reported.

[1] f4aecb9b62
[2] https://github.com/coreos/rpm-ostree/pull/5388#issuecomment-2971623787
2025-06-20 15:27:14 -04:00
Jonathan Lebon
a3c83bd895
passwd/group: order by UID/GID
This makes it easier to diff against other definitions of this file
ordered the same deterministic way.
2025-06-16 14:02:07 -04:00
Jonathan Lebon
2c6d03cfe3
manifests: consistently use set -xeuo pipefail in postprocess scripts
The `set -euo pipefail` shouldn't be controversial.

The `set -x` bit is more debatable because it makes
the output more verbose but I find it helpful right
now as I comb through all sorts of details as part of
https://github.com/coreos/fedora-coreos-tracker/issues/1861.

If we care about less verbose output, I'd prefer we keep `-x` but
switched to having rpm-ostree buffer postprocess output and only dump it
if it fails.
2025-05-26 14:41:11 -04:00
Dusty Mabe
672148a82d
minimal/systemd-presets: preset dnf-makecache.timer to disabled
This one doesn't make much sense to have enabled by default on systems
with image based updates because we shouldn't need a local cache of
yum repo metadata (i.e. we should just be interacting with a registry).
2025-05-16 15:47:35 -04:00
Dusty Mabe
4888be4e19
move systemd-preset enablement code to minimal
Arguably we still want to remove rpm systemd enablements and use the
presets for the original image we create for all of our images.
2025-05-16 15:47:35 -04:00
Dusty Mabe
986b59b5c1
minimal: drop exclude on iptables-legacy; add test
In Fedora CoreOS we are still including iptables-legacy for now [1]
and since you can't really overwrite an `exclude-packages` entry it
means we can't update our git submodule.

We are working to get away from using a git submodule [2], but I'd
like to get ours updated in the mean time.

[1] https://github.com/coreos/fedora-coreos-tracker/issues/1818
[2] https://github.com/coreos/fedora-coreos-tracker/issues/1861
2025-05-06 16:52:05 -04:00
Dusty Mabe
40e33e055a
Add riscv64 support
Add a riscv64 stanza for the bootloader so we can build images for
riscv64 and conditionalize kexec-tools because it's not yet built
for riscv64.
2025-04-23 11:17:14 -04:00
Colin Walters
993845d2a2 Move the tss group to /etc so it can be mutated
This works around two issues:

- First, rpm switched to reading users/groups directly for
  its implementation of systemd-sysusers, which meant
  it no longer reads via nss, which breaks nss-altfiles.
  xref: https://github.com/rpm-software-management/rpm/pull/2503#issuecomment-1536435351
  and below.
- Second, even if that was fixed, `keylime` wants to add
  its user to the group, which can't be done when it's a system
  uid.

Since nothing in the OS content is owned by this group, we can
move underneath `/etc` by default.

Signed-off-by: Colin Walters <walters@verbum.org>
2025-03-25 20:09:17 -04:00
Joseph Marrero Corchado
8b502872d4 Merge branch 'fix-version' into 'main'
Simplify versioning

Closes #40

See merge request fedora/bootc/base-images!150
2025-03-17 07:48:18 -04:00
Colin Walters
383f528989 Simplify versioning
The versioning here was originally inherited from the Fedora CoreOS
configuration. However...the version numbering was always
overridden by coreos-assembler, so it wasn't actually used there!

Conceptually there are two things here:

- OS version
- Arbitrary date stamp

For the "OS version"...well, the closest thing we have actually
to "version of set of RPMs" is a compose today, which is expressed
in a distinct label already - at least for CentOS and RHEL.
For Fedora of course post-branching there are no "composes"
as such but just a set of floating RPMs post-release.

We have the "arbitrary date stamp" in the container image build
time already - and tooling like bootc and rpm-ostree show
both the version and the build time.

Let's significantly simplify our version numbers by just going
to "OS version".

This especially fixes the bug that we weren't setting
`releasever` anymore which just broke the version anyways.

Closes: https://gitlab.com/fedora/bootc/base-images/-/issues/40

Signed-off-by: Colin Walters <walters@verbum.org>
2025-03-16 14:48:57 -04:00
Joseph Marrero Corchado
1bf50178bd minimal/kernel-install: set protect_running_kernel to False
https://dnf.readthedocs.io/en/latest/conf_ref.html#protect-running-kernel-label
uses uname to protect the running kernel, when both the
container and the host shared the same kernel version this
blocks removing the kernel or replacing it, since on ostree
systems we only support one kernel this prevents us from
installing kernel-rt for example.
2025-03-14 12:29:32 -04: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
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
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
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
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