summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorΝικόλαος Κυριάκος Φυτίλης2023-05-07 14:55:01 +0300
committerΝικόλαος Κυριάκος Φυτίλης2023-05-07 14:55:01 +0300
commit7a9eb8f1309b83072224627678a97414ebc16005 (patch)
tree2c325caf05b32f5e51c0e466aa45ab5753613cff
parent99ae37613666be75bafb9c8402101a0c5a145210 (diff)
downloadaur-7a9eb8f1309b83072224627678a97414ebc16005.tar.gz
add python packaging fix for legacyversion removal
-rw-r--r--2a7dcc5eb1357962dce1836c98f3824a297fd921.diff109
-rw-r--r--PKGBUILD21
2 files changed, 118 insertions, 12 deletions
diff --git a/2a7dcc5eb1357962dce1836c98f3824a297fd921.diff b/2a7dcc5eb1357962dce1836c98f3824a297fd921.diff
new file mode 100644
index 000000000000..600e871d64c0
--- /dev/null
+++ b/2a7dcc5eb1357962dce1836c98f3824a297fd921.diff
@@ -0,0 +1,109 @@
+diff --git a/config/ax_python_devel.m4 b/config/ax_python_devel.m4
+index e6cee04288b..f6d4b01444d 100644
+--- a/config/ax_python_devel.m4
++++ b/config/ax_python_devel.m4
+@@ -97,23 +97,13 @@ 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=`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`
++ ac_supports_python_ver=`$PYTHON -c "import sys; \
++ ver = sys.version.split ()[[0]]; \
++ print (ver >= '2.1.0')"`
+ if test "$ac_supports_python_ver" != "True"; then
+ if test -z "$PYTHON_NOVERSIONCHECK"; then
+ AC_MSG_RESULT([no])
+- m4_ifvaln([$2],[$2],[
+- AC_MSG_FAILURE([
++ AC_MSG_FAILURE([
+ This version of the AC@&t@_PYTHON_DEVEL macro
+ doesn't work properly with versions of Python before
+ 2.1.0. You may need to re-run configure, setting the
+@@ -122,7 +112,6 @@ PYTHON_EXTRA_LIBS and PYTHON_EXTRA_LDFLAGS by hand.
+ Moreover, to disable this check, set PYTHON_NOVERSIONCHECK
+ to something else than an empty string.
+ ])
+- ])
+ else
+ AC_MSG_RESULT([skip at user request])
+ fi
+@@ -131,37 +120,47 @@ to something else than an empty string.
+ fi
+
+ #
+- # if the macro parameter ``version'' is set, honour it
++ # If the macro parameter ``version'' is set, honour it.
++ # A Python shim class, VPy, is used to implement correct version comparisons via
++ # string expressions, since e.g. a naive textual ">= 2.7.3" won't work for
++ # Python 2.7.10 (the ".1" being evaluated as less than ".3").
+ #
+ if test -n "$1"; then
+ AC_MSG_CHECKING([for a version of Python $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`
++ cat << EOF > ax_python_devel_vpy.py
++class VPy:
++ def vtup(self, s):
++ return tuple(map(int, s.strip().replace("rc", ".").split(".")))
++ def __init__(self):
++ import sys
++ self.vpy = tuple(sys.version_info)
++ def __eq__(self, s):
++ return self.vpy == self.vtup(s)
++ def __ne__(self, s):
++ return self.vpy != self.vtup(s)
++ def __lt__(self, s):
++ return self.vpy < self.vtup(s)
++ def __gt__(self, s):
++ return self.vpy > self.vtup(s)
++ def __le__(self, s):
++ return self.vpy <= self.vtup(s)
++ def __ge__(self, s):
++ return self.vpy >= self.vtup(s)
++EOF
++ ac_supports_python_ver=`$PYTHON -c "import ax_python_devel_vpy; \
++ ver = ax_python_devel_vpy.VPy(); \
++ print (ver $1)"`
++ rm -rf ax_python_devel_vpy*.py* __pycache__/ax_python_devel_vpy*.py*
+ if test "$ac_supports_python_ver" = "True"; then
+- AC_MSG_RESULT([yes])
++ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+- m4_ifvaln([$2],[$2],[
+- AC_MSG_ERROR([this package requires Python $1.
++ AC_MSG_ERROR([this package requires Python $1.
+ If you have it installed, but it isn't the default Python
+ interpreter in your system path, please pass the PYTHON_VERSION
+ variable to configure. See ``configure --help'' for reference.
+ ])
+- PYTHON_VERSION=""
+- ])
++ PYTHON_VERSION=""
+ fi
+ fi
+
diff --git a/PKGBUILD b/PKGBUILD
index a050b2a3a9dc..718c1809a776 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -7,7 +7,7 @@
pkgname=zfs-utils-raidz-expansion-git
_pkgbase=zfs-utils-git
pkgver=2.1.99
-pkgrel=1
+pkgrel=2
epoch=1
pkgdesc="Userspace utilities for the Zettabyte File System."
arch=('x86_64')
@@ -21,20 +21,12 @@ conflicts=("${pkgname%-git}" "${_pkgbase%-git}" "${_pkgbase}")
source=('git+https://github.com/nicman23/zfs.git#branch=ahrens-raidz-expand'
'zfs.initcpio.install'
'zfs.initcpio.hook'
- 'zfs.initcpio.zfsencryptssh.install')
-sha256sums=('SKIP'
- '600f49d610906476f492d53ee1830154e4ebedf999284485e07d9cb2b3084766'
- '8b8c9b6ebfddfb51f2ab70fb943f53f08f6140140561efcb106120941edbc36e'
- '93e6ac4e16f6b38b2fa397a63327bcf7001111e3a58eb5fb97c888098c932a51')
-b2sums=('SKIP'
- '5147f165bc53cb792aaf11724cef253601fe853cd7bc43aeff0ef5cd3a23dbde57e38710c941803d6b5f5838bde99271804608221f1c6b33f30b734edbd85913'
- '32352e2e188073da4f61278899b6d343313ee3494d69dd10a38ab87bce2f2003767f0f49bc1c3c4d785dd1fc67eab4a27a6fdd5ffc5e63cf94d25f3dbffae4c1'
- '04e2af875e194df393d6cff983efc3fdf02a03a745d1b0b1e4a745f873d910b4dd0a45db956c1b5b2d97e9d5bf724ef12e23f7a2be3d5c12be027eaccf42349a')
-
+ 'zfs.initcpio.zfsencryptssh.install'
+ 2a7dcc5eb1357962dce1836c98f3824a297fd921.diff)
prepare() {
cd zfs
-
+ patch -p1 -i ../2a7dcc5eb1357962dce1836c98f3824a297fd921.diff
autoreconf -fi
}
@@ -73,3 +65,8 @@ package() {
install -D -m644 "${srcdir}"/zfs.initcpio.zfsencryptssh.install "${pkgdir}"/usr/lib/initcpio/install/zfsencryptssh
install -D -m644 contrib/bash_completion.d/zfs "${pkgdir}"/usr/share/bash-completion/completions/zfs
}
+md5sums=('SKIP'
+ '5b4f7c4a828b9771c67acdb06df3ddbf'
+ '4caf48dc87f42640ecfce4830599ea29'
+ '13a7889e01be24d9e89dd86113bf5bcf'
+ '0161955a0b61552485306a4288c44337')