Page MenuHome GnuPG

Lock files not compatible between Windows and Linux (invalid size)
Open, LowPublic

Description

It's a small annoyance but if you copy a GNUPGHOME from Windows to linux you get
errors like it can't start the agent or dirmngr or write the pubring.

Errors are like:
gpg: invalid size of lockfile
'/home/aheinecke/arbeit/gpg4win/validity-testdata/recipientgpghome/gnupg_spawn_dirmngr_sentinel.lock'
gpg: cannot read lockfile
gpg: connecting dirmngr at
'/run/user/1000/gnupg/d.tbunir81mpz7iqw5kgqccmkr/S.dirmngr' failed: Invalid argument

gpg: invalid size of lockfile
'/home/aheinecke/arbeit/gpg4win/validity-testdata/recipientgpghome/pubring.kbx.lock'
gpg: cannot read lockfile
gpg: can't lock
'/home/aheinecke/arbeit/gpg4win/validity-testdata/recipientgpghome/pubring.kbx'
gpg: error writing keyring
'/home/aheinecke/arbeit/gpg4win/validity-testdata/recipientgpghome/pubring.kbx':
Invalid argument

maybe we should just delete invalid size lockfiles?

Event Timeline

I've also noticed this issue on windows when trying to symlink %APPDATA%\gnupg to $HOME/.gnupg under msys32.

Yes, it would be convenient to use the same $GNUPGHOME in Git Bash (using /usr/bin/gpg) as in PowerShell / Cmd (using gpg.exe in %PATH%)