Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inherit from fedora-bootc's tier-x on Fedora 42+ #3177

Draft
wants to merge 12 commits into
base: rawhide
Choose a base branch
from

Conversation

jlebon
Copy link
Member

@jlebon jlebon commented Sep 23, 2024

There is a new tier-x in the fedora-bootc project whose goal is to
provide a common base that all variants (including tier-1) can share.

Move FCOS over to use this new tier, but only starting from Fedora 42.

This is a profound change and the start of an exciting new future! This
formalizes our relationship to other image-mode variants, encouraging us
to innovate and solve problems together in a more direct way.

Put more practically, e.g. bug fixes, new features, or temporary
workarounds that concern all/most tier-x derivatives should probably be
carried out at the tier-x level rather than the CoreOS level.

Eventually, this inheritance will be made even more explicit by having
FCOS be built FROM the tier-x image. For now, we share at the manifest
level, which is a stepping stone towards that goal.

Patches to actually dedupe our manifests with tier-x will follow. Though
note there is no change in the resulting package set here.

There is a new tier-x in the fedora-bootc project whose goal is to
provide a common base that all variants (including tier-1) can share.

Move FCOS over to use this new tier, but only starting from Fedora 42.

This is a profound change and the start of an exciting new future! This
formalizes our relationship to other image-mode variants, encouraging us
to innovate and solve problems together in a more direct way.

Put more practically, e.g. bug fixes, new features, or temporary
workarounds that concern all/most tier-x derivatives should probably be
carried out at the tier-x level rather than the CoreOS level.

Eventually, this inheritance will be made even more explicit by having
FCOS be built `FROM` the tier-x image. For now, we share at the manifest
level, which is a stepping stone towards that goal.

Patches to actually dedupe our manifests with tier-x will follow. Though
note there is no change in the resulting package set here.
All these manifests are already part of tier-x, so conditionalize them
on <f42.
Split all the things redundant with tier-x into a separate manifest that
only gets inherited on <f42.
Split all the things redundant with tier-x into a separate manifest that
only gets inherited on <f42.
Split all the things redundant with tier-x into a separate manifest that
only gets inherited on <f42.
No functional change. Prep for future patch.
No functional change. Prep for future patch.
All the requests in this manifest are part of tier-x, so conditionalize
on <f42.
In the spirit of abusing `remove-from-packages` less and being more
closely aligned with tier-x, stop literally nuking the systemd-firstboot
binary and systemd unit. Instead, just disable the systemd unit.

Note it's also disabled in the presets (in `40-coreos-systemd.preset`)
and as mentioned in the comment, via a runtime dropin. So that's triple
disablement already.
Split all the things redundant with tier-x into a separate manifest that
only gets inherited on <f42.
No functional change. This just makes it easier to share the list of
dupes with RHCOS downstream.
This workflow bumps the fedora-bootc submodule. It's better than just
using Dependabot because it only checks for changes in tier-0 and
tier-x. AFAICT, there isn't a way to tell Dependabot to do this.
@jlebon
Copy link
Member Author

jlebon commented Sep 23, 2024

Targeting rawhide for now to exercise it in CI. Will retarget testing-devel once this is ready to go.

@jlebon
Copy link
Member Author

jlebon commented Sep 23, 2024

Some diff stats:

testing-devel

  • No package diff
  • No initramfs diff
  • OSTree diff:
    $ ostree diff 40.20240922.dev.0 40.20240922.dev.1
    M    /usr/etc/pki/ca-trust/extracted/java/cacerts
    M    /usr/lib/os-release
    M    /usr/lib/modules/6.10.10-200.fc40.x86_64/initramfs.img
    M    /usr/lib/sysimage/rpm-ostree-base-db/rpmdb.sqlite
    M    /usr/share/rpm/rpmdb.sqlite
    M    /usr/share/rpm-ostree/treefile.json
    A    /usr/bin/systemd-firstboot
    A    /usr/lib/.build-id/07/052139ba8f88405bf6bef78a8f51b67894a761
    A    /usr/lib/systemd/system/systemd-firstboot.service
    
    These are all expected. See related commit for the systemd-firstboot-related one. The others churn naturally.

rawhide

  • No package diff

  • Initramfs diff

    -rw-r--r--   1 root     root           27 Dec 31  1969 usr/lib/ostree/prepare-root.conf
    -rw-r--r--   1 root     root           52 Dec 31  1969 usr/lib/ostree/prepare-root.conf
    

    This is from prepare-root.conf now also including the sysroot.readonly, which should also squash this warning from ostree-prepare-root:

    ostree-prepare-root[1319]: Found legacy sysroot.readonly flag, not configured in ostree/prepare-root.conf

    (Compare what we ship to what's in tier-0.)

  • OSTree diff:

    $ ostree diff 42.20240922.dev.0 42.20240922.dev.1
    M    /usr/etc/pki/ca-trust/extracted/java/cacerts
    M    /usr/lib/os-release
    M    /usr/lib/modules/6.12.0-0.rc0.20240920gitbaeb9a7d8b60.7.fc42.x86_64/initramfs.img
    M    /usr/lib/ostree/prepare-root.conf
    M    /usr/lib/sysimage/rpm-ostree-base-db/rpmdb.sqlite
    M    /usr/lib/tmpfiles.d/provision.conf
    M    /usr/share/rpm/rpmdb.sqlite
    M    /usr/share/rpm-ostree/treefile.json
    A    /usr/bin/systemd-firstboot
    A    /usr/lib/.build-id/df/db1101b9d05b622ff69b938d29783028f69ad5
    A    /usr/lib/dracut/dracut.conf.d/20-bootc-base.conf
    A    /usr/lib/dracut/dracut.conf.d/22-bootc-generic.conf
    A    /usr/lib/dracut/dracut.conf.d/49-bootc-tpm2-tss.conf
    A    /usr/lib/dracut/dracut.conf.d/59-altfiles.conf
    A    /usr/lib/systemd/system/systemd-firstboot.service
    

    These are all expected. See related commit for the systemd-firstboot-related one. The dracut dropins are redundant with our current settings, so no change there. The prepare-root.conf change is explained above. The others churn naturally.

@jlebon
Copy link
Member Author

jlebon commented Sep 23, 2024

Huh, looks like the submodule isn't getting initialized in CI. Investigating.
Edit: coreos/coreos-ci-lib#160

Copy link
Member

@dustymabe dustymabe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this.

# Firewall manipulation
- iptables nftables
- nftables
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm surprised iptables is included in bootc tier-x, but nftables isn't.

# This manifest can go away in Fedora 42. It duplicates tier-x.

# Default to `bash` in our container, the same as other containers we ship.
# Note this changes to /sbin/init in f42 as inherited by tier-x.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this make the generated container not podman run able without specifying more on the command line?

@@ -5,9 +5,6 @@
# One good model is to add fedora-coreos-config as a git submodule. See:
# https://github.com/coreos/coreos-assembler/pull/639

# Include rpm-ostree + kernel + bootloader
include: bootable-rpm-ostree.yaml

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

notable that fedora-coreos-base.yaml isn't included in RHCOS, but ignition-and-ostree.yaml is. So there will be some fixups to that repo needed when we bump the f-c-c git submodule there.

- [systemd, /usr/bin/systemd-firstboot,
/usr/lib/systemd/system/systemd-firstboot.service,
/usr/lib/systemd/system/sysinit.target.wants/systemd-firstboot.service]
- [systemd, /usr/lib/systemd/system/sysinit.target.wants/systemd-firstboot.service]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we should also add a test to verify it doesn't somehow come back from the dead and get started?

tmp-is-dir: true

# Required by Ignition, and makes the system not compatible with Anaconda
machineid-compat: false
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is also in manifests/tier-x.yaml

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not the biggest fan of a submodule here but I guess that's really the only way to share at this stage. I really don't know of anything better, but a lot of questions to come to mind.

  1. since we sync around things in this repo using config bot, how are updates to the submodule going to work?
  2. we sometimes have our "streams" on different versions of Fedora. Right now stable testing and testing-devel are on F40, next and next-devel are on F41, and rawhide F42. How do we account for this with a submodule. https://gitlab.com/fedora/bootc/base-images.git isn't a linear definition, it has branches like the rest of Fedora.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants