aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/patches/python-pygpgme-fix-pinentry-tests.patch
blob: 1f7a4cadb7e4499376c4edbc68849d4b8728b98f (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
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()
. * gnu/packages/kde.scm (kuserfeedback): Likewise. * gnu/packages/pascal.scm (p2c): Likewise. * gnu/packages/python-xyz.scm (python-ttystatus): Likewise. * gnu/packages/qt.scm (qtwebplugin): Likewise. Vagrant Cascadian 2022-09-01gnu: Remove kalarmcal....* gnu/packages/kde-pim.scm: Remove kalarmcal. Signed-off-by: Marius Bakke <marius@gnu.org> Petr Hodina 2022-09-01gnu: KDE PIM: Update all packages to 22.04.3....* gnu/packages/kde-pim.scm (KDE PIM): Update to 22.04.3. (akonadi, akonadi-calendar, akonadi-contacts, akonadi-mime, akonadi-notes, akonadi-search, kaddressbook, kalarmcal, kcalendarsupport, kcalutils, kdepim-runtime, keventviews, kgpg kidentitymanagement, kimap, kincidenceeditor, kldap, kleopatra kmailcommon, kmailimporter, kmailtransport, kmbox, kmessagelib knotes, kontactinterface, korganizer, kpeoplevcard, kpimcommon kpimtextedit, ksmtp, ktnef, libgravatar, libkdepim, libkgapi, libksieve): Update to 22.04.3. (akonadi-calendar): [inputs]: Add kdbusaddons and knotifications. (kincidenceeditor): [arguments]: Disable failing tests. (kdepim-runtime): [inputs]: Remove kalarmcal. (kmailimporter): [inputs]: Add kpimtextedit and ktextwidgets. (kmessagelib): [inputs]: Add knotifications. (kpimcommon): [inputs]: Add kpimtextedit. (libksieve): [inputs]: Add grantlee. Signed-off-by: Marius Bakke <marius@gnu.org> Petr Hodina 2022-09-01gnu: KDE: Use breeze-icons over oxygen-icons....* gnu/packages/kde-internet.scm (choqok kget konversation krdc krdc) * gnu/packages/kde-multimedia.scm (dragon elisa juk k3b kaffeine kamoso kmix kmplayer kwave) * gnu/packages/kde-pim.scm (kaddressbook kcalutils kgpg kleopatra kmail knotes korganizer) * gnu/packages/kde-systemtools.scm (dolphin dolphin-plugins khelpcenter konsole krfb ksystemlog) * gnu/packages/kde-utils.scm (kate kmag kmousetool kmouth kronometer krusader okteta rsibreak smb4k sweeper) * gnu/packages/kde.scm (kdevelop) Breeze icons replaces Oxygen icons in KDE 5, so use that in every package. Signed-off-by: Marius Bakke <marius@gnu.org> Brendan Tildesley 2022-09-01gnu: KDE-PIM: Remove trailing booleans....* gnu/packages/kde-pim.scm (akonadi, akonadi-mime, akonadi-search, kincidenceeditor, kdepim-runtime, kidentitymanagement, kleopatra, kmail, kmime, korganizer, kpeoplevcard, ksmtp, libkleo, libksieve)[arguments]: Remove trailing booleans. Signed-off-by: Marius Bakke <marius@gnu.org> Petr Hodina 2022-09-01gnu: KDE PIM: Update all packages to 21.12.3....* gnu/packages/kde-pim.scm (KDE PIM): Update to 21.12.3. (akonadi, akonadi-calendar, akonadi-contacts, akonadi-mime, akonadi-notes, akonadi-search, kaddressbook, kalarmcal, kcalendarsupport, kcalutils, kdepim-runtime, keventviews, kgpg, kidentitymanagement, kimap, kincidenceeditor, kldap, kleopatra, kmail, kmailcommon, kmailimporter, kmailtransport, kmbox, kmessagelib, kmime, knotes, kontactinterface, korganizer, kpeoplevcard, kpimcommon, kpimtextedit, ksmtp, ktnef, libgravatar, libkdepim, libkgapi, libkleo, libksieve): Update to 21.12.3. (kblog): Update to 20.04.3. * gnu/packages/patches/akonadi-not-relocatable.patch * gnu/packages/patches/akonadi-paths.patch * gnu/packages/patches/akonadi-timestamps.patch Fix patches to apply to latest code. (akonadi-calendar): [inputs]: Add new dependencies. (akonadi-contacts): [inputs]: Add new dependencies. (akonadi-search): [arguments]: Disable failing tests. (kcalendarsupport): [inputs]: Add new dependency, remove obsolete kdepim-apps-lib. (libksieve): [arguments]: Enable test that works now. * gnu/packages/patches/libksieve-Fix-missing-link-libraries.patch: Fix patch. (kaddressbook): [inputs]: Remove obsolete kdepim-apps-libs. Move kdocstools to native-inputs. (kmessagelib): [inputs]: Remove obsolete kdepim-appslibs, add kguiaddons. [arguments]: Fix findind header file. (kmailimporter): [inputs]: Add new dependencies. (kmailtransport): [inputs]: Add qtkeychain. (knotes): [inputs]: Move kdocstools to native-inputs. (kincidenceeditor): [inputs]: Add new dependencies. Remove obsolete kdepim-apps-libs [arguments]: Disable failing test. (kldap): [inputs]: Add qtkeychain. (kgpg)[arguments]: Disable failing tests. (libkleo): [propagated-inputs]: Propagate gpgme, qgpgme. [arguments]: Disable failing tests. (kdepim-runtime): [inputs]: Add new dependencies grantlee, grantleetheme, kcmutils, kldap, libkdepim, qtkeychain [arguments]: Enable all the tests that pass. We need to use the old hack instead of search-input-directory to workaround a mysterious include error. (kdepim-apps-lib): Remove obsolete package. (kmail): [origin]: Remove patch. Don't think it is needed anymore. [inputs]: Add new dependencies, delete obsolete kdepim-apps-libs and duplicate kmime. [arguments]: Disable failing tests. * gnu/packages/patches/kmail-Fix-missing-link-libraries.patch: Delete file. * gnu/local.mk: Remove reference to patch. (kmailcommon): [inputs]: Add new dependencies. Signed-off-by: Marius Bakke <marius@gnu.org> Brendan Tildesley 2022-09-01gnu: kmessagelib: Remove qtwebkit as an input....* gnu/packages/kde-pim.scm (kmessagelib): qtwebkit is unmaintained so it should be removed where possible. Signed-off-by: Marius Bakke <marius@gnu.org> Brendan Tildesley 2022-09-01gnu: KDE PIM: Update home-pages....* gnu/packages/kde-pim.scm (akonadi, kaddressbook, kcalutils, kgpg, kimap, kldap, kleopatra, kmail, kmailtransport, kmbox, kmime, knotes, kontactinterface, korganizer, kpimtextedit, ktnef): [home-page]: Update the link. Signed-off-by: Marius Bakke <marius@gnu.org> Petr Hodina 2022-09-01gnu: libgravatar: Remove input labels....* gnu/packages/kde-pim.scm (libgravatar): Remove input labels. Signed-off-by: Marius Bakke <marius@gnu.org> Petr Hodina 2022-09-01gnu: libgravatar: Move to (gnu packages kde-pim)....Remove uneeded (gnu packages kde-internet) import. * gnu/packages/kde-internet.scm: Move libgravatar ... * gnu/packages/kde-pim.scm ...here Signed-off-by: Marius Bakke <marius@gnu.org> Brendan Tildesley 2022-09-01gnu: kdav: Move to (gnu packages kde-frameworks)....* gnu/packages/kde-pim.scm * gnu/packages/kde-frameworks.scm (kdav): Move to (gnu packages kde-frameworks). It's considered a framework component now. Signed-off-by: Marius Bakke <marius@gnu.org> Brendan Tildesley 2022-07-31gnu: qtnetworkauth: Rename to qtnetworkauth-5....Automated with: git grep -l qtnetworkauth | xargs sed 's/\bqtnetworkauth\b/\0-5/g' -i Maxim Cournoyer 2022-07-31gnu: qttools: Rename to qttools-5....Automated with: git grep -l qttools | xargs sed 's/\bqttools\b/\0-5/g' -i git checkout NEWS Maxim Cournoyer 2022-07-31gnu: qtwebengine: Rename to qtwebengine-5....Automated with: git grep -l qtwebengine | xargs sed 's/\bqtwebengine\b/\0-5/g' -i git checkout NEWS Maxim Cournoyer 2022-07-31gnu: qtwebchannel: Rename to qtwebchannel-5....Automated via: git grep -l qtwebchannel | xargs sed 's/\bqtwebchannel\b/\0-5/g' -i git checkout NEWS Maxim Cournoyer 2022-07-31gnu: qtdeclarative: Rename to qtdeclarative-5....Automated via the following commands: git grep -l '\bqtdeclarative\b' | xargs sed -E 's/qtdeclarative/\0-5/g' -i git checkout NEWS Maxim Cournoyer