1

I am trying to install a patched kernel form Arch User Repository but getting One or more PGP signatures could not be verified! error. I looked at the PKGBUILD and attempted to add the keys with the following command:

gpg --keyserver hkp://keys.gnupg.net --recv-keys ABAF11C65A2970B130ABE3C479BE3E4300411886

It seems to just hang forever, 20 min+ at least. Running the same command as root (sudo) works almost immediately but I still get the One or more PGP signatures could not be verified! error as before. I assume it is because I am running packer as non-root user (packer can't run as root).

What am I doing wrong here?

strace:

strace gpg --keyserver hkp://keys.gnupg.net --recv-keys ABAF11C65A2970B130ABE3C479BE3E4300411886
execve("/usr/bin/gpg", ["gpg", "--keyserver", "hkp://keys.gnupg.net", "--recv-keys", "ABAF11C65A2970B130ABE3C479BE3E43"...], [/* 36 vars */]) = 0
brk(NULL)                               = 0x2617000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=239917, ...}) = 0
mmap(NULL, 239917, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fdec7545000
close(3)                                = 0
open("/usr/lib/libz.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\20#\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=88592, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fdec7544000
mmap(NULL, 2183688, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fdec7147000
mprotect(0x7fdec715c000, 2093056, PROT_NONE) = 0
mmap(0x7fdec735b000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x14000) = 0x7fdec735b000
close(3)                                = 0
open("/usr/lib/libbz2.so.1.0", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\27\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=65760, ...}) = 0
mmap(NULL, 2160936, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fdec6f37000
mprotect(0x7fdec6f46000, 2093056, PROT_NONE) = 0
mmap(0x7fdec7145000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xe000) = 0x7fdec7145000
close(3)                                = 0
open("/usr/lib/libsqlite3.so.0", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0000\22\2\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1095776, ...}) = 0
mmap(NULL, 3192664, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fdec6c2b000
mprotect(0x7fdec6d30000, 2093056, PROT_NONE) = 0
mmap(0x7fdec6f2f000, 32768, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x104000) = 0x7fdec6f2f000
close(3)                                = 0
open("/usr/lib/libgcrypt.so.20", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\221\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=923160, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fdec7543000
mmap(NULL, 3019456, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fdec6949000
mprotect(0x7fdec6a21000, 2097152, PROT_NONE) = 0
mmap(0x7fdec6c21000, 36864, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xd8000) = 0x7fdec6c21000
mmap(0x7fdec6c2a000, 704, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fdec6c2a000
close(3)                                = 0
open("/usr/lib/libgpg-error.so.0", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0+\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=80432, ...}) = 0
mmap(NULL, 2175576, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fdec6735000
mprotect(0x7fdec6748000, 2093056, PROT_NONE) = 0
mmap(0x7fdec6947000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x12000) = 0x7fdec6947000
close(3)                                = 0
open("/usr/lib/libreadline.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\260e\1\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0555, st_size=345576, ...}) = 0
mmap(NULL, 2397440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fdec64eb000
mprotect(0x7fdec652c000, 2093056, PROT_NONE) = 0
mmap(0x7fdec672b000, 32768, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x40000) = 0x7fdec672b000
mmap(0x7fdec6733000, 5376, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fdec6733000
close(3)                                = 0
open("/usr/lib/libassuan.so.0", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0007\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=76728, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fdec7542000
mmap(NULL, 2172000, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fdec62d8000
mprotect(0x7fdec62ea000, 2093056, PROT_NONE) = 0
mmap(0x7fdec64e9000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x11000) = 0x7fdec64e9000
close(3)                                = 0
open("/usr/lib/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0000\10\2\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1960896, ...}) = 0
mmap(NULL, 3803536, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fdec5f37000
mprotect(0x7fdec60cf000, 2093056, PROT_NONE) = 0
mmap(0x7fdec62ce000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x197000) = 0x7fdec62ce000
mmap(0x7fdec62d4000, 14736, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fdec62d4000
close(3)                                = 0
open("/usr/lib/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0pU\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1067376, ...}) = 0
mmap(NULL, 3162344, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fdec5c32000
mprotect(0x7fdec5d35000, 2097152, PROT_NONE) = 0
mmap(0x7fdec5f35000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x103000) = 0x7fdec5f35000
close(3)                                = 0
open("/usr/lib/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\240\r\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=14600, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fdec7541000
mmap(NULL, 2109680, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fdec5a2e000
mprotect(0x7fdec5a30000, 2097152, PROT_NONE) = 0
mmap(0x7fdec5c30000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7fdec5c30000
close(3)                                = 0
open("/usr/lib/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\240`\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=143616, ...}) = 0
mmap(NULL, 2212880, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fdec5811000
mprotect(0x7fdec5829000, 2093056, PROT_NONE) = 0
mmap(0x7fdec5a28000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17000) = 0x7fdec5a28000
mmap(0x7fdec5a2a000, 13328, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fdec5a2a000
close(3)                                = 0
open("/usr/lib/libncursesw.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\260u\1\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=444680, ...}) = 0
mmap(NULL, 2542224, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fdec55a4000
mprotect(0x7fdec560b000, 2097152, PROT_NONE) = 0
mmap(0x7fdec580b000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x67000) = 0x7fdec580b000
close(3)                                = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fdec7540000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fdec753f000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fdec753e000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fdec753d000
arch_prctl(ARCH_SET_FS, 0x7fdec753e700) = 0
mprotect(0x7fdec62ce000, 16384, PROT_READ) = 0
mprotect(0x7fdec580b000, 16384, PROT_READ) = 0
mprotect(0x7fdec5a28000, 4096, PROT_READ) = 0
mprotect(0x7fdec5c30000, 4096, PROT_READ) = 0
mprotect(0x7fdec5f35000, 4096, PROT_READ) = 0
mprotect(0x7fdec6947000, 4096, PROT_READ) = 0
mprotect(0x7fdec64e9000, 4096, PROT_READ) = 0
mprotect(0x7fdec672b000, 8192, PROT_READ) = 0
mprotect(0x7fdec6c21000, 4096, PROT_READ) = 0
mprotect(0x7fdec6f2f000, 12288, PROT_READ) = 0
mprotect(0x7fdec735b000, 4096, PROT_READ) = 0
mprotect(0x6d1000, 4096, PROT_READ)     = 0
mprotect(0x7fdec7580000, 4096, PROT_READ) = 0
munmap(0x7fdec7545000, 239917)          = 0
set_tid_address(0x7fdec753e9d0)         = 7516
set_robust_list(0x7fdec753e9e0, 24)     = 0
rt_sigaction(SIGRTMIN, {0x7fdec5816b40, [], SA_RESTORER|SA_SIGINFO, 0x7fdec5821e80}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {0x7fdec5816bd0, [], SA_RESTORER|SA_RESTART|SA_SIGINFO, 0x7fdec5821e80}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
brk(NULL)                               = 0x2617000
brk(0x2638000)                          = 0x2638000
fstat(0, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 3), ...}) = 0
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 3), ...}) = 0
fstat(2, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 3), ...}) = 0
open("/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=1668896, ...}) = 0
mmap(NULL, 1668896, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fdec73a5000
close(3)                                = 0
access("/etc/gcrypt/fips_enabled", F_OK) = -1 ENOENT (No such file or directory)
open("/proc/sys/crypto/fips_enabled", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/gcrypt/hwf.deny", O_RDONLY)  = -1 ENOENT (No such file or directory)
getrlimit(RLIMIT_CORE, {rlim_cur=RLIM64_INFINITY, rlim_max=RLIM64_INFINITY}) = 0
setrlimit(RLIMIT_CORE, {rlim_cur=0, rlim_max=RLIM64_INFINITY}) = 0
rt_sigaction(SIGINT, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGINT, {0x4962b0, [], SA_RESTORER, 0x7fdec5f6a330}, NULL, 8) = 0
rt_sigaction(SIGHUP, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGHUP, {0x4962b0, [], SA_RESTORER, 0x7fdec5f6a330}, NULL, 8) = 0
rt_sigaction(SIGTERM, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGTERM, {0x4962b0, [], SA_RESTORER, 0x7fdec5f6a330}, NULL, 8) = 0
rt_sigaction(SIGQUIT, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGQUIT, {0x4962b0, [], SA_RESTORER, 0x7fdec5f6a330}, NULL, 8) = 0
rt_sigaction(SIGSEGV, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGSEGV, {0x4962b0, [], SA_RESTORER, 0x7fdec5f6a330}, NULL, 8) = 0
rt_sigaction(SIGUSR1, {0x496210, [], SA_RESTORER, 0x7fdec5f6a330}, NULL, 8) = 0
rt_sigaction(SIGPIPE, {SIG_IGN, [], SA_RESTORER, 0x7fdec5f6a330}, NULL, 8) = 0
mmap(NULL, 32768, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fdec7578000
getuid()                                = 1000
mlock(0x7fdec7578000, 32768)            = 0
geteuid()                               = 1000
access("/home/dom/.gnupg/gpg.conf-2.1.11", R_OK) = -1 ENOENT (No such file or directory)
access("/home/dom/.gnupg/gpg.conf-2.1", R_OK) = -1 ENOENT (No such file or directory)
access("/home/dom/.gnupg/gpg.conf-2", R_OK) = -1 ENOENT (No such file or directory)
access("/home/dom/.gnupg/gpg.conf", R_OK) = 0
access("/home/dom/.gnupg/options", R_OK) = -1 ENOENT (No such file or directory)
stat("~/.gnupg", 0x7ffcf16f10f0)        = -1 ENOENT (No such file or directory)
stat("/home/dom/.gnupg/gpg.conf", {st_mode=S_IFREG|0600, st_size=5191, ...}) = 0
stat("/home/dom/.gnupg", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
getuid()                                = 1000
getuid()                                = 1000
open("/home/dom/.gnupg/gpg.conf", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0600, st_size=5191, ...}) = 0
read(3, "# Options for GnuPG\n# Copyright "..., 4096) = 4096
read(3, "oto is supplied to the\n# viewer "..., 4096) = 1095
read(3, "", 4096)                       = 0
close(3)                                = 0
access("/home/dom/.gnupg/random_seed", F_OK) = -1 ENOENT (No such file or directory)
open("/home/dom/.gnupg/pubring.gpg", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/home/dom/.gnupg/pubring.kbx", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0600, st_size=32, ...}) = 0
read(3, "\0\0\0 \1\1\0\2KBXf\0\0\0\0V\356\273\347V\356\273\347\0\0\0\0\0\0\0\0", 4096) = 32
close(3)                                = 0
access("/home/dom/.gnupg/pubring.kbx", F_OK) = 0
open("/usr/share/locale/locale.alias", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=2997, ...}) = 0
read(3, "# Locale name alias data base.\n#"..., 4096) = 2997
read(3, "", 4096)                       = 0
close(3)                                = 0
open("/usr/share/locale/en_IE.UTF-8/LC_MESSAGES/libgpg-error.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_IE.utf8/LC_MESSAGES/libgpg-error.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_IE/LC_MESSAGES/libgpg-error.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en.UTF-8/LC_MESSAGES/libgpg-error.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en.utf8/LC_MESSAGES/libgpg-error.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en/LC_MESSAGES/libgpg-error.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
socket(PF_LOCAL, SOCK_STREAM, 0)        = 3
stat("/home/dom/.gnupg/S.dirmngr", {st_mode=S_IFSOCK|0755, st_size=0, ...}) = 0
connect(3, {sa_family=AF_LOCAL, sun_path="/home/dom/.gnupg/S.dirmngr"}, 28) = 0
read(3, 0x2624910, 1002)                = ? ERESTARTSYS (To be restarted if SA_RESTART is set)
--- SIGWINCH {si_signo=SIGWINCH, si_code=SI_KERNEL} ---
read(3, ^Cstrace: Process 7516 detached
 <detached ...>

gpg: signal Interrupt caught ... exiting

Exited with CTRL+X.

  • strace it to see what it's doing? You're just receiving and importing a key, so available entropy should have nothing to do with it. – Celada Mar 20 '16 at 13:32
  • @Celada See edit. Looks like some files are missing but shouldn't they be created automatically? Also could gpg command be so dumb that it would hand instead of printing an error? – DominicM Mar 20 '16 at 14:03
  • I don't see anything wrong with the trace, but you only traced open system calls. You should trace all of them (no -e option) because otherwise you won't see what it's hanging on unless it happens to be an open call (which it isn't in this case). – Celada Mar 20 '16 at 15:48
  • @Celada Do you mean just "strace -open gpg ..."? I just tried that but there is no output at all, just hangs. – DominicM Mar 20 '16 at 15:52
  • Sure, but then you can check the contents of the file pen (since you asked it to save output into a file called pen using -o pen) to see what are the most recent few system calls it executed before hanging, which is likely to provide a good clue! – Celada Mar 20 '16 at 15:55
0

This works for me...

gpg --keyserver "<AUTHORITY>" --recv-keys "<KEY_CODE>"
gpg --lsign <KEY_CODE>

Eg.:

gpg --keyserver "http://pgp.mit.edu/" --recv-keys "702353E0F7E48EDB"
gpg --lsign 702353E0F7E48EDB

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.