git » python-pgpy.git » commit 9090c36

upgpkg: 0.6.0-5: Python 3.13 rebuild

author Carl Smedstad
2024-11-19 07:43:40 UTC
committer Carl Smedstad
2024-11-19 07:43:40 UTC
parent a37106c5957fdc9df6728b58d3f19f58209b9d27

upgpkg: 0.6.0-5: Python 3.13 rebuild

.SRCINFO +7 -3
PKGBUILD +13 -6
fix-tests.patch +33 -0

diff --git a/.SRCINFO b/.SRCINFO
index bf8bdea..89011d8 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
 pkgbase = python-pgpy
 	pkgdesc = Pretty Good Privacy for Python
 	pkgver = 0.6.0
-	pkgrel = 4
+	pkgrel = 5
 	url = https://github.com/SecurityInnovation/PGPy
 	arch = any
 	license = BSD-3-Clause
@@ -15,7 +15,11 @@ pkgbase = python-pgpy
 	depends = python
 	depends = python-cryptography
 	depends = python-pyasn1
-	source = python-pgpy::git+https://github.com/SecurityInnovation/PGPy.git#commit=a0e56ff79df37652208002dba9f37e29f451c8ac
-	b2sums = SKIP
+	source = python-pgpy::git+https://github.com/SecurityInnovation/PGPy.git#tag=v0.6.0
+	source = drop-use-of-imghdr.patch::https://github.com/SecurityInnovation/PGPy/commit/221a1f15a42f3ef76ccafcddf66b7c4ade391bff.patch
+	source = fix-tests.patch
+	b2sums = 0e0fc10f05c5f18f87449ab87c6f9e0e15d9945acfdf532b8e8460a61233f1ed7e00e81af81a9d422628bc7e76462e162604cd11fa1fe28ee961e9b1ce9fce56
+	b2sums = 5e8b46fd94f703f345218e5db6f018de9bd9ca476b4c853795188277be2b46026bd89775c1232b87f67983c1aef8d2fb62a4743987091b90d21b53f9f09f7f00
+	b2sums = 82409e50e2cf060b3b34460709c74c0c60e1c53392a226eb8134aade45f71023500b4f658a8c3353fc08b424e724358cec602b44c695685b4eaa31a521a10853
 
 pkgname = python-pgpy
diff --git a/PKGBUILD b/PKGBUILD
index 1d31d74..3f9686a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,7 @@
 
 pkgname=python-pgpy
 pkgver=0.6.0
-pkgrel=4
+pkgrel=5
 pkgdesc='Pretty Good Privacy for Python'
 arch=('any')
 license=('BSD-3-Clause')
@@ -24,14 +24,21 @@ checkdepends=(
   'python-pytest'
   'python-pytest-order'
 )
-_commit='a0e56ff79df37652208002dba9f37e29f451c8ac'
-source=("$pkgname::git+$url.git#commit=$_commit")
-b2sums=('SKIP')
+source=(
+  "$pkgname::git+$url.git#tag=v$pkgver"
+  # https://github.com/SecurityInnovation/PGPy/pull/443
+  "drop-use-of-imghdr.patch::$url/commit/221a1f15a42f3ef76ccafcddf66b7c4ade391bff.patch"
+  "fix-tests.patch"
+)
+b2sums=('0e0fc10f05c5f18f87449ab87c6f9e0e15d9945acfdf532b8e8460a61233f1ed7e00e81af81a9d422628bc7e76462e162604cd11fa1fe28ee961e9b1ce9fce56'
+        '5e8b46fd94f703f345218e5db6f018de9bd9ca476b4c853795188277be2b46026bd89775c1232b87f67983c1aef8d2fb62a4743987091b90d21b53f9f09f7f00'
+        '82409e50e2cf060b3b34460709c74c0c60e1c53392a226eb8134aade45f71023500b4f658a8c3353fc08b424e724358cec602b44c695685b4eaa31a521a10853')
 
-pkgver() {
+prepare() {
   cd "$pkgname"
 
-  git describe --tags | sed 's/^v//'
+  patch -Np1 -i ../drop-use-of-imghdr.patch
+  patch -Np1 -i ../fix-tests.patch
 }
 
 build() {
diff --git a/fix-tests.patch b/fix-tests.patch
new file mode 100644
index 0000000..04937f7
--- /dev/null
+++ b/fix-tests.patch
@@ -0,0 +1,33 @@
+diff --git a/tests/test_10_exceptions.py b/tests/test_10_exceptions.py
+index 299f345..8b5f138 100644
+--- a/tests/test_10_exceptions.py
++++ b/tests/test_10_exceptions.py
+@@ -57,16 +57,16 @@ def targette_pub():
+ 
+ @pytest.fixture(scope='module')
+ def temp_subkey():
+-    return PGPKey.new(PubKeyAlgorithm.RSAEncryptOrSign, 512)
++    return PGPKey.new(PubKeyAlgorithm.RSAEncryptOrSign, 1024)
+ 
+ 
+ @pytest.fixture(scope='module')
+ def temp_key():
+     u = PGPUID.new('User')
+-    k = PGPKey.new(PubKeyAlgorithm.RSAEncryptOrSign, 512)
++    k = PGPKey.new(PubKeyAlgorithm.RSAEncryptOrSign, 1024)
+     k.add_uid(u, usage={KeyFlags.Certify, KeyFlags.Sign}, hashes=[HashAlgorithm.SHA1])
+ 
+-    sk = PGPKey.new(PubKeyAlgorithm.RSAEncryptOrSign, 512)
++    sk = PGPKey.new(PubKeyAlgorithm.RSAEncryptOrSign, 1024)
+     k.add_subkey(sk, usage={KeyFlags.EncryptCommunications})
+ 
+     return k
+@@ -300,7 +300,7 @@ class TestPGPKey(object):
+ 
+     @pytest.mark.parametrize('key_alg_rsa_depr', key_algs_rsa_depr, ids=[alg.name for alg in key_algs_rsa_depr])
+     def test_new_key_deprecated_rsa_alg(self, key_alg_rsa_depr, recwarn):
+-        k = PGPKey.new(key_alg_rsa_depr, 512)
++        k = PGPKey.new(key_alg_rsa_depr, 1024)
+ 
+         w = recwarn.pop()
+         assert str(w.message) == '{:s} is deprecated - generating key using RSAEncryptOrSign'.format(key_alg_rsa_depr.name)