Browse Source

work in progress

main
Nicolas Massé 1 month ago
parent
commit
df9175c968
  1. 19
      build.sh
  2. 26
      centos-10/PATCHES/20-enable-zfs.patch
  3. 18
      centos-10/SPECS/libvirt.spec
  4. 26
      centos-9/PATCHES/20-enable-zfs.patch
  5. 9
      centos-9/SPECS/libvirt.spec
  6. 26
      fedora-41/PATCHES/20-enable-zfs.patch
  7. 9
      fedora-41/SPECS/libvirt.spec
  8. 26
      fedora-42/PATCHES/20-enable-zfs.patch
  9. 9
      fedora-42/SPECS/libvirt.spec
  10. 26
      fedora-43/PATCHES/20-enable-zfs.patch
  11. 9
      fedora-43/SPECS/libvirt.spec
  12. 22
      update.sh

19
build.sh

@ -0,0 +1,19 @@
#!/bin/bash
set -Eeuo pipefail
GIT_REPOSITORY="https://github.com/nmasse-itix/zfs-aarch64.git"
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..."
for spec in $dist/SPECS/*.spec; do
spec=${spec#$dist/}
copr-cli buildscm --clone-url "$GIT_REPOSITORY" --subdir "$dist" --spec "$spec" --chroot "$chroot" --nowait "$COPR_PROJECT"
done
done
echo "All builds submitted to COPR project '@$COPR_USERNAME/$COPR_PROJECT'."
echo "You can monitor the build status at: https://copr.fedorainfracloud.org/coprs/$COPR_USERNAME/$COPR_PROJECT/builds/"

26
centos-10/PATCHES/20-enable-zfs.patch

@ -0,0 +1,26 @@
diff --git a/SPECS/libvirt.spec b/SPECS/libvirt.spec
--- a/SPECS/libvirt.spec
+++ b/SPECS/libvirt.spec
@@ -26,7 +26,7 @@
%endif
%define arches_vbox %{arches_x86}
%define arches_ceph %{arches_64bit}
-%define arches_zfs %{arches_x86} %{power64} %{arm}
+%define arches_zfs %{arches_x86} %{power64} %{arm} aarch64
%define arches_numactl %{arches_x86} %{power64} aarch64 s390x
%define arches_numad %{arches_x86} %{power64} aarch64
%define arches_ch x86_64 aarch64
@@ -76,12 +76,7 @@
%define with_storage_gluster 0
%endif
-# Fedora had zfs-fuse until F43
-%if 0%{?fedora} && 0%{?fedora} < 43
- %define with_storage_zfs 0%{!?_without_storage_zfs:1}
-%else
- %define with_storage_zfs 0
-%endif
+%define with_storage_zfs 1
%define with_storage_iscsi_direct 0%{!?_without_storage_iscsi_direct:1}
# libiscsi has been dropped in RHEL-9

18
centos-10/SPECS/libvirt.spec

@ -26,11 +26,7 @@
%endif %endif
%define arches_vbox %{arches_x86} %define arches_vbox %{arches_x86}
%define arches_ceph %{arches_64bit} %define arches_ceph %{arches_64bit}
%if 0%{?copr_projectname:1} %define arches_zfs %{arches_x86} %{power64} %{arm} aarch64
%define arches_zfs %{arches_x86} %{power64} %{arm} aarch64
%else
%define arches_zfs %{arches_x86} %{power64} %{arm}
%endif
%define arches_numactl %{arches_x86} %{power64} aarch64 s390x %define arches_numactl %{arches_x86} %{power64} aarch64 s390x
%define arches_numad %{arches_x86} %{power64} aarch64 %define arches_numad %{arches_x86} %{power64} aarch64
%define arches_ch x86_64 aarch64 %define arches_ch x86_64 aarch64
@ -80,17 +76,7 @@
%define with_storage_gluster 0 %define with_storage_gluster 0
%endif %endif
# Local overrides for Copr %define with_storage_zfs 1
%if 0%{?copr_projectname:1}
%define with_storage_zfs 1
%else
# Fedora had zfs-fuse until F43
%if 0%{?fedora} && 0%{?fedora} < 43
%define with_storage_zfs 0%{!?_without_storage_zfs:1}
%else
%define with_storage_zfs 0
%endif
%endif
%define with_storage_iscsi_direct 0%{!?_without_storage_iscsi_direct:1} %define with_storage_iscsi_direct 0%{!?_without_storage_iscsi_direct:1}
# libiscsi has been dropped in RHEL-9 # libiscsi has been dropped in RHEL-9

26
centos-9/PATCHES/20-enable-zfs.patch

@ -0,0 +1,26 @@
diff --git a/SPECS/libvirt.spec b/SPECS/libvirt.spec
--- a/SPECS/libvirt.spec
+++ b/SPECS/libvirt.spec
@@ -26,7 +26,7 @@
%endif
%define arches_vbox %{arches_x86}
%define arches_ceph %{arches_64bit}
-%define arches_zfs %{arches_x86} %{power64} %{arm}
+%define arches_zfs %{arches_x86} %{power64} %{arm} aarch64
%define arches_numactl %{arches_x86} %{power64} aarch64 s390x
%define arches_numad %{arches_x86} %{power64} aarch64
%define arches_ch x86_64 aarch64
@@ -76,12 +76,7 @@
%define with_storage_gluster 0
%endif
-# Fedora had zfs-fuse until F43
-%if 0%{?fedora} && 0%{?fedora} < 43
- %define with_storage_zfs 0%{!?_without_storage_zfs:1}
-%else
- %define with_storage_zfs 0
-%endif
+%define with_storage_zfs 1
%define with_storage_iscsi_direct 0%{!?_without_storage_iscsi_direct:1}
# libiscsi has been dropped in RHEL-9

9
centos-9/SPECS/libvirt.spec

@ -26,7 +26,7 @@
%endif %endif
%define arches_vbox %{arches_x86} %define arches_vbox %{arches_x86}
%define arches_ceph %{arches_64bit} %define arches_ceph %{arches_64bit}
%define arches_zfs %{arches_x86} %{power64} %{arm} %define arches_zfs %{arches_x86} %{power64} %{arm} aarch64
%define arches_numactl %{arches_x86} %{power64} aarch64 s390x %define arches_numactl %{arches_x86} %{power64} aarch64 s390x
%define arches_numad %{arches_x86} %{power64} aarch64 %define arches_numad %{arches_x86} %{power64} aarch64
%define arches_ch x86_64 aarch64 %define arches_ch x86_64 aarch64
@ -76,12 +76,7 @@
%define with_storage_gluster 0 %define with_storage_gluster 0
%endif %endif
# Fedora had zfs-fuse until F43 %define with_storage_zfs 1
%if 0%{?fedora} && 0%{?fedora} < 43
%define with_storage_zfs 0%{!?_without_storage_zfs:1}
%else
%define with_storage_zfs 0
%endif
%define with_storage_iscsi_direct 0%{!?_without_storage_iscsi_direct:1} %define with_storage_iscsi_direct 0%{!?_without_storage_iscsi_direct:1}
# libiscsi has been dropped in RHEL-9 # libiscsi has been dropped in RHEL-9

26
fedora-41/PATCHES/20-enable-zfs.patch

@ -0,0 +1,26 @@
diff --git a/SPECS/libvirt.spec b/SPECS/libvirt.spec
--- a/SPECS/libvirt.spec
+++ b/SPECS/libvirt.spec
@@ -26,7 +26,7 @@
%endif
%define arches_vbox %{arches_x86}
%define arches_ceph %{arches_64bit}
-%define arches_zfs %{arches_x86} %{power64} %{arm}
+%define arches_zfs %{arches_x86} %{power64} %{arm} aarch64
%define arches_numactl %{arches_x86} %{power64} aarch64 s390x
%define arches_numad %{arches_x86} %{power64} aarch64
@@ -75,12 +75,7 @@
%endif
%endif
-# Fedora has zfs-fuse
-%if 0%{?fedora}
- %define with_storage_zfs 0%{!?_without_storage_zfs:1}
-%else
- %define with_storage_zfs 0
-%endif
+%define with_storage_zfs 1
%define with_storage_iscsi_direct 0%{!?_without_storage_iscsi_direct:1}
# libiscsi has been dropped in RHEL-9

9
fedora-41/SPECS/libvirt.spec

@ -26,7 +26,7 @@
%endif %endif
%define arches_vbox %{arches_x86} %define arches_vbox %{arches_x86}
%define arches_ceph %{arches_64bit} %define arches_ceph %{arches_64bit}
%define arches_zfs %{arches_x86} %{power64} %{arm} %define arches_zfs %{arches_x86} %{power64} %{arm} aarch64
%define arches_numactl %{arches_x86} %{power64} aarch64 s390x %define arches_numactl %{arches_x86} %{power64} aarch64 s390x
%define arches_numad %{arches_x86} %{power64} aarch64 %define arches_numad %{arches_x86} %{power64} aarch64
@ -75,12 +75,7 @@
%endif %endif
%endif %endif
# Fedora has zfs-fuse %define with_storage_zfs 1
%if 0%{?fedora}
%define with_storage_zfs 0%{!?_without_storage_zfs:1}
%else
%define with_storage_zfs 0
%endif
%define with_storage_iscsi_direct 0%{!?_without_storage_iscsi_direct:1} %define with_storage_iscsi_direct 0%{!?_without_storage_iscsi_direct:1}
# libiscsi has been dropped in RHEL-9 # libiscsi has been dropped in RHEL-9

26
fedora-42/PATCHES/20-enable-zfs.patch

@ -0,0 +1,26 @@
diff --git a/SPECS/libvirt.spec b/SPECS/libvirt.spec
--- a/SPECS/libvirt.spec
+++ b/SPECS/libvirt.spec
@@ -26,7 +26,7 @@
%endif
%define arches_vbox %{arches_x86}
%define arches_ceph %{arches_64bit}
-%define arches_zfs %{arches_x86} %{power64} %{arm}
+%define arches_zfs %{arches_x86} %{power64} %{arm} aarch64
%define arches_numactl %{arches_x86} %{power64} aarch64 s390x
%define arches_numad %{arches_x86} %{power64} aarch64
@@ -75,12 +75,7 @@
%endif
%endif
-# Fedora has zfs-fuse
-%if 0%{?fedora}
- %define with_storage_zfs 0%{!?_without_storage_zfs:1}
-%else
- %define with_storage_zfs 0
-%endif
+%define with_storage_zfs 1
%define with_storage_iscsi_direct 0%{!?_without_storage_iscsi_direct:1}
# libiscsi has been dropped in RHEL-9

9
fedora-42/SPECS/libvirt.spec

@ -26,7 +26,7 @@
%endif %endif
%define arches_vbox %{arches_x86} %define arches_vbox %{arches_x86}
%define arches_ceph %{arches_64bit} %define arches_ceph %{arches_64bit}
%define arches_zfs %{arches_x86} %{power64} %{arm} %define arches_zfs %{arches_x86} %{power64} %{arm} aarch64
%define arches_numactl %{arches_x86} %{power64} aarch64 s390x %define arches_numactl %{arches_x86} %{power64} aarch64 s390x
%define arches_numad %{arches_x86} %{power64} aarch64 %define arches_numad %{arches_x86} %{power64} aarch64
%define arches_ch x86_64 aarch64 %define arches_ch x86_64 aarch64
@ -77,12 +77,7 @@
%endif %endif
%endif %endif
# Fedora has zfs-fuse %define with_storage_zfs 1
%if 0%{?fedora}
%define with_storage_zfs 0%{!?_without_storage_zfs:1}
%else
%define with_storage_zfs 0
%endif
%define with_storage_iscsi_direct 0%{!?_without_storage_iscsi_direct:1} %define with_storage_iscsi_direct 0%{!?_without_storage_iscsi_direct:1}
# libiscsi has been dropped in RHEL-9 # libiscsi has been dropped in RHEL-9

26
fedora-43/PATCHES/20-enable-zfs.patch

@ -0,0 +1,26 @@
diff --git a/SPECS/libvirt.spec b/SPECS/libvirt.spec
--- a/SPECS/libvirt.spec
+++ b/SPECS/libvirt.spec
@@ -26,7 +26,7 @@
%endif
%define arches_vbox %{arches_x86}
%define arches_ceph %{arches_64bit}
-%define arches_zfs %{arches_x86} %{power64} %{arm}
+%define arches_zfs %{arches_x86} %{power64} %{arm} aarch64
%define arches_numactl %{arches_x86} %{power64} aarch64 s390x
%define arches_numad %{arches_x86} %{power64} aarch64
%define arches_ch x86_64 aarch64
@@ -76,12 +76,7 @@
%define with_storage_gluster 0
%endif
-# Fedora had zfs-fuse until F43
-%if 0%{?fedora} && 0%{?fedora} < 43
- %define with_storage_zfs 0%{!?_without_storage_zfs:1}
-%else
- %define with_storage_zfs 0
-%endif
+%define with_storage_zfs 1
%define with_storage_iscsi_direct 0%{!?_without_storage_iscsi_direct:1}
# libiscsi has been dropped in RHEL-9

9
fedora-43/SPECS/libvirt.spec

@ -26,7 +26,7 @@
%endif %endif
%define arches_vbox %{arches_x86} %define arches_vbox %{arches_x86}
%define arches_ceph %{arches_64bit} %define arches_ceph %{arches_64bit}
%define arches_zfs %{arches_x86} %{power64} %{arm} %define arches_zfs %{arches_x86} %{power64} %{arm} aarch64
%define arches_numactl %{arches_x86} %{power64} aarch64 s390x %define arches_numactl %{arches_x86} %{power64} aarch64 s390x
%define arches_numad %{arches_x86} %{power64} aarch64 %define arches_numad %{arches_x86} %{power64} aarch64
%define arches_ch x86_64 aarch64 %define arches_ch x86_64 aarch64
@ -76,12 +76,7 @@
%define with_storage_gluster 0 %define with_storage_gluster 0
%endif %endif
# Fedora had zfs-fuse until F43 %define with_storage_zfs 1
%if 0%{?fedora} && 0%{?fedora} < 43
%define with_storage_zfs 0%{!?_without_storage_zfs:1}
%else
%define with_storage_zfs 0
%endif
%define with_storage_iscsi_direct 0%{!?_without_storage_iscsi_direct:1} %define with_storage_iscsi_direct 0%{!?_without_storage_iscsi_direct:1}
# libiscsi has been dropped in RHEL-9 # libiscsi has been dropped in RHEL-9

22
update.sh

@ -4,6 +4,20 @@ set -Eeuo pipefail
find . -name '*.src.rpm' -delete find . -name '*.src.rpm' -delete
function install_all_srpm () {
local dist=$1
echo "Importing source RPMs of $dist..."
rpm -ivh "--define=_topdir $PWD/$dist" "$dist/SRPMS/"*.src.rpm
}
function apply_patches () {
local dist=$1
for patch in "$dist/PATCHES"/*.patch; do
echo "Applying patch $(basename "$patch")..."
patch -d "$dist"* -p1 < "$patch"
done
}
for v in 41 42 43; do for v in 41 42 43; do
dist="fedora-$v" dist="fedora-$v"
mkdir -p "$dist/SRPMS" mkdir -p "$dist/SRPMS"
@ -13,8 +27,8 @@ for v in 41 42 43; do
if ! dnf download --repofrompath=zfs-$dist,http://download.zfsonlinux.org/fedora/$v/SRPMS/ --repo=zfs-$dist --source zfs zfs-dkms --destdir $dist/SRPMS/; then if ! dnf download --repofrompath=zfs-$dist,http://download.zfsonlinux.org/fedora/$v/SRPMS/ --repo=zfs-$dist --source zfs zfs-dkms --destdir $dist/SRPMS/; then
echo "ZFS source RPM not found for Fedora $v, skipping..." echo "ZFS source RPM not found for Fedora $v, skipping..."
fi fi
echo "Importing source RPMs for Fedora $v..." install_all_srpm "$dist"
rpm -ivh "--define=_topdir $PWD/$dist" $dist/SRPMS/*.src.rpm apply_patches "$dist"
done done
for v in 9 10; do for v in 9 10; do
@ -26,6 +40,6 @@ for v in 9 10; do
if ! dnf download --repofrompath=zfs-$dist,http://download.zfsonlinux.org/epel/$v/SRPMS/ --repo=zfs-$dist --source zfs zfs-dkms --destdir $dist/SRPMS/; then if ! dnf download --repofrompath=zfs-$dist,http://download.zfsonlinux.org/epel/$v/SRPMS/ --repo=zfs-$dist --source zfs zfs-dkms --destdir $dist/SRPMS/; then
echo "ZFS source RPM not found for CentOS Stream $v, skipping..." echo "ZFS source RPM not found for CentOS Stream $v, skipping..."
fi fi
echo "Importing source RPMs for CentOS Stream $v..." install_all_srpm "$dist"
rpm -ivh "--define=_topdir $PWD/$dist" $dist/SRPMS/*.src.rpm apply_patches "$dist"
done done

Loading…
Cancel
Save