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>
-- _______________________________________________ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto