-
Notifications
You must be signed in to change notification settings - Fork 207
Fix two external issues breaking cfs on latest f44+ #2195
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
Changes from all commits
fc82c71
02f675d
bb8e7dd
cf29d24
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 | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -137,6 +137,44 @@ if ! rpm -q ostree 2>/dev/null | grep -q "2026\." ; then | |||||||
| esac | ||||||||
| fi | ||||||||
|
|
||||||||
| # Temporary: downgrade kernel to last 6.x when 7.0 or 7.1 is present. | ||||||||
| # Kernel 7.x broke composefs ("has no fs-verity digest"), fixed in 7.2. | ||||||||
| # xref https://github.com/bootc-dev/bootc/issues/2174 | ||||||||
| # TODO: Remove once all base images ship kernel >= 7.2 | ||||||||
| kernel_ver=$(rpm -q --qf '%{VERSION}' kernel 2>/dev/null || true) | ||||||||
| case "${kernel_ver}" in | ||||||||
| 7.0.*|7.1.*) | ||||||||
| arch=$(uname -m) | ||||||||
| koji_kver="6.19.10" | ||||||||
| koji_krel="300.fc44" | ||||||||
| koji_base="https://kojipkgs.fedoraproject.org/packages/kernel/${koji_kver}/${koji_krel}/${arch}" | ||||||||
| kernel_td=$(mktemp -d) | ||||||||
| trap 'rm -rf "${kernel_td}"' EXIT | ||||||||
| for pkg in kernel kernel-core kernel-modules kernel-modules-core; do | ||||||||
| curl --retry 5 --retry-delay 5 --retry-all-errors -fL \ | ||||||||
| "${koji_base}/${pkg}-${koji_kver}-${koji_krel}.${arch}.rpm" \ | ||||||||
| -o "${kernel_td}/${pkg}.rpm" | ||||||||
| done | ||||||||
| # Skip scriptlets: kernel-core's posttrans runs `kernel-install add` | ||||||||
| # which calls rpm-ostree, and that fails inside a container build. | ||||||||
| # We manually run depmod afterward since it's the only useful | ||||||||
| # scriptlet the kernel packages would otherwise execute. | ||||||||
| dnf -y install --allowerasing --setopt=tsflags=noscripts "${kernel_td}"/*.rpm | ||||||||
|
Contributor
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. Using
Suggested change
Collaborator
Author
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. Good thought Gemini, but we actually set installonlyn in our base image to turn off that dnf behavior. |
||||||||
| /sbin/depmod -a "${koji_kver}-${koji_krel}.$(uname -m)" | ||||||||
| # Remove any leftover module directories for the old kernel (e.g. | ||||||||
| # initramfs.img generated by the base image build is not RPM-owned | ||||||||
| # so dnf does not clean it up). | ||||||||
| for old_kmod_dir in /usr/lib/modules/*; do | ||||||||
| kd_ver=$(basename "${old_kmod_dir}") | ||||||||
| if [[ "${kd_ver}" != "${koji_kver}-"* ]]; then | ||||||||
| rm -rf "${old_kmod_dir}" | ||||||||
| fi | ||||||||
| done | ||||||||
| rm -rf "${kernel_td}" | ||||||||
| trap - EXIT | ||||||||
| ;; | ||||||||
| esac | ||||||||
|
|
||||||||
| dnf clean all | ||||||||
| # Clean logs and caches | ||||||||
| rm /var/log/* /var/cache /var/lib/{dnf,rpm-state,rhsm} -rf | ||||||||
Uh oh!
There was an error while loading. Please reload this page.