From mboxrd@z Thu Jan 1 00:00:00 1970 From: Leo Famulari Subject: Fix python-pygpgme FTBFS [was =?utf-8?Q?Re?= =?utf-8?B?OiBMZXTigJlzIGZpeCBidWlsZCBmYWlsdXJlcyBvbiDigJhzdGFnaW5n4oCZ?= =?utf-8?Q?!=5D?= Date: Sat, 7 Jan 2017 12:15:16 -0500 Message-ID: <20170107171516.GA12076@jasmine> References: <20161223052339.GA17539@jasmine> <20170104084505.GB5126@jasmine> <87shoyfoe7.fsf@gnu.org> <87zij3f5rq.fsf_-_@gnu.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="H+4ONPRPur6+Ovig" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40838) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cPuaR-0002m9-71 for guix-devel@gnu.org; Sat, 07 Jan 2017 12:15:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cPuaM-0007us-IW for guix-devel@gnu.org; Sat, 07 Jan 2017 12:15:23 -0500 Content-Disposition: inline In-Reply-To: <87zij3f5rq.fsf_-_@gnu.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Ludovic =?iso-8859-1?Q?Court=E8s?= Cc: guix-devel@gnu.org --H+4ONPRPur6+Ovig Content-Type: multipart/mixed; boundary="ReaqsoxgOBHFXBhH" Content-Disposition: inline --ReaqsoxgOBHFXBhH Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Jan 07, 2017 at 12:50:33PM +0100, Ludovic Court=C3=A8s wrote: > =E2=80=A2 there=E2=80=99s 1 tests failure in python2-pygpgme (breaks ma= ny things) > https://hydra.gnu.org/build/1752661 I attached a patch that takes a patch from Debian to fix the test failure. But I'm not sure if anything else is still broken in pygpgme. Also, AFAICT, only 'alot' uses python2-pygpgme. What else breaks? --ReaqsoxgOBHFXBhH Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="0001-gnu-python-pygpgme-Fix-build-failure.patch" Content-Transfer-Encoding: quoted-printable =46rom 706934ec0765fa3adbf71d84a27cadfdd1c892b3 Mon Sep 17 00:00:00 2001 =46rom: Leo Famulari Date: Sat, 7 Jan 2017 12:11:45 -0500 Subject: [PATCH] gnu: python-pygpgme: Fix build failure. * gnu/packages/patches/python-pygpgme-fix-pinentry-tests.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/gnupg.scm (python-pygpgme, python2-pygpgme)[source]: Use it. --- gnu/local.mk | 1 + gnu/packages/gnupg.scm | 3 +- .../python-pygpgme-fix-pinentry-tests.patch | 69 ++++++++++++++++++= ++++ 3 files changed, 72 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/python-pygpgme-fix-pinentry-tests.= patch diff --git a/gnu/local.mk b/gnu/local.mk index edd3d4be7..5fe14e63e 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -827,6 +827,7 @@ dist_patch_DATA =3D \ %D%/packages/patches/python-paste-remove-website-test.patch \ %D%/packages/patches/python-paste-remove-timing-test.patch \ %D%/packages/patches/python2-pygobject-2-gi-info-type-error-domain.patch= \ + %D%/packages/patches/python-pygpgme-fix-pinentry-tests.patch \ %D%/packages/patches/qt4-ldflags.patch \ %D%/packages/patches/quickswitch-fix-dmenu-check.patch \ %D%/packages/patches/rapicorn-isnan.patch \ diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm index 56fba45e3..92726ca11 100644 --- a/gnu/packages/gnupg.scm +++ b/gnu/packages/gnupg.scm @@ -425,7 +425,8 @@ distributed separately.") ;; Unfortunately, we have to disable some tests due to some gpg-age= nt ;; goofiness... see: ;; https://bugs.launchpad.net/pygpgme/+bug/999949 - (patches (search-patches "pygpgme-disable-problematic-tests.patch")= ))) + (patches (search-patches "pygpgme-disable-problematic-tests.patch" + "python-pygpgme-fix-pinentry-tests.patch")= ))) (arguments `(#:phases (modify-phases %standard-phases diff --git a/gnu/packages/patches/python-pygpgme-fix-pinentry-tests.patch b= /gnu/packages/patches/python-pygpgme-fix-pinentry-tests.patch new file mode 100644 index 000000000..1f7a4cadb --- /dev/null +++ b/gnu/packages/patches/python-pygpgme-fix-pinentry-tests.patch @@ -0,0 +1,69 @@ +Fix test failure of test_XXX caused by upgrade of gpgme from 1.6.0 to +1.8.0: + +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D +FAIL: test_encrypt_to_signonly (tests.test_encrypt_decrypt.EncryptDecryptT= estCase) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "/tmp/guix-build-python2-pygpgme-0.3.drv-0/pygpgme-0.3/tests/test_e= ncrypt_decrypt.py", line 185, in test_encrypt_to_signonly + self.assertEqual(exc.args[0], gpgme.ERR_SOURCE_UNKNOWN) +AssertionError: 7 !=3D 0 + +---------------------------------------------------------------------- + +Patch copied from the Debian package pygpgme-0.3-1.2: + +https://sources.debian.net/src/pygpgme/0.3-1.2/debian/patches/0005-Fix-tes= t-failures-with-pinentry.patch/ + +From: "Dr. Tobias Quathamer" +Date: Thu, 24 Nov 2016 12:20:54 +0100 +Subject: Fix test failures with pinentry + +--- + tests/test_encrypt_decrypt.py | 5 +++-- + tests/test_passphrase.py | 2 ++ + 2 files changed, 5 insertions(+), 2 deletions(-) + +diff --git a/tests/test_encrypt_decrypt.py b/tests/test_encrypt_decrypt.py +index 21ae83e..05707e1 100644 +--- a/tests/test_encrypt_decrypt.py ++++ b/tests/test_encrypt_decrypt.py +@@ -132,6 +132,7 @@ class EncryptDecryptTestCase(GpgHomeTestCase): + os.write(fd, b'Symmetric passphrase\n') + ctx =3D gpgme.Context() + ctx.armor =3D True ++ ctx.pinentry_mode =3D gpgme.PINENTRY_MODE_LOOPBACK + ctx.passphrase_cb =3D passphrase + ctx.encrypt(None, 0, plaintext, ciphertext) + self.assertTrue( +@@ -182,8 +183,8 @@ class EncryptDecryptTestCase(GpgHomeTestCase): + ctx.encrypt([recipient], gpgme.ENCRYPT_ALWAYS_TRUST, + plaintext, ciphertext) + except gpgme.GpgmeError as exc: +- self.assertEqual(exc.args[0], gpgme.ERR_SOURCE_UNKNOWN) +- self.assertEqual(exc.args[1], gpgme.ERR_GENERAL) ++ self.assertEqual(exc.args[0], gpgme.ERR_SOURCE_GPGME) ++ self.assertEqual(exc.args[1], gpgme.ERR_UNUSABLE_PUBKEY) + else: + self.fail('gpgme.GpgmeError not raised') +=20 +diff --git a/tests/test_passphrase.py b/tests/test_passphrase.py +index 35b3c59..05e6811 100644 +--- a/tests/test_passphrase.py ++++ b/tests/test_passphrase.py +@@ -34,6 +34,7 @@ class PassphraseTestCase(GpgHomeTestCase): + ctx =3D gpgme.Context() + key =3D ctx.get_key('EFB052B4230BBBC51914BCBB54DCBBC8DBFB9EB3') + ctx.signers =3D [key] ++ ctx.pinentry_mode =3D gpgme.PINENTRY_MODE_LOOPBACK + plaintext =3D BytesIO(b'Hello World\n') + signature =3D BytesIO() +=20 +@@ -55,6 +56,7 @@ class PassphraseTestCase(GpgHomeTestCase): + ctx =3D gpgme.Context() + key =3D ctx.get_key('EFB052B4230BBBC51914BCBB54DCBBC8DBFB9EB3') + ctx.signers =3D [key] ++ ctx.pinentry_mode =3D gpgme.PINENTRY_MODE_LOOPBACK + ctx.passphrase_cb =3D self.passphrase_cb + plaintext =3D BytesIO(b'Hello World\n') + signature =3D BytesIO() --=20 2.11.0 --ReaqsoxgOBHFXBhH-- --H+4ONPRPur6+Ovig Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAlhxIiAACgkQJkb6MLrK fwgENhAAxCWze7JQ8nDH9F23MpqaviBA/5tOWcW+J5PJDurzryEd3eqZwr5rp9t0 f4HUk5iXuarpasloexyzYPjK4Syi7jPVcn/ryBBqod/I1PSL64gEXi0V9QjcAIji XgxNxPqitjqBA0khPHiOOz0P80LBU2foHLG29ko4OQaLknB/b9Txf9HbdRpWDB1G QNax6ZBrkhtRpIY0W/K43z/4mnNwLO4BngebFwB0VBEpGSRDOr6oPiVH7HTBMKne +++77TDbp0ziObgiAAyw5Q3j/yOwvWCOtyCD1K+PXRxU2cMVMNBhHIU3sixOTeAX xwq+RX/QH/wsZzl07P3GzYrgSTd3BXRxQaJiSI1sm7AE3lSSJJUILAvqCXcUG4Zg UoO+PCeBzbw+LjcIvQSAFQUTQzsT3SpRKB4LMDCrBXaOmBcTmJWhAhf9T0y8uTPB 4b6MLB5+vQo7egQH9fsRYDnk2+VBwXRqtb/YGLsEMW6cFrPgKscRq3PTv2GXemad i4bXtN31woiMdlegS06pEeyZsucKqLpVYGJ8JrDGKLRe2S3gVWPskPukgtUGZlAn FLlA5jjhuf0ZDFcKdjxTkrKHx54sWvzIAh72p5jPZuvLokmPaTLqWhdPxgtzs0DV T0sDgg4j0Ep1ZbSL8xCJr+gHWFAbJrkvf5kiSrhdy+6dE9F579E= =r8FQ -----END PGP SIGNATURE----- --H+4ONPRPur6+Ovig--