[dev] Horde_Crypt and gnupg version ?

Michael M Slusarz slusarz at horde.org
Wed Mar 12 06:03:22 UTC 2014


Quoting Remi Collet <remi at fedoraproject.org>:

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

Either v1 or v2 should work.

> 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.

The regex should be fixed then to work for either version.

>    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.');
>    }

The better solution here is probably to make the gpg binary location  
configurable.  (See, e.g., Horde_Imap_Client for an example on how to  
create a conf.php file that is used by the test.)

FWIW, I use ArchLinux and GPG version 2 is located at /usr/bin/gpg.   
AFAIK, nobody is running gpg v1 with gpg v2, so 'gpg' is the more  
reasonable default rather than 'gpg2'.

michael
-- 

___________________________________
Michael Slusarz [slusarz at horde.org]



More information about the dev mailing list