From d6da5ff874fbcdfca0ac5b69480052b0b91bfa70 Mon Sep 17 00:00:00 2001 From: Marco Rodolfi Date: Sun, 7 Apr 2024 16:03:48 +0200 Subject: [PATCH 01/10] Add ROK CDEmu repo spec files for vhba-kmod module --- Containerfile.common | 2 ++ ublue-os-akmods-addons.spec | 13 ++++++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/Containerfile.common b/Containerfile.common index 755faee3..b00d22ef 100644 --- a/Containerfile.common +++ b/Containerfile.common @@ -20,6 +20,8 @@ COPY certs /tmp/certs COPY ublue-os-akmods-addons.spec /tmp/ublue-os-akmods-addons/ublue-os-akmods-addons.spec ADD https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/repo/fedora-${FEDORA_MAJOR_VERSION}/ublue-os-akmods-fedora-${FEDORA_MAJOR_VERSION}.repo \ /tmp/ublue-os-akmods-addons/rpmbuild/SOURCES/_copr_ublue-os-akmods.repo +ADD https://copr.fedorainfracloud.org/coprs/rok/cdemu/repo/fedora-${FEDORA_MAJOR_VERSION}/rok-cdemu-fedora-${FEDORA_MAJOR_VERSION}.repo \ + /tmp/ublue-os-akmods-addons/rpmbuild/SOURCES/_copr_rok-cdemu.repo ADD https://negativo17.org/repos/fedora-multimedia.repo \ /tmp/ublue-os-akmods-addons/rpmbuild/SOURCES/negativo17-fedora-multimedia.repo diff --git a/ublue-os-akmods-addons.spec b/ublue-os-akmods-addons.spec index 8b1b31ff..cd2d55c4 100644 --- a/ublue-os-akmods-addons.spec +++ b/ublue-os-akmods-addons.spec @@ -1,5 +1,5 @@ Name: ublue-os-akmods-addons -Version: 0.4 +Version: 0.5 Release: 1%{?dist} Summary: Signing key and repos for ublue os akmods @@ -11,7 +11,8 @@ Supplements: mokutil policycoreutils Source0: public_key.der Source1: _copr_ublue-os-akmods.repo -Source2: negativo17-fedora-multimedia.repo +Source2: _copr_rok-cdemu.repo +Source3: negativo17-fedora-multimedia.repo %description Adds the signing key for importing with mokutil to enable secure boot for kernel modules and repo files required to install akmod dependencies. @@ -24,23 +25,29 @@ Adds the signing key for importing with mokutil to enable secure boot for kernel # Have different name for *.der in case kmodgenca is needed for creating more keys install -Dm0644 %{SOURCE0} %{buildroot}%{_datadir}/ublue-os/%{_sysconfdir}/pki/akmods/certs/akmods-ublue.der install -Dm0644 %{SOURCE1} %{buildroot}%{_datadir}/ublue-os/%{_sysconfdir}/yum.repos.d/_copr_ublue-os-akmods.repo -install -Dm0644 %{SOURCE2} %{buildroot}%{_datadir}/ublue-os/%{_sysconfdir}/yum.repos.d/negativo17-fedora-multimedia.repo +install -Dm0644 %{SOURCE2} %{buildroot}%{_datadir}/ublue-os/%{_sysconfdir}/yum.repos.d/_copr_rok-cdemu.repo +install -Dm0644 %{SOURCE3} %{buildroot}%{_datadir}/ublue-os/%{_sysconfdir}/yum.repos.d/negativo17-fedora-multimedia.repo sed -i 's@enabled=1@enabled=0@g' %{buildroot}%{_datadir}/ublue-os/%{_sysconfdir}/yum.repos.d/negativo17-fedora-multimedia.repo +sed -i 's@enabled=1@enabled=0@g' %{buildroot}%{_datadir}/ublue-os/%{_sysconfdir}/yum.repos.d/_copr_rok-cdemu.repo install -Dm0644 %{buildroot}%{_datadir}/ublue-os/%{_sysconfdir}/pki/akmods/certs/akmods-ublue.der %{buildroot}%{_sysconfdir}/pki/akmods/certs/akmods-ublue.der install -Dm0644 %{buildroot}%{_datadir}/ublue-os/%{_sysconfdir}/yum.repos.d/_copr_ublue-os-akmods.repo %{buildroot}%{_sysconfdir}/yum.repos.d/_copr_ublue-os-akmods.repo +install -Dm0644 %{buildroot}%{_datadir}/ublue-os/%{_sysconfdir}/yum.repos.d/_copr_rok-cdemu.repo %{buildroot}%{_sysconfdir}/yum.repos.d/_copr_rok-cdemu.repo install -Dm0644 %{buildroot}%{_datadir}/ublue-os/%{_sysconfdir}/yum.repos.d/negativo17-fedora-multimedia.repo %{buildroot}%{_sysconfdir}/yum.repos.d/negativo17-fedora-multimedia.repo %files %attr(0644,root,root) %{_datadir}/ublue-os/%{_sysconfdir}/pki/akmods/certs/akmods-ublue.der %attr(0644,root,root) %{_datadir}/ublue-os/%{_sysconfdir}/yum.repos.d/_copr_ublue-os-akmods.repo +%attr(0644,root,root) %{_datadir}/ublue-os/%{_sysconfdir}/yum.repos.d/_copr_rok-cdemu.repo %attr(0644,root,root) %{_datadir}/ublue-os/%{_sysconfdir}/yum.repos.d/negativo17-fedora-multimedia.repo %attr(0644,root,root) %{_sysconfdir}/pki/akmods/certs/akmods-ublue.der %attr(0644,root,root) %{_sysconfdir}/yum.repos.d/_copr_ublue-os-akmods.repo +%attr(0644,root,root) %{_sysconfdir}/yum.repos.d/_copr_rok-cdemu.repo %attr(0644,root,root) %{_sysconfdir}/yum.repos.d/negativo17-fedora-multimedia.repo %changelog + * Mon Nov 20 2023 RJ Trujillo - 0.4 - Migrate xpadneo/xone modules from negativo17 fedora-steam to negativo17 fedora-multimedia From 03c911860d2bc911ffbc3bfc7a0f0960eb5055c7 Mon Sep 17 00:00:00 2001 From: Marco Rodolfi Date: Sun, 7 Apr 2024 16:07:06 +0200 Subject: [PATCH 02/10] Clean up whitespace --- ublue-os-akmods-addons.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/ublue-os-akmods-addons.spec b/ublue-os-akmods-addons.spec index cd2d55c4..34005100 100644 --- a/ublue-os-akmods-addons.spec +++ b/ublue-os-akmods-addons.spec @@ -47,7 +47,6 @@ install -Dm0644 %{buildroot}%{_datadir}/ublue-os/%{_sysconfdir}/yum.repos.d/nega %attr(0644,root,root) %{_sysconfdir}/yum.repos.d/negativo17-fedora-multimedia.repo %changelog - * Mon Nov 20 2023 RJ Trujillo - 0.4 - Migrate xpadneo/xone modules from negativo17 fedora-steam to negativo17 fedora-multimedia From 306120f8125d212e73b9362ae87132d42140eef6 Mon Sep 17 00:00:00 2001 From: Marco Rodolfi Date: Sun, 7 Apr 2024 16:16:47 +0200 Subject: [PATCH 03/10] Add vhba build script --- Containerfile.common | 1 + build-kmod-vhba.sh | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) create mode 100755 build-kmod-vhba.sh diff --git a/Containerfile.common b/Containerfile.common index b00d22ef..1fd01fbb 100644 --- a/Containerfile.common +++ b/Containerfile.common @@ -57,6 +57,7 @@ RUN if grep -qv "surface" <<< "${KERNEL_FLAVOR}"; then \ /tmp/build-kmod-v4l2loopback.sh && \ /tmp/build-kmod-VirtualBox.sh && \ /tmp/build-kmod-wl.sh && \ + /tmp/build-kmod-vhba.sh && \ /tmp/build-kmod-xpadneo.sh && \ /tmp/build-kmod-xone.sh && \ /tmp/build-kmod-zenergy.sh diff --git a/build-kmod-vhba.sh b/build-kmod-vhba.sh new file mode 100755 index 00000000..27301473 --- /dev/null +++ b/build-kmod-vhba.sh @@ -0,0 +1,16 @@ +#!/bin/sh + +set -oeux pipefail + + +ARCH="$(rpm -E '%_arch')" +KERNEL="$(rpm -q "${KERNEL_NAME}" --queryformat '%{VERSION}-%{RELEASE}.%{ARCH}')" +RELEASE="$(rpm -E '%fedora')" + + +### BUILD wl (succeed or fail-fast with debug output) +rpm-ostree install \ + akmod-vhba-*.fc${RELEASE}.${ARCH} +akmods --force --kernels "${KERNEL}" --kmod akmod-vhba +modinfo /usr/lib/modules/${KERNEL}/extra/akmod-vhba/akmod-vhba.ko.xz > /dev/null \ +|| (find /var/cache/akmods/akmod-vhba/ -name \*.log -print -exec cat {} \; && exit 1) From f8e31a9c5583c92696870635257cbcf47d141b67 Mon Sep 17 00:00:00 2001 From: Marco Rodolfi Date: Sun, 7 Apr 2024 16:18:50 +0200 Subject: [PATCH 04/10] Cleaning up module name --- build-kmod-vhba.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/build-kmod-vhba.sh b/build-kmod-vhba.sh index 27301473..a4e78864 100755 --- a/build-kmod-vhba.sh +++ b/build-kmod-vhba.sh @@ -8,9 +8,9 @@ KERNEL="$(rpm -q "${KERNEL_NAME}" --queryformat '%{VERSION}-%{RELEASE}.%{ARCH}') RELEASE="$(rpm -E '%fedora')" -### BUILD wl (succeed or fail-fast with debug output) +### BUILD vhba (succeed or fail-fast with debug output) rpm-ostree install \ akmod-vhba-*.fc${RELEASE}.${ARCH} -akmods --force --kernels "${KERNEL}" --kmod akmod-vhba -modinfo /usr/lib/modules/${KERNEL}/extra/akmod-vhba/akmod-vhba.ko.xz > /dev/null \ -|| (find /var/cache/akmods/akmod-vhba/ -name \*.log -print -exec cat {} \; && exit 1) +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) From e67b530668c25b2322556f49bae67da2e6fef60e Mon Sep 17 00:00:00 2001 From: Kyle Gospodnetich Date: Mon, 22 Apr 2024 20:03:33 -0700 Subject: [PATCH 05/10] fix: Add and then remove ROK CDEmu copr repo during akmod installation --- build-kmod-vhba.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build-kmod-vhba.sh b/build-kmod-vhba.sh index a4e78864..ae8762b9 100755 --- a/build-kmod-vhba.sh +++ b/build-kmod-vhba.sh @@ -7,6 +7,7 @@ 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_rok-cdemu.repo /etc/yum.repos.d/ ### BUILD vhba (succeed or fail-fast with debug output) rpm-ostree install \ @@ -14,3 +15,5 @@ rpm-ostree install \ 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) + +rm -f /etc/yum.repos.d/_copr_rok-cdemu.repo From dd517cf1a74efab5d80117a77c04941a04740892 Mon Sep 17 00:00:00 2001 From: Kyle Gospodnetich Date: Mon, 22 Apr 2024 20:26:02 -0700 Subject: [PATCH 06/10] fix: Only build vhba on Fedora 39 and newer --- Containerfile.common | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Containerfile.common b/Containerfile.common index 486224cd..84d05bc6 100644 --- a/Containerfile.common +++ b/Containerfile.common @@ -42,6 +42,9 @@ RUN if grep -qv "surface" <<< "${KERNEL_FLAVOR}"; then \ if grep -qv "fsync" <<< "${KERNEL_FLAVOR}"; then \ /tmp/build-kmod-openrgb.sh \ ; fi && \ + if [[ "${FEDORA_MAJOR_VERSION}" -ge 39 ]]; then \ + /tmp/build-kmod-vhba.sh && \ + ; fi && \ /tmp/build-kmod-ayaneo-platform.sh && \ /tmp/build-kmod-ayn-platform.sh && \ /tmp/build-kmod-kvmfr.sh && \ @@ -53,7 +56,6 @@ RUN if grep -qv "surface" <<< "${KERNEL_FLAVOR}"; then \ /tmp/build-kmod-v4l2loopback.sh && \ /tmp/build-kmod-VirtualBox.sh && \ /tmp/build-kmod-wl.sh && \ - /tmp/build-kmod-vhba.sh && \ /tmp/build-kmod-xpadneo.sh && \ /tmp/build-kmod-xone.sh && \ /tmp/build-kmod-zenergy.sh From a1a90e80175f58e86015ddb03a0d1e097ef1dfac Mon Sep 17 00:00:00 2001 From: Kyle Gospodnetich Date: Mon, 22 Apr 2024 20:31:54 -0700 Subject: [PATCH 07/10] chore: Restore in Containerfile --- Containerfile.common | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Containerfile.common b/Containerfile.common index 84d05bc6..0a32d50e 100644 --- a/Containerfile.common +++ b/Containerfile.common @@ -42,9 +42,6 @@ RUN if grep -qv "surface" <<< "${KERNEL_FLAVOR}"; then \ if grep -qv "fsync" <<< "${KERNEL_FLAVOR}"; then \ /tmp/build-kmod-openrgb.sh \ ; fi && \ - if [[ "${FEDORA_MAJOR_VERSION}" -ge 39 ]]; then \ - /tmp/build-kmod-vhba.sh && \ - ; fi && \ /tmp/build-kmod-ayaneo-platform.sh && \ /tmp/build-kmod-ayn-platform.sh && \ /tmp/build-kmod-kvmfr.sh && \ @@ -54,6 +51,7 @@ RUN if grep -qv "surface" <<< "${KERNEL_FLAVOR}"; then \ /tmp/build-kmod-rtl8814au.sh && \ /tmp/build-kmod-rtl88xxau.sh && \ /tmp/build-kmod-v4l2loopback.sh && \ + /tmp/build-kmod-vhba.sh && \ /tmp/build-kmod-VirtualBox.sh && \ /tmp/build-kmod-wl.sh && \ /tmp/build-kmod-xpadneo.sh && \ From 3927ad26b38e1506103af0fc914075441cbb6c60 Mon Sep 17 00:00:00 2001 From: Kyle Gospodnetich Date: Mon, 22 Apr 2024 20:34:25 -0700 Subject: [PATCH 08/10] chore: Skip build if F38 or below --- build-kmod-vhba.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build-kmod-vhba.sh b/build-kmod-vhba.sh index ae8762b9..0124c4aa 100755 --- a/build-kmod-vhba.sh +++ b/build-kmod-vhba.sh @@ -7,6 +7,11 @@ ARCH="$(rpm -E '%_arch')" KERNEL="$(rpm -q "${KERNEL_NAME}" --queryformat '%{VERSION}-%{RELEASE}.%{ARCH}')" RELEASE="$(rpm -E '%fedora')" +if [[ "$RELEASE" -lt 39 ]]; then + echo "SKIPPED BUILD of gasket: compile failure on kernel 6.8 as of 2024-03-17" + exit 0 +fi + cp /tmp/ublue-os-akmods-addons/rpmbuild/SOURCES/_copr_rok-cdemu.repo /etc/yum.repos.d/ ### BUILD vhba (succeed or fail-fast with debug output) From 4c608398e50086d40862a31d5ceacafecba96df0 Mon Sep 17 00:00:00 2001 From: Benjamin Sherman Date: Mon, 22 Apr 2024 23:16:27 -0500 Subject: [PATCH 09/10] refactor: change text in skip of build vhba --- build-kmod-vhba.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-kmod-vhba.sh b/build-kmod-vhba.sh index 0124c4aa..4190d056 100755 --- a/build-kmod-vhba.sh +++ b/build-kmod-vhba.sh @@ -8,7 +8,7 @@ KERNEL="$(rpm -q "${KERNEL_NAME}" --queryformat '%{VERSION}-%{RELEASE}.%{ARCH}') RELEASE="$(rpm -E '%fedora')" if [[ "$RELEASE" -lt 39 ]]; then - echo "SKIPPED BUILD of gasket: compile failure on kernel 6.8 as of 2024-03-17" + echo "SKIPPED BUILD of vhba on Fedora $RELEASE" exit 0 fi From 30e5309e7f2aa99122423024c14ecc9d69e9f105 Mon Sep 17 00:00:00 2001 From: Benjamin Sherman Date: Mon, 22 Apr 2024 23:20:50 -0500 Subject: [PATCH 10/10] chore: add changelog entry for vhba copr addons --- ublue-os-akmods-addons.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ublue-os-akmods-addons.spec b/ublue-os-akmods-addons.spec index 34005100..f23e4f67 100644 --- a/ublue-os-akmods-addons.spec +++ b/ublue-os-akmods-addons.spec @@ -47,6 +47,9 @@ install -Dm0644 %{buildroot}%{_datadir}/ublue-os/%{_sysconfdir}/yum.repos.d/nega %attr(0644,root,root) %{_sysconfdir}/yum.repos.d/negativo17-fedora-multimedia.repo %changelog +* Mon Apr 22 2024 Marco Rodolfi - 0.5 +- Add rok/cdemu copr repo for vhba kmod support + * Mon Nov 20 2023 RJ Trujillo - 0.4 - Migrate xpadneo/xone modules from negativo17 fedora-steam to negativo17 fedora-multimedia