* apt-key not found
@ 2017-09-01 3:17 yahia farghaly
2017-09-01 12:51 ` Alexander Kanavin
0 siblings, 1 reply; 2+ messages in thread
From: yahia farghaly @ 2017-09-01 3:17 UTC (permalink / raw)
To: yocto
[-- Attachment #1: Type: text/plain, Size: 2033 bytes --]
Hi,
I have built an image with deb package support and for authorization of the
incoming packages, i have to transfer a public key to the image and do the
command apt-key add <keyFile>. i do this for the first time the image is
booting but i want to automate the process when i build the image.
i have already created recipe which copy the public key to image rootfs
under /deb_key/keyFile then i tried to perform apt-key command in the image
recipe with
ROOTFS_POSTPROCESS_COMMAND += "addkeyfile;"
>
>
>> addkeyfile(){
>
> apt-key add ${D}/deb_key/keyFile
>
> }
>
>
but it gives me an error log of
>
> 1. | NOTE: Executing empty_var_volatile ...
> 2. | DEBUG: Executing shell function empty_var_volatile
> 3. | DEBUG: Shell function empty_var_volatile finished
> 4. | NOTE: Executing addkeyfile ...
> 5. | DEBUG: Executing shell function addkeyfile
> 6. |
> /home/yahia/Desktop/elinux_dev/bake_factory/poky-pyro-17.0.1/build/tmp/work/qemux86_64-poky-linux/apt-image/1.0-r0/temp/run.addkeyfile.12587:
> 108:
> /home/yahia/Desktop/elinux_dev/bake_factory/poky-pyro-17.0.1/build/tmp/work/qemux86_64-poky-linux/apt-image/1.0-r0/temp/run.addkeyfile.12587:
> apt-key: not found
> 7. | WARNING: exit code 127 from a shell command.
> 8. | DEBUG: Python function do_rootfs finished
> 9. | ERROR: Function failed: addkeyfile (log file is located at
> /home/yahia/Desktop/elinux_dev/bake_factory/poky-pyro-17.0.1/build/tmp/work/qemux86_64-poky-linux/apt-image/1.0-r0/temp/log.do_rootfs.12587)
> 10. ERROR: Task
> (/home/yahia/Desktop/elinux_dev/bake_factory/poky-pyro-17.0.1/meta-mylayer/recipes-example/images/apt-image.bb:do_rootfs)
> failed with exit code '1'
>
>
So, what the right way to do this ?
Thanks,
--
Yahia Farghaly
Graduated from Faculty of Engineering - Electronics and Communications
Department at Cairo University.
Linkedin <https://linkedin.com/in/yahiafarghaly> - GitHub
<https://github.com/yahiafarghaly>
[-- Attachment #2: Type: text/html, Size: 9833 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: apt-key not found
2017-09-01 3:17 apt-key not found yahia farghaly
@ 2017-09-01 12:51 ` Alexander Kanavin
0 siblings, 0 replies; 2+ messages in thread
From: Alexander Kanavin @ 2017-09-01 12:51 UTC (permalink / raw)
To: yocto, yahia farghaly
On 09/01/2017 06:17 AM, yahia farghaly wrote:
> So, what the right way to do this ?
You should study how signing RPM/IPK package feeds is done in Yocto, and
modify the code in the same way. Start from
meta/recipes-core/meta/signing-keys.bb
meta/classes/sign_package_feed.bbclass
meta/lib/oe/package_manager.py (RpmIndexer/OpkgIndexer classes)
Then modify DpkgIndexer class to use apt-key to do the signing in a
similar way. It even has a stub:
if self.d.getVar('PACKAGE_FEED_SIGN') == '1':
raise NotImplementedError('Package feed signing not
implementd for dpkg')
Alex
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-09-01 12:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-01 3:17 apt-key not found yahia farghaly
2017-09-01 12:51 ` Alexander Kanavin
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.