diff --git a/Containerfile.extra b/Containerfile.extra index ee6d9e97..51577395 100644 --- a/Containerfile.extra +++ b/Containerfile.extra @@ -53,6 +53,7 @@ RUN --mount=type=cache,dst=/var/cache/dnf \ /tmp/build-kmod-rtl8814au.sh && \ /tmp/build-kmod-rtl88xxau.sh && \ /tmp/build-kmod-ryzen-smu.sh && \ + /tmp/build-kmod-tp_smapi.sh && \ /tmp/build-kmod-vhba.sh && \ /tmp/build-kmod-VirtualBox.sh && \ /tmp/dual-sign.sh && \ diff --git a/build-kmod-tp_smapi.sh b/build-kmod-tp_smapi.sh new file mode 100755 index 00000000..df7d69de --- /dev/null +++ b/build-kmod-tp_smapi.sh @@ -0,0 +1,22 @@ +#!/bin/sh + +set -oeux pipefail + +ARCH="$(rpm -E '%_arch')" +KERNEL="$(rpm -q "${KERNEL_NAME}" --queryformat '%{VERSION}-%{RELEASE}.%{ARCH}')" +RELEASE="$(rpm -E '%fedora')" + +### Add TLP repo +dnf install -y https://repo.linrunner.de/fedora/tlp/repos/releases/tlp-release.fc$(rpm -E %fedora).noarch.rpm + +### BUILD tp_smapi (succeed or fail-fast with debug output) +if [[ "${RELEASE}" = 41 ]]; then + dnf --enablerepo=tlp-updates-testing install -y \ + "akmod-tp_smapi-*.fc${RELEASE}.${ARCH}" +else + dnf install -y \ + "akmod-tp_smapi-*.fc${RELEASE}.${ARCH}" +fi +akmods --force --kernels "${KERNEL}" --kmod tp_smapi +modinfo "/usr/lib/modules/${KERNEL}/extra/tp_smapi/tp_smapi.ko.xz" >/dev/null || + (find /var/cache/akmods/tp_smapi/ -name \*.log -print -exec cat {} \; && exit 1) diff --git a/test-prep.sh b/test-prep.sh index 724bdd1b..264f6295 100755 --- a/test-prep.sh +++ b/test-prep.sh @@ -79,6 +79,13 @@ if [[ -f $(find /tmp/akmods-rpms/kmods/kmod-nvidia-*.rpm) ]]; then sed -i "s@gpgcheck=0@gpgcheck=1@" /etc/yum.repos.d/nvidia-container-toolkit.repo fi +if [[ -f $(find /tmp/akmods-rpms/kmods/kmod-tp_smapi.rpm) ]]; then + dnf install -y https://repo.linrunner.de/fedora/tlp/repos/releases/tlp-release.fc$(rpm -E %fedora).noarch.rpm + if [[ "${RELEASE}" = 41 ]]; then + dnf config-manager --set-enabled=tlp-updates-testing + fi +fi + dnf install -y \ "${RPMFUSION_MIRROR_RPMS}"/free/fedora/rpmfusion-free-release-"${RELEASE}".noarch.rpm \ "${RPMFUSION_MIRROR_RPMS}"/nonfree/fedora/rpmfusion-nonfree-release-"${RELEASE}".noarch.rpm \