Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
binary packages signing: gpg database lock
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
niderecha
n00b
n00b


Joined: 10 Nov 2024
Posts: 8

PostPosted: Wed Nov 13, 2024 10:49 pm    Post subject: binary packages signing: gpg database lock Reply with quote

Hi. I'm trying to compile and sign binary packages. It doesn't work for me without strange manual steps, and googling didn't help.

If I run for example
Code:
emerge -av1 cpuid

it fails with
Code:
>>> Completed installing sys-apps/cpuid-20240916 into /var/tmp/portage/sys-apps/cpuid-20240916/image
                                                                                                         
 * Final size of build directory: 1240 KiB (1.2 MiB)
 * Final size of installed tree:   626 KiB
                         
strip: x86_64-pc-linux-gnu-strip --strip-unneeded -N __gentoo_check_ldflags__ -R .comment -R .GCC.command.
line -R .note.gnu.gold-version               
   /usr/bin/cpuid                                   
!!!                                                                                                       
gpg: Note: database_open 134217901 waiting for lock (held by 666240) ...
gpg: Note: database_open 134217901 waiting for lock (held by 666240) ...                     
gpg: Note: database_open 134217901 waiting for lock (held by 666240) ...                     
gpg: Note: database_open 134217901 waiting for lock (held by 666240) ...                         
gpg: Note: database_open 134217901 waiting for lock (held by 666240) ...                                 
gpg: keydb_search failed: Connection timed out                                                           
gpg: skipped "0x306A307EE50F1047": Connection timed out             
gpg: signing failed: Connection timed out
Traceback (most recent call last):
  File "/usr/lib/portage/python3.12/gpkg-helper.py", line 75, in <module>
    rval = main(sys.argv[:])
           ^^^^^^^^^^^^^^^^^

The process 666240 here is
Code:
keyboxd --homedir /root/.gnupg --daemon

But it didn't exist when I was starting the emerge.

If, after I start emerge, I run
Code:
killall keyboxd

then emerge completes successfully.

My make.conf:
Code:
...
BINPKG_FORMAT="gpkg"
FEATURES="${FEATURES} getbinpkg binpkg-request-signature buildpkg binpkg-signing"
BINPKG_GPG_SIGNING_GPG_HOME="/root/.gnupg"
BINPKG_GPG_SIGNING_KEY="0x306A307EE50F1047"
...


Last edited by niderecha on Thu Nov 14, 2024 11:56 am; edited 1 time in total
Back to top
View user's profile Send private message
bstaletic
Guru
Guru


Joined: 05 Apr 2014
Posts: 373

PostPosted: Wed Nov 13, 2024 10:56 pm    Post subject: Reply with quote

Are there appropriate keys in /root/.gnupg that you can use for signing?
https://wiki.gentoo.org/wiki/GPG#Generating_keys
Back to top
View user's profile Send private message
niderecha
n00b
n00b


Joined: 10 Nov 2024
Posts: 8

PostPosted: Wed Nov 13, 2024 11:01 pm    Post subject: Reply with quote

yes... If I kill root's keyboxd after I start emerge, then everything goes through
Back to top
View user's profile Send private message
pingtoo
Veteran
Veteran


Joined: 10 Sep 2021
Posts: 1246
Location: Richmond Hill, Canada

PostPosted: Thu Nov 14, 2024 12:20 am    Post subject: Reply with quote

niderecha,

Do root user have a file in /root/.gnupg/common.conf file? And if that file exist do you have "use-keyboxd" in it? if "use-keyboxd" exist you need to comment it out.
Back to top
View user's profile Send private message
niderecha
n00b
n00b


Joined: 10 Nov 2024
Posts: 8

PostPosted: Thu Nov 14, 2024 9:45 am    Post subject: Reply with quote

Code:
# cat ~/.gnupg/common.conf
use-keyboxd

Yes, apparently so. I didn't touch this file myself, I guess it was created by one of the gpg invocations. It's safe to delete it, right?
Back to top
View user's profile Send private message
niderecha
n00b
n00b


Joined: 10 Nov 2024
Posts: 8

PostPosted: Thu Nov 14, 2024 9:50 am    Post subject: Reply with quote

Uh, without that file things break differently
Code:
# emerge -av1 cpuid

Local copy of remote index is up-to-date and will be used.

These are the packages that would be merged, in order:

Calculating dependencies... done!
Dependency resolution took 2.04 s (backtrack: 0/20).

[ebuild  N     ] sys-apps/cpuid-20240916::gentoo  0 KiB

Total: 1 package (1 new), Size of downloads: 0 KiB

Would you like to merge these packages? [Yes/No]
>>> Unlocking GPG... gpg: skipped "0x306A307EE50F1047": No secret key
gpg: signing failed: No secret key
!!! GPG unlock failed
Back to top
View user's profile Send private message
pingtoo
Veteran
Veteran


Joined: 10 Sep 2021
Posts: 1246
Location: Richmond Hill, Canada

PostPosted: Thu Nov 14, 2024 12:35 pm    Post subject: Reply with quote

niderecha wrote:
Code:
# cat ~/.gnupg/common.conf
use-keyboxd

Yes, apparently so. I didn't touch this file myself, I guess it was created by one of the gpg invocations. It's safe to delete it, right?


No, I ask comment out the line. Not delete the file.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum