mirror of
https://github.com/ublue-os/akmods.git
synced 2026-11-03 14:59:42 -09:00
feat: Switch to terra package for openrazer (#588)
* feat: Switch to terra package for openrazer, now auto-updates and no longer requires manual ublue intervention for updates * fix: Skip openrazer build on aarch64 Terra only publishes openrazer for x86_64. On aarch64 the build script fails at `dnf install akmod-openrazer` (no arch match) before reaching its `rm -f /etc/yum.repos.d/terra.repo` cleanup. The leaked Terra repo then stays enabled for every later script in the same layer, so `dnf download` pulls x86_64 builds of v4l2loopback and xpadneo into the shared /var/cache/rpms/common set. The final aarch64 test install then fails on the incompatible-arch RPMs. Exit early on aarch64 so the Terra repo is never added, matching the existing wl build script. --------- Co-authored-by: Benjamin Sherman <benjamin@holyarmy.org>
This commit is contained in:
parent
c30e9467fe
commit
7591c29d84
2 changed files with 12 additions and 4 deletions
|
|
@ -50,7 +50,7 @@ The `nvidia` and `nvidia-open` images contains
|
|||
| Group | Package | Description | Source |
|
||||
|-------|---------|-------------|--------|
|
||||
| common | [framework-laptop](https://github.com/DHowett/framework-laptop-kmod) | A kernel module that exposes the Framework Laptop (13, 16)'s battery charge limit and LEDs to userspace | [](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/package/framework-laptop-kmod) |
|
||||
| common | [openrazer](https://openrazer.github.io/) | kernel module adding additional features to Razer hardware | [](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/package/openrazer-kmod) |
|
||||
| common | [openrazer](https://openrazer.github.io/) | kernel module adding additional features to Razer hardware | [Terra](https://github.com/terrapkg/packages) |
|
||||
| common | [v4l2loopback](https://github.com/umlaeute/v4l2loopback) | allows creating "virtual video devices" | [RPMFusion - free](https://rpmfusion.org/) |
|
||||
| common | [wl](https://github.com/rpmfusion/broadcom-wl/) | support for some legacy broadcom wifi devices | [RPMFusion - nonfree](https://rpmfusion.org/) |
|
||||
| common | [xone](https://github.com/dlundqvist/xone) | xbox one controller USB wired/RF driver modified to work along-side xpad (built from [xonedo](https://github.com/OpenGamingCollective/xonedo) fork) | [](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/package/xone-kmod) |
|
||||
|
|
|
|||
|
|
@ -6,7 +6,15 @@ ARCH="$(rpm -E '%_arch')"
|
|||
KERNEL="$(rpm -q "${KERNEL_NAME}" --queryformat '%{VERSION}-%{RELEASE}.%{ARCH}')"
|
||||
RELEASE="$(rpm -E '%fedora')"
|
||||
|
||||
cp /tmp/ublue-os-akmods-addons/rpmbuild/SOURCES/_copr_ublue-os-akmods.repo /etc/yum.repos.d/
|
||||
# Skip for aarch64, Terra only ships openrazer for x86_64
|
||||
if [[ "${ARCH}" =~ aarch64 ]]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
cp /tmp/ublue-os-akmods-addons/rpmbuild/SOURCES/terra.repo /etc/yum.repos.d/
|
||||
curl -LsSf -o /etc/pki/rpm-gpg/RPM-GPG-KEY-terra"${RELEASE}" \
|
||||
"https://raw.githubusercontent.com/terrapkg/packages/f${RELEASE}/anda/terra/gpg-keys/RPM-GPG-KEY-terra${RELEASE}"
|
||||
rpmkeys --import /etc/pki/rpm-gpg/RPM-GPG-KEY-terra"${RELEASE}"
|
||||
|
||||
### BUILD openrazer (succeed or fail-fast with debug output)
|
||||
dnf install -y \
|
||||
|
|
@ -23,8 +31,8 @@ modinfo /usr/lib/modules/"${KERNEL}"/extra/openrazer/razeraccessory.ko.xz >/dev/
|
|||
|
||||
mkdir -p /var/cache/rpms/common
|
||||
dnf download --destdir /var/cache/rpms/common \
|
||||
openrazer-kmod-common
|
||||
openrazer
|
||||
|
||||
rm -f /var/cache/rpms/common/*.src.rpm
|
||||
|
||||
rm -f /etc/yum.repos.d/_copr_ublue-os-akmods.repo
|
||||
rm -f /etc/yum.repos.d/terra.repo
|
||||
|
|
|
|||
Loading…
Reference in a new issue