diff --git a/Containerfile.common b/Containerfile.common index cb102f36..0a32d50e 100644 --- a/Containerfile.common +++ b/Containerfile.common @@ -21,6 +21,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 @@ -49,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 && \ diff --git a/build-kmod-vhba.sh b/build-kmod-vhba.sh new file mode 100755 index 00000000..4190d056 --- /dev/null +++ b/build-kmod-vhba.sh @@ -0,0 +1,24 @@ +#!/bin/sh + +set -oeux pipefail + + +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 vhba on Fedora $RELEASE" + 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) +rpm-ostree install \ + 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) + +rm -f /etc/yum.repos.d/_copr_rok-cdemu.repo diff --git a/ublue-os-akmods-addons.spec b/ublue-os-akmods-addons.spec index 8b1b31ff..f23e4f67 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,31 @@ 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 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