From: Leo Famulari <leo@famulari.name>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: guix-devel@gnu.org
Subject: Fix python-pygpgme FTBFS [was Re: Let’s fix build failures on ‘staging’!]
Date: Sat, 7 Jan 2017 12:15:16 -0500 [thread overview]
Message-ID: <20170107171516.GA12076@jasmine> (raw)
In-Reply-To: <87zij3f5rq.fsf_-_@gnu.org>
[-- Attachment #1.1: Type: text/plain, Size: 395 bytes --]
On Sat, Jan 07, 2017 at 12:50:33PM +0100, Ludovic Courtès wrote:
> • there’s 1 tests failure in python2-pygpgme (breaks many 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?
[-- Attachment #1.2: 0001-gnu-python-pygpgme-Fix-build-failure.patch --]
[-- Type: text/plain, Size: 5478 bytes --]
From 706934ec0765fa3adbf71d84a27cadfdd1c892b3 Mon Sep 17 00:00:00 2001
From: Leo Famulari <leo@famulari.name>
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 = \
%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-agent
;; 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:
+
+======================================================================
+FAIL: test_encrypt_to_signonly (tests.test_encrypt_decrypt.EncryptDecryptTestCase)
+----------------------------------------------------------------------
+Traceback (most recent call last):
+ File "/tmp/guix-build-python2-pygpgme-0.3.drv-0/pygpgme-0.3/tests/test_encrypt_decrypt.py", line 185, in test_encrypt_to_signonly
+ self.assertEqual(exc.args[0], gpgme.ERR_SOURCE_UNKNOWN)
+AssertionError: 7 != 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-test-failures-with-pinentry.patch/
+
+From: "Dr. Tobias Quathamer" <toddy@debian.org>
+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 = gpgme.Context()
+ ctx.armor = True
++ ctx.pinentry_mode = gpgme.PINENTRY_MODE_LOOPBACK
+ ctx.passphrase_cb = 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')
+
+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 = gpgme.Context()
+ key = ctx.get_key('EFB052B4230BBBC51914BCBB54DCBBC8DBFB9EB3')
+ ctx.signers = [key]
++ ctx.pinentry_mode = gpgme.PINENTRY_MODE_LOOPBACK
+ plaintext = BytesIO(b'Hello World\n')
+ signature = BytesIO()
+
+@@ -55,6 +56,7 @@ class PassphraseTestCase(GpgHomeTestCase):
+ ctx = gpgme.Context()
+ key = ctx.get_key('EFB052B4230BBBC51914BCBB54DCBBC8DBFB9EB3')
+ ctx.signers = [key]
++ ctx.pinentry_mode = gpgme.PINENTRY_MODE_LOOPBACK
+ ctx.passphrase_cb = self.passphrase_cb
+ plaintext = BytesIO(b'Hello World\n')
+ signature = BytesIO()
--
2.11.0
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2017-01-07 17:15 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-23 5:23 Staging freeze Leo Famulari
2016-12-23 6:00 ` John Darrington
2016-12-26 18:16 ` Leo Famulari
2016-12-27 23:56 ` Leo Famulari
2016-12-28 4:13 ` Leo Famulari
2016-12-28 9:17 ` John Darrington
2016-12-29 17:16 ` Leo Famulari
2016-12-29 17:51 ` Ludovic Courtès
2016-12-29 18:42 ` Leo Famulari
2016-12-31 11:12 ` Ludovic Courtès
2017-01-04 8:45 ` Leo Famulari
2017-01-04 22:31 ` Ludovic Courtès
2017-01-07 11:50 ` Let’s fix build failures on ‘staging’! Ludovic Courtès
2017-01-07 17:15 ` Leo Famulari [this message]
2017-01-07 21:31 ` Fix python-pygpgme FTBFS [was Re: Let’s fix build failures on ‘staging’!] Ludovic Courtès
2017-01-07 21:46 ` Leo Famulari
2017-01-07 17:22 ` Let’s fix build failures on ‘staging’! Leo Famulari
2017-01-07 17:35 ` Leo Famulari
2017-01-07 21:32 ` Ludovic Courtès
2017-01-07 21:46 ` Leo Famulari
2017-01-08 17:19 ` Leo Famulari
2017-01-07 18:10 ` [PATCH 1/2] Revert "gnu: Add threaded variants of fftw and fftwf for Ardour and mod-host." David Craven
2017-01-07 18:10 ` [PATCH 2/2] gnu: ardour: Add eudev dependency David Craven
2017-01-07 19:11 ` [PATCH 1/2] Revert "gnu: Add threaded variants of fftw and fftwf for Ardour and mod-host." Ricardo Wurmus
2017-01-07 22:43 ` David Craven
2017-01-07 22:45 ` David Craven
2017-01-08 10:57 ` Ludovic Courtès
2017-01-08 7:23 ` Ricardo Wurmus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170107171516.GA12076@jasmine \
--to=leo@famulari.name \
--cc=guix-devel@gnu.org \
--cc=ludo@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).