[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: RFS: ruby-mail-gpg 0.2.6-1



On 16-05-16 12:04:38, Jérémy Bobbio wrote:
> georg@riseup.net:
> > - I've made some progress: […]
> 
> Great! :)

Thanks for your input!

> I'm surprised you need to both launch and reload gpg-agent. I think it
> would also be much better to kill the agent once the tests have been
> run.

I guess just reloading is fine, gpg-agent will be launched if not
running already. Also, I'll kill the gpg-agent after the tests ran. I'll
fix this.

> > - AFAICT: Two last major showstoppers left, I need support with
> >   these, because I can't find a way on my own to solve these:
> > 
> >   - * One of the tests [1] fails. Running this gives:
> >     Failure: <GPGME::Error::BadPassphrase> exception expected but none was thrown.
> >     
> >     I guess the output of gpg changed during the transition from version
> >     1.x to 2.x - but I didn't find a way how to overcome this.
> >     Still I'm unsure, because there is "no exception thrown".
> >     
> >     Should I remove this part? Could someone of you have a look into
> >     this?
> 
> After fiddling around, I've managed to understand what's happening: the
> agent is caching the passphrase. So it doesn't ask gpg to enter a new
> one, and so the wrong passphrase is never given to gpg. So I guess the
> agent needs to be told to forget the passphrase before this particular
> test can be run properly.

I see, I'll check if this will let the test pass.

> Both the hardcoded path and the binary files have the same root cause:
> this should all be generated on the fly as part of the test setup
> process. I really don't think it's a good thing to have GnuPG binary
> files shipped as part of the source.
> 
> Storing armored versions of the keys and importing them in a fresh
> temporary directory is a more robust approach, IMHO…  This is how I did
> it for Schleuder some time ago. The “around” block creates a new
> temporary directory, sets the right environment variable and import keys
> before running the tests. See:
> https://sources.debian.net/src/schleuder/2.2.1-2%2Bdeb7u1/spec/schleuder/crypt_spec.rb/?hl=28:45#L28
> 
> If that feels like too much changes, you could at least copy upstream
> binary files in a temporary and use that as the GNUPGHOME. Otherwise,
> there's a risk that testing twice in a row will give surprising results.

I could generate the keys on the fly sure...but, not sure if I'm missing
something here: Right now the quilt patch which injects gpg.conf and
gpg-agent.conf into the upstream provided gpghome inside the build dir.
Even if I would generate the keys myself: How would I get these two
configs into a temp dir, without the need to specify the path the configs
should be copied from?

Thanks,
Georg

Attachment: signature.asc
Description: Digital signature


Reply to: