Allow APT_AUTH.CONF(5) config files to be used with archives during bootstrap.

Currently it's only supported in the chroot/binary phases. Omitting
bootstrap was an oversight.

Note that config/archives/*.conf are assumed to be apt.conf files,
so the apt_auth files are required to end with .auth and will be renamed
to .conf when copied into the chroot.
This commit is contained in:
Nick Brown 2022-06-28 21:05:12 +01:00
parent d2722e8f19
commit 4a0350bdaf
1 changed files with 20 additions and 0 deletions

View File

@ -75,6 +75,26 @@ do
fi
done
# Adding local apt auth (chroot)
# Note: .conf is assumed to be apt.conf, so use new suffix .auth
for FILE in config/archives/*.auth
do
if [ -e "${FILE}" ]
then
cp ${FILE} chroot/etc/apt/auth.conf.d/$(basename ${FILE} .auth).conf
fi
done
# Adding local apt auth (chroot)
# Note: .conf is assumed to be apt.conf, so use new suffix .auth
for FILE in config/archives/*.auth.chroot
do
if [ -e "${FILE}" ]
then
cp ${FILE} chroot/etc/apt/auth.conf.d/$(basename ${FILE} .auth.chroot).conf
fi
done
# Check local archive keys
if Find_files config/archives/*.key || \
Find_files config/archives/*.key.chroot