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" 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() n docstring. Tobias Geerinckx-Rice 2019-01-16services: avahi: Deprecate the 'avahi-service' procedure....* gnu/services/avahi.scm (<avahi-configuration>): Export getters. Add default values. (avahi-service-type)[default-value]: New field. (avahi-service): Mark as deprecated. * gnu/services/desktop.scm (%desktop-services): Use the 'service' form instead of calling 'avahi-service'. * gnu/tests/base.scm (%avahi-os): Likewise. * doc/guix.texi (Base Services): Adjust example accordingly. (Networking Services): Update accordingly. Ludovic Courtès 2018-02-19services: avahi: Publish '_workstation._tcp' by default....This reverts to the behavior of avahi-daemon prior to Avahi 0.7 (commit 550f4509acf2c0f67882260414b0bb2843e07465). * gnu/services/avahi.scm (<avahi-configuration>)[publish-workstation?]: New field. (configuration-file): Honor it. Ludovic Courtès 2018-02-19services: avahi: Read PID file from /run....* gnu/services/avahi.scm (%avahi-activation, avahi-shepherd-service): Use /run/avahi-daemon/ instead of /var/run/avahi-daemon/. This was the case since the switch to Avahi 0.7 (commit 550f4509acf2c0f67882260414b0bb2843e07465). Ludovic Courtès 2018-02-15gnu: nss-mdns: Update to 0.12.0....* gnu/packages/avahi.scm (nss-mdns): Update to 0.12 + patch. (nss-mdns-0.10.0): Remove. * gnu/services/avahi.scm (avahi-service-type): Use NSS-MDNS again. Ludovic Courtès 2018-02-09services: avahi: Default to nss-mdns 0.10....This works around <https://bugs.gnu.org/30396>. Reported by George myglc2 Clemmer <myglc2@gmail.com>. * gnu/packages/avahi.scm (nss-mdns-0.10): New variable. * gnu/services/avahi.scm (avahi-service-type): Use it. Ludovic Courtès 2017-11-05services: Add 'description' fields....* gnu/services/admin.scm (rottlog-service-type) (tailon-service-type): Add 'description' field. * gnu/services/audio.scm (mpd-service-type): Likewise. * gnu/services/avahi.scm (avahi-service-type): Likewise. * gnu/services/ssh.scm (lsh-service-type) (openssh-service-type, dropbear-service-type): Likewise. Ludovic Courtès