Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test suite hangs with gnupg 2.0 #3

Closed
remicollet opened this issue Jun 16, 2016 · 10 comments
Closed

Test suite hangs with gnupg 2.0 #3

remicollet opened this issue Jun 16, 2016 · 10 comments
Milestone

Comments

@remicollet
Copy link
Contributor

On RHEL / CentOS we only have gnupg v2 (no gnupg v1)

With version 1.3.6 the test suite have lot of failure (everywhere the passphrase is needed, I'm working on this issue).

With version 1.4.0RC1 the test suite simply hangs (in tests/gnupg_oo_encrypt.phpt)

Fails on Fedora 22 (gpgme 1.4.3, gnupg 2.1.11)
Hangs on Fedora 21 (gpgme 1.4.3, gnupg 2.0.29)
Hangs on RHEL 7 (gpgme 1.3.2, gnupg 2.0.22)

So I really think this is related to gnupg version 2.0 vs 2.1

Failure seems acceptable, when hang doesn't.

@remicollet
Copy link
Contributor Author

I forget to say, I haven't found any explanation in the diff between versions 1.3.6 and 1.4.0RC1 :(

@bukka
Copy link
Member

bukka commented Jun 16, 2016

I'm actually using fedora. Have you tried to compile with:

$ ./configure --with-gpg=/usr/bin/gpg

By default it will use gpg2 which is not supported atm.

@bukka
Copy link
Member

bukka commented Jun 16, 2016

anyway I will take a look why it hangs as it should be exactly the same as 1.3.6. The only point of this release is to support PHP 7 and possibly fix some compilation issue from the previous version. All improvements and test fixes (more rewrite probably as they are dependent and not really good) will go to 1.5

@remicollet
Copy link
Contributor Author

remicollet commented Jun 16, 2016

I'm actually using fedora. Have you tried to compile with

Yes, as I said, no problem with gnupg 1 ;)

The issue in only on RHEL which only have gpg2 (/usr/bin/gpg is a symlink to gpg2), but can be reproduced on Fedora <= 22

By default it will use gpg2 which is not supported atm.

And the reason why this extension is not (yet) part of official fedora / EPEL repository ;)

@remicollet
Copy link
Contributor Author

FYI, here is the minimal C app I use to reproduce the hang issue (could be simpler)
https://github.com/remicollet/remirepo/blob/master/php/pecl/php-pecl-gnupg/info.c

To reproduce the hang, with gnupg 2.0, and without tty of X display

  DISPLAY= ./info /usr/bin/gpg2  2>&1 | cat

@bukka
Copy link
Member

bukka commented Jun 16, 2016

Nice. That's very helpful. Thanks. Will hopefully find some time to look into it later

@remicollet
Copy link
Contributor Author

Sorry about the noise... this is not a regression.

After digging for hour... 1.3.6 also hangs in some case.

php run-tests.php ... => fails
php -n run-tests.php... => hangs

Perhaps a simple note in the README about "gnupg 2 not supported" is enough.
Feel free to close this bug.

FYI, php-pecl-gnupg is now available in my repository, and use gnupg1 (I have finally choose to build a RPM of gnupg 1.4.20 which can be installed beside system gnupg 2.x)

@remicollet remicollet changed the title Regression in 1.4.0RC1 with gnupg 2.0 Test suite hangs with gnupg 2.0 Jun 17, 2016
@bukka bukka added this to the 1.5 milestone Jun 19, 2016
@bukka
Copy link
Member

bukka commented Jun 19, 2016

Thanks. I have updated README and set milestone for this to 1.5 to make sure it won't hang there.

@travisghansen
Copy link

travisghansen commented Jun 22, 2016

This same test (meaning encrypting and then decrypting with a key that has a passphrase) is part of my test suite here: https://github.com/travisghansen/phpgpg

It works for me on both Arch with

php 7.0.7-1
gnupg 2.1.12-2
gpgme 1.6.0-2
php-gnupg 1.4.0RC1-1

And centos7 php and pals installed form @remicollet 's repo.

Not sure if I've got something messed up on my test but it appears clean.

gboddin added a commit to ec-europa/fpfis-repo that referenced this issue Jan 25, 2018
@bukka
Copy link
Member

bukka commented Mar 7, 2021

Fixed since 1.5.0RC1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants