From e4d9322e5da91e4a3545105be1da259379a18787 Mon Sep 17 00:00:00 2001 From: m2 <69128853+m2Giles@users.noreply.github.com> Date: Fri, 18 Oct 2024 18:50:35 -0400 Subject: [PATCH] fix: don't attempt to pull zfs on beta (#1802) --- .github/workflows/reusable-build.yml | 2 +- Containerfile | 9 +++------ build_files/install-akmods.sh | 16 +++++++++++++++- 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index 92ba676911d..b7bd37893c4 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -172,6 +172,7 @@ jobs: - name: Verify ZFS uses: EyeCantCU/cosign-action/verify@58722a084c82190b57863002d494c91eabbe9e79 # v0.3.0 + if: inputs.fedora_version != 'beta' with: containers: akmods-zfs:coreos-stable-${{ env.fedora_version }} @@ -337,7 +338,6 @@ jobs: sudo podman pull ${{ env.IMAGE_REGISTRY }}/${{ env.BASE_IMAGE_NAME }}-${{ env.image_flavor }}:${{ env.fedora_version }} sudo podman pull ${{ env.IMAGE_REGISTRY }}/akmods:${{ env.AKMODS_FLAVOR }}-${{ env.fedora_version }} sudo podman pull ${{ env.IMAGE_REGISTRY }}/akmods-nvidia:${{ env.AKMODS_FLAVOR }}-${{ env.fedora_version }} - sudo podman pull ${{ env.IMAGE_REGISTRY }}/akmods-zfs:coreos-stable-${{ env.fedora_version }} sudo podman pull ${{ env.IMAGE_REGISTRY }}/${{ env.AKMODS_FLAVOR }}-kernel:${{ env.kernel_release }} - name: Build Image diff --git a/Containerfile b/Containerfile index 40b7bb1cd65..ffc45c0a12c 100644 --- a/Containerfile +++ b/Containerfile @@ -6,17 +6,15 @@ ARG BASE_IMAGE="ghcr.io/ublue-os/${SOURCE_IMAGE}" ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION:-40}" ARG TARGET_BASE="${TARGET_BASE:-bluefin}" ARG NVIDIA_TYPE="${NVIDIA_TYPE:-}" -ARG KERNEL="${KERNEL:-6.9.7-200.fc40.x86_64}" +ARG KERNEL="${KERNEL:-6.10.10-200.fc40.x86_64}" ARG UBLUE_IMAGE_TAG="${UBLUE_IMAGE_TAG:-latest}" ARG SHA_HEAD_SHORT="${SHA_HEAD_SHORT}" # FROM's for Mounting ARG KMOD_SOURCE_COMMON="ghcr.io/ublue-os/akmods:${AKMODS_FLAVOR}-${FEDORA_MAJOR_VERSION}" -ARG ZFS_CACHE="ghcr.io/ublue-os/akmods-zfs:coreos-stable-${FEDORA_MAJOR_VERSION}" ARG NVIDIA_CACHE="ghcr.io/ublue-os/akmods-nvidia:${AKMODS_FLAVOR}-${FEDORA_MAJOR_VERSION}" ARG KERNEL_CACHE="ghcr.io/ublue-os/${AKMODS_FLAVOR}-kernel:${KERNEL}" FROM ${KMOD_SOURCE_COMMON} AS akmods -FROM ${ZFS_CACHE} AS zfs_cache FROM ${NVIDIA_CACHE} AS nvidia_cache FROM ${KERNEL_CACHE} AS kernel_cache @@ -33,7 +31,7 @@ ARG AKMODS_FLAVOR="${AKMODS_FLAVOR}" ARG BASE_IMAGE_NAME="${BASE_IMAGE_NAME}" ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION}" ARG NVIDIA_TYPE="${NVIDIA_TYPE:-}" -ARG KERNEL="${KERNEL:-6.9.7-200.fc40.x86_64}" +ARG KERNEL="${KERNEL:-6.10.10-200.fc40.x86_64}" ARG UBLUE_IMAGE_TAG="${UBLUE_IMAGE_TAG:-latest}" ARG SHA_HEAD_SHORT="${SHA_HEAD_SHORT}" @@ -43,7 +41,6 @@ RUN --mount=type=cache,dst=/var/cache/rpm-ostree \ --mount=type=bind,from=akmods,source=/rpms,target=/tmp/akmods \ --mount=type=bind,from=nvidia_cache,source=/rpms,target=/tmp/akmods-rpms \ --mount=type=bind,from=kernel_cache,source=/tmp/rpms,target=/tmp/kernel-rpms \ - --mount=type=bind,from=zfs_cache,source=/rpms,target=/tmp/akmods-zfs \ rpm-ostree cliwrap install-to-root / && \ mkdir -p /var/lib/alternatives && \ /ctx/build_files/build-base.sh && \ @@ -64,7 +61,7 @@ ARG IMAGE_FLAVOR="${IMAGE_FLAVOR}" ARG AKMODS_FLAVOR="${AKMODS_FLAVOR}" ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION}" ARG NVIDIA_TYPE="${NVIDIA_TYPE:-}" -ARG KERNEL="${KERNEL:-6.9.7-200.fc40.x86_64}" +ARG KERNEL="${KERNEL:-6.10.10-200.fc40.x86_64}" ARG UBLUE_IMAGE_TAG="${UBLUE_IMAGE_TAG:-latest}" # Build, Clean-up, Commit diff --git a/build_files/install-akmods.sh b/build_files/install-akmods.sh index cc00f773937..ac032843f12 100755 --- a/build_files/install-akmods.sh +++ b/build_files/install-akmods.sh @@ -29,7 +29,21 @@ rpm-ostree uninstall rpmfusion-free-release rpmfusion-nonfree-release # ZFS for gts/stable if [[ ${AKMODS_FLAVOR} =~ "coreos" ]]; then - rpm-ostree install pv /tmp/akmods-zfs/kmods/zfs/*.rpm + skopeo copy docker://ghcr.io/ublue-os/akmods-zfs:coreos-stable-"$(rpm -E %fedora)"-"${KERNEL}" dir:/tmp/akmods-zfs + ZFS_TARGZ=$(jq -r '.layers[].digest' < /tmp/akmods-zfs/manifest.json | cut -d : -f 2) + tar -xvzf /tmp/akmods-zfs/"$ZFS_TARGZ" -C /tmp/ + mv /tmp/rpms/* /tmp/akmods-zfs/ + ZFS_RPMS=( + /tmp/akmods-zfs/kmods/zfs/kmod-zfs-"${KERNEL}"-*.rpm + /tmp/akmods-zfs/kmods/zfs/libnvpair3-*.rpm + /tmp/akmods-zfs/kmods/zfs/libuutil3-*.rpm + /tmp/akmods-zfs/kmods/zfs/libzfs5-*.rpm + /tmp/akmods-zfs/kmods/zfs/libzpool5-*.rpm + /tmp/akmods-zfs/kmods/zfs/python3-pyzfs-*.rpm + /tmp/akmods-zfs/kmods/zfs/zfs-*.rpm + pv + ) + rpm-ostree install "${ZFS_RPMS[@]}" depmod -a -v "${KERNEL}" echo "zfs" > /usr/lib/modules-load.d/zfs.conf fi