Skip to content

Commit

Permalink
fix: don't attempt to pull zfs on beta (#1802)
Browse files Browse the repository at this point in the history
  • Loading branch information
m2Giles authored Oct 18, 2024
1 parent 4b199ab commit e4d9322
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/reusable-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

Expand Down Expand Up @@ -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
Expand Down
9 changes: 3 additions & 6 deletions Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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}"

Expand All @@ -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 && \
Expand All @@ -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
Expand Down
16 changes: 15 additions & 1 deletion build_files/install-akmods.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit e4d9322

Please sign in to comment.