> -----Original Message----- > From: yocto@lists.yoctoproject.org <yocto@lists.yoctoproject.org> On > Behalf Of Damien LEFEVRE via lists.yoctoproject.org > Sent: 26 May 2020 11:02 > To: yocto@lists.yoctoproject.org > Subject: Re: [yocto] gpg: can't connect to the agent: File name too long > > I think my problem is that the do_image_* are running as fakeroot/pseudo. > > Is there a way to run this task as a normal local user. > > I read that I should create the socket when not running under local user with > gpgconf --create-socketdir > > > But this fails too although I set permissions for all on the gpg files and > directories: > ''' > | gpgconf: socketdir is '/test-warrior/build-jetson- > xavier/tmp/work/jetson_xavier-poky-linux/test-image/1.0- > r0/my_img/home' > | gpgconf: no /run/user dir > | gpgconf: using homedir as fallback > | gpgconf: error creating socket directory > | gpgconf: fatal error (exit status 1) > > ''' > > Basically I need to, as a normal user, run gpg after do_image_tegra. > > Any hint?
The problem is that the path to UNIX sockets are limited in length and you are probably hitting that limit. The base classes take care of avoiding that but I did hit this problem in a custom recipe that was using gpg directly. I solved problem in the task shell function that was calling gpg by using a host temporary directory (/var/tmp/...) as a throw away GPG home directory. gpgdir=`mktemp -td ${PN}-gpg.XXXXXX` install -m 700 -d $gpgdir/home gpg --batch --homedir $gpgdir/home ... ... rm -rf $gpgdir Hope that helps. -- Diego Santa Cruz, PhD Technology Architect spinetix.com
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#49490): https://lists.yoctoproject.org/g/yocto/message/49490 Mute This Topic: https://lists.yoctoproject.org/mt/74456223/21656 Group Owner: yocto+ow...@lists.yoctoproject.org Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-