[dev] Horde_Crypt and gnupg version ?

Remi Collet remi at fedoraproject.org
Tue Mar 11 06:09:59 UTC 2014


Hi,

Which is the version of gnupg needed (and preferred) for Horde_Crypt ?


ON fedora /usr/bin/gpg is gnupg version 1.4.16
Some test fail because of version output (recent versions doesn't output
full version anymore, but only "GnuPG v1")

This minor workaround is enough [1]:
   sed -e '/GnuPG v/s/%d.%d.%d (%s)/%s/' -i PgpTest.php

Then all tests succeed.

In RHEL 6 and 7 /usr/bin/gpg is gnupg version 2.0
All test succeed.

Of course there can be issue when password are needed
(IIRC, only gnupg v1 accepts password from command line options)

If only gnupg v1 is accepted, then we have a problem ;)
(RHEL 6 and 7 don't have gnupg v1, so /usr/bin/gpg is a simple link to
/usr/bin/gpg2, and we can't have gnupg v1 in some other repo, as
/usr/bin/gpg exists)

If both are accepted, perhaps test could be slightly improved

   if (is_executable('/usr/bin/gpg')) {
       $gpg = '/usr/bin/gpg';
   } else if (is_executable('/usr/bin/gpg2')) {
       $gpg = '/usr/bin/gpg2';
   } else {
       $this->markTestSkipped('GPG binary not found.');
   }

And if v2 is preferred, changing order.


Thanks for clarification,
Remi


[1] please consider changing this in official next version


More information about the dev mailing list