Open brianmay opened 1 year ago
What's the build environment and filesystem?
The key(s) in the keyring /etc/apt/trusted.gpg.d/raspberrypi-archive-stable.gpg are ignored as the file is not readable by user '_apt' executing apt-key.
I'd start by looking at that file (in the work directory), not the host system. What's the content and what are the permissions?
Oh, crap. I diagnosed this before, but then totally stuffed up trying to reset the state. I hadn't noticed that directories like /dev
were still mounted in the work directory, so when I rm -rf work
it obviously deleted all my /dev
files :-(, and I had to reboot, and then I completely forgot. Anyway:
canidae# ls -l ./work/brian-slint/stage0/rootfs/etc/apt/trusted.gpg.d/raspberrypi-archive-stable.gpg
-rw------- 1 root root 1183 Feb 6 08:53 ./work/brian-slint/stage0/rootfs/etc/apt/trusted.gpg.d/raspberrypi-archive-stable.gpg
canidae# gpg < ./work/brian-slint/stage0/rootfs/etc/apt/trusted.gpg.d/raspberrypi-archive-stable.gpg
gpg: WARNING: no command supplied. Trying to guess what you mean ...
pub rsa2048 2012-06-17 [SC]
CF8A1AF502A2AA2D763BAE7E82B129927FA3303E
uid Raspberry Pi Archive Signing Key
sub rsa2048 2012-06-17 [E]
My strong suspicion is that the permissions are wrong, because I use umask 077
. Which probably means that there should be a umask 000
somewhere in one of the scripts.
Setting umask to 000 before running the script does appear to have helped.
What if you change this to this:
cat files/raspberrypi.gpg.key | gpg --dearmor > "${STAGE_WORK_DIR}/raspberrypi-archive-stable.gpg"
install -m 644 "${STAGE_WORK_DIR}/raspberrypi-archive-stable.gpg" "${ROOTFS_DIR}/etc/apt/trusted.gpg.d/"
Yes, that seems to work also.
Should be fixed now
I feel like I am doing something stupid here, but I can't see anything wrong.
raspbian-archive-keyring was installed.