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

chore: enable Fedora 42 akmods #308

Merged
merged 10 commits into from
Mar 18, 2025
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
4 changes: 3 additions & 1 deletion .github/actions/get-kernel-version/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: Get Kernel Version
inputs:
fedora_version:
description: "The Fedora release version: 40, 41, etc"
description: "The Fedora release version: 41, 42, etc"
required: true
type: string
kernel_flavor:
Expand Down Expand Up @@ -30,6 +30,8 @@ runs:
id: kernel
shell: bash
run: |
set -x

if [[ ${{ inputs.kernel_flavor }} =~ asus|surface ]]; then
build_image="quay.io/fedora/fedora:${{ inputs.fedora_version }}"
podman pull "$build_image"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-40.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
paths-ignore:
- '**.md'
schedule:
- cron: '25 0 * * *' # 0025 UTC everyday (20 minutes after 41)
- cron: '45 0 * * *' # 0045 UTC everyday (20 minutes after 41)
workflow_dispatch:


Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-41.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
paths-ignore:
- '**.md'
schedule:
- cron: '5 0 * * *' # 0005 UTC everyday
- cron: '25 0 * * *' # 0025 UTC everyday (20 minutes after 42)
Copy link
Member

Choose a reason for hiding this comment

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

Same here? Why the change in time?

workflow_dispatch:

jobs:
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/build-42.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: ublue akmods 42
on:
merge_group:
pull_request:
branches:
- main
paths-ignore:
- '**.md'
schedule:
- cron: '5 0 * * *' # 0005 UTC everyday
workflow_dispatch:

jobs:
kernel-akmods:
uses: ./.github/workflows/reusable-build.yml
secrets: inherit
strategy:
fail-fast: false
matrix:
fedora_version:
- 42
kernel_flavor:
- main
Copy link
Contributor

Choose a reason for hiding this comment

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

add - bazzite

with:
fedora_version: ${{ matrix.fedora_version }}
kernel_flavor: ${{ matrix.kernel_flavor }}
2 changes: 1 addition & 1 deletion .github/workflows/reusable-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
workflow_call:
inputs:
fedora_version:
description: "The Fedora release version: 40, 41, etc"
description: "The Fedora release version: 41, 42, etc"
required: true
type: string
kernel_flavor:
Expand Down
4 changes: 2 additions & 2 deletions Containerfile.common
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
### Containerfile.common - used to build ONLY NON-nvidia kmods
###

ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION:-40}"
ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION:-42}"
ARG BUILDER_IMAGE="${BUILDER_IMAGE:-quay.io/fedora/fedora}"
ARG BUILDER_BASE="${BUILDER_IMAGE}:${FEDORA_MAJOR_VERSION}"
FROM ${BUILDER_BASE} AS builder

ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION:-40}"
ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION:-42}"
ARG KERNEL_FLAVOR="${KERNEL_FLAVOR:-main}"
ARG RPMFUSION_MIRROR=""
ARG DUAL_SIGN="true"
Expand Down
4 changes: 2 additions & 2 deletions Containerfile.extra
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
### Containerfile.extra - used to build extra kmods
###

ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION:-40}"
ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION:-42}"
ARG BUILDER_IMAGE="${BUILDER_IMAGE:-quay.io/fedora/fedora}"
ARG BUILDER_BASE="${BUILDER_IMAGE}:${FEDORA_MAJOR_VERSION}"
FROM ${BUILDER_BASE} AS builder

ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION:-40}"
ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION:-42}"
ARG KERNEL_FLAVOR="${KERNEL_FLAVOR:-main}"
ARG RPMFUSION_MIRROR=""
ARG DUAL_SIGN="true"
Expand Down
4 changes: 2 additions & 2 deletions Containerfile.nvidia
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
### Containerfile.nvidia - used to build ONLY NVIDIA kmods
###

ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION:-40}"
ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION:-42}"
ARG BUILDER_IMAGE="${BUILDER_IMAGE:-quay.io/fedora/fedora}"
ARG BUILDER_BASE="${BUILDER_IMAGE}:${FEDORA_MAJOR_VERSION}"
FROM ${BUILDER_BASE} AS builder

ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION:-40}"
ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION:-42}"
ARG KERNEL_FLAVOR="${KERNEL_FLAVOR:-main}"
ARG RPMFUSION_MIRROR=""
ARG DUAL_SIGN="true"
Expand Down
4 changes: 2 additions & 2 deletions Containerfile.nvidia-open
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
### Containerfile.nvidia - used to build ONLY NVIDIA kmods
###

ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION:-40}"
ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION:-42}"
ARG BUILDER_IMAGE="${BUILDER_IMAGE:-quay.io/fedora/fedora}"
ARG BUILDER_BASE="${BUILDER_IMAGE}:${FEDORA_MAJOR_VERSION}"
FROM ${BUILDER_BASE} AS builder

ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION:-40}"
ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION:-42}"
ARG KERNEL_FLAVOR="${KERNEL_FLAVOR:-main}"
ARG RPMFUSION_MIRROR=""
ARG DUAL_SIGN="true"
Expand Down
4 changes: 2 additions & 2 deletions Containerfile.test
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
### Containerfile.test - used to test akmods
###

ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION:-40}"
ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION:-42}"
ARG BUILDER_IMAGE="${BUILDER_IMAGE:-quay.io/fedora/fedora}"
ARG BUILDER_BASE="${BUILDER_IMAGE}:${FEDORA_MAJOR_VERSION}"
ARG INPUT_AKMODS="${INPUT_AKMODS:-akmods}"
Expand All @@ -11,7 +11,7 @@ ARG INPUT_BASE="${INPUT_AKMODS}:${INPUT_TAG}"
FROM ${INPUT_BASE} AS akmods_cache
FROM ${BUILDER_BASE} AS tester

ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION:-40}"
ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION:-42}"
ARG KERNEL_FLAVOR="${KERNEL_FLAVOR:-main}"
ARG RPMFUSION_MIRROR=""
ARG DUAL_SIGN="true"
Expand Down
4 changes: 2 additions & 2 deletions Containerfile.zfs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
### Containerfile.zfs - used to build ONLY ZFS kmod
###

ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION:-40}"
ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION:-42}"
ARG BUILDER_IMAGE="${BUILDER_IMAGE:-quay.io/fedora/fedora}"
ARG BUILDER_BASE="${BUILDER_IMAGE}:${FEDORA_MAJOR_VERSION}"
FROM ${BUILDER_BASE} AS builder

ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION:-40}"
ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION:-42}"
ARG KERNEL_FLAVOR="${KERNEL_FLAVOR:-coreos-stable}"
ARG DUAL_SIGN="true"
ARG RPMFUSION_MIRROR=""
Expand Down
21 changes: 13 additions & 8 deletions build_files/common/build-kmod-openrazer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,24 @@
KERNEL="$(rpm -q "${KERNEL_NAME}" --queryformat '%{VERSION}-%{RELEASE}.%{ARCH}')"
RELEASE="$(rpm -E '%fedora')"

# OpenRazer builds are broken on Fedora 42
if [[ "${FEDORA_MAJOR_VERSION}" -eq 42 ]]; then
exit 0
fi

cp /tmp/ublue-os-akmods-addons/rpmbuild/SOURCES/_copr_ublue-os-akmods.repo /etc/yum.repos.d/

### BUILD openrazer (succeed or fail-fast with debug output)
dnf install -y \
akmod-openrazer-*.fc${RELEASE}.${ARCH}
akmods --force --kernels "${KERNEL}" --kmod openrazer
modinfo /usr/lib/modules/${KERNEL}/extra/openrazer/razerkbd.ko.xz > /dev/null \
|| (find /var/cache/akmods/openrazer/ -name \*.log -print -exec cat {} \; && exit 1)
modinfo /usr/lib/modules/${KERNEL}/extra/openrazer/razermouse.ko.xz > /dev/null \
|| (find /var/cache/akmods/openrazer/ -name \*.log -print -exec cat {} \; && exit 1)
modinfo /usr/lib/modules/${KERNEL}/extra/openrazer/razerkraken.ko.xz > /dev/null \
|| (find /var/cache/akmods/openrazer/ -name \*.log -print -exec cat {} \; && exit 1)
modinfo /usr/lib/modules/${KERNEL}/extra/openrazer/razeraccessory.ko.xz > /dev/null \
|| (find /var/cache/akmods/openrazer/ -name \*.log -print -exec cat {} \; && exit 1)
modinfo /usr/lib/modules/${KERNEL}/extra/openrazer/razerkbd.ko.xz >/dev/null ||

Check warning on line 20 in build_files/common/build-kmod-openrazer.sh

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

build_files/common/build-kmod-openrazer.sh#L20

Double quote to prevent globbing and word splitting.
(find /var/cache/akmods/openrazer/ -name \*.log -print -exec cat {} \; && exit 1)
modinfo /usr/lib/modules/${KERNEL}/extra/openrazer/razermouse.ko.xz >/dev/null ||

Check warning on line 22 in build_files/common/build-kmod-openrazer.sh

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

build_files/common/build-kmod-openrazer.sh#L22

Double quote to prevent globbing and word splitting.
(find /var/cache/akmods/openrazer/ -name \*.log -print -exec cat {} \; && exit 1)
modinfo /usr/lib/modules/${KERNEL}/extra/openrazer/razerkraken.ko.xz >/dev/null ||

Check warning on line 24 in build_files/common/build-kmod-openrazer.sh

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

build_files/common/build-kmod-openrazer.sh#L24

Double quote to prevent globbing and word splitting.
(find /var/cache/akmods/openrazer/ -name \*.log -print -exec cat {} \; && exit 1)
modinfo /usr/lib/modules/${KERNEL}/extra/openrazer/razeraccessory.ko.xz >/dev/null ||

Check warning on line 26 in build_files/common/build-kmod-openrazer.sh

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

build_files/common/build-kmod-openrazer.sh#L26

Double quote to prevent globbing and word splitting.
(find /var/cache/akmods/openrazer/ -name \*.log -print -exec cat {} \; && exit 1)

rm -f /etc/yum.repos.d/_copr_ublue-os-akmods.repo
7 changes: 1 addition & 6 deletions build_files/extra/build-kmod-vhba.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,7 @@ ARCH="$(rpm -E '%_arch')"
KERNEL="$(rpm -q "${KERNEL_NAME}" --queryformat '%{VERSION}-%{RELEASE}.%{ARCH}')"
RELEASE="$(rpm -E '%fedora')"

if [[ "$RELEASE" -lt 39 ]]; then
echo "SKIPPED BUILD of vhba on Fedora $RELEASE"
exit 0
fi

if [[ "${RELEASE}" -ge 42 ]]; then
if [[ "${RELEASE}" -ge 43 ]]; then
COPR_RELEASE="rawhide"
else
COPR_RELEASE="${RELEASE}"
Expand Down
2 changes: 1 addition & 1 deletion fetch-kernel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ elif [[ "${kernel_flavor}" == "bazzite" ]]; then
# curl -LO https://github.com/bazzite-org/kernel-bazzite/releases/download/"$build_tag"/kernel-uki-virt-addons-"$kernel_version".rpm
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)"
KERNEL_RELEASE="$(echo "$kernel_version" | cut -d - -f 2 | rev | cut -d . -f 2- | rev)"
Copy link
Member Author

@p5 p5 Mar 15, 2025

Choose a reason for hiding this comment

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

We needed to slightly rework this logic to support release candidate kernel versions.

"-rc-X" was removed from the original command, causing the lookup to fail.

Copy link
Contributor

Choose a reason for hiding this comment

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

I like rev based solutions as they often end up being much simpler (and more correct) than mulitple cuts.

ARCH=$(uname -m)

# Using curl instead of dnf download for https links
Expand Down