mirror of
https://github.com/ublue-os/akmods.git
synced 2026-11-03 14:59:42 -09:00
feat: Add support for OGC LTS kernel (#574)
This commit is contained in:
parent
030f543249
commit
afc983c624
6 changed files with 209 additions and 48 deletions
174
.github/workflows/build-akmods-ogc-lts.yml
vendored
Normal file
174
.github/workflows/build-akmods-ogc-lts.yml
vendored
Normal file
|
|
@ -0,0 +1,174 @@
|
|||
---
|
||||
#
|
||||
# WARNING THIS IS A GENERATED WORKFLOW. DO NOT EDIT BY HAND!
|
||||
#
|
||||
# Generate the workflow by running `just generate-workflows` at git root
|
||||
# Modify the inputs in workflow-templates
|
||||
name: Build OGC-LTS akmods
|
||||
on:
|
||||
merge_group:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
schedule:
|
||||
- cron: '16 0 * * *' # 0016 UTC everyday
|
||||
workflow_dispatch:
|
||||
jobs:
|
||||
cache_kernel_ogc-lts_44:
|
||||
name: Cache ogc-lts (44)
|
||||
uses: ./.github/workflows/reusable-cache-kernel.yml
|
||||
secrets: inherit
|
||||
permissions:
|
||||
actions: read
|
||||
contents: read
|
||||
packages: write
|
||||
with:
|
||||
architecture: '["x86_64"]'
|
||||
kernel_flavor: ogc-lts
|
||||
version: 44
|
||||
build-ogc-lts_44_common:
|
||||
name: Build common ogc-lts (44)
|
||||
uses: ./.github/workflows/reusable-build.yml
|
||||
secrets: inherit
|
||||
permissions:
|
||||
actions: read
|
||||
attestations: write
|
||||
contents: read
|
||||
id-token: write
|
||||
packages: write
|
||||
needs: cache_kernel_ogc-lts_44
|
||||
with:
|
||||
akmods_target: common
|
||||
architecture: '["x86_64"]'
|
||||
kernel_cache_key: ${{ needs.cache_kernel_ogc-lts_44.outputs.KCKEY }}
|
||||
kernel_flavor: ogc-lts
|
||||
version: 44
|
||||
build-ogc-lts_44_extra:
|
||||
name: Build extra ogc-lts (44)
|
||||
uses: ./.github/workflows/reusable-build.yml
|
||||
secrets: inherit
|
||||
permissions:
|
||||
actions: read
|
||||
attestations: write
|
||||
contents: read
|
||||
id-token: write
|
||||
packages: write
|
||||
needs: cache_kernel_ogc-lts_44
|
||||
with:
|
||||
akmods_target: extra
|
||||
architecture: '["x86_64"]'
|
||||
kernel_cache_key: ${{ needs.cache_kernel_ogc-lts_44.outputs.KCKEY }}
|
||||
kernel_flavor: ogc-lts
|
||||
version: 44
|
||||
build-ogc-lts_44_nvidia-lts:
|
||||
name: Build nvidia-lts ogc-lts (44)
|
||||
uses: ./.github/workflows/reusable-build.yml
|
||||
secrets: inherit
|
||||
permissions:
|
||||
actions: read
|
||||
attestations: write
|
||||
contents: read
|
||||
id-token: write
|
||||
packages: write
|
||||
needs: cache_kernel_ogc-lts_44
|
||||
with:
|
||||
akmods_target: nvidia-lts
|
||||
architecture: '["x86_64"]'
|
||||
kernel_cache_key: ${{ needs.cache_kernel_ogc-lts_44.outputs.KCKEY }}
|
||||
kernel_flavor: ogc-lts
|
||||
version: 44
|
||||
check-ogc-lts_44:
|
||||
name: Check ogc-lts (44)
|
||||
permissions:
|
||||
actions: read
|
||||
contents: read
|
||||
needs: [build-ogc-lts_44_common,build-ogc-lts_44_extra,build-ogc-lts_44_nvidia-lts]
|
||||
runs-on: ubuntu-24.04
|
||||
if: always()
|
||||
steps:
|
||||
- name: Check for Build Failures
|
||||
if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') || contains(needs.*.result, 'skipped')
|
||||
run: exit 1
|
||||
|
||||
- name: Exit if Success
|
||||
run: exit 0
|
||||
cache_kernel_ogc-lts_43:
|
||||
name: Cache ogc-lts (43)
|
||||
uses: ./.github/workflows/reusable-cache-kernel.yml
|
||||
secrets: inherit
|
||||
permissions:
|
||||
actions: read
|
||||
contents: read
|
||||
packages: write
|
||||
with:
|
||||
architecture: '["x86_64"]'
|
||||
kernel_flavor: ogc-lts
|
||||
version: 43
|
||||
build-ogc-lts_43_common:
|
||||
name: Build common ogc-lts (43)
|
||||
uses: ./.github/workflows/reusable-build.yml
|
||||
secrets: inherit
|
||||
permissions:
|
||||
actions: read
|
||||
attestations: write
|
||||
contents: read
|
||||
id-token: write
|
||||
packages: write
|
||||
needs: cache_kernel_ogc-lts_43
|
||||
with:
|
||||
akmods_target: common
|
||||
architecture: '["x86_64"]'
|
||||
kernel_cache_key: ${{ needs.cache_kernel_ogc-lts_43.outputs.KCKEY }}
|
||||
kernel_flavor: ogc-lts
|
||||
version: 43
|
||||
build-ogc-lts_43_extra:
|
||||
name: Build extra ogc-lts (43)
|
||||
uses: ./.github/workflows/reusable-build.yml
|
||||
secrets: inherit
|
||||
permissions:
|
||||
actions: read
|
||||
attestations: write
|
||||
contents: read
|
||||
id-token: write
|
||||
packages: write
|
||||
needs: cache_kernel_ogc-lts_43
|
||||
with:
|
||||
akmods_target: extra
|
||||
architecture: '["x86_64"]'
|
||||
kernel_cache_key: ${{ needs.cache_kernel_ogc-lts_43.outputs.KCKEY }}
|
||||
kernel_flavor: ogc-lts
|
||||
version: 43
|
||||
build-ogc-lts_43_nvidia-lts:
|
||||
name: Build nvidia-lts ogc-lts (43)
|
||||
uses: ./.github/workflows/reusable-build.yml
|
||||
secrets: inherit
|
||||
permissions:
|
||||
actions: read
|
||||
attestations: write
|
||||
contents: read
|
||||
id-token: write
|
||||
packages: write
|
||||
needs: cache_kernel_ogc-lts_43
|
||||
with:
|
||||
akmods_target: nvidia-lts
|
||||
architecture: '["x86_64"]'
|
||||
kernel_cache_key: ${{ needs.cache_kernel_ogc-lts_43.outputs.KCKEY }}
|
||||
kernel_flavor: ogc-lts
|
||||
version: 43
|
||||
check-ogc-lts_43:
|
||||
name: Check ogc-lts (43)
|
||||
permissions:
|
||||
actions: read
|
||||
contents: read
|
||||
needs: [build-ogc-lts_43_common,build-ogc-lts_43_extra,build-ogc-lts_43_nvidia-lts]
|
||||
runs-on: ubuntu-24.04
|
||||
if: always()
|
||||
steps:
|
||||
- name: Check for Build Failures
|
||||
if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') || contains(needs.*.result, 'skipped')
|
||||
run: exit 1
|
||||
|
||||
- name: Exit if Success
|
||||
run: exit 0
|
||||
38
.github/workflows/build-akmods-ogc.yml
vendored
38
.github/workflows/build-akmods-ogc.yml
vendored
|
|
@ -62,23 +62,6 @@ jobs:
|
|||
kernel_cache_key: ${{ needs.cache_kernel_ogc_43.outputs.KCKEY }}
|
||||
kernel_flavor: ogc
|
||||
version: 43
|
||||
build-ogc_43_nvidia-lts:
|
||||
name: Build nvidia-lts ogc (43)
|
||||
uses: ./.github/workflows/reusable-build.yml
|
||||
secrets: inherit
|
||||
permissions:
|
||||
actions: read
|
||||
attestations: write
|
||||
contents: read
|
||||
id-token: write
|
||||
packages: write
|
||||
needs: cache_kernel_ogc_43
|
||||
with:
|
||||
akmods_target: nvidia-lts
|
||||
architecture: '["x86_64"]'
|
||||
kernel_cache_key: ${{ needs.cache_kernel_ogc_43.outputs.KCKEY }}
|
||||
kernel_flavor: ogc
|
||||
version: 43
|
||||
build-ogc_43_nvidia-open:
|
||||
name: Build nvidia-open ogc (43)
|
||||
uses: ./.github/workflows/reusable-build.yml
|
||||
|
|
@ -101,7 +84,7 @@ jobs:
|
|||
permissions:
|
||||
actions: read
|
||||
contents: read
|
||||
needs: [build-ogc_43_common,build-ogc_43_extra,build-ogc_43_nvidia-lts,build-ogc_43_nvidia-open]
|
||||
needs: [build-ogc_43_common,build-ogc_43_extra,build-ogc_43_nvidia-open]
|
||||
runs-on: ubuntu-24.04
|
||||
if: always()
|
||||
steps:
|
||||
|
|
@ -157,23 +140,6 @@ jobs:
|
|||
kernel_cache_key: ${{ needs.cache_kernel_ogc_44.outputs.KCKEY }}
|
||||
kernel_flavor: ogc
|
||||
version: 44
|
||||
build-ogc_44_nvidia-lts:
|
||||
name: Build nvidia-lts ogc (44)
|
||||
uses: ./.github/workflows/reusable-build.yml
|
||||
secrets: inherit
|
||||
permissions:
|
||||
actions: read
|
||||
attestations: write
|
||||
contents: read
|
||||
id-token: write
|
||||
packages: write
|
||||
needs: cache_kernel_ogc_44
|
||||
with:
|
||||
akmods_target: nvidia-lts
|
||||
architecture: '["x86_64"]'
|
||||
kernel_cache_key: ${{ needs.cache_kernel_ogc_44.outputs.KCKEY }}
|
||||
kernel_flavor: ogc
|
||||
version: 44
|
||||
build-ogc_44_nvidia-open:
|
||||
name: Build nvidia-open ogc (44)
|
||||
uses: ./.github/workflows/reusable-build.yml
|
||||
|
|
@ -196,7 +162,7 @@ jobs:
|
|||
permissions:
|
||||
actions: read
|
||||
contents: read
|
||||
needs: [build-ogc_44_common,build-ogc_44_extra,build-ogc_44_nvidia-lts,build-ogc_44_nvidia-open]
|
||||
needs: [build-ogc_44_common,build-ogc_44_extra,build-ogc_44_nvidia-open]
|
||||
runs-on: ubuntu-24.04
|
||||
if: always()
|
||||
steps:
|
||||
|
|
|
|||
7
Justfile
7
Justfile
|
|
@ -10,7 +10,8 @@ KCWD := shell('mkdir -p $1 && echo $1', version_cache / 'KCWD')
|
|||
KCPATH := shell('mkdir -p $1 && echo $1', env('KCPATH', KCWD / 'rpms'))
|
||||
version_json := KCPATH / 'cache.json'
|
||||
builder := if kernel_flavor =~ 'centos' { 'quay.io/centos/centos:' + version } else { 'quay.io/fedora/fedora:' + version }
|
||||
ogc_image := "ghcr.io/opengamingcollective/kernel-packages-fedora:7.2-rc7-ogc6.1-fc" + version
|
||||
ogc_tag := if kernel_flavor == 'ogc-lts' { 'lts' } else { '7.2-rc7-ogc6.1' }
|
||||
ogc_image := "ghcr.io/opengamingcollective/kernel-packages-fedora:" + ogc_tag + "-fc" + version
|
||||
|
||||
|
||||
# Inputs
|
||||
|
|
@ -226,7 +227,7 @@ get-kernel-version:
|
|||
linux=$($dnf repoquery --whatprovides kernel-longterm | sort -V | tail -n1 | sed 's/.*://')
|
||||
kernel_name=kernel-longterm
|
||||
;;
|
||||
"ogc")
|
||||
"ogc"|"ogc-lts")
|
||||
ogc_manifest=$(skopeo inspect --raw "docker://{{ ogc_image }}")
|
||||
linux=$(echo "$ogc_manifest" | jq -r '
|
||||
.layers[].annotations["org.opencontainers.image.title"]
|
||||
|
|
@ -251,7 +252,7 @@ get-kernel-version:
|
|||
minor=$(echo "$linux" | cut -d '.' -f 2)
|
||||
patch=$(echo "$linux" | cut -d '.' -f 3)
|
||||
kernel_major_minor_patch="${major}.${minor}.${patch}"
|
||||
if [[ "{{ kernel_flavor }}" == "ogc" ]]; then
|
||||
if [[ "{{ kernel_flavor }}" =~ ^ogc ]]; then
|
||||
kernel_major_minor_patch=$(echo "$linux" | sed 's/\.fc.*$//')
|
||||
fi
|
||||
linux="$(echo $linux | tr -d '[:cntrl:]')"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# ublue-os akmods
|
||||
|
||||
[](https://scorecard.dev/viewer/?uri=github.com/ublue-os/akmods)[](https://github.com/ublue-os/akmods/actions/workflows/build-akmods-centos.yml)[](https://github.com/ublue-os/akmods/actions/workflows/build-akmods-coreos-stable.yml)[](https://github.com/ublue-os/akmods/actions/workflows/build-akmods-coreos-testing.yml)[](https://github.com/ublue-os/akmods/actions/workflows/build-akmods-longterm-6.18.yml)[](https://github.com/ublue-os/akmods/actions/workflows/build-akmods-ogc.yml)[](https://github.com/ublue-os/akmods/actions/workflows/build-akmods-main.yml)
|
||||
[](https://scorecard.dev/viewer/?uri=github.com/ublue-os/akmods)[](https://github.com/ublue-os/akmods/actions/workflows/build-akmods-centos.yml)[](https://github.com/ublue-os/akmods/actions/workflows/build-akmods-coreos-stable.yml)[](https://github.com/ublue-os/akmods/actions/workflows/build-akmods-coreos-testing.yml)[](https://github.com/ublue-os/akmods/actions/workflows/build-akmods-longterm-6.18.yml)[](https://github.com/ublue-os/akmods/actions/workflows/build-akmods-ogc.yml)[](https://github.com/ublue-os/akmods/actions/workflows/build-akmods-ogc-lts.yml)[](https://github.com/ublue-os/akmods/actions/workflows/build-akmods-main.yml)
|
||||
|
||||
OCI images providing a set of cached kernel RPMs and extra kernel modules to Universal Blue images. Used for better hardware support and consistent build process.
|
||||
|
||||
|
|
@ -25,6 +25,8 @@ Builds also run for different kernels:
|
|||
- `coreos-testing` - Current Fedora CoreOS testing kernel version
|
||||
- `Centos` - Mainline Centos Kernel
|
||||
- `Longterm-6.18` - Fedora Kernel on Kernel 6.18 LTS
|
||||
- `ogc` - [Open Gaming Collective](https://github.com/OpenGamingCollective/kernel-packages-fedora) kernel
|
||||
- `ogc-lts` - Open Gaming Collective kernel, LTS branch (`:lts` tag)
|
||||
|
||||
See `images.yaml` for which akmods packages are built for each Kernel
|
||||
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ case "$kernel_flavor" in
|
|||
"longterm"*)
|
||||
dnf -y copr enable kwizart/kernel-"${kernel_flavor}"
|
||||
;;
|
||||
"ogc")
|
||||
"ogc"|"ogc-lts")
|
||||
;;
|
||||
*)
|
||||
echo "unexpected kernel_flavor ${kernel_flavor} for query" >&2
|
||||
|
|
@ -74,7 +74,7 @@ elif [[ "${kernel_flavor}" =~ "longterm" ]]; then
|
|||
kernel-longterm-modules-extra-"${kernel_version}" \
|
||||
kernel-longterm-devel-"${kernel_version}" \
|
||||
kernel-longterm-devel-matched-"${kernel_version}"
|
||||
elif [[ "${kernel_flavor}" == "ogc" ]]; then
|
||||
elif [[ "${kernel_flavor}" =~ ^ogc ]]; then
|
||||
ogc_image="${OGC_IMAGE:?OGC_IMAGE env var must be set}"
|
||||
dnf install -y --setopt=install_weak_deps=False jq skopeo golang-oras
|
||||
|
||||
|
|
@ -135,7 +135,7 @@ install -Dm644 "${KCWD}"/certs/public_key.crt "$PUBLIC_KEY_PATH"
|
|||
install -Dm644 "${KCWD}"/certs/private_key.priv "$PRIVATE_KEY_PATH"
|
||||
|
||||
ls -la /
|
||||
if [[ "${kernel_flavor}" == "centos-kmodsig" ]] || [[ "${kernel_flavor}" == "ogc" ]]; then
|
||||
if [[ "${kernel_flavor}" == "centos-kmodsig" ]] || [[ "${kernel_flavor}" =~ ^ogc ]]; then
|
||||
dnf install -y \
|
||||
/"${kernel_name}-$kernel_version.rpm" \
|
||||
/"${kernel_name}-core-$kernel_version.rpm" \
|
||||
|
|
|
|||
28
images.yaml
28
images.yaml
|
|
@ -76,17 +76,29 @@ ogc-desktop-build-group-only-x86: &ogc-desktop-build-group-only-x86
|
|||
- *akmods-base
|
||||
- *akmods-extra
|
||||
- *arch-only-x86
|
||||
nvidia-lts:
|
||||
!!merge <<:
|
||||
- *akmods-base
|
||||
- *akmods-nvidia-lts
|
||||
- *arch-only-x86
|
||||
nvidia-open:
|
||||
!!merge <<:
|
||||
- *akmods-base
|
||||
- *akmods-nvidia-open
|
||||
- *arch-only-x86
|
||||
|
||||
ogc-lts-desktop-build-group-only-x86: &ogc-lts-desktop-build-group-only-x86
|
||||
common:
|
||||
!!merge <<:
|
||||
- *akmods-base
|
||||
- *akmods-common
|
||||
- *arch-only-x86
|
||||
extra:
|
||||
!!merge <<:
|
||||
- *akmods-base
|
||||
- *akmods-extra
|
||||
- *arch-only-x86
|
||||
nvidia-lts:
|
||||
!!merge <<:
|
||||
- *akmods-base
|
||||
- *akmods-nvidia-lts
|
||||
- *arch-only-x86
|
||||
|
||||
desktop-build-group: &desktop-build-group
|
||||
common:
|
||||
!!merge <<:
|
||||
|
|
@ -150,6 +162,9 @@ images:
|
|||
ogc:
|
||||
!!merge <<:
|
||||
- *ogc-desktop-build-group-only-x86
|
||||
ogc-lts:
|
||||
!!merge <<:
|
||||
- *ogc-lts-desktop-build-group-only-x86
|
||||
coreos-stable:
|
||||
!!merge <<:
|
||||
- *desktop-build-group
|
||||
|
|
@ -161,6 +176,9 @@ images:
|
|||
ogc:
|
||||
!!merge <<:
|
||||
- *ogc-desktop-build-group-only-x86
|
||||
ogc-lts:
|
||||
!!merge <<:
|
||||
- *ogc-lts-desktop-build-group-only-x86
|
||||
coreos-stable:
|
||||
!!merge <<:
|
||||
- *desktop-build-group
|
||||
|
|
|
|||
Loading…
Reference in a new issue