Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.6.9

Bug #19914 PinEntry can't find Console_CommandLine
Submitted: 2013-04-27 06:10 UTC
From: gauthierm Assigned: gauthierm
Status: Closed Package: Crypt_GPG (version 1.4.0b4)
PHP Version: Irrelevant OS: CentOS or RHEL
Roadmaps: (Not assigned)    
Subscription  


 [2013-04-27 06:10 UTC] gauthierm (Michael Gauthier)
Description: ------------ PEAR install of Crypt_GPG succeeds even when PHP XML is not available. Subsequent GPG commands with passphrases throw an exception: Crypt_GPG DEBUG: ERROR: gpg: decryption failed: No secret key and a no pinetry application. This might be a bug in a dependency of ours, maybe Console_CommandLine.

Comments

 [2015-04-08 00:05 UTC] alec (Aleksander Machniak)
-Summary: Bad package dependencies +Summary: PinEntry can't find Console_CommandLine
This is problem with Console_CommandLine indeed, but it is not just the dependencies install issue. To reproduce this you need to use GnuPG 2.x. In that case pinentry program is used. I installed Crypt_GPG using composer, so the code in crypt-gpg-pinentry looks like this: $phpDir = '/home/alec/repos/roundcubemail/vendor/pear-pear.php.net/Crypt_GPG'; if ($phpDir[0] === '@') { // Git repo needs to set the include path as the pinentry program is not // invoked in the current directory. set_include_path( dirname(__FILE__) . DIRECTORY_SEPARATOR . '..' . PATH_SEPARATOR . get_include_path() ); } else { // PEAR packaged version needs to set include path in case it is running // in a local PEAR tree that's not in the system PHP include path. set_include_path($phpDir); } In this case default include path will be overwritten with the directory in which Console/CommandLine.php (and others) do not exist. Fixing include path to not remove the default solves the issue. However, this requires Console_CommandLine installed in the system, which is not what we may want using composer. Maybe we should pass include_path to the crypt-gpg-pinentry as an argument and use it if specified?
 [2015-08-18 20:55 UTC] gauthierm (Michael Gauthier)
 [2015-08-19 03:36 UTC] gauthierm (Michael Gauthier)
-Status: Open +Status: Closed -Assigned To: +Assigned To: gauthierm
This bug has been fixed in SVN. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.