2025-07-07 16:09:34 -08:00
|
|
|
FROM BUILDER AS build_prep
|
|
|
|
|
|
|
|
|
|
ARG DUAL_SIGN="true"
|
|
|
|
|
ARG KERNEL_FLAVOR_ARG
|
|
|
|
|
ARG KERNEL_NAME_ARG
|
|
|
|
|
ARG RPMFUSION_MIRROR_ARG
|
|
|
|
|
ARG VERSION_ARG
|
|
|
|
|
|
|
|
|
|
#ifdef CI_SETX
|
|
|
|
|
ARG CI=1
|
|
|
|
|
#endif /* CI_SETX */
|
|
|
|
|
|
|
|
|
|
#ifdef NVIDIA
|
2025-12-08 15:13:30 -09:00
|
|
|
ARG KMOD_REPO_ARG
|
2025-07-07 16:09:34 -08:00
|
|
|
#endif /* NVIDIA */
|
|
|
|
|
|
|
|
|
|
# /*
|
|
|
|
|
# common copy/add
|
|
|
|
|
# */
|
|
|
|
|
|
|
|
|
|
COPY certs /tmp/certs
|
|
|
|
|
|
2026-08-08 16:26:12 -08:00
|
|
|
COPY files/usr/lib/systemd/system-preset/70-nvidia-cdi-refresh.preset /tmp/ublue-os-nvidia-addons/rpmbuild/SOURCES/70-nvidia-cdi-refresh.preset
|
|
|
|
|
COPY files/usr/lib/systemd/system/nvidia-cdi-refresh.service.d/10-ublue-ordering.conf /tmp/ublue-os-nvidia-addons/rpmbuild/SOURCES/10-ublue-ordering.conf
|
2025-07-07 16:09:34 -08:00
|
|
|
COPY files/etc/udev/rules.d/60-nvidia-extra-devices-pm.rules /tmp/ublue-os-nvidia-addons/rpmbuild/SOURCES/60-nvidia-extra-devices-pm.rules
|
|
|
|
|
|
2026-10-13 11:24:35 -08:00
|
|
|
# /*
|
|
|
|
|
# Fedora-specific repository configurations
|
|
|
|
|
# */
|
2025-07-07 16:09:34 -08:00
|
|
|
ADD https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/repo/fedora-${VERSION}/ublue-os-akmods-fedora-${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
|
2026-04-03 20:46:44 -08:00
|
|
|
ADD https://raw.githubusercontent.com/terrapkg/packages/f${VERSION}/anda/terra/release/terra.repo \
|
|
|
|
|
/tmp/ublue-os-akmods-addons/rpmbuild/SOURCES/terra.repo
|
2026-08-01 09:14:07 -08:00
|
|
|
ADD https://copr.fedorainfracloud.org/coprs/rok/cdemu/repo/fedora-${VERSION}/rok-cdemu-fedora-${VERSION}.repo \
|
|
|
|
|
/tmp/ublue-os-akmods-addons/rpmbuild/SOURCES/_copr_rok-cdemu.repo
|
2026-04-04 21:45:44 -08:00
|
|
|
ADD https://raw.githubusercontent.com/terrapkg/packages/f${VERSION}/anda/terra/gpg-keys/RPM-GPG-KEY-terra${VERSION} \
|
|
|
|
|
/tmp/ublue-os-akmods-addons/rpmbuild/SOURCES/RPM-GPG-KEY-terra${VERSION}
|
2025-07-07 16:09:34 -08:00
|
|
|
|
|
|
|
|
# /*
|
|
|
|
|
# Preperation
|
|
|
|
|
# */
|
|
|
|
|
COPY build_files/prep /tmp/
|
|
|
|
|
RUN --mount=type=cache,dst=/var/cache/dnf \
|
|
|
|
|
--mount=type=cache,dst=/var/cache/libdnf5 \
|
|
|
|
|
bash <<'RUNEOF'
|
2026-05-06 17:36:26 -08:00
|
|
|
set ${CI+-x} -euo pipefail
|
2025-07-07 16:09:34 -08:00
|
|
|
ls -sh /tmp/kernel_cache
|
|
|
|
|
/tmp/build-prep.sh
|
|
|
|
|
RUNEOF
|
|
|
|
|
|
|
|
|
|
FROM build_prep AS builder
|
|
|
|
|
|
|
|
|
|
ARG DUAL_SIGN="true"
|
|
|
|
|
ARG KERNEL_FLAVOR_ARG
|
|
|
|
|
ARG KERNEL_NAME_ARG
|
|
|
|
|
ARG RPMFUSION_MIRROR_ARG
|
|
|
|
|
ARG VERSION_ARG
|
|
|
|
|
|
|
|
|
|
#ifdef CI_SETX
|
|
|
|
|
ARG CI=1
|
|
|
|
|
#endif /* CI_SETX */
|
|
|
|
|
|
|
|
|
|
#ifdef NVIDIA
|
2025-12-08 15:13:30 -09:00
|
|
|
ARG KMOD_REPO_ARG
|
feat(ci): skip rebuilding unchanged akmods images (#620)
Every nightly rebuilds all 33 targets even when nothing changed. Each
rebuild is another chance to hit a mirror flake, and published images
record nothing about what they were built from.
Label each image with a fingerprint of its inputs: the kernel release,
the git objects that feed the build, the target config, and overrides.
The build job skips test, build, and push when the published image
matches, is signed, and is under AKMODS_MAX_AGE_DAYS old (default 7).
The manifest job likewise skips regenerating indexes that are already
current and signed, but attestation still runs every time. Any doubt
means build. PR runs and the new force input bypass the guard.
NVIDIA builds pin akmod-nvidia to the fingerprinted version, and the
userspace packages to the same driver version, so the label describes
what was actually built.
2026-10-24 21:21:52 -08:00
|
|
|
ARG NVIDIA_AKMOD_EVR_ARG
|
2025-07-07 16:09:34 -08:00
|
|
|
#endif /* NVIDIA */
|
|
|
|
|
|
2025-12-22 10:11:28 -09:00
|
|
|
#ifdef ZFS
|
fix(ci): stop four recurring CI flakes (#618)
* fix(build): retry dnf installs with fresh metadata
Fedora updates pushes leave mirrors briefly inconsistent. dnf rejects the
new repomd, accepts an older one, then 404s on RPMs that have already been
removed. A plain retry reuses that metadata, especially with the persistent
libdnf5 cache, so refresh it between attempts.
* fix(zfs): pin ZFS release instead of querying the GitHub API
Unauthenticated api.github.com calls from shared runner IPs get rate-limited,
and short curl retries cannot outlast an hourly limit. Pinning the full
release removes that call and makes version bumps show up as PRs.
BREAKING: ZFS_MINOR_VERSION and zfs.*.minor_version are no longer read.
Use ZFS_VERSION and zfs.*.version (full X.Y.Z). Renovate manages the pin.
* fix(just): resolve CoreOS kernel without pulling the image
cache-kernel pulls the full fedora-coreos image on every arch just to run
rpm -q kernel, and a quay.io CDN EOF fails the job. Read the build id from
the image index and the kernel from commitmeta.json instead.
An empty or invalid cache.json was also published, so the later step failed
with "Input required and not supplied: path". Write the cache only after
the fields check out, and drop a restored cache that does not match.
* fix(just): retry koji kernel lookups
A transient curl error was treated as "not found" because the check matched
the string "200 OK" with no retry. That dropped the release number by 100
and could select the wrong kernel or none. Retry transport failures, and
only use the fallback after a successful request that returns 404.
* docs: document RPMFUSION_MIRROR build override
The variable already changes where the build fetches RPM Fusion packages,
but it was not listed with the other Justfile environment variables.
2026-10-24 15:08:40 -08:00
|
|
|
ARG ZFS_VERSION_ARG
|
2026-07-20 09:04:19 -08:00
|
|
|
ARG ZFS_CONFIGURE_ARGS_ARG
|
2025-12-22 10:11:28 -09:00
|
|
|
#endif /* ZFS */
|
|
|
|
|
|
2025-07-07 16:09:34 -08:00
|
|
|
#if defined COMMON
|
|
|
|
|
# /*
|
|
|
|
|
# common akmods
|
|
|
|
|
# */
|
|
|
|
|
COPY build_files/common /tmp/
|
|
|
|
|
RUN --mount=type=cache,dst=/var/cache/dnf \
|
|
|
|
|
--mount=type=cache,dst=/var/cache/libdnf5 \
|
|
|
|
|
bash <<'RUNEOF'
|
2026-05-06 17:36:26 -08:00
|
|
|
set ${CI+-x} -euo pipefail
|
2025-07-07 16:09:34 -08:00
|
|
|
/tmp/build-ublue-os-akmods-addons.sh
|
|
|
|
|
cp /tmp/ublue-os-akmods-addons/rpmbuild/RPMS/noarch/ublue-os-akmods-addons*.rpm /var/cache/rpms/ublue-os/
|
|
|
|
|
RUNEOF
|
|
|
|
|
RUN --mount=type=cache,dst=/var/cache/dnf \
|
|
|
|
|
--mount=type=cache,dst=/var/cache/libdnf5 \
|
|
|
|
|
bash <<'RUNEOF'
|
2026-09-02 19:59:16 -08:00
|
|
|
set ${CI+-x} -euo pipefail
|
2025-07-07 16:09:34 -08:00
|
|
|
/tmp/build-kmod-openrazer.sh
|
|
|
|
|
/tmp/build-kmod-v4l2loopback.sh
|
|
|
|
|
/tmp/build-kmod-wl.sh
|
2026-03-16 10:36:24 -08:00
|
|
|
/tmp/build-kmod-xpadneo.sh
|
2026-04-04 23:08:18 -08:00
|
|
|
/tmp/build-kmod-xone.sh
|
2025-07-07 16:09:34 -08:00
|
|
|
RUNEOF
|
|
|
|
|
|
2026-03-19 18:07:31 -08:00
|
|
|
#elif defined EXTRA
|
|
|
|
|
# /*
|
|
|
|
|
# extra akmods
|
|
|
|
|
# */
|
|
|
|
|
COPY build_files/extra /tmp/
|
|
|
|
|
RUN --mount=type=cache,dst=/var/cache/dnf \
|
|
|
|
|
--mount=type=cache,dst=/var/cache/libdnf5 \
|
|
|
|
|
bash <<'RUNEOF'
|
2026-05-06 17:36:26 -08:00
|
|
|
set ${CI+-x} -euo pipefail
|
2026-04-13 13:22:05 -08:00
|
|
|
/tmp/build-kmod-gcadapter_oc.sh || echo "SKIPPED: gcadapter_oc"
|
2026-08-14 12:48:37 -08:00
|
|
|
/tmp/build-kmod-nct6687d.sh || echo "SKIPPED: nct6687d"
|
2026-04-13 13:22:05 -08:00
|
|
|
/tmp/build-kmod-zenergy.sh || echo "SKIPPED: zenergy"
|
|
|
|
|
/tmp/build-kmod-ryzen-smu.sh || echo "SKIPPED: ryzen-smu"
|
|
|
|
|
/tmp/build-kmod-evdi.sh || echo "SKIPPED: evdi"
|
|
|
|
|
/tmp/build-kmod-system76.sh || echo "SKIPPED: system76"
|
|
|
|
|
/tmp/build-kmod-system76-io.sh || echo "SKIPPED: system76-io"
|
|
|
|
|
/tmp/build-kmod-hid-tmff2.sh || echo "SKIPPED: hid-tmff2"
|
|
|
|
|
/tmp/build-kmod-new-lg4ff.sh || echo "SKIPPED: new-lg4ff"
|
2026-10-22 15:27:25 -08:00
|
|
|
/tmp/build-kmod-logitech-trueforce.sh || echo "SKIPPED: logitech-trueforce"
|
2026-04-13 13:22:05 -08:00
|
|
|
/tmp/build-kmod-t150-driver.sh || echo "SKIPPED: t150-driver"
|
|
|
|
|
/tmp/build-kmod-hid-fanatecff.sh || echo "SKIPPED: hid-fanatecff"
|
|
|
|
|
/tmp/build-kmod-sc0710.sh || echo "SKIPPED: sc0710"
|
2026-10-22 15:30:17 -08:00
|
|
|
/tmp/build-kmod-ayaneo-platform.sh || echo "SKIPPED: ayaneo-platform"
|
2026-04-13 13:22:05 -08:00
|
|
|
/tmp/build-kmod-kvmfr.sh || echo "SKIPPED: kvmfr"
|
2026-10-26 13:16:16 -08:00
|
|
|
/tmp/build-kmod-vhba.sh || echo "SKIPPED: vhba"
|
2026-03-19 18:07:31 -08:00
|
|
|
RUNEOF
|
|
|
|
|
|
2025-07-07 16:09:34 -08:00
|
|
|
#elif defined NVIDIA
|
|
|
|
|
# /*
|
|
|
|
|
# nvidia kmods
|
|
|
|
|
# */
|
|
|
|
|
|
|
|
|
|
COPY build_files/nvidia /tmp/
|
|
|
|
|
RUN --mount=type=cache,dst=/var/cache/dnf \
|
|
|
|
|
--mount=type=cache,dst=/var/cache/libdnf5 \
|
|
|
|
|
bash <<'RUNEOF'
|
2026-09-02 19:59:16 -08:00
|
|
|
set ${CI+-x} -euo pipefail
|
2025-07-07 16:09:34 -08:00
|
|
|
/tmp/build-ublue-os-nvidia-addons.sh
|
|
|
|
|
cp /tmp/ublue-os-nvidia-addons/rpmbuild/RPMS/noarch/ublue-os-nvidia-addons*.rpm /var/cache/rpms/ublue-os/
|
2026-09-20 12:32:49 -08:00
|
|
|
rpm -qlp /var/cache/rpms/ublue-os/ublue-os-nvidia-addons*.rpm
|
2025-07-07 16:09:34 -08:00
|
|
|
RUNEOF
|
|
|
|
|
RUN --mount=type=cache,dst=/var/cache/dnf \
|
|
|
|
|
--mount=type=cache,dst=/var/cache/libdnf5 \
|
|
|
|
|
bash <<'RUNEOF'
|
2026-09-02 19:59:16 -08:00
|
|
|
set ${CI+-x} -euo pipefail
|
2025-12-08 15:13:30 -09:00
|
|
|
/tmp/build-kmod-nvidia.sh "$KMOD_REPO"
|
2025-07-07 16:09:34 -08:00
|
|
|
RUNEOF
|
2026-02-17 12:31:46 -09:00
|
|
|
RUN --mount=type=cache,dst=/var/cache/dnf \
|
|
|
|
|
--mount=type=cache,dst=/var/cache/libdnf5 \
|
|
|
|
|
bash <<'RUNEOF'
|
2026-09-02 19:59:16 -08:00
|
|
|
set ${CI+-x} -euo pipefail
|
2026-02-17 12:31:46 -09:00
|
|
|
/tmp/download-nvidia-rpms.sh "$KMOD_REPO"
|
2026-03-07 13:06:39 -09:00
|
|
|
install -m755 -t /var/cache/rpms/ublue-os /tmp/nvidia-install.sh
|
2026-02-17 12:31:46 -09:00
|
|
|
RUNEOF
|
2025-07-07 16:09:34 -08:00
|
|
|
|
|
|
|
|
#elif defined ZFS
|
|
|
|
|
# /*
|
|
|
|
|
# zfs akmods
|
|
|
|
|
# */
|
|
|
|
|
COPY build_files/zfs /tmp/
|
|
|
|
|
RUN --mount=type=cache,dst=/var/cache/dnf \
|
|
|
|
|
--mount=type=cache,dst=/var/cache/libdnf5 \
|
|
|
|
|
bash <<'RUNEOF'
|
2026-05-06 17:36:26 -08:00
|
|
|
set ${CI+-x} -euo pipefail
|
2025-11-18 22:06:14 -09:00
|
|
|
if [[ "${KERNEL_FLAVOR}" =~ (coreos|longterm) ]]; then
|
|
|
|
|
/tmp/build-ublue-os-ucore-addons.sh
|
|
|
|
|
cp /tmp/ublue-os-ucore-addons/rpmbuild/RPMS/noarch/ublue-os-ucore-addons*.rpm /var/cache/rpms/ucore/
|
|
|
|
|
fi
|
|
|
|
|
RUNEOF
|
|
|
|
|
RUN --mount=type=cache,dst=/var/cache/dnf \
|
|
|
|
|
--mount=type=cache,dst=/var/cache/libdnf5 \
|
|
|
|
|
bash <<'RUNEOF'
|
2026-05-06 17:36:26 -08:00
|
|
|
set ${CI+-x} -euo pipefail
|
2025-07-07 16:09:34 -08:00
|
|
|
/tmp/build-kmod-zfs.sh
|
|
|
|
|
RUNEOF
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
# /*
|
|
|
|
|
# Signing
|
|
|
|
|
# */
|
|
|
|
|
COPY build_files/post /tmp/
|
|
|
|
|
RUN --mount=type=cache,dst=/var/cache/dnf \
|
|
|
|
|
--mount=type=cache,dst=/var/cache/libdnf5 \
|
|
|
|
|
bash <<'RUNEOF'
|
2026-05-06 17:36:26 -08:00
|
|
|
set ${CI+-x} -euo pipefail
|
2025-07-07 16:09:34 -08:00
|
|
|
#ifdef ZFS
|
|
|
|
|
/tmp/dual-sign-zfs.sh
|
|
|
|
|
#else
|
|
|
|
|
/tmp/dual-sign.sh
|
|
|
|
|
#endif /* ZFS */
|
|
|
|
|
/tmp/build-post.sh
|
|
|
|
|
RUNEOF
|
|
|
|
|
|
2025-07-08 10:19:06 -08:00
|
|
|
FROM scratch AS RPM_CACHE
|
2025-07-07 16:09:34 -08:00
|
|
|
|
|
|
|
|
COPY --from=builder /var/cache/kernel-rpms /kernel-rpms
|
|
|
|
|
COPY --from=builder /var/cache/rpms /rpms
|
|
|
|
|
|
|
|
|
|
FROM build_prep AS test
|
|
|
|
|
|
|
|
|
|
ARG DUAL_SIGN="true"
|
|
|
|
|
ARG KERNEL_FLAVOR_ARG
|
|
|
|
|
ARG KERNEL_NAME_ARG
|
|
|
|
|
ARG RPMFUSION_MIRROR_ARG
|
|
|
|
|
ARG VERSION_ARG
|
|
|
|
|
|
2026-02-17 12:31:46 -09:00
|
|
|
#ifdef NVIDIA
|
|
|
|
|
ARG KMOD_REPO_ARG
|
|
|
|
|
#endif /* NVIDIA */
|
|
|
|
|
|
2025-07-07 16:09:34 -08:00
|
|
|
#ifdef CI_SETX
|
|
|
|
|
ENV CI=1
|
|
|
|
|
#endif
|
|
|
|
|
|
2025-07-08 10:19:06 -08:00
|
|
|
COPY --from=RPM_CACHE /kernel-rpms /tmp/kernel_cache
|
|
|
|
|
COPY --from=RPM_CACHE /rpms /tmp/akmods-rpms
|
2025-07-07 16:09:34 -08:00
|
|
|
|
|
|
|
|
COPY build_files/test/test-prep.sh /tmp/
|
|
|
|
|
COPY certs /tmp/certs
|
|
|
|
|
|
|
|
|
|
RUN --mount=type=cache,dst=/var/cache/dnf \
|
|
|
|
|
--mount=type=cache,dst=/var/cache/libdnf5 \
|
|
|
|
|
bash <<'RUNEOF'
|
2026-05-06 17:36:26 -08:00
|
|
|
set ${CI+-x} -euo pipefail
|
2025-07-07 16:09:34 -08:00
|
|
|
/tmp/test-prep.sh
|
|
|
|
|
RUNEOF
|
|
|
|
|
|
|
|
|
|
COPY build_files/test/check-signatures.sh /tmp/
|
|
|
|
|
CMD ["/tmp/check-signatures.sh"]
|
2025-07-08 10:19:06 -08:00
|
|
|
|
|
|
|
|
FROM scratch AS RPMS
|
|
|
|
|
COPY --from=RPM_CACHE / /
|