From 734a739fe83ae6e9103300393b18d1a3fbdd439b Mon Sep 17 00:00:00 2001 From: Jon Mulder Date: Sat, 27 Apr 2024 02:17:01 -0400 Subject: [PATCH] feat: add 'extra' akmod stream & facetimehd-kmod to akmod cache (#163) Co-authored-by: Benjamin Sherman --- .gitattributes | 1 + .github/workflows/reusable-build.yml | 1 + Containerfile.common | 16 +---- Containerfile.extra | 61 ++++++++++++++++++ README.md | 95 ++++++++++++++++------------ build-kmod-facetimehd.sh | 25 ++++++++ 6 files changed, 145 insertions(+), 54 deletions(-) create mode 100644 .gitattributes create mode 100644 Containerfile.extra create mode 100755 build-kmod-facetimehd.sh diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..c233cb6d --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +Containerfile* linguist-language=Containerfile diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index bafe04f4..fa182089 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -35,6 +35,7 @@ jobs: - surface cfile_suffix: - common + - extra - nvidia exclude: - kernel_flavor: asus diff --git a/Containerfile.common b/Containerfile.common index fc6f6b75..d596cc39 100644 --- a/Containerfile.common +++ b/Containerfile.common @@ -37,26 +37,12 @@ RUN if grep -qv "surface" <<< "${KERNEL_FLAVOR}"; then \ if grep -qv "asus" <<< "${KERNEL_FLAVOR}"; then \ /tmp/build-kmod-evdi.sh \ ; fi && \ - if grep -qv "fsync" <<< "${KERNEL_FLAVOR}"; then \ - /tmp/build-kmod-openrgb.sh \ - ; fi && \ - /tmp/build-kmod-ayaneo-platform.sh && \ - /tmp/build-kmod-ayn-platform.sh && \ - /tmp/build-kmod-gcadapter_oc.sh && \ - /tmp/build-kmod-kvmfr.sh && \ - /tmp/build-kmod-nct6687d.sh && \ /tmp/build-kmod-openrazer.sh && \ - /tmp/build-kmod-ryzen-smu.sh && \ - /tmp/build-kmod-rtl8814au.sh && \ - /tmp/build-kmod-rtl88xxau.sh && \ /tmp/build-kmod-v4l2loopback.sh && \ /tmp/build-kmod-framework-laptop.sh && \ - /tmp/build-kmod-vhba.sh && \ - /tmp/build-kmod-VirtualBox.sh && \ /tmp/build-kmod-wl.sh && \ /tmp/build-kmod-xpadneo.sh && \ - /tmp/build-kmod-xone.sh && \ - /tmp/build-kmod-zenergy.sh + /tmp/build-kmod-xone.sh RUN cp /tmp/ublue-os-akmods-addons/rpmbuild/RPMS/noarch/ublue-os-akmods-addons*.rpm \ /var/cache/rpms/ublue-os/ diff --git a/Containerfile.extra b/Containerfile.extra new file mode 100644 index 00000000..ea6ff171 --- /dev/null +++ b/Containerfile.extra @@ -0,0 +1,61 @@ +### +### Containerfile.extra - used to build extra kmods +### + +#Build from base, simpley because it's the smallest image +ARG SOURCE_IMAGE="${SOURCE_IMAGE:-base}" +ARG SOURCE_ORG="${SOURCE_ORG:-fedora-ostree-desktops}" +ARG BASE_IMAGE="quay.io/${SOURCE_ORG}/${SOURCE_IMAGE}" +ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION:-40}" + +FROM ${BASE_IMAGE}:${FEDORA_MAJOR_VERSION} AS builder +ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION:-40}" +ARG KERNEL_FLAVOR="{KERNEL_FLAVOR:-main}" +ARG KERNEL_VERSION="" +ARG RPMFUSION_MIRROR="" + +COPY build*.sh /tmp +COPY certs /tmp/certs + +# files for akmods +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://negativo17.org/repos/fedora-multimedia.repo \ + /tmp/ublue-os-akmods-addons/rpmbuild/SOURCES/negativo17-fedora-multimedia.repo + +RUN /tmp/build-prep.sh + +# Set kernel name +RUN if grep -qv "surface" <<< "${KERNEL_FLAVOR}"; then \ + export KERNEL_NAME="kernel" \ + ; else \ + export KERNEL_NAME="kernel-surface" \ + ; fi && \ + if grep -qv "fsync" <<< "${KERNEL_FLAVOR}"; then \ + /tmp/build-kmod-openrgb.sh \ + ; fi && \ + /tmp/build-kmod-ayaneo-platform.sh && \ + /tmp/build-kmod-ayn-platform.sh && \ + /tmp/build-kmod-facetimehd.sh \ + /tmp/build-kmod-framework-laptop.sh && \ + /tmp/build-kmod-gcadapter_oc.sh && \ + /tmp/build-kmod-kvmfr.sh && \ + /tmp/build-kmod-nct6687d.sh && \ + /tmp/build-kmod-rtl8814au.sh && \ + /tmp/build-kmod-rtl88xxau.sh && \ + /tmp/build-kmod-ryzen-smu.sh && \ + /tmp/build-kmod-vhba.sh && \ + /tmp/build-kmod-VirtualBox.sh && \ + /tmp/build-kmod-zenergy.sh + +RUN for RPM in $(find /var/cache/akmods/ -type f -name \*.rpm); do \ + cp "${RPM}" /var/cache/rpms/kmods/; \ + done + +RUN find /var/cache/rpms + +FROM scratch + +COPY --from=builder /var/cache/rpms /rpms + diff --git a/README.md b/README.md index 16c0fb53..ae590f97 100644 --- a/README.md +++ b/README.md @@ -1,41 +1,55 @@ -[![build-38](https://github.com/ublue-os/akmods/actions/workflows/build-38.yml/badge.svg)](https://github.com/ublue-os/akmods/actions/workflows/build-38.yml) [![build-39](https://github.com/ublue-os/akmods/actions/workflows/build-39.yml/badge.svg)](https://github.com/ublue-os/akmods/actions/workflows/build-39.yml) [![build-40](https://github.com/ublue-os/akmods/actions/workflows/build-40.yml/badge.svg)](https://github.com/ublue-os/akmods/actions/workflows/build-40.yml) - # ublue-os akmods +[![build-38](https://github.com/ublue-os/akmods/actions/workflows/build-38.yml/badge.svg)](https://github.com/ublue-os/akmods/actions/workflows/build-38.yml) [![build-39](https://github.com/ublue-os/akmods/actions/workflows/build-39.yml/badge.svg)](https://github.com/ublue-os/akmods/actions/workflows/build-39.yml) [![build-40](https://github.com/ublue-os/akmods/actions/workflows/build-40.yml/badge.svg)](https://github.com/ublue-os/akmods/actions/workflows/build-40.yml) + A layer for adding extra kernel modules to your image. Use for better hardware support and a few other features! -# Features +## How it's organized + +The [`akmods` image](https://github.com/orgs/ublue-os/packages/container/package/akmods) is built and published daily. However, there's not a single image but several, given various kernel support we now provide. + +The akmods package is broken out into three akmod "streams": + +- `common` - any kmod installed by default in Bluefin or which was originally in main pre-39 +- `extra` - primarily for kmods used in Bazzite or any others we need, but don't fit in `common` +- `nvidia` - only for the nvidia kmod Feel free to PR more kmod build scripts into this repo! -- ublue-os-akmods-addons - installs extra repos and our kmods signing key; install and import to allow SecureBoot systems to use these kmods -- ublue-os-nvidia-addons - installs extra repos enabling our nvidia support - - [nvidia container selinux policy](https://github.com/NVIDIA/dgx-selinux/tree/master/src/nvidia-container-selinux) - uses RHEL9 policy as the closest match - - [nvidia-container-tookkit repo](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html#installing-with-yum-or-dnf) - version 1.14 (and newer) provide CDI for podman use of nvidia gpus -- [ayaneo-platform](https://github.com/ShadowBlip/ayaneo-platform) - Linux drivers for AYANEO x86 handhelds (akmod from [ublue-os/akmods copr](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/)) -- [ayn-platform](https://github.com/ShadowBlip/ayn-platform) - Linux drivers for AYN x86 handhelds (akmod from [ublue-os/akmods copr](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/)) -- [evdi](www.displaylink.com) - kernel module required for use of displaylink (akmod from [negativo17 multimedia repo](https://negativo17.org/multimedia/) -- [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 (akmod from [ublue-os/akmods copr](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/)) -- [gcadapter_oc](https://github.com/hannesmann/gcadapter-oc-kmod) - kernel module for overclocking the Nintendo Wii U/Mayflash GameCube adapter (akmod from [ublue-os/akmods copr](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/)) -- [kvmfr](https://github.com/gnif/looking-glass) - KVM framebuffer relay kernel module for use with Looking Glass (akmod from [hikariknight/looking-glass-kvmfr-akmod copr](https://copr.fedorainfracloud.org/coprs/hikariknight/looking-glass-kvmfr/)) -- [nct6687d](https://github.com/Fred78290/nct6687d) - Linux kernel module for Nuvoton NCT6687-R found on AMD B550 chipset motherboards (akmod from [ublue-os/akmods copr](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/)) -- [nvidia](https://rpmfusion.org/Howto/NVIDIA) - nvidia GPU drivers built from rpmfusion -- [openrazer](https://openrazer.github.io/) - kernel module adding additional features to Razer hardware (akmod from [ublue-os/akmods copr](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/)) -- [openrgb](https://gitlab.com/CalcProgrammer1/OpenRGB/-/raw/master/OpenRGB.patch) - kernel module with i2c-nct6775 and patched i2c-piix4 for use with OpenRGB (akmod from [ublue-os/akmods copr](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/)) -- rtl8814au - Realtek RTL8814AU Driver (akmod from [ublue-os/akmods copr](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/)) -- rtl88xxau - Realtek RTL8812AU/21AU and RTL8814AU driver (akmod from [ublue-os/akmods copr](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/)) -- [ryzen_smu](https://gitlab.com/leogx9r/ryzen_smu) - A Linux kernel driver that exposes access to the SMU (System Management Unit) for certain AMD Ryzen Processors (akmod from [ublue-os/akmods copr](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/)) -- [v4l2loopback](https://github.com/umlaeute/v4l2loopback) - allows creating "virtual video devices" -- [wl (broadcom)](https://github.com/rpmfusion/broadcom-wl/) - support for some legacy broadcom wifi devices -- [xpadneo](https://github.com/atar-axis/xpadneo) - xbox one controller bluetooth driver (akmod from [negativo17 steam repo](https://negativo17.org/steam/) -- [xonedo](https://github.com/BoukeHaarsma23/xonedo/) - xbox one controller USB wired/RF driver modified to work along-side xpad (akmod from [ublue-os/akmods copr](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/)) -- [zenergy](https://github.com/BoukeHaarsma23/zenergy) - Based on AMD_ENERGY driver, but with some jiffies added so non-root users can read it safely. (akmod from [ublue-os/akmods copr](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/)) - -# How it's organized +## Features -The [`akmods` image](https://github.com/orgs/ublue-os/packages/container/package/akmods) is built and published daily. However, there's not a single image but several, given various kernel support we now provide. +### Overview -Here's a rundown on how it's organized. +- ublue-os-akmods-addons - installs extra repos and our kmods signing key; install and import to allow SecureBoot systems to use these kmods +- ublue-os-nvidia-addons - installs extra repos enabling our nvidia support + - [nvidia container selinux policy](https://github.com/NVIDIA/dgx-selinux/tree/master/src/nvidia-container-selinux) - uses RHEL9 policy as the closest match + - [nvidia-container-tookkit repo](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html#installing-with-yum-or-dnf) - version 1.14 (and newer) provide CDI for podman use of nvidia gpus + +### Kmod Packages + +| Package | Stream | Description | Source | +|---------|--------|-------------|--------| +| [ayaneo-platform](https://github.com/ShadowBlip/ayaneo-platform) | extra | Linux drivers for AYANEO x86 handhelds | [![badge](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/package/ayaneo-platform-kmod/status_image/last_build.png)](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/package/ayaneo-platform-kmod) | +| [ayn-platform](https://github.com/ShadowBlip/ayn-platform) | extra | Linux drivers for AYN x86 handhelds | [![badge](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/package/ayn-platform-kmod/status_image/last_build.png)](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/package/ayn-platform-kmod) | +| [evdi](www.displaylink.com) | common | kernel module required for use of displaylink | [negativo17 - fedora-multimedia](https://negativo17.org/) | +| [facetimehd](https://github.com/patjak/facetimehd/) | extra | kernel module Linux driver for the FacetimeHD (Broadcom 1570) PCIe webcam | [![badge](https://copr.fedorainfracloud.org/coprs/mulderje/facetimehd-kmod/package/facetimehd-kmod/status_image/last_build.png)](https://copr.fedorainfracloud.org/coprs/mulderje/facetimehd-kmod/package/facetimehd-kmod) | +| [framework-laptop](https://github.com/DHowett/framework-laptop-kmod) | extra | A kernel module that exposes the Framework Laptop (13, 16)'s battery charge limit and LEDs to userspace | [![badge](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/package/framework-laptop-kmod/status_image/last_build.png)](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/package/framework-laptop-kmod) | +| [gcadapter_oc](https://github.com/hannesmann/gcadapter-oc-kmod) | extra | kernel module for overclocking the Nintendo Wii U/Mayflash GameCube adapter | [![badge](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/package/gcadapter_oc-kmod/status_image/last_build.png)](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/package/gcadapter_oc-kmod) | +| [kvmfr](https://github.com/gnif/looking-glass) | extra | KVM framebuffer relay kernel module for use with Looking Glass | [![badge](https://copr.fedorainfracloud.org/coprs/hikariknight/looking-glass-kvmfr/package/kvmfr-kmod/status_image/last_build.png)](https://copr.fedorainfracloud.org/coprs/hikariknight/looking-glass-kvmfr/package/kvmfr-kmod) | +| [nct6687d](https://github.com/Fred78290/nct6687d) | extra | Linux kernel module for Nuvoton NCT6687-R found on AMD B550 chipset motherboards | [![badge](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/package/nct6687d-kmod/status_image/last_build.png)](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/package/nct6687d-kmod) | +| [nvidia](https://rpmfusion.org/Howto/NVIDIA) | nvidia | nvidia GPU drivers built from rpmfusion | [RPMFusion - nonfree](https://rpmfusion.org/) | +| [openrazer](https://openrazer.github.io/) | common | kernel module adding additional features to Razer hardware | [![badge](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/package/openrazer-kmod/status_image/last_build.png)](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/package/openrazer-kmod) | +| [openrgb](https://gitlab.com/CalcProgrammer1/OpenRGB/-/raw/master/OpenRGB.patch) | extra | kernel module with i2c-nct6775 and patched i2c-piix4 for use with OpenRGB | [![badge](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/package/openrgb-kmod/status_image/last_build.png)](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/package/openrgb-kmod) | +| [rtl8814au](https://github.com/morrownr/8814au) | extra | Realtek RTL8814AU Driver | [![badge](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/package/rtl8814au-kmod/status_image/last_build.png)](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/package/rtl8814au-kmod) | +| [rtl88xxau](https://github.com/aircrack-ng/rtl8812au) | extra | Realtek RTL8812AU/21AU and RTL8814AU driver | [![badge](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/package/rtl88xxau-kmod/status_image/last_build.png)](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/package/rtl88xxau-kmod) | +| [ryzen-smu](https://gitlab.com/leogx9r/ryzen_smu) | extra | A Linux kernel driver that exposes access to the SMU (System Management Unit) for certain AMD Ryzen Processors | [![badge](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/package/ryzen-smu-kmod/status_image/last_build.png)](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/package/ryzen-smu-kmod) | +| [v4l2loopback](https://github.com/umlaeute/v4l2loopback) | common | allows creating "virtual video devices" | [RPMFusion - free](https://rpmfusion.org/) | +| [wl](https://github.com/rpmfusion/broadcom-wl/) | common | support for some legacy broadcom wifi devices | [RPMFusion - nonfree](https://rpmfusion.org/) | +| [xpadneo](https://github.com/atar-axis/xpadneo) | common | xbox one controller bluetooth driver | [negativo17 - fedora-multimedia](https://negativo17.org/) | +| [xone](https://github.com/BoukeHaarsma23/xonedo/) | common | xbox one controller USB wired/RF driver modified to work along-side xpad | [![badge](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/package/xone-kmod/status_image/last_build.png)](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/package/xone-kmod) | +| [zenergy](https://github.com/BoukeHaarsma23/zenergy) | extra | Based on AMD_ENERGY driver, but with some jiffies added so non-root users can read it safely | [![badge](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/package/zenergy-kmod/status_image/last_build.png)](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/package/zenergy-kmod) | + +## Notes We do our best to support all current builds of Fedora, current versions of the kernel modules listed, and the latest NVIDIA driver. **Note: NVIDIA legacy driver version 470 is no longer provided as RPMfusion has ceased updates to the package and it no longer builds with kernel 6.8 which has now released for Fedora 38 and 39. Also the `-550` extra driver version tag has been removed as the latest driver will always be included.** @@ -53,11 +67,9 @@ The majority of the drivers are tagged with `KERNEL_TYPE-FEDORA_RELEASE`. NVIDIA | [patched Microsoft Surface devices](https://github.com/linux-surface/linux-surface/) | 39 | `surface-39` | | | 40 | `surface-40` | +## Usage - -# Usage - -To install one of these kmods, you'll need to install any of their specific dependencies (checkout the `build-prep.sh` and the specific `build-FOO.sh` script for details. +To install one of these kmods, you'll need to install any of their specific dependencies (checkout the `build-prep.sh` and the specific `build-FOO.sh` script for details). For common images, add something like this to your Containerfile, replacing `TAG` with one of the `something-FR` tags above: @@ -66,30 +78,35 @@ For common images, add something like this to your Containerfile, replacing `TAG RUN rpm-ostree install /tmp/rpms/ublue-os/ublue-os-akmods*.rpm RUN rpm-ostree install /tmp/rpms/kmods/kmod-v4l2loopback*.rpm +For extra images, add something like this to your Containerfile, replacing `TAG` with one of the `something-FR` tags above: + + COPY --from=ghcr.io/ublue-os/akmods-extra:TAG /rpms/ /tmp/rpms + RUN find /tmp/rpms + RUN rpm-ostree install /tmp/rpms/kmods/kmod-facetimehd*.rpm + For NVIDIA images, add something like this to your Containerfile, replacing `TAG` with one of the `something-FR-NVV` tags above: - COPY --from=ghcr.io/ublue-os/akmods:TAG /rpms/ /tmp/rpms + COPY --from=ghcr.io/ublue-os/akmods-nvidia:TAG /rpms/ /tmp/rpms RUN find /tmp/rpms RUN rpm-ostree install /tmp/rpms/ublue-os/ublue-os-nvidia*.rpm RUN rpm-ostree install /tmp/rpms/kmods/kmod-nvidia.rpm These examples show: + 1. copying all the rpms from the respective akmods images 2. installing the respective ublue specific RPM 3. installing a kmods RPM. - -# Adding kmods +## Adding kmods If you have a kmod you want to contribute send a pull request by adding a script using [build-kmod-wl.sh](https://github.com/ublue-os/akmods/blob/main/build-kmod-wl.sh) as an example. -# Verification +## Verification These images are signed with sisgstore's [cosign](https://docs.sigstore.dev/cosign/overview/). You can verify the signature by downloading the `cosign.pub` key from this repo and running the following command, replacing `RELEASE` with either `38` or `39`: cosign verify --key cosign.pub ghcr.io/ublue-os/akmods:RELEASE -# Metrics +## Metrics ![Alt](https://repobeats.axiom.co/api/embed/a7ddeb1a3d2e0ce534ccf7cfa75c33b35183b106.svg "Repobeats analytics image") - diff --git a/build-kmod-facetimehd.sh b/build-kmod-facetimehd.sh new file mode 100755 index 00000000..32c55863 --- /dev/null +++ b/build-kmod-facetimehd.sh @@ -0,0 +1,25 @@ +#!/bin/sh + +set -oeux pipefail + +ARCH="$(rpm -E '%_arch')" +KERNEL="$(rpm -q "${KERNEL_NAME:-kernel}" --queryformat '%{VERSION}-%{RELEASE}.%{ARCH}')" +RELEASE="$(rpm -E '%fedora')" + +if [[ "${RELEASE}" -ge 41 ]]; then + COPR_RELEASE="rawhide" +else + COPR_RELEASE="${RELEASE}" +fi + +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) +rpm-ostree install \ + 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) + +rm -f /etc/yum.repos.d/_copr_mulderje-facetimehd-kmod.repo