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

feat: support CoreOS Kernel #206

Merged
merged 5 commits into from
Jun 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .github/workflows/reusable-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,16 @@ jobs:
- fsync
- fsync-lts
- surface
- coreos
cfile_suffix:
- common
- extra
- nvidia
exclude:
- fedora_version: 39
kernel_flavor: fsync
- fedora_version: 39
kernel_flavor: asus
- fedora_version: 40
kernel_flavor: fsync-lts # kernel-ba packages are not being built for F40 yet.
steps:
Expand Down Expand Up @@ -160,6 +165,9 @@ jobs:
$dnf config-manager --add-repo=https://pkg.surfacelinux.com/fedora/linux-surface.repo
linux=$($dnf repoquery --repoid linux-surface --whatprovides kernel-surface | tail -n1 | sed 's/.*://')
;;
"coreos")
linux=$(skopeo inspect docker://quay.io/fedora/fedora-coreos:stable | jq -r '.Labels["ostree.linux"] | split(".x86_64")[0]')
;;
*)
echo "unexpected kernel_flavor '${{ matrix.kernel_flavor }}' for dnf repoquery"
;;
Expand Down Expand Up @@ -216,7 +224,6 @@ jobs:
with:
string: ${{ env.IMAGE_REGISTRY }}


- name: Push To GHCR
uses: Wandalen/wretry.action@v3.5.0
id: push
Expand Down
12 changes: 12 additions & 0 deletions build-prep.sh
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,18 @@ elif [[ "surface" == "${KERNEL_FLAVOR}" ]]; then
--install kernel-surface-modules \
--install kernel-surface-modules-core \
--install kernel-surface-modules-extra
elif [[ "coreos" == "${KERNEL_FLAVOR}" ]] && \
[[ -n "${KERNEL_VERSION}" ]]; then
echo "Installing CoreOS Kernel"
KERNEL_MAJOR_MINOR_PATCH=$(echo $KERNEL_VERSION | cut -d '-' -f 1)
KERNEL_RELEASE=$(echo $KERNEL_VERSION | cut -d '-' -f 2)
rpm-ostree cliwrap install-to-root /
rpm-ostree override replace --experimental \
https://kojipkgs.fedoraproject.org//packages/kernel/$KERNEL_MAJOR_MINOR_PATCH/$KERNEL_RELEASE/x86_64/kernel-$KERNEL_MAJOR_MINOR_PATCH-$KERNEL_RELEASE.x86_64.rpm \
https://kojipkgs.fedoraproject.org//packages/kernel/$KERNEL_MAJOR_MINOR_PATCH/$KERNEL_RELEASE/x86_64/kernel-core-$KERNEL_MAJOR_MINOR_PATCH-$KERNEL_RELEASE.x86_64.rpm \
https://kojipkgs.fedoraproject.org//packages/kernel/$KERNEL_MAJOR_MINOR_PATCH/$KERNEL_RELEASE/x86_64/kernel-modules-$KERNEL_MAJOR_MINOR_PATCH-$KERNEL_RELEASE.x86_64.rpm \
https://kojipkgs.fedoraproject.org//packages/kernel/$KERNEL_MAJOR_MINOR_PATCH/$KERNEL_RELEASE/x86_64/kernel-modules-core-$KERNEL_MAJOR_MINOR_PATCH-$KERNEL_RELEASE.x86_64.rpm \
https://kojipkgs.fedoraproject.org//packages/kernel/$KERNEL_MAJOR_MINOR_PATCH/$KERNEL_RELEASE/x86_64/kernel-modules-extra-$KERNEL_MAJOR_MINOR_PATCH-$KERNEL_RELEASE.x86_64.rpm
elif [[ "main" == "${KERNEL_FLAVOR}" ]] && \
[[ "" != "${KERNEL_VERSION}" ]]; then
echo "main kernel version ${KERNEL_VERSION} to avoid upgrading kernel beyond what is in the image."
Expand Down