From b6ad08c2709fbdab0b96852d9bfeb52d753b89bc Mon Sep 17 00:00:00 2001 From: John Estabrook Date: Thu, 3 Oct 2019 14:38:54 +0000 Subject: Add local archive keys before configuring local package repository In the binary stage, chroot is restored from cache/bootstrap, which contains neither custom repo lists, nor keys. If local packages are present, chroot_archives will call 'Apt chroot update' after adding custom repo lists without adding keys. apt-get will then fail instead of warn as of apt version 1.5. Closes: #941691 --- scripts/build/chroot_archives | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/scripts/build/chroot_archives b/scripts/build/chroot_archives index 9ca6a7892..f634a625d 100755 --- a/scripts/build/chroot_archives +++ b/scripts/build/chroot_archives @@ -212,6 +212,25 @@ EOF fi done + # Check local archive keys (chroot) + if Find_files config/archives/*.key || \ + Find_files config/archives/*.key.chroot + then + for FILE in config/archives/*.key \ + config/archives/*.key.chroot + do + if [ -e "${FILE}" ] + then + if grep -q "PGP PUBLIC KEY BLOCK" "${FILE}" + then + cp ${FILE} chroot/etc/apt/trusted.gpg.d/$(basename ${FILE}).asc + else + cp ${FILE} chroot/etc/apt/trusted.gpg.d/$(basename ${FILE}).gpg + fi + fi + done + fi + # Configure local package repository if Find_files config/packages.chroot/*.deb || Find_files config/packages/*.deb then @@ -344,25 +363,6 @@ EOF Chroot chroot "apt-get ${APT_OPTIONS} install aptitude" fi else # Get fresh indices - # Check local archive keys - if Find_files config/archives/*.key || \ - Find_files config/archives/*.key.chroot - then - for FILE in config/archives/*.key \ - config/archives/*.key.chroot - do - if [ -e "${FILE}" ] - then - if grep -q "PGP PUBLIC KEY BLOCK" "${FILE}" - then - cp ${FILE} chroot/etc/apt/trusted.gpg.d/$(basename ${FILE}).asc - else - cp ${FILE} chroot/etc/apt/trusted.gpg.d/$(basename ${FILE}).gpg - fi - fi - done - fi - # Check local keyring packages if Find_files config/archives/*.deb then -- cgit v1.2.3