From 749b769fe50d0bb70af5c72a2f6a37bd8bb520d6 Mon Sep 17 00:00:00 2001 From: Antheas Kapenekakis Date: Sun, 20 Oct 2024 01:01:02 +0200 Subject: [PATCH 1/6] feat: rename kmods to not include kernel name --- Containerfile.common | 8 ++++++++ Containerfile.extra | 8 ++++++++ Containerfile.nvidia | 8 ++++++++ Containerfile.nvidia-open | 8 ++++++++ 4 files changed, 32 insertions(+) diff --git a/Containerfile.common b/Containerfile.common index 1e4e6da1..5c6b88e3 100644 --- a/Containerfile.common +++ b/Containerfile.common @@ -61,6 +61,14 @@ RUN --mount=type=cache,dst=/var/cache/dnf \ done && \ find /var/cache/rpms +# Remove kernel version from kmod package names +# FIXME: This will only work for 6.* kernels unfortunately +RUN set -e; for rpm in $(find /var/cache/rpms/kmods -type f -name \*.rpm); do \ + basename=$(basename ${rpm}); \ + name=${basename%%-6*}; \ + fpm -s rpm -t rpm -p ${rpm} -f --name ${name} ${rpm}; \ + done + FROM scratch COPY --from=builder /var/cache/rpms /rpms diff --git a/Containerfile.extra b/Containerfile.extra index 62a6744e..2fcc02ab 100644 --- a/Containerfile.extra +++ b/Containerfile.extra @@ -61,6 +61,14 @@ RUN --mount=type=cache,dst=/var/cache/dnf \ done && \ find /var/cache/rpms +# Remove kernel version from kmod package names +# FIXME: This will only work for 6.* kernels unfortunately +RUN set -e; for rpm in $(find /var/cache/rpms/kmods -type f -name \*.rpm); do \ + basename=$(basename ${rpm}); \ + name=${basename%%-6*}; \ + fpm -s rpm -t rpm -p ${rpm} -f --name ${name} ${rpm}; \ + done + FROM scratch COPY --from=builder /var/cache/rpms /rpms diff --git a/Containerfile.nvidia b/Containerfile.nvidia index 6569f72a..63da8f21 100644 --- a/Containerfile.nvidia +++ b/Containerfile.nvidia @@ -58,6 +58,14 @@ RUN --mount=type=cache,dst=/var/cache/dnf \ done && \ find /var/cache/rpms +# Remove kernel version from kmod package names +# FIXME: This will only work for 6.* kernels unfortunately +RUN set -e; for rpm in $(find /var/cache/rpms/kmods -type f -name \*.rpm); do \ + basename=$(basename ${rpm}); \ + name=${basename%%-6*}; \ + fpm -s rpm -t rpm -p ${rpm} -f --name ${name} ${rpm}; \ + done + FROM scratch COPY --from=builder /var/cache/rpms /rpms diff --git a/Containerfile.nvidia-open b/Containerfile.nvidia-open index 71f008de..f869bcd0 100644 --- a/Containerfile.nvidia-open +++ b/Containerfile.nvidia-open @@ -58,6 +58,14 @@ RUN --mount=type=cache,dst=/var/cache/dnf \ done && \ find /var/cache/rpms +# Remove kernel version from kmod package names +# FIXME: This will only work for 6.* kernels unfortunately +RUN set -e; for rpm in $(find /var/cache/rpms/kmods -type f -name \*.rpm); do \ + basename=$(basename ${rpm}); \ + name=${basename%%-6*}; \ + fpm -s rpm -t rpm -p ${rpm} -f --name ${name} ${rpm}; \ + done + FROM scratch COPY --from=builder /var/cache/rpms /rpms From 0501278efaf041a31d84d241c47c19d7ef935fbc Mon Sep 17 00:00:00 2001 From: Antheas Kapenekakis Date: Sun, 20 Oct 2024 01:01:12 +0200 Subject: [PATCH 2/6] feat: bundle akmods into resulting image --- build-kmod-VirtualBox.sh | 4 +++- build-kmod-ayaneo-platform.sh | 4 +++- build-kmod-ayn-platform.sh | 4 +++- build-kmod-bmi260.sh | 4 +++- build-kmod-evdi.sh | 4 +++- build-kmod-facetimehd.sh | 4 +++- build-kmod-gcadapter_oc.sh | 4 +++- build-kmod-kvmfr.sh | 4 +++- build-kmod-nct6687d.sh | 4 +++- build-kmod-nvidia.sh | 4 +++- build-kmod-openrazer.sh | 4 +++- build-kmod-rtl8814au.sh | 4 +++- build-kmod-rtl88xxau.sh | 4 +++- build-kmod-ryzen-smu.sh | 4 +++- build-kmod-v4l2loopback.sh | 4 +++- build-kmod-vhba.sh | 4 +++- build-kmod-wl.sh | 4 +++- build-kmod-xone.sh | 4 +++- build-kmod-xpadneo.sh | 4 +++- build-kmod-zenergy.sh | 4 +++- build-prep.sh | 9 +++++++-- 21 files changed, 67 insertions(+), 22 deletions(-) diff --git a/build-kmod-VirtualBox.sh b/build-kmod-VirtualBox.sh index fb39454c..91f44ce5 100755 --- a/build-kmod-VirtualBox.sh +++ b/build-kmod-VirtualBox.sh @@ -8,8 +8,10 @@ RELEASE="$(rpm -E '%fedora')" ### BUILD VirtualBox (succeed or fail-fast with debug output) -dnf install -y \ +dnf download -y --destdir /var/cache/rpms/akmods \ akmod-VirtualBox-*.fc${RELEASE}.${ARCH} +dnf install -y \ + /var/cache/rpms/akmods/akmod-VirtualBox-*.rpm akmods --force --kernels "${KERNEL}" --kmod VirtualBox modinfo /usr/lib/modules/${KERNEL}/extra/VirtualBox/{vboxdrv,vboxnetadp,vboxnetflt}.ko.xz > /dev/null \ || (find /var/cache/akmods/VirtualBox/ -name \*.log -print -exec cat {} \; && exit 1) diff --git a/build-kmod-ayaneo-platform.sh b/build-kmod-ayaneo-platform.sh index 18453756..26033357 100755 --- a/build-kmod-ayaneo-platform.sh +++ b/build-kmod-ayaneo-platform.sh @@ -8,8 +8,10 @@ RELEASE="$(rpm -E '%fedora')" cp /tmp/ublue-os-akmods-addons/rpmbuild/SOURCES/_copr_ublue-os-akmods.repo /etc/yum.repos.d/ -dnf install -y \ +dnf download -y --destdir /var/cache/rpms/akmods \ akmod-ayaneo-platform-*.fc${RELEASE}.${ARCH} +dnf install -y \ + /var/cache/rpms/akmods/akmod-ayaneo-platform-*.rpm akmods --force --kernels "${KERNEL}" --kmod ayaneo-platform modinfo /usr/lib/modules/${KERNEL}/extra/ayaneo-platform/ayaneo-platform.ko.xz > /dev/null \ || (find /var/cache/akmods/ayaneo-platform/ -name \*.log -print -exec cat {} \; && exit 1) diff --git a/build-kmod-ayn-platform.sh b/build-kmod-ayn-platform.sh index e739005e..f45ddf62 100755 --- a/build-kmod-ayn-platform.sh +++ b/build-kmod-ayn-platform.sh @@ -8,8 +8,10 @@ RELEASE="$(rpm -E '%fedora')" cp /tmp/ublue-os-akmods-addons/rpmbuild/SOURCES/_copr_ublue-os-akmods.repo /etc/yum.repos.d/ -dnf install -y \ +dnf download -y --destdir /var/cache/rpms/akmods \ akmod-ayn-platform-*.fc${RELEASE}.${ARCH} +dnf install -y \ + /var/cache/rpms/akmods/akmod-ayn-platform-*.rpm akmods --force --kernels "${KERNEL}" --kmod ayn-platform modinfo /usr/lib/modules/${KERNEL}/extra/ayn-platform/ayn-platform.ko.xz > /dev/null \ || (find /var/cache/akmods/ayn-platform/ -name \*.log -print -exec cat {} \; && exit 1) diff --git a/build-kmod-bmi260.sh b/build-kmod-bmi260.sh index 5e6f3ef2..f539d903 100755 --- a/build-kmod-bmi260.sh +++ b/build-kmod-bmi260.sh @@ -8,8 +8,10 @@ RELEASE="$(rpm -E '%fedora')" cp /tmp/ublue-os-akmods-addons/rpmbuild/SOURCES/_copr_ublue-os-akmods.repo /etc/yum.repos.d/ -dnf install -y \ +dnf download -y --destdir /var/cache/rpms/akmods \ akmod-bmi260-*.fc${RELEASE}.${ARCH} +dnf install -y \ + /var/cache/rpms/akmods/akmod-bmi260-*.rpm akmods --force --kernels "${KERNEL}" --kmod bmi260 modinfo /usr/lib/modules/${KERNEL}/extra/bmi260/bmi260_{core,i2c}.ko.xz > /dev/null \ || (find /var/cache/akmods/bmi260/ -name \*.log -print -exec cat {} \; && exit 1) diff --git a/build-kmod-evdi.sh b/build-kmod-evdi.sh index b2785f05..0a35df3b 100755 --- a/build-kmod-evdi.sh +++ b/build-kmod-evdi.sh @@ -19,8 +19,10 @@ set -e pipefail ### BUILD evdi (succeed or fail-fast with debug output) export CFLAGS="-fno-pie -no-pie" -dnf install -y \ +dnf download -y --destdir /var/cache/rpms/akmods \ kmod-evdi*.fc"${RELEASE}.${ARCH}" akmod-evdi-*.fc"${RELEASE}.${ARCH}" +dnf install -y \ + /var/cache/rpms/akmods/kmod-evdi*.rpm /var/cache/rpms/akmods/akmod-evdi-*.rpm akmods --force --kernels "${KERNEL}" --kmod evdi modinfo /usr/lib/modules/"${KERNEL}"/extra/evdi/evdi.ko.xz >/dev/null || (find /var/cache/akmods/evdi/ -name \*.log -print -exec cat {} \; && exit 1) diff --git a/build-kmod-facetimehd.sh b/build-kmod-facetimehd.sh index d42e099c..a4741400 100755 --- a/build-kmod-facetimehd.sh +++ b/build-kmod-facetimehd.sh @@ -16,8 +16,10 @@ curl -LsSf -o /etc/yum.repos.d/_copr_mulderje-facetimehd-kmod.repo \ "https://copr.fedorainfracloud.org/coprs/mulderje/facetimehd-kmod/repo/fedora-${COPR_RELEASE}/mulderje-facetimehd-kmod-fedora-${COPR_RELEASE}.repo" ### BUILD facetimehd (succeed or fail-fast with debug output) -dnf install -y \ +dnf download -y --destdir /var/cache/rpms/akmods \ akmod-facetimehd-*.fc${RELEASE}.${ARCH} +dnf install -y \ + /var/cache/rpms/akmods/akmod-facetimehd-*.rpm akmods --force --kernels "${KERNEL}" --kmod facetimehd modinfo "/usr/lib/modules/${KERNEL}/extra/facetimehd/facetimehd.ko.xz" > /dev/null \ || (find /var/cache/akmods/facetimehd/ -name \*.log -print -exec cat {} \; && exit 1) diff --git a/build-kmod-gcadapter_oc.sh b/build-kmod-gcadapter_oc.sh index 6a51af23..d32739b4 100755 --- a/build-kmod-gcadapter_oc.sh +++ b/build-kmod-gcadapter_oc.sh @@ -8,8 +8,10 @@ RELEASE="$(rpm -E '%fedora')" cp /tmp/ublue-os-akmods-addons/rpmbuild/SOURCES/_copr_ublue-os-akmods.repo /etc/yum.repos.d/ -dnf install -y \ +dnf download -y --destdir /var/cache/rpms/akmods \ akmod-gcadapter_oc-*.fc${RELEASE}.${ARCH} +dnf install -y \ + /var/cache/rpms/akmods/akmod-gcadapter_oc-*.rpm akmods --force --kernels "${KERNEL}" --kmod gcadapter_oc modinfo /usr/lib/modules/${KERNEL}/extra/gcadapter_oc/gcadapter_oc.ko.xz > /dev/null \ || (find /var/cache/akmods/gcadapter_oc/ -name \*.log -print -exec cat {} \; && exit 1) diff --git a/build-kmod-kvmfr.sh b/build-kmod-kvmfr.sh index c9b6ca14..b98ba60d 100755 --- a/build-kmod-kvmfr.sh +++ b/build-kmod-kvmfr.sh @@ -15,8 +15,10 @@ fi curl -LsSf -o /etc/yum.repos.d/_copr_hikariknight-looking-glass-kvmfr.repo "https://copr.fedorainfracloud.org/coprs/hikariknight/looking-glass-kvmfr/repo/fedora-${COPR_RELEASE}/hikariknight-looking-glass-kvmfr-fedora-${COPR_RELEASE}.repo" ### BUILD kvmfr (succeed or fail-fast with debug output) -dnf install -y \ +dnf download -y --destdir /var/cache/rpms/akmods \ "akmod-kvmfr-*.fc${RELEASE}.${ARCH}" +dnf install -y \ + /var/cache/rpms/akmods/akmod-kvmfr-*.rpm akmods --force --kernels "${KERNEL}" --kmod kvmfr modinfo "/usr/lib/modules/${KERNEL}/extra/kvmfr/kvmfr.ko.xz" > /dev/null \ || (find /var/cache/akmods/kvmfr/ -name \*.log -print -exec cat {} \; && exit 1) diff --git a/build-kmod-nct6687d.sh b/build-kmod-nct6687d.sh index 717cf920..2d2e65d9 100755 --- a/build-kmod-nct6687d.sh +++ b/build-kmod-nct6687d.sh @@ -9,8 +9,10 @@ RELEASE="$(rpm -E '%fedora')" cp /tmp/ublue-os-akmods-addons/rpmbuild/SOURCES/_copr_ublue-os-akmods.repo /etc/yum.repos.d/ ### BUILD nct6687d (succeed or fail-fast with debug output) -dnf install -y \ +dnf download -y --destdir /var/cache/rpms/akmods \ akmod-nct6687d-*.fc${RELEASE}.${ARCH} +dnf install -y \ + /var/cache/rpms/akmods/akmod-nct6687d-*.rpm akmods --force --kernels "${KERNEL}" --kmod nct6687d modinfo /usr/lib/modules/${KERNEL}/extra/nct6687d/nct6687.ko.xz > /dev/null \ || (find /var/cache/akmods/nct6687d/ -name \*.log -print -exec cat {} \; && exit 1) diff --git a/build-kmod-nvidia.sh b/build-kmod-nvidia.sh index 64f50fc1..10ad33af 100755 --- a/build-kmod-nvidia.sh +++ b/build-kmod-nvidia.sh @@ -13,8 +13,10 @@ cd /tmp sed -i 's/enabled=1/enabled=0/' /etc/yum.repos.d/rpmfusion-*.repo cp /tmp/ublue-os-nvidia-addons/rpmbuild/SOURCES/negativo17-fedora-nvidia.repo /etc/yum.repos.d/ -dnf install -y \ +dnf download -y --destdir /var/cache/rpms/akmods \ akmod-nvidia*.fc${RELEASE} +dnf install -y \ + /var/cache/rpms/akmods/akmod-nvidia*.rpm # Either successfully build and install the kernel modules, or fail early with debug output rpm -qa |grep nvidia diff --git a/build-kmod-openrazer.sh b/build-kmod-openrazer.sh index ce10df82..715b9add 100755 --- a/build-kmod-openrazer.sh +++ b/build-kmod-openrazer.sh @@ -9,8 +9,10 @@ RELEASE="$(rpm -E '%fedora')" 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 \ +dnf download -y --destdir /var/cache/rpms/akmods \ akmod-openrazer-*.fc${RELEASE}.${ARCH} +dnf install -y \ + /var/cache/rpms/akmods/akmod-openrazer-*.rpm 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) diff --git a/build-kmod-rtl8814au.sh b/build-kmod-rtl8814au.sh index ca02b96b..4a8f68e4 100755 --- a/build-kmod-rtl8814au.sh +++ b/build-kmod-rtl8814au.sh @@ -13,8 +13,10 @@ fi cp /tmp/ublue-os-akmods-addons/rpmbuild/SOURCES/_copr_ublue-os-akmods.repo /etc/yum.repos.d/ -dnf install -y \ +dnf download -y --destdir /var/cache/rpms/akmods \ akmod-rtl8814au-*.fc${RELEASE}.${ARCH} +dnf install -y \ + /var/cache/rpms/akmods/akmod-rtl8814au-*.rpm akmods --force --kernels "${KERNEL}" --kmod rtl8814au modinfo /usr/lib/modules/${KERNEL}/extra/rtl8814au/rtl8814au.ko.xz > /dev/null \ || (find /var/cache/akmods/rtl8814au/ -name \*.log -print -exec cat {} \; && exit 1) diff --git a/build-kmod-rtl88xxau.sh b/build-kmod-rtl88xxau.sh index c508a0e4..e8e0b237 100755 --- a/build-kmod-rtl88xxau.sh +++ b/build-kmod-rtl88xxau.sh @@ -13,8 +13,10 @@ fi cp /tmp/ublue-os-akmods-addons/rpmbuild/SOURCES/_copr_ublue-os-akmods.repo /etc/yum.repos.d/ -dnf install -y \ +dnf download -y --destdir /var/cache/rpms/akmods \ akmod-rtl88xxau-*.fc${RELEASE}.${ARCH} +dnf install -y \ + /var/cache/rpms/akmods/akmod-rtl88xxau-*.rpm akmods --force --kernels "${KERNEL}" --kmod rtl88xxau modinfo /usr/lib/modules/${KERNEL}/extra/rtl88xxau/88XXau.ko.xz > /dev/null \ || (find /var/cache/akmods/rtl88xxau/ -name \*.log -print -exec cat {} \; && exit 1) diff --git a/build-kmod-ryzen-smu.sh b/build-kmod-ryzen-smu.sh index 53f08d74..0c99eddb 100755 --- a/build-kmod-ryzen-smu.sh +++ b/build-kmod-ryzen-smu.sh @@ -9,8 +9,10 @@ RELEASE="$(rpm -E '%fedora')" cp /tmp/ublue-os-akmods-addons/rpmbuild/SOURCES/_copr_ublue-os-akmods.repo /etc/yum.repos.d/ ### BUILD ryzen-smu (succeed or fail-fast with debug output) -dnf install -y \ +dnf download -y --destdir /var/cache/rpms/akmods \ akmod-ryzen-smu-*.fc${RELEASE}.${ARCH} +dnf install -y \ + /var/cache/rpms/akmods/akmod-ryzen-smu-*.rpm akmods --force --kernels "${KERNEL}" --kmod ryzen-smu modinfo /usr/lib/modules/${KERNEL}/extra/ryzen-smu/ryzen_smu.ko.xz > /dev/null \ || (find /var/cache/akmods/ryzen-smu/ -name \*.log -print -exec cat {} \; && exit 1) diff --git a/build-kmod-v4l2loopback.sh b/build-kmod-v4l2loopback.sh index 023f2479..1fed4953 100755 --- a/build-kmod-v4l2loopback.sh +++ b/build-kmod-v4l2loopback.sh @@ -8,8 +8,10 @@ KERNEL="$(rpm -q "${KERNEL_NAME}" --queryformat '%{VERSION}-%{RELEASE}.%{ARCH}') RELEASE="$(rpm -E '%fedora')" ### BUILD v4l2loopbak (succeed or fail-fast with debug output) -dnf install -y \ +dnf download -y --destdir /var/cache/rpms/akmods \ akmod-v4l2loopback-*.fc${RELEASE}.${ARCH} +dnf install -y \ + /var/cache/rpms/akmods/akmod-v4l2loopback-*.rpm akmods --force --kernels "${KERNEL}" --kmod v4l2loopback modinfo /usr/lib/modules/${KERNEL}/extra/v4l2loopback/v4l2loopback.ko.xz > /dev/null \ || (find /var/cache/akmods/v4l2loopback/ -name \*.log -print -exec cat {} \; && exit 1) diff --git a/build-kmod-vhba.sh b/build-kmod-vhba.sh index 7b66ad51..62e2bb98 100755 --- a/build-kmod-vhba.sh +++ b/build-kmod-vhba.sh @@ -26,8 +26,10 @@ fi curl -LsSf -o /etc/yum.repos.d/_copr_rok-cdemu.repo "https://copr.fedorainfracloud.org/coprs/rok/cdemu/repo/fedora-${COPR_RELEASE}/rok-cdemu-fedora-${COPR_RELEASE}.repo" ### BUILD vhba (succeed or fail-fast with debug output) -dnf install -y \ +dnf download -y --destdir /var/cache/rpms/akmods \ akmod-vhba-*.fc${RELEASE}.${ARCH} +dnf install -y \ + /var/cache/rpms/akmods/akmod-vhba-*.rpm akmods --force --kernels "${KERNEL}" --kmod vhba modinfo /usr/lib/modules/${KERNEL}/extra/vhba/vhba.ko.xz > /dev/null \ || (find /var/cache/akmods/vhba/ -name \*.log -print -exec cat {} \; && exit 1) diff --git a/build-kmod-wl.sh b/build-kmod-wl.sh index 4027fcc8..b38c76e8 100755 --- a/build-kmod-wl.sh +++ b/build-kmod-wl.sh @@ -9,8 +9,10 @@ RELEASE="$(rpm -E '%fedora')" ### BUILD wl (succeed or fail-fast with debug output) -dnf install -y \ +dnf download -y --destdir /var/cache/rpms/akmods \ akmod-wl-*.fc${RELEASE}.${ARCH} +dnf install -y \ + /var/cache/rpms/akmods/akmod-wl-*.rpm akmods --force --kernels "${KERNEL}" --kmod wl modinfo /usr/lib/modules/${KERNEL}/extra/wl/wl.ko.xz > /dev/null \ || (find /var/cache/akmods/wl/ -name \*.log -print -exec cat {} \; && exit 1) diff --git a/build-kmod-xone.sh b/build-kmod-xone.sh index 705d753c..f89651dc 100755 --- a/build-kmod-xone.sh +++ b/build-kmod-xone.sh @@ -9,8 +9,10 @@ RELEASE="$(rpm -E '%fedora')" cp /tmp/ublue-os-akmods-addons/rpmbuild/SOURCES/_copr_ublue-os-akmods.repo /etc/yum.repos.d/ ### BUILD xone (succeed or fail-fast with debug output) -dnf install -y \ +dnf download -y --destdir /var/cache/rpms/akmods \ akmod-xone-*.fc${RELEASE}.${ARCH} +dnf install -y \ + /var/cache/rpms/akmods/akmod-xone-*.rpm akmods --force --kernels "${KERNEL}" --kmod xone modinfo /usr/lib/modules/${KERNEL}/extra/xone/xone-{dongle,gip,gip-gamepad,gip-headset,gip-chatpad,gip-madcatz-strat,gip-madcatz-glam,gip-pdp-jaguar}.ko.xz > /dev/null \ || (find /var/cache/akmods/xone/ -name \*.log -print -exec cat {} \; && exit 1) diff --git a/build-kmod-xpadneo.sh b/build-kmod-xpadneo.sh index 3ad92275..55b8ff50 100755 --- a/build-kmod-xpadneo.sh +++ b/build-kmod-xpadneo.sh @@ -19,8 +19,10 @@ fi set -e pipefail ### BUILD xpadneo (succeed or fail-fast with debug output) -dnf install -y \ +dnf download -y --destdir /var/cache/rpms/akmods \ akmod-xpadneo-*.fc${RELEASE}.${ARCH} +dnf install -y \ + /var/cache/rpms/akmods/akmod-xpadneo-*.rpm akmods --force --kernels "${KERNEL}" --kmod xpadneo modinfo /usr/lib/modules/${KERNEL}/extra/xpadneo/hid-xpadneo.ko.xz > /dev/null \ || (find /var/cache/akmods/xpadneo/ -name \*.log -print -exec cat {} \; && exit 1) diff --git a/build-kmod-zenergy.sh b/build-kmod-zenergy.sh index 0dd7d46f..84708f02 100755 --- a/build-kmod-zenergy.sh +++ b/build-kmod-zenergy.sh @@ -8,8 +8,10 @@ RELEASE="$(rpm -E '%fedora')" cp /tmp/ublue-os-akmods-addons/rpmbuild/SOURCES/_copr_ublue-os-akmods.repo /etc/yum.repos.d/ -dnf install -y \ +dnf download -y --destdir /var/cache/rpms/akmods \ akmod-zenergy-*.fc${RELEASE}.${ARCH} +dnf install -y \ + /var/cache/rpms/akmods/akmod-zenergy-*.rpm akmods --force --kernels "${KERNEL}" --kmod zenergy modinfo /usr/lib/modules/${KERNEL}/extra/zenergy/zenergy.ko.xz > /dev/null \ || (find /var/cache/akmods/zenergy/ -name \*.log -print -exec cat {} \; && exit 1) diff --git a/build-prep.sh b/build-prep.sh index f1d0f756..24986575 100755 --- a/build-prep.sh +++ b/build-prep.sh @@ -50,7 +50,12 @@ fi ### PREPARE BUILD ENV dnf install -y \ akmods \ - mock + mock \ + ruby-devel + +# FPM is needed to rename akmods, gem provided by ruby-devel +gem install fpm + if [[ ! -s "/tmp/certs/private_key.priv" ]]; then echo "WARNING: Using test signing key. Run './generate-akmods-key' for production builds." @@ -93,4 +98,4 @@ fi chmod 1777 /tmp /var/tmp # create directories for later copying resulting artifacts -mkdir -p /var/cache/rpms/{kmods,ublue-os,ucore} +mkdir -p /var/cache/rpms/{akmods,kmods,ublue-os,ucore} From 40bc5d25cdc685e97957b8eb358416cc9ea60565 Mon Sep 17 00:00:00 2001 From: Antheas Kapenekakis Date: Sun, 20 Oct 2024 17:30:23 +0200 Subject: [PATCH 3/6] fix: add arg so f41 builds --- Containerfile.common | 7 +++++-- Containerfile.extra | 7 +++++-- Containerfile.nvidia | 7 +++++-- Containerfile.nvidia-open | 7 +++++-- 4 files changed, 20 insertions(+), 8 deletions(-) diff --git a/Containerfile.common b/Containerfile.common index 5c6b88e3..af22b5af 100644 --- a/Containerfile.common +++ b/Containerfile.common @@ -63,10 +63,13 @@ RUN --mount=type=cache,dst=/var/cache/dnf \ # Remove kernel version from kmod package names # FIXME: This will only work for 6.* kernels unfortunately -RUN set -e; for rpm in $(find /var/cache/rpms/kmods -type f -name \*.rpm); do \ +# FIXME: The sed is a gross hack, maybe PR upstream? +RUN set -e; \ + sed -i -e 's/args = \["rpmbuild", "-bb"\]/args = \["rpmbuild", "-bb", "--buildroot", "#{build_path}\/BUILD"\]/g' /usr/local/share/gems/gems/fpm-*/lib/fpm/package/rpm.rb; \ + for rpm in $(find /var/cache/rpms/kmods -type f -name \*.rpm); do \ basename=$(basename ${rpm}); \ name=${basename%%-6*}; \ - fpm -s rpm -t rpm -p ${rpm} -f --name ${name} ${rpm}; \ + fpm --verbose -s rpm -t rpm -p ${rpm} -f --name ${name} ${rpm}; \ done FROM scratch diff --git a/Containerfile.extra b/Containerfile.extra index 2fcc02ab..5e3e0012 100644 --- a/Containerfile.extra +++ b/Containerfile.extra @@ -63,10 +63,13 @@ RUN --mount=type=cache,dst=/var/cache/dnf \ # Remove kernel version from kmod package names # FIXME: This will only work for 6.* kernels unfortunately -RUN set -e; for rpm in $(find /var/cache/rpms/kmods -type f -name \*.rpm); do \ +# FIXME: The sed is a gross hack, maybe PR upstream? +RUN set -e; \ + sed -i -e 's/args = \["rpmbuild", "-bb"\]/args = \["rpmbuild", "-bb", "--buildroot", "#{build_path}\/BUILD"\]/g' /usr/local/share/gems/gems/fpm-*/lib/fpm/package/rpm.rb; \ + for rpm in $(find /var/cache/rpms/kmods -type f -name \*.rpm); do \ basename=$(basename ${rpm}); \ name=${basename%%-6*}; \ - fpm -s rpm -t rpm -p ${rpm} -f --name ${name} ${rpm}; \ + fpm --verbose -s rpm -t rpm -p ${rpm} -f --name ${name} ${rpm}; \ done FROM scratch diff --git a/Containerfile.nvidia b/Containerfile.nvidia index 63da8f21..be15ec0a 100644 --- a/Containerfile.nvidia +++ b/Containerfile.nvidia @@ -60,10 +60,13 @@ RUN --mount=type=cache,dst=/var/cache/dnf \ # Remove kernel version from kmod package names # FIXME: This will only work for 6.* kernels unfortunately -RUN set -e; for rpm in $(find /var/cache/rpms/kmods -type f -name \*.rpm); do \ +# FIXME: The sed is a gross hack, maybe PR upstream? +RUN set -e; \ + sed -i -e 's/args = \["rpmbuild", "-bb"\]/args = \["rpmbuild", "-bb", "--buildroot", "#{build_path}\/BUILD"\]/g' /usr/local/share/gems/gems/fpm-*/lib/fpm/package/rpm.rb; \ + for rpm in $(find /var/cache/rpms/kmods -type f -name \*.rpm); do \ basename=$(basename ${rpm}); \ name=${basename%%-6*}; \ - fpm -s rpm -t rpm -p ${rpm} -f --name ${name} ${rpm}; \ + fpm --verbose -s rpm -t rpm -p ${rpm} -f --name ${name} ${rpm}; \ done FROM scratch diff --git a/Containerfile.nvidia-open b/Containerfile.nvidia-open index f869bcd0..bf6b7184 100644 --- a/Containerfile.nvidia-open +++ b/Containerfile.nvidia-open @@ -60,10 +60,13 @@ RUN --mount=type=cache,dst=/var/cache/dnf \ # Remove kernel version from kmod package names # FIXME: This will only work for 6.* kernels unfortunately -RUN set -e; for rpm in $(find /var/cache/rpms/kmods -type f -name \*.rpm); do \ +# FIXME: The sed is a gross hack, maybe PR upstream? +RUN set -e; \ + sed -i -e 's/args = \["rpmbuild", "-bb"\]/args = \["rpmbuild", "-bb", "--buildroot", "#{build_path}\/BUILD"\]/g' /usr/local/share/gems/gems/fpm-*/lib/fpm/package/rpm.rb; \ + for rpm in $(find /var/cache/rpms/kmods -type f -name \*.rpm); do \ basename=$(basename ${rpm}); \ name=${basename%%-6*}; \ - fpm -s rpm -t rpm -p ${rpm} -f --name ${name} ${rpm}; \ + fpm --verbose -s rpm -t rpm -p ${rpm} -f --name ${name} ${rpm}; \ done FROM scratch From 1a413ab59b9850fa5f79dd8f29966c0fa319e733 Mon Sep 17 00:00:00 2001 From: Antheas Kapenekakis Date: Sun, 20 Oct 2024 21:27:29 +0200 Subject: [PATCH 4/6] fix: add renaming to zfs --- Containerfile.zfs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Containerfile.zfs b/Containerfile.zfs index 52de7c55..91b55ccb 100644 --- a/Containerfile.zfs +++ b/Containerfile.zfs @@ -35,6 +35,17 @@ RUN --mount=type=cache,dst=/var/cache/dnf \ /tmp/build-kmod-zfs.sh && \ /tmp/dual-sign-zfs.sh +# Remove kernel version from kmod package names +# FIXME: This will only work for 6.* kernels unfortunately +# FIXME: The sed is a gross hack, maybe PR upstream? +RUN set -e; \ + sed -i -e 's/args = \["rpmbuild", "-bb"\]/args = \["rpmbuild", "-bb", "--buildroot", "#{build_path}\/BUILD"\]/g' /usr/local/share/gems/gems/fpm-*/lib/fpm/package/rpm.rb; \ + for rpm in $(find /var/cache/rpms/kmods -type f -name \*.rpm); do \ + basename=$(basename ${rpm}); \ + name=${basename%%-6*}; \ + fpm --verbose -s rpm -t rpm -p ${rpm} -f --name ${name} ${rpm}; \ + done + FROM scratch COPY --from=builder /var/cache/rpms /rpms From 4b9b061929f99ad23ff699a08059dea6929efc1f Mon Sep 17 00:00:00 2001 From: Antheas Kapenekakis Date: Sun, 20 Oct 2024 21:37:52 +0200 Subject: [PATCH 5/6] Revert "feat: bundle akmods into resulting image" This reverts commit 0501278efaf041a31d84d241c47c19d7ef935fbc. --- build-kmod-VirtualBox.sh | 4 +--- build-kmod-ayaneo-platform.sh | 4 +--- build-kmod-ayn-platform.sh | 4 +--- build-kmod-bmi260.sh | 4 +--- build-kmod-evdi.sh | 4 +--- build-kmod-facetimehd.sh | 4 +--- build-kmod-gcadapter_oc.sh | 4 +--- build-kmod-kvmfr.sh | 4 +--- build-kmod-nct6687d.sh | 4 +--- build-kmod-nvidia.sh | 4 +--- build-kmod-openrazer.sh | 4 +--- build-kmod-rtl8814au.sh | 4 +--- build-kmod-rtl88xxau.sh | 4 +--- build-kmod-ryzen-smu.sh | 4 +--- build-kmod-v4l2loopback.sh | 4 +--- build-kmod-vhba.sh | 4 +--- build-kmod-wl.sh | 4 +--- build-kmod-xone.sh | 4 +--- build-kmod-xpadneo.sh | 4 +--- build-kmod-zenergy.sh | 4 +--- build-prep.sh | 9 ++------- 21 files changed, 22 insertions(+), 67 deletions(-) diff --git a/build-kmod-VirtualBox.sh b/build-kmod-VirtualBox.sh index 91f44ce5..fb39454c 100755 --- a/build-kmod-VirtualBox.sh +++ b/build-kmod-VirtualBox.sh @@ -8,10 +8,8 @@ RELEASE="$(rpm -E '%fedora')" ### BUILD VirtualBox (succeed or fail-fast with debug output) -dnf download -y --destdir /var/cache/rpms/akmods \ - akmod-VirtualBox-*.fc${RELEASE}.${ARCH} dnf install -y \ - /var/cache/rpms/akmods/akmod-VirtualBox-*.rpm + akmod-VirtualBox-*.fc${RELEASE}.${ARCH} akmods --force --kernels "${KERNEL}" --kmod VirtualBox modinfo /usr/lib/modules/${KERNEL}/extra/VirtualBox/{vboxdrv,vboxnetadp,vboxnetflt}.ko.xz > /dev/null \ || (find /var/cache/akmods/VirtualBox/ -name \*.log -print -exec cat {} \; && exit 1) diff --git a/build-kmod-ayaneo-platform.sh b/build-kmod-ayaneo-platform.sh index 26033357..18453756 100755 --- a/build-kmod-ayaneo-platform.sh +++ b/build-kmod-ayaneo-platform.sh @@ -8,10 +8,8 @@ RELEASE="$(rpm -E '%fedora')" cp /tmp/ublue-os-akmods-addons/rpmbuild/SOURCES/_copr_ublue-os-akmods.repo /etc/yum.repos.d/ -dnf download -y --destdir /var/cache/rpms/akmods \ - akmod-ayaneo-platform-*.fc${RELEASE}.${ARCH} dnf install -y \ - /var/cache/rpms/akmods/akmod-ayaneo-platform-*.rpm + akmod-ayaneo-platform-*.fc${RELEASE}.${ARCH} akmods --force --kernels "${KERNEL}" --kmod ayaneo-platform modinfo /usr/lib/modules/${KERNEL}/extra/ayaneo-platform/ayaneo-platform.ko.xz > /dev/null \ || (find /var/cache/akmods/ayaneo-platform/ -name \*.log -print -exec cat {} \; && exit 1) diff --git a/build-kmod-ayn-platform.sh b/build-kmod-ayn-platform.sh index f45ddf62..e739005e 100755 --- a/build-kmod-ayn-platform.sh +++ b/build-kmod-ayn-platform.sh @@ -8,10 +8,8 @@ RELEASE="$(rpm -E '%fedora')" cp /tmp/ublue-os-akmods-addons/rpmbuild/SOURCES/_copr_ublue-os-akmods.repo /etc/yum.repos.d/ -dnf download -y --destdir /var/cache/rpms/akmods \ - akmod-ayn-platform-*.fc${RELEASE}.${ARCH} dnf install -y \ - /var/cache/rpms/akmods/akmod-ayn-platform-*.rpm + akmod-ayn-platform-*.fc${RELEASE}.${ARCH} akmods --force --kernels "${KERNEL}" --kmod ayn-platform modinfo /usr/lib/modules/${KERNEL}/extra/ayn-platform/ayn-platform.ko.xz > /dev/null \ || (find /var/cache/akmods/ayn-platform/ -name \*.log -print -exec cat {} \; && exit 1) diff --git a/build-kmod-bmi260.sh b/build-kmod-bmi260.sh index f539d903..5e6f3ef2 100755 --- a/build-kmod-bmi260.sh +++ b/build-kmod-bmi260.sh @@ -8,10 +8,8 @@ RELEASE="$(rpm -E '%fedora')" cp /tmp/ublue-os-akmods-addons/rpmbuild/SOURCES/_copr_ublue-os-akmods.repo /etc/yum.repos.d/ -dnf download -y --destdir /var/cache/rpms/akmods \ - akmod-bmi260-*.fc${RELEASE}.${ARCH} dnf install -y \ - /var/cache/rpms/akmods/akmod-bmi260-*.rpm + akmod-bmi260-*.fc${RELEASE}.${ARCH} akmods --force --kernels "${KERNEL}" --kmod bmi260 modinfo /usr/lib/modules/${KERNEL}/extra/bmi260/bmi260_{core,i2c}.ko.xz > /dev/null \ || (find /var/cache/akmods/bmi260/ -name \*.log -print -exec cat {} \; && exit 1) diff --git a/build-kmod-evdi.sh b/build-kmod-evdi.sh index 0a35df3b..b2785f05 100755 --- a/build-kmod-evdi.sh +++ b/build-kmod-evdi.sh @@ -19,10 +19,8 @@ set -e pipefail ### BUILD evdi (succeed or fail-fast with debug output) export CFLAGS="-fno-pie -no-pie" -dnf download -y --destdir /var/cache/rpms/akmods \ - kmod-evdi*.fc"${RELEASE}.${ARCH}" akmod-evdi-*.fc"${RELEASE}.${ARCH}" dnf install -y \ - /var/cache/rpms/akmods/kmod-evdi*.rpm /var/cache/rpms/akmods/akmod-evdi-*.rpm + kmod-evdi*.fc"${RELEASE}.${ARCH}" akmod-evdi-*.fc"${RELEASE}.${ARCH}" akmods --force --kernels "${KERNEL}" --kmod evdi modinfo /usr/lib/modules/"${KERNEL}"/extra/evdi/evdi.ko.xz >/dev/null || (find /var/cache/akmods/evdi/ -name \*.log -print -exec cat {} \; && exit 1) diff --git a/build-kmod-facetimehd.sh b/build-kmod-facetimehd.sh index a4741400..d42e099c 100755 --- a/build-kmod-facetimehd.sh +++ b/build-kmod-facetimehd.sh @@ -16,10 +16,8 @@ curl -LsSf -o /etc/yum.repos.d/_copr_mulderje-facetimehd-kmod.repo \ "https://copr.fedorainfracloud.org/coprs/mulderje/facetimehd-kmod/repo/fedora-${COPR_RELEASE}/mulderje-facetimehd-kmod-fedora-${COPR_RELEASE}.repo" ### BUILD facetimehd (succeed or fail-fast with debug output) -dnf download -y --destdir /var/cache/rpms/akmods \ - akmod-facetimehd-*.fc${RELEASE}.${ARCH} dnf install -y \ - /var/cache/rpms/akmods/akmod-facetimehd-*.rpm + akmod-facetimehd-*.fc${RELEASE}.${ARCH} akmods --force --kernels "${KERNEL}" --kmod facetimehd modinfo "/usr/lib/modules/${KERNEL}/extra/facetimehd/facetimehd.ko.xz" > /dev/null \ || (find /var/cache/akmods/facetimehd/ -name \*.log -print -exec cat {} \; && exit 1) diff --git a/build-kmod-gcadapter_oc.sh b/build-kmod-gcadapter_oc.sh index d32739b4..6a51af23 100755 --- a/build-kmod-gcadapter_oc.sh +++ b/build-kmod-gcadapter_oc.sh @@ -8,10 +8,8 @@ RELEASE="$(rpm -E '%fedora')" cp /tmp/ublue-os-akmods-addons/rpmbuild/SOURCES/_copr_ublue-os-akmods.repo /etc/yum.repos.d/ -dnf download -y --destdir /var/cache/rpms/akmods \ - akmod-gcadapter_oc-*.fc${RELEASE}.${ARCH} dnf install -y \ - /var/cache/rpms/akmods/akmod-gcadapter_oc-*.rpm + akmod-gcadapter_oc-*.fc${RELEASE}.${ARCH} akmods --force --kernels "${KERNEL}" --kmod gcadapter_oc modinfo /usr/lib/modules/${KERNEL}/extra/gcadapter_oc/gcadapter_oc.ko.xz > /dev/null \ || (find /var/cache/akmods/gcadapter_oc/ -name \*.log -print -exec cat {} \; && exit 1) diff --git a/build-kmod-kvmfr.sh b/build-kmod-kvmfr.sh index b98ba60d..c9b6ca14 100755 --- a/build-kmod-kvmfr.sh +++ b/build-kmod-kvmfr.sh @@ -15,10 +15,8 @@ fi curl -LsSf -o /etc/yum.repos.d/_copr_hikariknight-looking-glass-kvmfr.repo "https://copr.fedorainfracloud.org/coprs/hikariknight/looking-glass-kvmfr/repo/fedora-${COPR_RELEASE}/hikariknight-looking-glass-kvmfr-fedora-${COPR_RELEASE}.repo" ### BUILD kvmfr (succeed or fail-fast with debug output) -dnf download -y --destdir /var/cache/rpms/akmods \ - "akmod-kvmfr-*.fc${RELEASE}.${ARCH}" dnf install -y \ - /var/cache/rpms/akmods/akmod-kvmfr-*.rpm + "akmod-kvmfr-*.fc${RELEASE}.${ARCH}" akmods --force --kernels "${KERNEL}" --kmod kvmfr modinfo "/usr/lib/modules/${KERNEL}/extra/kvmfr/kvmfr.ko.xz" > /dev/null \ || (find /var/cache/akmods/kvmfr/ -name \*.log -print -exec cat {} \; && exit 1) diff --git a/build-kmod-nct6687d.sh b/build-kmod-nct6687d.sh index 2d2e65d9..717cf920 100755 --- a/build-kmod-nct6687d.sh +++ b/build-kmod-nct6687d.sh @@ -9,10 +9,8 @@ RELEASE="$(rpm -E '%fedora')" cp /tmp/ublue-os-akmods-addons/rpmbuild/SOURCES/_copr_ublue-os-akmods.repo /etc/yum.repos.d/ ### BUILD nct6687d (succeed or fail-fast with debug output) -dnf download -y --destdir /var/cache/rpms/akmods \ - akmod-nct6687d-*.fc${RELEASE}.${ARCH} dnf install -y \ - /var/cache/rpms/akmods/akmod-nct6687d-*.rpm + akmod-nct6687d-*.fc${RELEASE}.${ARCH} akmods --force --kernels "${KERNEL}" --kmod nct6687d modinfo /usr/lib/modules/${KERNEL}/extra/nct6687d/nct6687.ko.xz > /dev/null \ || (find /var/cache/akmods/nct6687d/ -name \*.log -print -exec cat {} \; && exit 1) diff --git a/build-kmod-nvidia.sh b/build-kmod-nvidia.sh index 10ad33af..64f50fc1 100755 --- a/build-kmod-nvidia.sh +++ b/build-kmod-nvidia.sh @@ -13,10 +13,8 @@ cd /tmp sed -i 's/enabled=1/enabled=0/' /etc/yum.repos.d/rpmfusion-*.repo cp /tmp/ublue-os-nvidia-addons/rpmbuild/SOURCES/negativo17-fedora-nvidia.repo /etc/yum.repos.d/ -dnf download -y --destdir /var/cache/rpms/akmods \ - akmod-nvidia*.fc${RELEASE} dnf install -y \ - /var/cache/rpms/akmods/akmod-nvidia*.rpm + akmod-nvidia*.fc${RELEASE} # Either successfully build and install the kernel modules, or fail early with debug output rpm -qa |grep nvidia diff --git a/build-kmod-openrazer.sh b/build-kmod-openrazer.sh index 715b9add..ce10df82 100755 --- a/build-kmod-openrazer.sh +++ b/build-kmod-openrazer.sh @@ -9,10 +9,8 @@ RELEASE="$(rpm -E '%fedora')" 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 download -y --destdir /var/cache/rpms/akmods \ - akmod-openrazer-*.fc${RELEASE}.${ARCH} dnf install -y \ - /var/cache/rpms/akmods/akmod-openrazer-*.rpm + 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) diff --git a/build-kmod-rtl8814au.sh b/build-kmod-rtl8814au.sh index 4a8f68e4..ca02b96b 100755 --- a/build-kmod-rtl8814au.sh +++ b/build-kmod-rtl8814au.sh @@ -13,10 +13,8 @@ fi cp /tmp/ublue-os-akmods-addons/rpmbuild/SOURCES/_copr_ublue-os-akmods.repo /etc/yum.repos.d/ -dnf download -y --destdir /var/cache/rpms/akmods \ - akmod-rtl8814au-*.fc${RELEASE}.${ARCH} dnf install -y \ - /var/cache/rpms/akmods/akmod-rtl8814au-*.rpm + akmod-rtl8814au-*.fc${RELEASE}.${ARCH} akmods --force --kernels "${KERNEL}" --kmod rtl8814au modinfo /usr/lib/modules/${KERNEL}/extra/rtl8814au/rtl8814au.ko.xz > /dev/null \ || (find /var/cache/akmods/rtl8814au/ -name \*.log -print -exec cat {} \; && exit 1) diff --git a/build-kmod-rtl88xxau.sh b/build-kmod-rtl88xxau.sh index e8e0b237..c508a0e4 100755 --- a/build-kmod-rtl88xxau.sh +++ b/build-kmod-rtl88xxau.sh @@ -13,10 +13,8 @@ fi cp /tmp/ublue-os-akmods-addons/rpmbuild/SOURCES/_copr_ublue-os-akmods.repo /etc/yum.repos.d/ -dnf download -y --destdir /var/cache/rpms/akmods \ - akmod-rtl88xxau-*.fc${RELEASE}.${ARCH} dnf install -y \ - /var/cache/rpms/akmods/akmod-rtl88xxau-*.rpm + akmod-rtl88xxau-*.fc${RELEASE}.${ARCH} akmods --force --kernels "${KERNEL}" --kmod rtl88xxau modinfo /usr/lib/modules/${KERNEL}/extra/rtl88xxau/88XXau.ko.xz > /dev/null \ || (find /var/cache/akmods/rtl88xxau/ -name \*.log -print -exec cat {} \; && exit 1) diff --git a/build-kmod-ryzen-smu.sh b/build-kmod-ryzen-smu.sh index 0c99eddb..53f08d74 100755 --- a/build-kmod-ryzen-smu.sh +++ b/build-kmod-ryzen-smu.sh @@ -9,10 +9,8 @@ RELEASE="$(rpm -E '%fedora')" cp /tmp/ublue-os-akmods-addons/rpmbuild/SOURCES/_copr_ublue-os-akmods.repo /etc/yum.repos.d/ ### BUILD ryzen-smu (succeed or fail-fast with debug output) -dnf download -y --destdir /var/cache/rpms/akmods \ - akmod-ryzen-smu-*.fc${RELEASE}.${ARCH} dnf install -y \ - /var/cache/rpms/akmods/akmod-ryzen-smu-*.rpm + akmod-ryzen-smu-*.fc${RELEASE}.${ARCH} akmods --force --kernels "${KERNEL}" --kmod ryzen-smu modinfo /usr/lib/modules/${KERNEL}/extra/ryzen-smu/ryzen_smu.ko.xz > /dev/null \ || (find /var/cache/akmods/ryzen-smu/ -name \*.log -print -exec cat {} \; && exit 1) diff --git a/build-kmod-v4l2loopback.sh b/build-kmod-v4l2loopback.sh index 1fed4953..023f2479 100755 --- a/build-kmod-v4l2loopback.sh +++ b/build-kmod-v4l2loopback.sh @@ -8,10 +8,8 @@ KERNEL="$(rpm -q "${KERNEL_NAME}" --queryformat '%{VERSION}-%{RELEASE}.%{ARCH}') RELEASE="$(rpm -E '%fedora')" ### BUILD v4l2loopbak (succeed or fail-fast with debug output) -dnf download -y --destdir /var/cache/rpms/akmods \ - akmod-v4l2loopback-*.fc${RELEASE}.${ARCH} dnf install -y \ - /var/cache/rpms/akmods/akmod-v4l2loopback-*.rpm + akmod-v4l2loopback-*.fc${RELEASE}.${ARCH} akmods --force --kernels "${KERNEL}" --kmod v4l2loopback modinfo /usr/lib/modules/${KERNEL}/extra/v4l2loopback/v4l2loopback.ko.xz > /dev/null \ || (find /var/cache/akmods/v4l2loopback/ -name \*.log -print -exec cat {} \; && exit 1) diff --git a/build-kmod-vhba.sh b/build-kmod-vhba.sh index 62e2bb98..7b66ad51 100755 --- a/build-kmod-vhba.sh +++ b/build-kmod-vhba.sh @@ -26,10 +26,8 @@ fi curl -LsSf -o /etc/yum.repos.d/_copr_rok-cdemu.repo "https://copr.fedorainfracloud.org/coprs/rok/cdemu/repo/fedora-${COPR_RELEASE}/rok-cdemu-fedora-${COPR_RELEASE}.repo" ### BUILD vhba (succeed or fail-fast with debug output) -dnf download -y --destdir /var/cache/rpms/akmods \ - akmod-vhba-*.fc${RELEASE}.${ARCH} dnf install -y \ - /var/cache/rpms/akmods/akmod-vhba-*.rpm + akmod-vhba-*.fc${RELEASE}.${ARCH} akmods --force --kernels "${KERNEL}" --kmod vhba modinfo /usr/lib/modules/${KERNEL}/extra/vhba/vhba.ko.xz > /dev/null \ || (find /var/cache/akmods/vhba/ -name \*.log -print -exec cat {} \; && exit 1) diff --git a/build-kmod-wl.sh b/build-kmod-wl.sh index b38c76e8..4027fcc8 100755 --- a/build-kmod-wl.sh +++ b/build-kmod-wl.sh @@ -9,10 +9,8 @@ RELEASE="$(rpm -E '%fedora')" ### BUILD wl (succeed or fail-fast with debug output) -dnf download -y --destdir /var/cache/rpms/akmods \ - akmod-wl-*.fc${RELEASE}.${ARCH} dnf install -y \ - /var/cache/rpms/akmods/akmod-wl-*.rpm + akmod-wl-*.fc${RELEASE}.${ARCH} akmods --force --kernels "${KERNEL}" --kmod wl modinfo /usr/lib/modules/${KERNEL}/extra/wl/wl.ko.xz > /dev/null \ || (find /var/cache/akmods/wl/ -name \*.log -print -exec cat {} \; && exit 1) diff --git a/build-kmod-xone.sh b/build-kmod-xone.sh index f89651dc..705d753c 100755 --- a/build-kmod-xone.sh +++ b/build-kmod-xone.sh @@ -9,10 +9,8 @@ RELEASE="$(rpm -E '%fedora')" cp /tmp/ublue-os-akmods-addons/rpmbuild/SOURCES/_copr_ublue-os-akmods.repo /etc/yum.repos.d/ ### BUILD xone (succeed or fail-fast with debug output) -dnf download -y --destdir /var/cache/rpms/akmods \ - akmod-xone-*.fc${RELEASE}.${ARCH} dnf install -y \ - /var/cache/rpms/akmods/akmod-xone-*.rpm + akmod-xone-*.fc${RELEASE}.${ARCH} akmods --force --kernels "${KERNEL}" --kmod xone modinfo /usr/lib/modules/${KERNEL}/extra/xone/xone-{dongle,gip,gip-gamepad,gip-headset,gip-chatpad,gip-madcatz-strat,gip-madcatz-glam,gip-pdp-jaguar}.ko.xz > /dev/null \ || (find /var/cache/akmods/xone/ -name \*.log -print -exec cat {} \; && exit 1) diff --git a/build-kmod-xpadneo.sh b/build-kmod-xpadneo.sh index 55b8ff50..3ad92275 100755 --- a/build-kmod-xpadneo.sh +++ b/build-kmod-xpadneo.sh @@ -19,10 +19,8 @@ fi set -e pipefail ### BUILD xpadneo (succeed or fail-fast with debug output) -dnf download -y --destdir /var/cache/rpms/akmods \ - akmod-xpadneo-*.fc${RELEASE}.${ARCH} dnf install -y \ - /var/cache/rpms/akmods/akmod-xpadneo-*.rpm + akmod-xpadneo-*.fc${RELEASE}.${ARCH} akmods --force --kernels "${KERNEL}" --kmod xpadneo modinfo /usr/lib/modules/${KERNEL}/extra/xpadneo/hid-xpadneo.ko.xz > /dev/null \ || (find /var/cache/akmods/xpadneo/ -name \*.log -print -exec cat {} \; && exit 1) diff --git a/build-kmod-zenergy.sh b/build-kmod-zenergy.sh index 84708f02..0dd7d46f 100755 --- a/build-kmod-zenergy.sh +++ b/build-kmod-zenergy.sh @@ -8,10 +8,8 @@ RELEASE="$(rpm -E '%fedora')" cp /tmp/ublue-os-akmods-addons/rpmbuild/SOURCES/_copr_ublue-os-akmods.repo /etc/yum.repos.d/ -dnf download -y --destdir /var/cache/rpms/akmods \ - akmod-zenergy-*.fc${RELEASE}.${ARCH} dnf install -y \ - /var/cache/rpms/akmods/akmod-zenergy-*.rpm + akmod-zenergy-*.fc${RELEASE}.${ARCH} akmods --force --kernels "${KERNEL}" --kmod zenergy modinfo /usr/lib/modules/${KERNEL}/extra/zenergy/zenergy.ko.xz > /dev/null \ || (find /var/cache/akmods/zenergy/ -name \*.log -print -exec cat {} \; && exit 1) diff --git a/build-prep.sh b/build-prep.sh index 24986575..f1d0f756 100755 --- a/build-prep.sh +++ b/build-prep.sh @@ -50,12 +50,7 @@ fi ### PREPARE BUILD ENV dnf install -y \ akmods \ - mock \ - ruby-devel - -# FPM is needed to rename akmods, gem provided by ruby-devel -gem install fpm - + mock if [[ ! -s "/tmp/certs/private_key.priv" ]]; then echo "WARNING: Using test signing key. Run './generate-akmods-key' for production builds." @@ -98,4 +93,4 @@ fi chmod 1777 /tmp /var/tmp # create directories for later copying resulting artifacts -mkdir -p /var/cache/rpms/{akmods,kmods,ublue-os,ucore} +mkdir -p /var/cache/rpms/{kmods,ublue-os,ucore} From d28afa455b4f615b4faa497ba9976fafbf46be3a Mon Sep 17 00:00:00 2001 From: Antheas Kapenekakis Date: Sun, 20 Oct 2024 21:49:32 +0200 Subject: [PATCH 6/6] fix: readd fpm --- build-prep.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/build-prep.sh b/build-prep.sh index f1d0f756..a4912473 100755 --- a/build-prep.sh +++ b/build-prep.sh @@ -50,7 +50,10 @@ fi ### PREPARE BUILD ENV dnf install -y \ akmods \ - mock + mock \ + ruby-devel + +gem install fpm if [[ ! -s "/tmp/certs/private_key.priv" ]]; then echo "WARNING: Using test signing key. Run './generate-akmods-key' for production builds."