diff options
author | omni <omni+alpine@hack.org> | 2021-12-16 16:05:59 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2021-12-17 06:46:02 +0000 |
commit | ed08ee83abbed21f7c6ed7951d88c9d12d1eb369 (patch) | |
tree | 21c6014fb7183f8557df2336a78017ae3d3fcd96 | |
parent | d0f2c92baf69116ed4baf92cdfed367e7b7b9986 (diff) | |
download | aports-ed08ee83abbed21f7c6ed7951d88c9d12d1eb369.tar.gz aports-ed08ee83abbed21f7c6ed7951d88c9d12d1eb369.tar.bz2 aports-ed08ee83abbed21f7c6ed7951d88c9d12d1eb369.tar.xz |
main/zfs: upgrade to 2.1.2
Fixes #13198
-rw-r--r-- | main/zfs/APKBUILD | 11 | ||||
-rw-r--r-- | main/zfs/python-3.10.patch | 149 | ||||
-rw-r--r-- | main/zfs/test-mmap_seek.patch | 11 |
3 files changed, 17 insertions, 154 deletions
diff --git a/main/zfs/APKBUILD b/main/zfs/APKBUILD index 84745a4e88..0c8fe7de30 100644 --- a/main/zfs/APKBUILD +++ b/main/zfs/APKBUILD @@ -1,8 +1,8 @@ # Contributor: Carlo Landmeter <clandmeter@alpinelinux.org> # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=zfs -pkgver=2.1.1 -pkgrel=1 +pkgver=2.1.2 +pkgrel=0 pkgdesc="ZFS for Linux" url="https://zfsonlinux.org" arch="all !armhf !armv7" @@ -14,7 +14,8 @@ options="!check" # need to be run on live system w/ ZFS loaded. subpackages="$pkgname-dev $pkgname-doc $pkgname-openrc $pkgname-libs $pkgname-dracut::noarch $pkgname-udev $pkgname-scripts $pkgname-utils-py:utils_py:noarch py3-pyzfs:pyzfs:noarch" source="https://github.com/zfsonlinux/zfs/releases/download/zfs-$pkgver/zfs-$pkgver.tar.gz - python-3.10.patch" + test-mmap_seek.patch + " prepare() { default_prepare @@ -79,6 +80,6 @@ pyzfs() { } sha512sums=" -b69ce764a9f7438ec2c90f86be02abfd684c67cd38de876374e3e6f4b2f82a75d86fa70205def2ba454ad27e52ec8d955ebc4ba456e91d397129a54ea849c19c zfs-2.1.1.tar.gz -fecc90b99a8452bc92a9dcd6caf2f9fee865879247317337f74600be340bd3116cf80e6892833ac8fe62ad2167db09e8ccca11c1bd887acc57dda2389ad20eb0 python-3.10.patch +3e3932259da2a27f1c4cca8da62b909edc43bf51ab0229d2d5d0234d9a7eaa7b63b67c06a98cbe2d29ba1eb5cbcaab16e5062c2a2bc8e84cab770be10ebf2102 zfs-2.1.2.tar.gz +cf4b5a6f5062605ebb42c82a5a02fda6bc7ae74728437c666f5a43beb7ca2448567b579026cb26a87ce014a68d3fc81606284abb0b080e60a7ed02a2116b955b test-mmap_seek.patch " diff --git a/main/zfs/python-3.10.patch b/main/zfs/python-3.10.patch deleted file mode 100644 index 1fbb8b07c4..0000000000 --- a/main/zfs/python-3.10.patch +++ /dev/null @@ -1,149 +0,0 @@ -From 08cd0717359b1a18693e3c8e6d6e5a2819b35a48 Mon Sep 17 00:00:00 2001 -From: Rich Ercolani <214141+rincebrain@users.noreply.github.com> -Date: Tue, 8 Jun 2021 20:20:16 -0400 -Subject: [PATCH] Correct a flaw in the Python 3 version checking - -It turns out the ax_python_devel.m4 version check assumes that -("3.X+1.0" >= "3.X.0") is True in Python, which is not when X+1 -is 10 or above and X is not. (Also presumably X+1=100 and ...) - -So let's remake the check to behave consistently, using the -"packaging" or (if absent) the "distlib" modules. - -(Also, update the Github workflows to use the new packages.) - -Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> -Reviewed-by: John Kennedy <john.kennedy@delphix.com> -Signed-off-by: Rich Ercolani <rincebrain@gmail.com> -Closes: #12073 ---- - .github/workflows/zfs-tests-functional.yml | 3 +- - .github/workflows/zfs-tests-sanity.yml | 3 +- - .github/workflows/zloop.yml | 4 +-- - config/always-pyzfs.m4 | 15 ++++++++++ - config/ax_python_devel.m4 | 33 ++++++++++++++++++---- - rpm/generic/zfs.spec.in | 5 ++++ - 6 files changed, 53 insertions(+), 10 deletions(-) - -diff --git a/config/always-pyzfs.m4 b/config/always-pyzfs.m4 -index 76e07b593df..fa39fd88519 100644 ---- a/config/always-pyzfs.m4 -+++ b/config/always-pyzfs.m4 -@@ -46,6 +46,21 @@ AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_PYZFS], [ - ]) - AC_SUBST(DEFINE_PYZFS) - -+ dnl # -+ dnl # Python "packaging" (or, failing that, "distlib") module is required to build and install pyzfs -+ dnl # -+ AS_IF([test "x$enable_pyzfs" = xcheck -o "x$enable_pyzfs" = xyes], [ -+ ZFS_AC_PYTHON_MODULE([packaging], [], [ -+ ZFS_AC_PYTHON_MODULE([distlib], [], [ -+ AS_IF([test "x$enable_pyzfs" = xyes], [ -+ AC_MSG_ERROR("Python $PYTHON_VERSION packaging and distlib modules are not installed") -+ ], [test "x$enable_pyzfs" != xno], [ -+ enable_pyzfs=no -+ ]) -+ ]) -+ ]) -+ ]) -+ - dnl # - dnl # Require python-devel libraries - dnl # -diff --git a/config/ax_python_devel.m4 b/config/ax_python_devel.m4 -index faf6c2b0d7e..fcf73dc2088 100644 ---- a/config/ax_python_devel.m4 -+++ b/config/ax_python_devel.m4 -@@ -97,9 +97,18 @@ AC_DEFUN([AX_PYTHON_DEVEL],[ - # Check for a version of Python >= 2.1.0 - # - AC_MSG_CHECKING([for a version of Python >= '2.1.0']) -- ac_supports_python_ver=`$PYTHON -c "import sys; \ -- ver = sys.version.split ()[[0]]; \ -- print (ver >= '2.1.0')"` -+ ac_supports_python_ver=`cat<<EOD | $PYTHON - -+from __future__ import print_function; -+import sys; -+try: -+ from packaging import version; -+except ImportError: -+ from distlib import version; -+ver = sys.version.split ()[[0]]; -+(tst_cmp, tst_ver) = ">= '2.1.0'".split (); -+tst_ver = tst_ver.strip ("'"); -+eval ("print (version.LegacyVersion (ver)"+ tst_cmp +"version.LegacyVersion (tst_ver))") -+EOD` - if test "$ac_supports_python_ver" != "True"; then - if test -z "$PYTHON_NOVERSIONCHECK"; then - AC_MSG_RESULT([no]) -@@ -126,9 +135,21 @@ to something else than an empty string. - # - if test -n "$1"; then - AC_MSG_CHECKING([for a version of Python $1]) -- ac_supports_python_ver=`$PYTHON -c "import sys; \ -- ver = sys.version.split ()[[0]]; \ -- print (ver $1)"` -+ # Why the strip ()? Because if we don't, version.parse -+ # will, for example, report 3.10.0 >= '3.11.0' -+ ac_supports_python_ver=`cat<<EOD | $PYTHON - -+ -+from __future__ import print_function; -+import sys; -+try: -+ from packaging import version; -+except ImportError: -+ from distlib import version; -+ver = sys.version.split ()[[0]]; -+(tst_cmp, tst_ver) = "$1".split (); -+tst_ver = tst_ver.strip ("'"); -+eval ("print (version.LegacyVersion (ver)"+ tst_cmp +"version.LegacyVersion (tst_ver))") -+EOD` - if test "$ac_supports_python_ver" = "True"; then - AC_MSG_RESULT([yes]) - else -diff --git a/rpm/generic/zfs.spec.in b/rpm/generic/zfs.spec.in -index b1750942f53..b073d68a46c 100644 ---- a/rpm/generic/zfs.spec.in -+++ b/rpm/generic/zfs.spec.in -@@ -306,6 +306,11 @@ Requires: libffi - Requires: python%{__python_pkg_version} - Requires: %{__python_cffi_pkg} - %if 0%{?rhel}%{?fedora}%{?suse_version} -+%if 0%{?rhel} >= 8 || 0%{?centos} >= 8 || 0%{?fedora} >= 28 -+BuildRequires: python3-packaging -+%else -+BuildRequires: python-packaging -+%endif - BuildRequires: python%{__python_pkg_version}-devel - BuildRequires: %{__python_cffi_pkg} - BuildRequires: %{__python_setuptools_pkg} -From adeccfea177ee674913a87d95ddacbd699ed1c67 Mon Sep 17 00:00:00 2001 -From: Rich Ercolani <214141+rincebrain@users.noreply.github.com> -Date: Fri, 29 Oct 2021 18:36:01 -0400 -Subject: [PATCH] Python 3.10 fixes, part 2 - -There was a fallback case I overlooked in the initial patch, with -a similarly imperfect version extractor. - -Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> -Signed-off-by: Rich Ercolani <rincebrain@gmail.com> -Closes #12045 -Closes #12673 ---- - config/ax_python_devel.m4 | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/config/ax_python_devel.m4 b/config/ax_python_devel.m4 -index fcf73dc2088..7adcf01a04c 100644 ---- a/config/ax_python_devel.m4 -+++ b/config/ax_python_devel.m4 -@@ -224,7 +224,7 @@ EOD` - ac_python_version=$PYTHON_VERSION - else - ac_python_version=`$PYTHON -c "import sys; \ -- print (sys.version[[:3]])"` -+ print ('.'.join(sys.version.split('.')[[:2]]))"` - fi - fi - diff --git a/main/zfs/test-mmap_seek.patch b/main/zfs/test-mmap_seek.patch new file mode 100644 index 0000000000..777790c733 --- /dev/null +++ b/main/zfs/test-mmap_seek.patch @@ -0,0 +1,11 @@ +--- a/tests/zfs-tests/cmd/mmap_seek/mmap_seek.c ++++ b/tests/zfs-tests/cmd/mmap_seek/mmap_seek.c +@@ -29,6 +29,8 @@ + #include <stdlib.h> + #include <string.h> + #include <sys/mman.h> ++#include <sys/sysmacros.h> ++#include <linux/fs.h> + #include <errno.h> + + static void |