mirror of
https://github.com/ublue-os/akmods.git
synced 2026-11-03 23:09:54 -09:00
* chore(nvidia): move negativo nvidia repos to /usr This PR should do the following things: On Fedora 45 and higher, move .repo files from /etc/yum.repos.d to /usr/share/dnf5/repos.d. On Fedora 44 and centos/rhel, don't touch anything, package should be identical after this change and keep the /usr/share/ublue-os/etc/yum.repos.d for everything for now. As discussed in: https://github.com/ublue-os/akmods/issues/591#issuecomment-5742188994 * debug package contents * rm /usr/share/ublue-os/etc/yum.repos.d from F45 and higher * remove more redundant leading slashes or else this results in /usr/share/ublue-os//etc/yum.repos.d with 2 slashes as %{_sysconfdir} resolves to /etc which already has a slash character * add check to prevent shipping enabled repos * changelog * make test check for True and yes as well These are also valid options in dnf5, however at least Fedora sticks with 0/1. See: https://dnf5.readthedocs.io/en/stable/dnf5.conf.5.html#boolean-label See: https://dnf5.readthedocs.io/en/stable/dnf5.conf.5.html#repo-options
226 lines
6.2 KiB
Text
226 lines
6.2 KiB
Text
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
|
|
ARG KMOD_REPO_ARG
|
|
#endif /* NVIDIA */
|
|
|
|
# /*
|
|
# common copy/add
|
|
# */
|
|
|
|
COPY certs /tmp/certs
|
|
|
|
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
|
|
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
|
|
|
|
#ifndef CENTOS
|
|
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
|
|
ADD https://raw.githubusercontent.com/terrapkg/packages/f${VERSION}/anda/terra/release/terra.repo \
|
|
/tmp/ublue-os-akmods-addons/rpmbuild/SOURCES/terra.repo
|
|
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
|
|
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}
|
|
#endif
|
|
|
|
# /*
|
|
# Preperation
|
|
# */
|
|
COPY build_files/prep /tmp/
|
|
RUN --mount=type=cache,dst=/var/cache/dnf \
|
|
--mount=type=cache,dst=/var/cache/libdnf5 \
|
|
bash <<'RUNEOF'
|
|
set ${CI+-x} -euo pipefail
|
|
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
|
|
ARG KMOD_REPO_ARG
|
|
#endif /* NVIDIA */
|
|
|
|
#ifdef ZFS
|
|
ARG ZFS_MINOR_VERSION_ARG
|
|
ARG ZFS_CONFIGURE_ARGS_ARG
|
|
#endif /* ZFS */
|
|
|
|
#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'
|
|
set ${CI+-x} -euo pipefail
|
|
/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'
|
|
set ${CI+-x} -euo pipefail
|
|
/tmp/build-kmod-framework-laptop.sh
|
|
/tmp/build-kmod-openrazer.sh
|
|
/tmp/build-kmod-v4l2loopback.sh
|
|
/tmp/build-kmod-vhba.sh
|
|
/tmp/build-kmod-wl.sh
|
|
/tmp/build-kmod-xpadneo.sh
|
|
/tmp/build-kmod-xone.sh
|
|
RUNEOF
|
|
|
|
#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'
|
|
set ${CI+-x} -euo pipefail
|
|
/tmp/build-kmod-gcadapter_oc.sh || echo "SKIPPED: gcadapter_oc"
|
|
/tmp/build-kmod-nct6687d.sh || echo "SKIPPED: nct6687d"
|
|
/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"
|
|
/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"
|
|
/tmp/build-kmod-kvmfr.sh || echo "SKIPPED: kvmfr"
|
|
RUNEOF
|
|
|
|
#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'
|
|
set ${CI+-x} -euo pipefail
|
|
/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/
|
|
rpm -qlp /var/cache/rpms/ublue-os/ublue-os-nvidia-addons*.rpm
|
|
RUNEOF
|
|
RUN --mount=type=cache,dst=/var/cache/dnf \
|
|
--mount=type=cache,dst=/var/cache/libdnf5 \
|
|
bash <<'RUNEOF'
|
|
set ${CI+-x} -euo pipefail
|
|
/tmp/build-kmod-nvidia.sh "$KMOD_REPO"
|
|
RUNEOF
|
|
RUN --mount=type=cache,dst=/var/cache/dnf \
|
|
--mount=type=cache,dst=/var/cache/libdnf5 \
|
|
bash <<'RUNEOF'
|
|
set ${CI+-x} -euo pipefail
|
|
/tmp/download-nvidia-rpms.sh "$KMOD_REPO"
|
|
install -m755 -t /var/cache/rpms/ublue-os /tmp/nvidia-install.sh
|
|
RUNEOF
|
|
|
|
#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'
|
|
set ${CI+-x} -euo pipefail
|
|
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'
|
|
set ${CI+-x} -euo pipefail
|
|
/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'
|
|
set ${CI+-x} -euo pipefail
|
|
#ifdef ZFS
|
|
/tmp/dual-sign-zfs.sh
|
|
#else
|
|
/tmp/dual-sign.sh
|
|
#endif /* ZFS */
|
|
/tmp/build-post.sh
|
|
RUNEOF
|
|
|
|
FROM scratch AS RPM_CACHE
|
|
|
|
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
|
|
|
|
#ifdef NVIDIA
|
|
ARG KMOD_REPO_ARG
|
|
#endif /* NVIDIA */
|
|
|
|
#ifdef CI_SETX
|
|
ENV CI=1
|
|
#endif
|
|
|
|
COPY --from=RPM_CACHE /kernel-rpms /tmp/kernel_cache
|
|
COPY --from=RPM_CACHE /rpms /tmp/akmods-rpms
|
|
|
|
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'
|
|
set ${CI+-x} -euo pipefail
|
|
/tmp/test-prep.sh
|
|
RUNEOF
|
|
|
|
COPY build_files/test/check-signatures.sh /tmp/
|
|
CMD ["/tmp/check-signatures.sh"]
|
|
|
|
FROM scratch AS RPMS
|
|
COPY --from=RPM_CACHE / /
|