I'm currently trying to set up a small (partial) ubuntu mirror.
Doing this, I stumbled across gpgv
. And as I need gpgv for verifying the signatures of the mirror files, I tried importing the ubuntu keyring files into my keyring via:
gpg --no-default-keyring --keyring trustedkeys.gpg --import /usr/share/keyrings/ubuntu-archive-keyring.gpg
When I then run gpgv
, I am granted with an error:
gpgv: can't allocate lock for '/home/sync_user/.gnupg/trustedkeys.gpg'
However, when I just cp /usr/share/keyrings/ubuntu-archive-keyring.gpg ~/.gnupg/trustedkeys.gpg
and run gpgv
, there is no error message.
Even if I have the exact same permissions etc, the error persists in the first but not in the second case:
- Imported keys:
sync_user@machine:~/.gnupg$ ls -lah
total 20K
drwx------ 2 sync_user sync_user 4.0K Aug 22 12:01 .
drwxr-xr-x 6 sync_user sync_user 4.0K Aug 21 16:59 ..
-rw------- 1 sync_user sync_user 1.2K Aug 22 11:55 trustdb.gpg
-rw-r--r-- 1 sync_user sync_user 7.8K Aug 22 11:55 trustedkeys.gpg
- Copied keyring:
sync_user@machine:~/.gnupg$ ls -lah
total 20K
drwx------ 2 sync_user sync_user 4.0K Aug 22 12:01 .
drwxr-xr-x 6 sync_user sync_user 4.0K Aug 21 16:59 ..
-rw------- 1 sync_user sync_user 1.2K Aug 22 11:55 trustdb.gpg
-rw-r--r-- 1 sync_user sync_user 7.3K Aug 22 12:03 trustedkeys.gpg
Another note: this happens exactly the same with different users on the same machine and on other machines. I have tried it with ubuntu 20.04 and an arch linux install - same results.
The gpgv --version
s are: gpgv (GnuPG) 2.2.19 libgcrypt 1.8.5
on ubuntu and gpgv (GnuPG) 2.2.21 libgcrypt 1.8.6
on arch.
Does anyone have an idea where this behavior could be rooted in?
I would be thankful for every comment.
gpg --list-keys
just fine butgpgv
chokes when trying to use that key ring with with samecan't allocate lock
error.