I found a solution that includes a post install script that runs when do_rootfs is called. Everything that I added to my recipe, which installs my public key in the system, is below:
pkg_postinst_${PN}() {
#!/bin/sh
if [ -n "$D" ]; then
OPT="--homedir $D/home/root/.gnupg"
else
OPT=""
fi
gpg $OPT --import ${D}${datadir}/mykey.gpg
}
source
share