[Pkg-gnupg-maint] Bug#735363: gnupg: Fatal error/non-zero exit code returned when --trust-model=always used

Dominic Hargreaves dom at earth.li
Wed Jan 15 00:29:11 UTC 2014


Package: gnupg
Version: 1.4.16-1
Severity: important

As of 1.4.16-1, this fails:

$ gpg --trust-model=always --homedir /tmp/tmp.AXdUGWvlbz --gen-key
gpg (GnuPG) 1.4.16; Copyright (C) 2013 Free Software Foundation, Inc.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

gpg: keyring `/tmp/tmp.AXdUGWvlbz/secring.gpg' created
gpg: keyring `/tmp/tmp.AXdUGWvlbz/pubring.gpg' created
Please select what kind of key you want:
...

+++++
+++++
gpg: fatal: can't open `/tmp/tmp.AXdUGWvlbz/trustdb.gpg': No such file or directory
secmem usage: 2688/5920 bytes in 9/25 blocks of pool 6432/32768
$ echo $?
2

The problem is specific to --trust-model=always:

$ gpg --homedir /tmp/tmp.AXdUGWvlbz --gen-key
gpg (GnuPG) 1.4.16; Copyright (C) 2013 Free Software Foundation, Inc.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

gpg: keyring `/tmp/tmp.AXdUGWvlbz/secring.gpg' created
gpg: keyring `/tmp/tmp.AXdUGWvlbz/pubring.gpg' created
Please select what kind of key you want:
...

+++++
...+++++
gpg: /tmp/tmp.AXdUGWvlbz/trustdb.gpg: trustdb created
gpg: key 4C418E9D marked as ultimately trusted
public and secret key created and signed.

gpg: checking the trustdb
gpg: 3 marginal(s) needed, 1 complete(s) needed, PGP trust model
gpg: depth: 0  valid:   1  signed:   0  trust: 0-, 0q, 0n, 0m, 0f, 1u
gpg: next trustdb check due at 2014-01-15
pub   1024R/4C418E9D 2014-01-14 [expires: 2014-01-15]
      Key fingerprint = D144 037B 7ED8 2479 A5E3  FFF1 59D3 2D68 4C41 8E9D
uid                  dominic <dom at earth.li>
sub   1024R/BF4AA586 2014-01-14 [expires: 2014-01-15]

$ echo $?

This seems to be related to

http://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=commit;h=498b9a95dc65c43240835d64cc92d8fb43014d53

as discussed in #725889 but it not exactly the same problem - maybe
more of the commands (gen-key, import) needs fixing too?

1.4.15-3 does not exhibit the problem.

The real world manifestation of this is in the request-tracker4 test
suite: see #735361. I can try and come up with a more exact test case
if needed - there are quite a few layers of perl in the way.

Thanks,
Dominic.



More information about the Pkg-gnupg-maint mailing list