diff -Nru php-horde-crypt-2.7.5/debian/changelog php-horde-crypt-2.7.5/debian/changelog --- php-horde-crypt-2.7.5/debian/changelog 2016-12-17 22:04:22.000000000 +0000 +++ php-horde-crypt-2.7.5/debian/changelog 2016-12-22 18:37:12.000000000 +0000 @@ -1,3 +1,11 @@ +php-horde-crypt (2.7.5-1ubuntu1) zesty; urgency=medium + + * d/control, d/t/control: add explicit dependency on gnupg for tests + * debian/patches/update_tests_gnupg2.patch: Update tests for gnupg2 + changes. Closes LP: #1652133. + + -- Nishanth Aravamudan Thu, 22 Dec 2016 10:37:12 -0800 + php-horde-crypt (2.7.5-1) unstable; urgency=medium * New upstream version 2.7.5 diff -Nru php-horde-crypt-2.7.5/debian/control php-horde-crypt-2.7.5/debian/control --- php-horde-crypt-2.7.5/debian/control 2016-12-17 22:04:22.000000000 +0000 +++ php-horde-crypt-2.7.5/debian/control 2016-12-22 18:37:12.000000000 +0000 @@ -1,9 +1,10 @@ Source: php-horde-crypt Section: php Priority: extra -Maintainer: Horde Maintainers +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Horde Maintainers Uploaders: Mathieu Parent -Build-Depends: debhelper (>= 9), pkg-php-tools, pear-horde-channel +Build-Depends: debhelper (>= 9), pkg-php-tools, pear-horde-channel, gnupg Standards-Version: 3.9.8 Homepage: http://www.horde.org/ Vcs-git: https://anonscm.debian.org/git/pkg-horde/PEAR/php-horde-crypt.git diff -Nru php-horde-crypt-2.7.5/debian/patches/series php-horde-crypt-2.7.5/debian/patches/series --- php-horde-crypt-2.7.5/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 +++ php-horde-crypt-2.7.5/debian/patches/series 2016-12-22 18:33:31.000000000 +0000 @@ -0,0 +1 @@ +update_tests_gnupg2.patch diff -Nru php-horde-crypt-2.7.5/debian/patches/update_tests_gnupg2.patch php-horde-crypt-2.7.5/debian/patches/update_tests_gnupg2.patch --- php-horde-crypt-2.7.5/debian/patches/update_tests_gnupg2.patch 1970-01-01 00:00:00.000000000 +0000 +++ php-horde-crypt-2.7.5/debian/patches/update_tests_gnupg2.patch 2016-12-22 18:37:12.000000000 +0000 @@ -0,0 +1,64 @@ +Description: Update tests for gnupg2 changes + The tests currently rely on gpg1 behavior, so pass parameters to gpg + that make gpg2 emulate the behavior of gpg1 as necessary. Thanks to + https://github.com/keybase/keybase-issues/issues/1712 for related, but + not identical, issues and solution suggestions. + . + Split testVerifyPassphrase() into two tests: gpg2 always spawns a + gpg-agent, which caches passphrases. So the first correct passphrase + ends up leading to the second bad passphrase attempt passing. +Author: Nishanth Aravamudan +Bug: https://bugs.horde.org/ticket/14548 +Bug-Ubuntu: https://launchpad.net/bugs/1652133 +Forwarded: https://bugs.horde.org/view.php?actionID=view_file&type=patch&file=update_tests_gnupg2.patch&ticket=14548 +Last-Update: 2016-12-22 + +--- a/Horde_Crypt-2.7.5/lib/Horde/Crypt/Pgp/Backend/Binary.php ++++ b/Horde_Crypt-2.7.5/lib/Horde/Crypt/Pgp/Backend/Binary.php +@@ -75,8 +75,15 @@ + '--no-options', + '--no-default-keyring', + '--yes', +- '--homedir ' . $this->_tempdir ++ '--homedir ' . $this->_tempdir, ++ '--keyid-format short' + ); ++ ++ $result = $this->_callGpg(array('--version'), 'r', null, false, false, true); ++ /* gpg > 1.x requires specifying the pinentry-mode */ ++ if (!preg_match('/gpg \(GnuPG\) = (1\.[0-9\.]+)/', $result->stdout, $m)) { ++ $this->_gnupg[] = '--pinentry-mode loopback'; ++ } + } + + /** +@@ -678,6 +685,7 @@ + if ($parseable) { + putenv('LANGUAGE=C'); + } ++ putenv('GPG_TTY=$(tty)'); + if ($mode == 'w') { + if ($fp = popen($cmdline, 'w')) { + putenv('LANGUAGE=' . $language); +--- a/Horde_Crypt-2.7.5/test/Horde/Crypt/Pgp/TestBase.php ++++ b/Horde_Crypt-2.7.5/test/Horde/Crypt/Pgp/TestBase.php +@@ -511,7 +511,7 @@ + $this->assertNotEmpty($out->result); + } + +- public function testVerifyPassphrase() ++ public function testVerifyPassphraseCorrect() + { + $this->assertTrue( + $this->_pgp->verifyPassphrase( +@@ -520,7 +520,10 @@ + 'Secret' + ) + ); ++ } + ++ public function testVerifyPassphraseIncorrect() ++ { + $this->assertFalse( + $this->_pgp->verifyPassphrase( + $this->_getPublicKey(), diff -Nru php-horde-crypt-2.7.5/debian/tests/control php-horde-crypt-2.7.5/debian/tests/control --- php-horde-crypt-2.7.5/debian/tests/control 2016-12-17 22:04:22.000000000 +0000 +++ php-horde-crypt-2.7.5/debian/tests/control 2016-12-22 18:37:12.000000000 +0000 @@ -1,3 +1,3 @@ Tests: phpunit Restrictions: needs-recommends -Depends: @, php-cli, php-horde-test +Depends: @, php-cli, php-horde-test, gnupg