Regression: home dir no longer automatically created
Closed, ResolvedPublic


The fix for bug 1675 introduced a regression. tdbio_set_dbname() calls
take_write_lock() before try_make_homedir(), but that tries to create the lock
in the homedir, which doesn't exist yet.

The error is:
"gpg: failed to create temporary file
`/home/ubuntu/.gnupg/.#lk0x21044c0.adt.7314': No such file or directory"

Seen with 1.4.20, but code in 2.x is similar.

See downstream bug report:


mdeslaur added a subscriber: mdeslaur.
gniibe claimed this task.Feb 10 2016, 12:53 AM
gniibe added a subscriber: gniibe.

Thank you for the report. Confirmed. It was my mistake, I didn't test the code
path with no homedir.

Please try attached patch.
While I understand it's a regression (and it's urgent for you), I downgrade the
It will be soon in the repo.

Thanks for the patch, but it still needs a small change. You don't want to
create the directory or the lock file if the user specified --no-auto-check-trustdb.

How about this patch?

You are right to have the check against CREATE.
I'll include that check.

This would be final version.
If !create, we can let it return earlier.

I think you attached the original patch once again by mistake...

Sorry, here it is.

Patch looks good, thanks!

werner added a subscriber: werner.May 6 2016, 8:20 PM

For which branches has this been fixed?
Do we have releases for all of them?

gniibe added a comment.May 9 2016, 4:18 AM

Fixed in all branches.

Master 2.1: d9f9b3be036747c9f55060aed47896f951bfb853
1.4: d957e4388f72581b1ec801613b5629b5ea3f586d
2.0: eb7806d63df63663170ba86f0673caa34b944c28

For some reason, the commit messages of 1.4 and 2.0 refers
master commit of 2f3e42047d17313eeb38d354048f343158402a8d.
Perhaps, I did in my repo and it was 2f3e420 and apply it to 1.4 and 2.0.
Then, I pushed 1.4, 2.0, and 2.1. and 2.1 was failed because of
non-fast-forward. Then I rebased for 2.1.

gniibe set Version to 1.4.20,2.0.29,2.1.11.May 9 2016, 4:18 AM
werner added a comment.May 9 2016, 8:46 PM

Thanks. Fix released with 2.0.30 and 2.1.12.
We can close this bug after the release of 1.4.21

werner closed this task as Resolved.May 10 2016, 11:41 AM
werner added a project: Unreleased.
werner removed a project: Testing.