-
Notifications
You must be signed in to change notification settings - Fork 159
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
Changes from all commits
a006291
417b0ac
c5435a3
3121db0
65fe9a8
0e3a989
b28e0f4
a5a9e96
2c4366e
33c8b49
b78b205
603832f
b20b287
d533ecb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: Bump fedora-bootc submodule | ||
|
||
on: | ||
schedule: | ||
- cron: '0 */6 * * *' | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
bump-fedora-bootc-submodule: | ||
name: Bump fedora-bootc submodule | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
fetch-depth: 0 | ||
# https://github.com/actions/checkout/issues/766 | ||
- name: Mark git checkout as safe | ||
run: git config --global --add safe.directory "$GITHUB_WORKSPACE" | ||
- name: Check if there are new commits | ||
run: | | ||
previous_rev=$(git -C fedora-bootc rev-parse HEAD) | ||
git submodule update --remote fedora-bootc | ||
new_rev=$(git -C fedora-bootc rev-parse HEAD) | ||
if [ "${previous_rev}" != "${new_rev}" ]; then | ||
if git -C fedora-bootc diff --quiet "${previous_rev}" "${new_rev}" tier-0 tier-x; then | ||
# reset back any changes to avoid a PR bump | ||
git submodule update | ||
fi | ||
fi | ||
if git diff --quiet --exit-code; then | ||
echo "No tier-0 or tier-x changes; exiting" | ||
exit 0 | ||
fi | ||
|
||
git -C fedora-bootc shortlog --no-merges "${previous_rev}..${new_rev}" -- tier-0 tier-x > $RUNNER_TEMP/shortlog | ||
|
||
marker=END-OF-LOG-MARKER-$RANDOM$RANDOM$RANDOM | ||
cat >> $GITHUB_ENV <<EOF | ||
SHORTLOG<<$marker | ||
$(cat $RUNNER_TEMP/shortlog) | ||
$marker | ||
EOF | ||
- name: Open pull request | ||
uses: peter-evans/create-pull-request@v6 | ||
with: | ||
token: ${{ secrets.COREOSBOT_RELENG_TOKEN }} | ||
push-to-fork: coreosbot-releng/fedora-coreos-config | ||
branch: bump-fedora-bootc | ||
commit-message: | | ||
Bump fedora-bootc submodule | ||
|
||
${{ env.SHORTLOG }} | ||
title: "Bump fedora-bootc submodule" | ||
body: | | ||
Created by [GitHub workflow](${{ github.server_url }}/${{ github.repository }}/actions/workflows/bump-fedora-bootc.yml) ([source](${{ github.server_url }}/${{ github.repository }}/blob/testing-devel/.github/workflows/bump-fedora-bootc.yml)). | ||
|
||
``` | ||
${{ env.SHORTLOG }} | ||
``` | ||
committer: "CoreOS Bot <[email protected]>" | ||
author: "CoreOS Bot <[email protected]>" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "fedora-bootc"] | ||
path = fedora-bootc | ||
url = https://gitlab.com/fedora/bootc/base-images.git |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# This manifest can go away in Fedora 42. It duplicates tier-x. | ||
|
||
# Modern defaults we want | ||
boot-location: modules | ||
tmp-is-dir: true | ||
|
||
# Required by Ignition, and makes the system not compatible with Anaconda | ||
machineid-compat: false | ||
|
||
remove-from-packages: | ||
# We don't want systemd-firstboot.service. It conceptually conflicts with | ||
# Ignition. We also inject runtime bits to disable it in systemd-firstboot.service.d/fcos-disable.conf | ||
# to make it easier to use systemd builds from git. | ||
- [systemd, /usr/lib/systemd/system/sysinit.target.wants/systemd-firstboot.service] | ||
# We don't want auto-generated mount units. See also | ||
# https://github.com/systemd/systemd/issues/13099 | ||
- [systemd-udev, /usr/lib/systemd/system-generators/systemd-gpt-auto-generator] |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,32 +5,15 @@ | |
# 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 | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. notable that There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, there's a bunch of tweaks needed in openshift/os to adapt to this. I'm working on that in parallel with this PR but haven't published it yet. |
||
# Modern defaults we want | ||
boot-location: modules | ||
tmp-is-dir: true | ||
|
||
# Required by Ignition, and makes the system not compatible with Anaconda | ||
machineid-compat: false | ||
|
||
packages: | ||
- ignition | ||
- dracut-network | ||
# for encryption | ||
- clevis clevis-luks clevis-dracut clevis-systemd | ||
|
||
remove-from-packages: | ||
# We don't want systemd-firstboot.service. It conceptually conflicts with | ||
# Ignition. We also inject runtime bits to disable it in systemd-firstboot.service.d/fcos-disable.conf | ||
# to make it easier to use systemd builds from git. | ||
- [systemd, /usr/bin/systemd-firstboot, | ||
/usr/lib/systemd/system/systemd-firstboot.service, | ||
/usr/lib/systemd/system/sysinit.target.wants/systemd-firstboot.service] | ||
# We don't want auto-generated mount units. See also | ||
# https://github.com/systemd/systemd/issues/13099 | ||
- [systemd-udev, /usr/lib/systemd/system-generators/systemd-gpt-auto-generator] | ||
packages-s390x: | ||
# for Secure Execution | ||
- veritysetup | ||
|
||
postprocess: | ||
# Undo RPM scripts enabling units; we want the presets to be canonical | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# This manifest can go away in Fedora 42. It duplicates tier-x. | ||
|
||
packages: | ||
# Standard tools for configuring network/hostname | ||
- NetworkManager hostname | ||
- iproute | ||
# Firewall manipulation | ||
- iptables |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,17 +3,15 @@ | |
# generic enough to be shared downstream with RHCOS. | ||
|
||
packages: | ||
# Standard tools for configuring network/hostname | ||
- NetworkManager hostname | ||
# Interactive Networking configuration during coreos-install | ||
- NetworkManager-tui | ||
# Support for cloud quirks and dynamic config in real rootfs: | ||
# https://github.com/coreos/fedora-coreos-tracker/issues/320 | ||
- NetworkManager-cloud-setup | ||
# Route manipulation and QoS | ||
- iproute iproute-tc | ||
# Route QoS | ||
- iproute-tc | ||
# Firewall manipulation | ||
- iptables nftables | ||
- nftables | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm surprised There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think that would be a good idea. |
||
# Interactive network tools for admins | ||
- socat net-tools bind-utils | ||
# Declarative network configuration | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# This manifest can go away in Fedora 42. It duplicates tier-x. | ||
|
||
packages: | ||
- cryptsetup | ||
- e2fsprogs | ||
- lvm2 | ||
- xfsprogs | ||
# SELinux policy | ||
- selinux-policy-targeted | ||
# Allow for configuring different timezones | ||
- tzdata | ||
# zram-generator (but not zram-generator-defaults) for F33 change | ||
# https://github.com/coreos/fedora-coreos-tracker/issues/509 | ||
- zram-generator |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# All of these manifests duplicate tier-x. It's meant to be included by streams | ||
# which do not yet inherit from it (like FCOS <42, and "traditional" RHCOS) | ||
|
||
include: | ||
- bootable-rpm-ostree.yaml | ||
- ignition-and-ostree-tier-x-dupes.yaml | ||
- system-configuration-tier-x-dupes.yaml | ||
- networking-tools-tier-x-dupes.yaml | ||
- user-experience-tier-x-dupes.yaml | ||
# See https://github.com/coreos/bootupd | ||
- bootupd.yaml |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Here, we include tier-x, but override some key settings. | ||
|
||
include: ../fedora-bootc/tier-x/manifest.yaml | ||
|
||
# Required by Ignition, and makes the system not compatible with Anaconda. | ||
# Note this deviates from fedora-bootc and means `systemctl enable` doesn't | ||
# work in a container build. We'll have to resolve that issue some other way in | ||
# the future... For more details, see | ||
# https://github.com/CentOS/centos-bootc/issues/167 | ||
machineid-compat: false | ||
|
||
# This is the historical default and what FCOS currently ships. fedora-bootc | ||
# uses the new `root` value, but migrating FCOS is not that simple... | ||
opt-usrlocal: var | ||
|
||
postprocess: | ||
- | | ||
#!/usr/bin/env bash | ||
set -euo pipefail | ||
# For now, rely on the `sysroot.readonly` knob in /ostree/config only. | ||
# Having it in prepare-root.conf too throws off ostree-prepare-root in | ||
# live PXE/ISO and we have no easy way to override it when building those. | ||
# Really, we need to fix libostree + live ISOs to work well together: | ||
# https://github.com/ostreedev/ostree/issues/1921 | ||
# It's awkward to edit arbitrary keyfile configs. Just rewrite it. | ||
Comment on lines
+20
to
+25
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess my question here is what is the plan to get away from doing this other than fixing |
||
if grep -q readonly /usr/lib/ostree/prepare-root.conf; then | ||
grep -q '^4 ' <(wc -l /usr/lib/ostree/prepare-root.conf) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what is this line doing? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's verifying that the canonical file hasn't changed: https://gitlab.com/fedora/bootc/base-images/-/blob/main/tier-0/ostree.yaml I guess I could've checksummed it instead. |
||
cat > /usr/lib/ostree/prepare-root.conf <<EOF | ||
[composefs] | ||
enabled = true | ||
EOF | ||
fi |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# 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. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. does this make the generated container not There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Though more precisely it is still |
||
container-cmd: | ||
- /usr/bin/bash | ||
|
||
packages: | ||
# Basic user tools | ||
- bash-completion | ||
- coreutils | ||
# jq - parsing/interacting with JSON data | ||
- jq | ||
- less | ||
- sudo | ||
- vim-minimal | ||
# File compression/decompression | ||
- tar | ||
# Remote Access | ||
- openssh-clients openssh-server | ||
# Container tooling | ||
## crun recommends but doesn't require criu and criu-libs. We want them for | ||
## checkpoint/restore. https://github.com/coreos/fedora-coreos-tracker/issues/1370 | ||
- crun criu criu-libs | ||
- podman | ||
- skopeo |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this is by design. We need to keep this manifest until we only have tier-x. It's only included in the < 42 path.