[Python-modules-commits] r25732 - in packages/python-gnupg/trunk/debian (5 files)

valhalla-guest at users.alioth.debian.org valhalla-guest at users.alioth.debian.org
Tue Sep 3 11:07:17 UTC 2013


    Date: Tuesday, September 3, 2013 @ 11:07:13
  Author: valhalla-guest
Revision: 25732

improved --quick-random workaround

Added:
  packages/python-gnupg/trunk/debian/patches/use_quick_random_for_gnupg_1.patch
Modified:
  packages/python-gnupg/trunk/debian/bin/gpg
  packages/python-gnupg/trunk/debian/changelog
  packages/python-gnupg/trunk/debian/patches/series
  packages/python-gnupg/trunk/debian/rules

Modified: packages/python-gnupg/trunk/debian/bin/gpg
===================================================================
--- packages/python-gnupg/trunk/debian/bin/gpg	2013-09-03 03:15:28 UTC (rev 25731)
+++ packages/python-gnupg/trunk/debian/bin/gpg	2013-09-03 11:07:13 UTC (rev 25732)
@@ -1,3 +1,7 @@
 #!/bin/sh
 GPG=`which -a gpg | uniq | tail -n+2 | head -n1`
-exec "$GPG" --quick-random "$@"
+if echo "$*" | grep -q gen-key; then
+    exec "$GPG" --quick-random "$@"
+else
+    exec "$GPG" "$@"
+fi

Modified: packages/python-gnupg/trunk/debian/changelog
===================================================================
--- packages/python-gnupg/trunk/debian/changelog	2013-09-03 03:15:28 UTC (rev 25731)
+++ packages/python-gnupg/trunk/debian/changelog	2013-09-03 11:07:13 UTC (rev 25732)
@@ -2,6 +2,9 @@
 
   * New upstream release. Closes: #721296, #721294.
   * Updated standard versions to 3.9.4 (no change needed).
+  * Reverted simplification of --quick-random workaround.
+  * Adding --quick-random instead of --debug-quick-random for 
+    gnupg < 2.
 
  -- Elena Grandi <elena.valhalla at gmail.com>  Sat, 31 Aug 2013 09:10:31 +0200
 

Modified: packages/python-gnupg/trunk/debian/patches/series
===================================================================
--- packages/python-gnupg/trunk/debian/patches/series	2013-09-03 03:15:28 UTC (rev 25731)
+++ packages/python-gnupg/trunk/debian/patches/series	2013-09-03 11:07:13 UTC (rev 25732)
@@ -1 +1,2 @@
 skip_network_needing_test.patch
+use_quick_random_for_gnupg_1.patch

Added: packages/python-gnupg/trunk/debian/patches/use_quick_random_for_gnupg_1.patch
===================================================================
--- packages/python-gnupg/trunk/debian/patches/use_quick_random_for_gnupg_1.patch	                        (rev 0)
+++ packages/python-gnupg/trunk/debian/patches/use_quick_random_for_gnupg_1.patch	2013-09-03 11:07:13 UTC (rev 25732)
@@ -0,0 +1,32 @@
+Description: Use --quick-random for gpg < 2 (instead of --debug-quick-random 
+ or nothing at all.
+Forwarded: https://code.google.com/p/python-gnupg/issues/detail?id=82
+Bug: https://code.google.com/p/python-gnupg/issues/detail?id=82
+Author: Elena Grandi <elena.valhalla at gmail.com>
+===================================================================
+--- python-gnupg-0.3.5.orig/test_gnupg.py	2013-09-03 12:31:06.625531798 +0200
++++ python-gnupg-0.3.5/test_gnupg.py	2013-09-03 12:32:35.570701842 +0200
+@@ -99,8 +99,11 @@
+             shutil.rmtree(hd)
+         self.homedir = hd
+         self.gpg = gnupg.GPG(gnupghome=hd, gpgbinary=GPGBINARY)
+-        if self.gpg.version and self.gpg.version >= (2,):
+-            self.gpg.options = ['--debug-quick-random']
++        if self.gpg.version:
++            if self.gpg.version >= (2,):
++                self.gpg.options = ['--debug-quick-random']
++            else:
++                self.gpg.options = ['--quick-random']
+ 
+     def test_environment(self):
+         "Test the environment by ensuring that setup worked"
+@@ -129,7 +132,8 @@
+             'Name-Comment': 'A test user',
+             'Expire-Date': 0,
+         }
+-        if '--debug-quick-random' in (self.gpg.options or []):
++        if '--debug-quick-random' in (self.gpg.options or []) or \
++                '--quick-random' in (self.gpg.options or []):
+             # If using the fake RNG, a key isn't regarded as valid
+             # unless its comment has the text (insecure!) in it.
+             params['Name-Comment'] = 'A test user (insecure!)'

Modified: packages/python-gnupg/trunk/debian/rules
===================================================================
--- packages/python-gnupg/trunk/debian/rules	2013-09-03 03:15:28 UTC (rev 25731)
+++ packages/python-gnupg/trunk/debian/rules	2013-09-03 11:07:13 UTC (rev 25732)
@@ -17,8 +17,9 @@
 
 override_dh_auto_test:
 ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
+	chmod 755 $(CURDIR)/debian/bin/gpg
 	set -ex; for py in $(shell pyversions -r -v); do \
-		PATH=$(CURDIR)/debian/bin:$$PATH PYTHONPATH=$(CURDIR)/build/lib.*-$$py  python$$py test_gnupg.py ;\
+		PATH=$(CURDIR)/debian/bin:$$PATH PYTHONPATH=$(CURDIR)/build/lib.*-$$py python$$py test_gnupg.py ;\
 	done
 	set -ex; for python in $(shell py3versions -r); do \
 		cp test_gnupg.py test_gnupg_3.py ;\




More information about the Python-modules-commits mailing list