-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add 'extra' akmod stream & facetimehd-kmod to akmod cache (#163)
Co-authored-by: Benjamin Sherman <[email protected]>
- Loading branch information
Showing
6 changed files
with
145 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Containerfile* linguist-language=Containerfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,6 +35,7 @@ jobs: | |
- surface | ||
cfile_suffix: | ||
- common | ||
- extra | ||
- nvidia | ||
exclude: | ||
- kernel_flavor: asus | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |