From 41f37db4cca2a952c69881cef4f03442c7dfd240 Mon Sep 17 00:00:00 2001 From: Jakub Kujawa Date: Thu, 28 Sep 2023 11:27:36 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=B3=20chore(*):=20Include=20openrazer?= =?UTF-8?q?=20driver=20in=20the=20OS=20image?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Containerfile | 3 +++ config/recipe.yml | 3 ++- config/scripts/openrazer.sh | 12 ++++++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 config/scripts/openrazer.sh diff --git a/Containerfile b/Containerfile index 084869aa1e..282ee9676b 100644 --- a/Containerfile +++ b/Containerfile @@ -28,6 +28,9 @@ COPY cosign.pub /usr/share/ublue-os/cosign.pub COPY --from=ghcr.io/ublue-os/bling:latest /rpms /tmp/bling/rpms COPY --from=ghcr.io/ublue-os/bling:latest /files /tmp/bling/files +# Copy the akmods from ublue-os/akmods into tmp, to be installed later +COPY --from=ghcr.io/ublue-os/akmods:${IMAGE_MAJOR_VERSION} /rpms/ /tmp/akmods/rpms + # Copy build scripts & configuration COPY build.sh /tmp/build.sh COPY config /tmp/config/ diff --git a/config/recipe.yml b/config/recipe.yml index a761fb6bcf..68daa7f1d8 100644 --- a/config/recipe.yml +++ b/config/recipe.yml @@ -20,7 +20,7 @@ modules: repos: - https://download.opensuse.org/repositories/hardware:/razer/Fedora_%OS_VERSION%/hardware:razer.repo install: - - openrazer-meta + - polychromatic remove: - firefox - firefox-langpacks @@ -44,4 +44,5 @@ modules: - type: script scripts: + - openrazer.sh - signing.sh diff --git a/config/scripts/openrazer.sh b/config/scripts/openrazer.sh new file mode 100644 index 0000000000..75dee95ba2 --- /dev/null +++ b/config/scripts/openrazer.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +set -oue pipefail + +# Only run if OS_VERSION is not 39 +if grep -qv "39" <<< "$OS_VERSION"; then + rpm-ostree install \ + kernel-devel-matched \ + kernel-tools \ + /tmp/akmods/rpms/kmods/*openrazer*.rpm \ + /tmp/akmods/rpms/kmods/*openrgb*.rpm +fi \ No newline at end of file