From 154c970671b1a546764e86b2ee8fd80ed84d9689 Mon Sep 17 00:00:00 2001 From: Nicolas MASSE Date: Sat, 1 Nov 2025 16:34:57 +0100 Subject: [PATCH] doc + script --- README.md | 5 ++++- build.sh | 20 ++++++++++++-------- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index b0a7e9f..ba8fb00 100644 --- a/README.md +++ b/README.md @@ -23,9 +23,12 @@ The packages are built and hosted on COPR. To use them on your aarch64 system: # Enable the COPR repository sudo dnf copr enable nmasse-itix/zfs-aarch64 - # Optionally, limit the packages to only ZFS-related ones + # Optionally, limit the packages to only ZFS-related ones (DNF >= 5) sudo dnf config-manager setopt 'copr:copr.fedorainfracloud.org:nmasse-itix:zfs-aarch64.includepkgs=*zfs* libnvpair* libuutil* libzpool*' + # Optionally, limit the packages to only ZFS-related ones (DNF < 5) + sudo dnf config-manager --setopt 'copr:copr.fedorainfracloud.org:nmasse-itix:zfs-aarch64.includepkgs=*zfs* libnvpair* libuutil* libzpool*' --save + # Verify the repository is enabled and packages are available sudo dnf --repo=copr:copr.fedorainfracloud.org:nmasse-itix:zfs-aarch64 search zfs ``` diff --git a/build.sh b/build.sh index c876cb2..06dd0d4 100755 --- a/build.sh +++ b/build.sh @@ -14,21 +14,25 @@ COPR_PROJECT="zfs-aarch64" COPR_USERNAME="$(copr-cli whoami)" for dist in centos-* fedora-*; do - chroot="${dist//centos/epel}-aarch64" - echo "Building packages for $dist using $chroot..." + copr_release="${dist//centos/epel}" + echo "Building packages for $copr_release..." for spec in $dist/SPECS/*.spec; do spec="${spec#$dist/}" package_name="$(basename "$spec" .spec)" dist_version="${dist#*-}" dist_name="${dist%%-*}" + copr_args=( --chroot "$copr_release-aarch64" ) - copr-cli buildscm --clone-url "$GIT_REPOSITORY" --method make_srpm --subdir "$dist" --spec "$spec" --chroot "$chroot" --background --nowait "$COPR_PROJECT" - - # Special case for libvirt on Fedora 43. Since the ZFS driver of libvirt is disabled since Fedora 43, we also build it for x86_64. - if [[ "$package_name" == "libvirt" && "$dist_name" == "fedora" && "$dist_version" -ge "43" ]]; then - echo "Also submitting libvirt build for Fedora 43 using x86_64 chroot..." - copr-cli buildscm --clone-url "$GIT_REPOSITORY" --method make_srpm --subdir "$dist" --spec "$spec" --chroot "$dist-x86_64" --background --nowait "$COPR_PROJECT" + # Special case for libvirt. + # Since the ZFS driver of libvirt is disabled since Fedora 43, we also build it for x86_64. + # And CentOS never shipped the Libvirt ZFS driver, so we build it for x86_64 as well. + if [[ "$package_name" == "libvirt" ]]; then + if [[ "$dist_name" == "fedora" && "$dist_version" -ge "43" || "$dist_name" == "centos" ]]; then + copr_args+=( --chroot "$copr_release-x86_64" ) + fi fi + + copr-cli buildscm --clone-url "$GIT_REPOSITORY" --method make_srpm --subdir "$dist" --spec "$spec" "${copr_args[@]}" --background --nowait "$COPR_PROJECT" done done