diff -Nru gpgme1.0-1.8.0/debian/changelog gpgme1.0-1.8.0/debian/changelog --- gpgme1.0-1.8.0/debian/changelog 2016-12-14 12:39:18.000000000 +0000 +++ gpgme1.0-1.8.0/debian/changelog 2017-05-04 21:13:18.000000000 +0000 @@ -1,12 +1,27 @@ -gpgme1.0 (1.8.0-3ubuntu1~ubuntu16.04~ppa34) xenial; urgency=medium +gpgme1.0 (1.8.0-3ubuntu2~ubuntu16.04~ppa1) xenial; urgency=medium - * Build for KCI - * Drop debhelper depends to v9 + * No-change backport for xenial. We need this package for kwallet-kf5. - -- Rik Mills Wed, 14 Dec 2016 12:39:18 +0000 + -- José Manuel Santamaría Lema Thu, 04 May 2017 23:12:14 +0200 -gpgme1.0 (1.8.0-3ubuntu1~ubuntu17.04~ppa32) zesty; urgency=medium +gpgme1.0 (1.8.0-3ubuntu2) zesty; urgency=medium + * Add in libgpgme-dev a libgpgme-pthread.so pointing to libgpgme.so, this + will fix the build failures of kf5-kdepim-apps-libs when built against this + gpgme package. + * Set LDFLAGS=-Wl,-z,relro in debian/rules, this avoids passing + "-Bsymbolic-functions" which seems to be the cause of FTBFS'es for some + architectures. + * Add 0005-tests-Reduce-iterations-threads.patch, this fixes another cause of + FTBFS'es on some architectures. + * Previous two changes fix (LP: #1647204) + * Thank you to Rik Mills for his help fixing the above problems. + + -- José Manuel Santamaría Lema Sat, 18 Feb 2017 22:22:02 +0100 + +gpgme1.0 (1.8.0-3ubuntu1) zesty; urgency=medium + + [ José Manuel Santamaría Lema ] * Pass '-fPIC' to gcc, otherwise this package will fail to build on Ubuntu with this error: /usr/include/*/qt5/QtCore/qglobal.h:1087:4: error: @@ -14,7 +29,18 @@ built with -reduce-relocations. " "Compile your code with -fPIC (-fPIE is not enough)." - -- José Manuel Santamaría Lema Thu, 08 Dec 2016 00:37:30 +0100 + [ Rik Mills ] + * Apply upstream patch to fix build hang on launchpad-buildd and speed up + tests on low entropy systems. (LP: #1647204) + + [ Andre Hinecke ] + * Apply another upstream patch to fix build hang on launchpad-buildd if + gpg is gpg2. + + [ Barry Warsaw ] + * d/control: update-maintainer + + -- Rik Mills Mon, 30 Jan 2017 09:08:10 +0000 gpgme1.0 (1.8.0-3) unstable; urgency=medium diff -Nru gpgme1.0-1.8.0/debian/control gpgme1.0-1.8.0/debian/control --- gpgme1.0-1.8.0/debian/control 2016-12-14 12:39:18.000000000 +0000 +++ gpgme1.0-1.8.0/debian/control 2017-02-18 21:22:02.000000000 +0000 @@ -1,13 +1,14 @@ Source: gpgme1.0 Priority: optional Section: libs -Maintainer: Debian GnuPG Maintainers +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Debian GnuPG Maintainers Uploaders: Jose Carlos Garcia Sogo , Daniel Kahn Gillmor , Build-Depends: automake (>= 1.14), - debhelper (>= 9~), + debhelper (>= 10~), dh-autoreconf, dh-exec, dh-python, diff -Nru gpgme1.0-1.8.0/debian/libgpgme-dev.links gpgme1.0-1.8.0/debian/libgpgme-dev.links --- gpgme1.0-1.8.0/debian/libgpgme-dev.links 1970-01-01 00:00:00.000000000 +0000 +++ gpgme1.0-1.8.0/debian/libgpgme-dev.links 2017-02-18 21:22:02.000000000 +0000 @@ -0,0 +1,2 @@ +#! /usr/bin/dh-exec +usr/lib/${DEB_HOST_MULTIARCH}/libgpgme.so usr/lib/${DEB_HOST_MULTIARCH}/libgpgme-pthread.so diff -Nru gpgme1.0-1.8.0/debian/patches/0003-fix-build-hang-on-launchpad-buildd.patch gpgme1.0-1.8.0/debian/patches/0003-fix-build-hang-on-launchpad-buildd.patch --- gpgme1.0-1.8.0/debian/patches/0003-fix-build-hang-on-launchpad-buildd.patch 1970-01-01 00:00:00.000000000 +0000 +++ gpgme1.0-1.8.0/debian/patches/0003-fix-build-hang-on-launchpad-buildd.patch 2017-02-18 21:22:02.000000000 +0000 @@ -0,0 +1,57 @@ +From a98951a30a6ae603ffac4ec8c5168aa6d1019933 Mon Sep 17 00:00:00 2001 +From: Andre Heinecke +Date: Wed, 25 Jan 2017 14:10:18 +0100 +Subject: [PATCH] tests: Use --debug-quick-random for tests + +* tests/start-stop-agent: Don't autostart agent on --stop and +running check. Use --debug-quick-random when starting. + +-- +This should speed up the tests especially on low entropy systems. +Possibly fixing a hang on pythons op_genkey test in the Launchpad +build enviorment (see launchpad issue 1655298) +--- + tests/start-stop-agent | 12 +++++++----- + 1 file changed, 7 insertions(+), 5 deletions(-) + +diff --git a/tests/start-stop-agent b/tests/start-stop-agent +index ab47d8d..e843ce5 100755 +--- a/tests/start-stop-agent ++++ b/tests/start-stop-agent +@@ -15,11 +15,12 @@ fi + + GPG_AGENT_INFO= + export GPG_AGENT_INFO ++GPG_AGENT=$(which gpg-agent) + + token=$(echo "gpgme-$(pwd)" | tr ' ' '_') + + if [ "$1" = "--stop" ]; then +- if [ "$(gpg-connect-agent getval\ $token /bye 2>/dev/null | head -1)" \ ++ if [ "$(gpg-connect-agent --no-autostart getval\ $token /bye 2>/dev/null | head -1)" \ + != "D set" ]; then + echo "gpg-agent not running" >&2 + exit 0 +@@ -29,15 +30,16 @@ if [ "$1" = "--stop" ]; then + exit 0 + fi + +-if [ "$(gpg-connect-agent getval\ $token /bye 2>/dev/null | head -1)" \ ++if [ "$(gpg-connect-agent --no-autostart getval\ $token /bye 2>/dev/null | head -1)" \ + = "D set" ]; then + echo "gpg-agent already running" >&2 + exit 0 + fi + +-echo "starting gpg-agent " >&2 +-gpg-connect-agent putval\ $token\ set /bye >/dev/null 2>&1 +-if [ "$(gpg-connect-agent getval\ $token /bye 2>/dev/null | head -1)" \ ++echo "starting gpg-agent.." >&2 ++ ++gpg-connect-agent --agent-program="${GPG_AGENT}|--debug-quick-random" putval\ $token\ set /bye ++if [ $? -ne 0 -o "$(gpg-connect-agent getval\ $token /bye 2>/dev/null | head -1)" \ + != "D set" ]; then + echo "error starting gpg-agent" >&2 + exit 1 +-- +2.8.0.rc3 diff -Nru gpgme1.0-1.8.0/debian/patches/0004-Ensure-quick-random-is-used-if-gpg-is-gpg2.patch gpgme1.0-1.8.0/debian/patches/0004-Ensure-quick-random-is-used-if-gpg-is-gpg2.patch --- gpgme1.0-1.8.0/debian/patches/0004-Ensure-quick-random-is-used-if-gpg-is-gpg2.patch 1970-01-01 00:00:00.000000000 +0000 +++ gpgme1.0-1.8.0/debian/patches/0004-Ensure-quick-random-is-used-if-gpg-is-gpg2.patch 2017-02-18 21:22:02.000000000 +0000 @@ -0,0 +1,27 @@ +From f3ca2c9ce9fd4a03e293065f10b92589a7e642d6 Mon Sep 17 00:00:00 2001 +From: Andre Heinecke +Date: Thu, 26 Jan 2017 10:44:02 +0100 +Subject: [PATCH] python: Ensure quick-random is used if gpg is gpg2 + +* lang/python/tests/Makefile.am (gpg.conf): Configure +agent-program accordingly. +--- + lang/python/tests/Makefile.am | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/lang/python/tests/Makefile.am b/lang/python/tests/Makefile.am +index f9366dd..d7f2e58 100644 +--- a/lang/python/tests/Makefile.am ++++ b/lang/python/tests/Makefile.am +@@ -107,6 +107,8 @@ clean-local: + ./gpg.conf: + # This is required for t-sig-notations. + echo no-force-v3-sigs > ./gpg.conf ++ echo ignore-invalid-option agent-program >> ./gpg.conf ++ echo "agent-program `which $(GPG_AGENT)`|--debug-quick-random" >> ./gpg.conf + + ./gpg-agent.conf: + # This is required for gpg2, which does not support command fd. +-- +2.1.4 + diff -Nru gpgme1.0-1.8.0/debian/patches/0005-tests-Reduce-iterations-threads.patch gpgme1.0-1.8.0/debian/patches/0005-tests-Reduce-iterations-threads.patch --- gpgme1.0-1.8.0/debian/patches/0005-tests-Reduce-iterations-threads.patch 1970-01-01 00:00:00.000000000 +0000 +++ gpgme1.0-1.8.0/debian/patches/0005-tests-Reduce-iterations-threads.patch 2017-02-18 21:22:02.000000000 +0000 @@ -0,0 +1,42 @@ +From 7bd6ab4a91d43d7cbf5d347c0c12e0e4f9f7e3bf Mon Sep 17 00:00:00 2001 +From: Andre Heinecke +Date: Mon, 30 Jan 2017 14:19:52 +0100 +Subject: [PATCH] tests: Reduce iterations / threads + +* tests/gpg/t-gpgconf.c (main): Reduce iterations to 10. +* tests/gpg/t-thread-keylist-verify.c, +tests/gpg/t-thread-keylist.c (THREAD_COUNT): Reduce to 10. + +-- +While these tests tested for race conditions a smaller number +of iteration should still show problems if they are run on +multiple systems and regulary. While the 100 Thread count in +the t-thread tests could lead to resource problems. +--- + tests/gpg/t-gpgconf.c | 2 +- + tests/gpg/t-thread-keylist-verify.c | 2 +- + tests/gpg/t-thread-keylist.c | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +--- a/tests/gpg/t-thread-keylist-verify.c ++++ b/tests/gpg/t-thread-keylist-verify.c +@@ -32,7 +32,7 @@ + + #include "t-support.h" + +-#define THREAD_COUNT 100 ++#define THREAD_COUNT 10 + + static const char test_text1[] = "Just GNU it!\n"; + static const char test_sig1[] = +--- a/tests/gpg/t-thread-keylist.c ++++ b/tests/gpg/t-thread-keylist.c +@@ -32,7 +32,7 @@ + + #include "t-support.h" + +-#define THREAD_COUNT 100 ++#define THREAD_COUNT 10 + + void * + start_keylist (void *arg) diff -Nru gpgme1.0-1.8.0/debian/patches/series gpgme1.0-1.8.0/debian/patches/series --- gpgme1.0-1.8.0/debian/patches/series 2016-12-09 14:35:42.000000000 +0000 +++ gpgme1.0-1.8.0/debian/patches/series 2017-02-18 21:22:02.000000000 +0000 @@ -1,3 +1,5 @@ 0001-avoid-identifying-as-beta.patch 0002-Remove-a-forgotten-instance-of-libsuffix.patch -test +0003-fix-build-hang-on-launchpad-buildd.patch +0004-Ensure-quick-random-is-used-if-gpg-is-gpg2.patch +0005-tests-Reduce-iterations-threads.patch diff -Nru gpgme1.0-1.8.0/debian/patches/test gpgme1.0-1.8.0/debian/patches/test --- gpgme1.0-1.8.0/debian/patches/test 2016-12-09 14:35:42.000000000 +0000 +++ gpgme1.0-1.8.0/debian/patches/test 1970-01-01 00:00:00.000000000 +0000 @@ -1,320 +0,0 @@ ---- a/lang/python/tests/initial.py -+++ b/lang/python/tests/initial.py -@@ -26,16 +26,29 @@ import gpg - import support - support.init_gpgme(gpg.constants.protocol.OpenPGP) - --subprocess.check_call([os.path.join(os.getenv('top_srcdir'), -- "tests", "start-stop-agent"), "--start"]) -+print("start-stop-agent begin") -+subprocess.check_call(os.path.join(os.getenv('top_srcdir'), -+ "tests", "start-stop-agent") + " --start", -+ shell=True) - -+print("start-stop-agent end") -+ -+print("check0") - with gpg.Context() as c: -+ print("check1") - alpha = c.get_key("A0FF4590BB6122EDEF6E3C542D727CC768697734", False) -+ print("check2") - bob = c.get_key("D695676BDCEDCC2CDD6152BCFE180B1DA9E3B0B2", False) -+ print("check3") - - # Mark alpha as trusted. The signature verification tests expect - # this. - support.mark_key_trusted(c, alpha) -+ print("check4") - - c.op_import(open(support.in_srcdir("encrypt-only.asc"))) -+ print("check5") - c.op_import(open(support.in_srcdir("sign-only.asc"))) -+ print("check6") -+ -+print("init test end") ---- a/lang/python/tests/run-tests.py -+++ b/lang/python/tests/run-tests.py -@@ -54,16 +54,17 @@ args = parser.parse_args() - if not args.interpreters: - args.interpreters = [sys.executable] - --out = sys.stdout if args.verbose else None --err = sys.stderr if args.verbose else None -- - def status_to_str(code): - return {0: "PASS", 77: "SKIP", 99: "ERROR"}.get(code, "FAIL") - - results = list() - for interpreter in args.interpreters: -+ print("check 0") -+ sys.stdout.flush() - version = subprocess.check_output( - [interpreter, "-c", "import sys; print('{0}.{1}'.format(sys.version_info[0], sys.version_info[1]))"]).strip().decode() -+ print("check 0.1") -+ sys.stdout.flush() - - builddirs = glob.glob(os.path.join(args.builddir, "..", "build", - "lib*"+version)) -@@ -73,11 +74,21 @@ for interpreter in args.interpreters: - env["PYTHONPATH"] = builddirs[0] - - print("Running tests using {0} ({1})...".format(interpreter, version)) -+ sys.stdout.flush() - for test in args.tests: -- status = subprocess.call( -+ #if test == "t-callbacks.py": -+ # continue -+ print("run test" + test) -+ sys.stdout.flush() -+ p = subprocess.Popen( - [interpreter, os.path.join(args.srcdir, test)], -- env=env, stdout=out, stderr=err) -+ env=env) -+ stdout, _ = p.communicate() -+ print("run tests check2") -+ sys.stdout.flush() -+ status = p.returncode - print("{0}: {1}".format(status_to_str(status), test)) -+ sys.stdout.flush() - results.append(status) - - def count(status): ---- a/lang/python/tests/t-callbacks.py -+++ b/lang/python/tests/t-callbacks.py -@@ -24,6 +24,10 @@ import os - import gpg - import support - -+import sys -+print("start test callbacks check") -+sys.stdout.flush() -+ - support.init_gpgme(gpg.constants.protocol.OpenPGP) - - c = gpg.Context() -@@ -32,6 +36,8 @@ c.set_pinentry_mode(gpg.constants.PINENT - source = gpg.Data("Hallo Leute\n") - sink = gpg.Data() - -+print("test callbacks check 01") -+sys.stdout.flush() - # Valid passphrases, both as string and bytes. - for passphrase in ('foo', b'foo'): - def passphrase_cb(hint, desc, prev_bad, hook=None): -@@ -41,6 +47,8 @@ for passphrase in ('foo', b'foo'): - c.set_passphrase_cb(passphrase_cb, passphrase) - c.op_encrypt([], 0, source, sink) - -+print("test callbacks check 02") -+sys.stdout.flush() - # Returning an invalid type. - def passphrase_cb(hint, desc, prev_bad, hook=None): - return 0 -@@ -54,6 +62,8 @@ except Exception as e: - else: - assert False, "Expected an error, got none" - -+print("test callbacks check 03") -+sys.stdout.flush() - # Raising an exception inside callback. - myException = Exception() - def passphrase_cb(hint, desc, prev_bad, hook=None): -@@ -67,6 +77,8 @@ except Exception as e: - else: - assert False, "Expected an error, got none" - -+print("test callbacks check 04") -+sys.stdout.flush() - # Wrong kind of callback function. - def bad_passphrase_cb(): - pass -@@ -81,44 +93,50 @@ else: - - - -+print("test callbacks check 05") -+sys.stdout.flush() - # Test the progress callback. --parms = """ --Key-Type: RSA --Key-Length: 1024 --Name-Real: Joe Tester --Name-Comment: with stupid passphrase --Name-Email: joe+gpg@example.org --Passphrase: Crypt0R0cks --Expire-Date: 2020-12-31 -- --""" -- --messages = [] --def progress_cb(what, typ, current, total, hook=None): -- assert hook == messages -- messages.append( -- "PROGRESS UPDATE: what = {}, type = {}, current = {}, total = {}" -- .format(what, typ, current, total)) -- --c = gpg.Context() --c.set_progress_cb(progress_cb, messages) --c.op_genkey(parms, None, None) --assert len(messages) > 0 -- --# Test exception handling. --def progress_cb(what, typ, current, total, hook=None): -- raise myException -- --c = gpg.Context() --c.set_progress_cb(progress_cb, None) --try: -- c.op_genkey(parms, None, None) --except Exception as e: -- assert e == myException --else: -- assert False, "Expected an error, got none" -+#parms = """ -+#Key-Type: RSA -+#Key-Length: 1024 -+#Name-Real: Joe Tester -+#Name-Comment: with stupid passphrase -+#Name-Email: joe+gpg@example.org -+#Passphrase: Crypt0R0cks -+#Expire-Date: 2020-12-31 -+# -+#""" -+# -+#messages = [] -+#def progress_cb(what, typ, current, total, hook=None): -+# assert hook == messages -+# messages.append( -+# "PROGRESS UPDATE: what = {}, type = {}, current = {}, total = {}" -+# .format(what, typ, current, total)) -+# -+#c = gpg.Context() -+#c.set_progress_cb(progress_cb, messages) -+#c.op_genkey(parms, None, None) -+#assert len(messages) > 0 -+# -+print("test callbacks check 06") -+sys.stdout.flush() -+## Test exception handling. -+#def progress_cb(what, typ, current, total, hook=None): -+# raise myException -+# -+#c = gpg.Context() -+#c.set_progress_cb(progress_cb, None) -+#try: -+# c.op_genkey(parms, None, None) -+#except Exception as e: -+# assert e == myException -+#else: -+# assert False, "Expected an error, got none" - - -+print("test callbacks check 07") -+sys.stdout.flush() - # Test the edit callback. - c = gpg.Context() - c.set_pinentry_mode(gpg.constants.PINENTRY_MODE_LOOPBACK) -@@ -136,6 +154,8 @@ def edit_cb(status, args, hook): - c.op_edit(alpha, edit_cb, cookie, sink) - assert edit_cb_called - -+print("test callbacks check 08") -+sys.stdout.flush() - # Test exceptions. - c = gpg.Context() - c.set_pinentry_mode(gpg.constants.PINENTRY_MODE_LOOPBACK) -@@ -153,6 +173,8 @@ else: - - - -+print("test callbacks check 09") -+sys.stdout.flush() - # Test the status callback. - source = gpg.Data("Hallo Leute\n") - sink = gpg.Data() -@@ -169,6 +191,8 @@ c.set_ctx_flag("full-status", "1") - c.op_encrypt([alpha], gpg.constants.ENCRYPT_ALWAYS_TRUST, source, sink) - assert status_cb_called - -+print("test callbacks check 10") -+sys.stdout.flush() - # Test exceptions. - source = gpg.Data("Hallo Leute\n") - sink = gpg.Data() -@@ -188,6 +212,8 @@ else: - - - -+print("test callbacks check 11") -+sys.stdout.flush() - # Test the data callbacks. - def read_cb(amount, hook=None): - assert hook == cookie -@@ -202,6 +228,8 @@ except Exception as e: - else: - assert False, "Expected an error, got none" - -+print("test callbacks check 12") -+sys.stdout.flush() - def read_cb(amount): - raise myException - data = gpg.Data(cbs=(read_cb, None, None, lambda: None)) -@@ -213,6 +241,8 @@ else: - assert False, "Expected an error, got none" - - -+print("test callbacks check 13") -+sys.stdout.flush() - def write_cb(what, hook=None): - assert hook == cookie - return "wrong type" -@@ -224,6 +254,8 @@ except Exception as e: - else: - assert False, "Expected an error, got none" - -+print("test callbacks check 14") -+sys.stdout.flush() - def write_cb(what): - raise myException - data = gpg.Data(cbs=(None, write_cb, None, lambda: None)) -@@ -235,6 +267,8 @@ else: - assert False, "Expected an error, got none" - - -+print("test callbacks check 15") -+sys.stdout.flush() - def seek_cb(offset, whence, hook=None): - assert hook == cookie - return "wrong type" -@@ -246,6 +280,8 @@ except Exception as e: - else: - assert False, "Expected an error, got none" - -+print("test callbacks check 16") -+sys.stdout.flush() - def seek_cb(offset, whence): - raise myException - data = gpg.Data(cbs=(None, None, seek_cb, lambda: None)) -@@ -255,3 +291,7 @@ except Exception as e: - assert e == myException - else: - assert False, "Expected an error, got none" -+ -+ -+print("end test callbacks check") -+sys.stdout.flush() ---- a/lang/python/tests/support.py -+++ b/lang/python/tests/support.py -@@ -48,7 +48,11 @@ def print_data(data): - except: - # Hope for the best. - pass -- sys.stdout.buffer.write(data) -+ if hasattr(sys.stdout, "buffer"): -+ sys.stdout.buffer.write(data) -+ else: -+ sys.stdout.write(data) -+ sys.stdout.flush() - - def mark_key_trusted(ctx, key): - class Editor(object): diff -Nru gpgme1.0-1.8.0/debian/rules gpgme1.0-1.8.0/debian/rules --- gpgme1.0-1.8.0/debian/rules 2016-12-09 14:35:42.000000000 +0000 +++ gpgme1.0-1.8.0/debian/rules 2017-02-18 21:22:02.000000000 +0000 @@ -1,6 +1,7 @@ #!/usr/bin/make -f export DEB_BUILD_MAINT_OPTIONS = hardening=+all,-pie,+pic +LDFLAGS=-Wl,-z,relro export QT_SELECT := qt5 export DEBIAN_VERSION = $(shell dpkg-parsechangelog | sed -n -e '/^Version:/s/.*: //p')