summaryrefslogtreecommitdiffstats
path: root/rpm
diff options
context:
space:
mode:
authorRich Ercolani <[email protected]>2021-11-01 17:54:47 -0400
committerGitHub <[email protected]>2021-11-01 14:54:47 -0700
commit8cd9f20a34c72f57d1748f27a79230fcdc41e9b8 (patch)
tree32fd7fb7bef87ca495888d1021fee35a44736daa /rpm
parent71c6098526c6d5fbfa84a58cefe6cdc403488d8c (diff)
Correct a flaw in the Python 3 version checking (#12636)
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 <[email protected]> Reviewed-by: John Kennedy <[email protected]> Signed-off-by: Rich Ercolani <[email protected]> Closes: #12073
Diffstat (limited to 'rpm')
-rw-r--r--rpm/generic/zfs.spec.in5
1 files changed, 5 insertions, 0 deletions
diff --git a/rpm/generic/zfs.spec.in b/rpm/generic/zfs.spec.in
index 7fa28ac72..4a37ae8ce 100644
--- a/rpm/generic/zfs.spec.in
+++ b/rpm/generic/zfs.spec.in
@@ -311,6 +311,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}