[Python-modules-commits] [python-gnupg] 03/03: merge patched into master

Elena Grandi valhalla-guest at moszumanska.debian.org
Tue Aug 16 15:26:16 UTC 2016


This is an automated email from the git hooks/post-receive script.

valhalla-guest pushed a commit to branch master
in repository python-gnupg.

commit 2847fbd72d224c4ddcbcf14a96b67dfc35299542
Merge: 3a2f6b0 81345de
Author: Elena Grandi <valhalla-d at trueelena.org>
Date:   Tue Aug 16 17:21:54 2016 +0200

    merge patched into master

 debian/.git-dpm                                    |  4 +--
 ...002-Correctly-capture-subkey-fingerprints.patch | 12 ++------
 ...e-Keys-by-removing-version-and-whitespace.patch | 35 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 test_gnupg.py                                      |  8 ++---
 5 files changed, 45 insertions(+), 15 deletions(-)

diff --cc debian/.git-dpm
index bb3e22d,0000000..b669443
mode 100644,000000..100644
--- a/debian/.git-dpm
+++ b/debian/.git-dpm
@@@ -1,11 -1,0 +1,11 @@@
 +# see git-dpm(1) from git-dpm package
- fd6835d8beec6703c412c06d2cca6e8c74d8f417
- fd6835d8beec6703c412c06d2cca6e8c74d8f417
++81345def06fd47dbfbc8add1f460ddab5881e494
++81345def06fd47dbfbc8add1f460ddab5881e494
 +16065427a552e386da63551fe79e7836133dfac5
 +16065427a552e386da63551fe79e7836133dfac5
 +python-gnupg_0.3.8.orig.tar.gz
 +b3be79566210942a2afcd87ab8f9537749df55c3
 +38993
 +debianTag="debian/%e%v"
 +patchedTag="patched/%e%v"
 +upstreamTag="upstream/%e%u"
diff --cc debian/patches/0002-Correctly-capture-subkey-fingerprints.patch
index a8f6115,0000000..55bd542
mode 100644,000000..100644
--- a/debian/patches/0002-Correctly-capture-subkey-fingerprints.patch
+++ b/debian/patches/0002-Correctly-capture-subkey-fingerprints.patch
@@@ -1,69 -1,0 +1,63 @@@
 +From fd6835d8beec6703c412c06d2cca6e8c74d8f417 Mon Sep 17 00:00:00 2001
++From: Elena Grandi <valhalla-d at trueelena.org>
++Date: Sun, 29 Nov 2015 15:03:57 +0100
 +Subject: Correctly capture subkey fingerprints.
- Description: Subkey fingerprints are no longer incorrectly captured.
- Author: Vinay Sajip
- Origin: upstream
- Bug: https://bitbucket.org/vinay.sajip/python-gnupg/issues/44/possible-undocumented-api-change-when
- Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=802967
- Applied-Upstream: https://bitbucket.org/vinay.sajip/python-gnupg/commits/e3cb134162a5
- Last-Update: 2015-11-15
- ---
- This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
++
 +---
 + gnupg.py      | 7 +++++--
 + test_gnupg.py | 3 ++-
 + 2 files changed, 7 insertions(+), 3 deletions(-)
 +
 +diff --git a/gnupg.py b/gnupg.py
 +index ec70661..01f86ff 100644
 +--- a/gnupg.py
 ++++ b/gnupg.py
 +@@ -455,7 +455,6 @@ class ListKeys(SearchKeys):
 + 
 +         crt = X.509 certificate
 +         crs = X.509 certificate and private key available
 +-        ssb = secret subkey (secondary key)
 +         uat = user attribute (same as user id except for field 10).
 +         sig = signature
 +         rev = revocation signature
 +@@ -500,6 +499,10 @@ class ListKeys(SearchKeys):
 +         self.curkey['subkeys'].append(subkey)
 +         self.in_subkey = True
 + 
 ++    def ssb(self, args):
 ++        subkey = [args[4], None]    # keyid, type
 ++        self.curkey['subkeys'].append(subkey)
 ++        self.in_subkey = True
 + 
 + class ScanKeys(ListKeys):
 +     ''' Handle status messages for --with-fingerprint.'''
 +@@ -1121,7 +1124,7 @@ class GPG(object):
 +         self._collect_output(p, result, stdin=p.stdin)
 +         lines = result.data.decode(self.encoding,
 +                                    self.decode_errors).splitlines()
 +-        valid_keywords = 'pub uid sec fpr sub'.split()
 ++        valid_keywords = 'pub uid sec fpr sub ssb'.split()
 +         for line in lines:
 +             if self.verbose:
 +                 print(line)
 +diff --git a/test_gnupg.py b/test_gnupg.py
 +index f6325ef..55a3c8e 100644
 +--- a/test_gnupg.py
 ++++ b/test_gnupg.py
 +@@ -240,6 +240,7 @@ class GPGTestCase(unittest.TestCase):
 +         private_keys = self.gpg.list_keys(secret=True)
 +         self.assertTrue(is_list_with_len(private_keys, 1),
 +                         "1-element list expected")
 ++        self.assertEqual(len(private_keys.fingerprints), 1)
 +         # Now do the same test, but using keyring and secret_keyring arguments
 +         hd = os.path.join(os.getcwd(), 'keys')
 +         gpg = gnupg.GPG(gnupghome=hd, gpgbinary=GPGBINARY,
 +@@ -689,7 +690,7 @@ def suite(args=None):
 + 
 + def init_logging():
 +     logging.basicConfig(level=logging.DEBUG, filename="test_gnupg.log",
 +-                        filemode="w", format="%(asctime)s %(levelname)-5s %(name)-10s %(threadName)-10s %(message)s")
 ++                        filemode="w", format="%(asctime)s %(levelname)-5s %(name)-10s %(threadName)-10s %(lineno)4d %(message)s")
 + 
 + def main():
 +     init_logging()
diff --cc debian/patches/0003-Compare-Keys-by-removing-version-and-whitespace.patch
index 0000000,0000000..0da3528
new file mode 100644
--- /dev/null
+++ b/debian/patches/0003-Compare-Keys-by-removing-version-and-whitespace.patch
@@@ -1,0 -1,0 +1,35 @@@
++From 81345def06fd47dbfbc8add1f460ddab5881e494 Mon Sep 17 00:00:00 2001
++From: Elena Grandi <valhalla-d at trueelena.org>
++Date: Tue, 16 Aug 2016 17:19:12 +0200
++Subject: Compare Keys by removing version and whitespace
++
++---
++ test_gnupg.py | 8 ++++----
++ 1 file changed, 4 insertions(+), 4 deletions(-)
++
++diff --git a/test_gnupg.py b/test_gnupg.py
++index 55a3c8e..6f6b66c 100644
++--- a/test_gnupg.py
+++++ b/test_gnupg.py
++@@ -8,6 +8,7 @@ import doctest
++ import logging
++ import os.path
++ import os
+++import re
++ import shutil
++ import stat
++ import sys
++@@ -85,10 +86,9 @@ def is_list_with_len(o, n):
++ 
++ def compare_keys(k1, k2):
++     "Compare ASCII keys"
++-    k1 = k1.split('\n')
++-    k2 = k2.split('\n')
++-    del k1[1] # remove version lines
++-    del k2[1]
+++    pattern = r'-----BEGIN PGP PUBLIC KEY BLOCK-----\n.*\s+'
+++    k1 = re.sub(pattern, '', k1)
+++    k2 = re.sub(pattern, '', k2)
++     return k1 != k2
++ 
++ class GPGTestCase(unittest.TestCase):
diff --cc debian/patches/series
index 2cf634e,0000000..46ea08c
mode 100644,000000..100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@@ -1,2 -1,0 +1,3 @@@
 +skip_network_needing_test.patch
 +0002-Correctly-capture-subkey-fingerprints.patch
++0003-Compare-Keys-by-removing-version-and-whitespace.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-gnupg.git



More information about the Python-modules-commits mailing list