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: enable Fedora 41 builds #27

Merged
merged 7 commits into from
Oct 2, 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
12 changes: 12 additions & 0 deletions .github/workflows/reusable-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ jobs:
fedora_version:
- 39
- 40
- 41
exclude:
- fedora_version: 39
kernel_flavor: asus
Expand All @@ -46,6 +47,16 @@ jobs:
kernel_flavor: fsync
- fedora_version: 39
kernel_flavor: fsync-ba
- fedora_version: 41
kernel_flavor: fsync
- fedora_version: 41
kernel_flavor: fsync-ba
- fedora_version: 41
kernel_flavor: coreos-stable
- fedora_version: 41
kernel_flavor: coreos-testing
- fedora_version: 41
kernel_flavor: surface

steps:
- name: Checkout Push to Registry action
Expand Down Expand Up @@ -89,6 +100,7 @@ jobs:
echo "Querying koji for ${coreos_version} kernel: $kernel_version"
echo "$URL"
HTTP_RESP=$(curl -sI "$URL" | grep ^HTTP)
linux=""
if grep -qv "200 OK" <<< "${HTTP_RESP}"; then
echo "Koji failed to find $coreos_version kernel: $kernel_version"
case "$kernel_rel_part" in
Expand Down
28 changes: 15 additions & 13 deletions fetch.sh
m2Giles marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -eoux pipefail
kernel_version="${KERNEL_VERSION}"
kernel_flavor="${KERNEL_FLAVOR}"

#CoreOS pool repo
# CoreOS pool repo
# curl -LsSf -o /etc/yum.repos.d/fedora-coreos-pool.repo \
# https://raw.githubusercontent.com/coreos/fedora-coreos-config/testing-devel/fedora-coreos-pool.repo

Expand Down Expand Up @@ -58,20 +58,19 @@ elif [[ "${kernel_flavor}" == "surface" ]]; then
libwacom-surface \
libwacom-surface-data


else
KERNEL_MAJOR_MINOR_PATCH=$(echo "$kernel_version" | cut -d '-' -f 1)
KERNEL_RELEASE="$(echo "$kernel_version" | cut -d - -f 2 | cut -d . -f 1).$(echo "$kernel_version" | cut -d - -f 2 | cut -d . -f 2)"
ARCH=$(uname -m)
dnf download -y \
https://kojipkgs.fedoraproject.org//packages/kernel/"$KERNEL_MAJOR_MINOR_PATCH"/"$KERNEL_RELEASE"/"$ARCH"/kernel-"$kernel_version".rpm \
https://kojipkgs.fedoraproject.org//packages/kernel/"$KERNEL_MAJOR_MINOR_PATCH"/"$KERNEL_RELEASE"/"$ARCH"/kernel-modules-"$kernel_version".rpm \
https://kojipkgs.fedoraproject.org//packages/kernel/"$KERNEL_MAJOR_MINOR_PATCH"/"$KERNEL_RELEASE"/"$ARCH"/kernel-modules-core-"$kernel_version".rpm \
https://kojipkgs.fedoraproject.org//packages/kernel/"$KERNEL_MAJOR_MINOR_PATCH"/"$KERNEL_RELEASE"/"$ARCH"/kernel-modules-extra-"$kernel_version".rpm \
https://kojipkgs.fedoraproject.org//packages/kernel/"$KERNEL_MAJOR_MINOR_PATCH"/"$KERNEL_RELEASE"/"$ARCH"/kernel-devel-"$kernel_version".rpm \
https://kojipkgs.fedoraproject.org//packages/kernel/"$KERNEL_MAJOR_MINOR_PATCH"/"$KERNEL_RELEASE"/"$ARCH"/kernel-devel-matched-"$kernel_version".rpm \
https://kojipkgs.fedoraproject.org//packages/kernel/"$KERNEL_MAJOR_MINOR_PATCH"/"$KERNEL_RELEASE"/"$ARCH"/kernel-uki-virt-"$kernel_version".rpm


# Using curl instead of dnf download for https links
curl -LO https://kojipkgs.fedoraproject.org//packages/kernel/"$KERNEL_MAJOR_MINOR_PATCH"/"$KERNEL_RELEASE"/"$ARCH"/kernel-"$kernel_version".rpm
curl -LO https://kojipkgs.fedoraproject.org//packages/kernel/"$KERNEL_MAJOR_MINOR_PATCH"/"$KERNEL_RELEASE"/"$ARCH"/kernel-modules-"$kernel_version".rpm
curl -LO https://kojipkgs.fedoraproject.org//packages/kernel/"$KERNEL_MAJOR_MINOR_PATCH"/"$KERNEL_RELEASE"/"$ARCH"/kernel-modules-core-"$kernel_version".rpm
curl -LO https://kojipkgs.fedoraproject.org//packages/kernel/"$KERNEL_MAJOR_MINOR_PATCH"/"$KERNEL_RELEASE"/"$ARCH"/kernel-modules-extra-"$kernel_version".rpm
curl -LO https://kojipkgs.fedoraproject.org//packages/kernel/"$KERNEL_MAJOR_MINOR_PATCH"/"$KERNEL_RELEASE"/"$ARCH"/kernel-devel-"$kernel_version".rpm
curl -LO https://kojipkgs.fedoraproject.org//packages/kernel/"$KERNEL_MAJOR_MINOR_PATCH"/"$KERNEL_RELEASE"/"$ARCH"/kernel-devel-matched-"$kernel_version".rpm
curl -LO https://kojipkgs.fedoraproject.org//packages/kernel/"$KERNEL_MAJOR_MINOR_PATCH"/"$KERNEL_RELEASE"/"$ARCH"/kernel-uki-virt-"$kernel_version".rpm
fi

if [[ "${kernel_flavor}" =~ fsync|fsync-ba ]]; then
Expand All @@ -93,6 +92,7 @@ openssl x509 -in /tmp/certs/public_key.der -out /tmp/certs/public_key.crt
install -Dm644 /tmp/certs/public_key.crt "$PUBLIC_KEY_PATH"
install -Dm644 /tmp/certs/private_key.priv "$PRIVATE_KEY_PATH"

ls -la /
if [[ "${kernel_flavor}" =~ asus|fsync|fsync-ba ]]; then
dnf install -y \
/kernel-"$kernel_version".rpm \
Expand Down Expand Up @@ -154,9 +154,11 @@ if [[ ${DUAL_SIGN:-} == "true" ]]; then
rm -f "$SECOND_PRIVATE_KEY_PATH" "$SECOND_PUBLIC_KEY_PATH"
fi

ln -s / /tmp/buildroot

# Rebuild RPMs and Verify
if [[ "${kernel_flavor}" =~ surface ]]; then
rpmrebuild --batch kernel-surface-core-"${kernel_version}"
rpmrebuild --additional=--buildroot=/tmp/buildroot --batch kernel-surface-core-"${kernel_version}"
rm -f /usr/lib/modules/"${kernel_version}"/vmlinuz
dnf reinstall -y \
/kernel-surface-"$kernel_version".rpm \
Expand All @@ -165,7 +167,7 @@ if [[ "${kernel_flavor}" =~ surface ]]; then
/kernel-surface-modules-extra-"$kernel_version".rpm \
/root/rpmbuild/RPMS/"$(uname -m)"/kernel-*.rpm
else
rpmrebuild --batch kernel-core-"${kernel_version}"
rpmrebuild --additional=--buildroot=/tmp/buildroot --batch kernel-core-"${kernel_version}"
rm -f /usr/lib/modules/"${kernel_version}"/vmlinuz
dnf reinstall -y \
/kernel-"$kernel_version".rpm \
Expand Down