https repos

This commit is contained in:
Bob Mottram 2014-09-21 19:44:16 +01:00
parent 6edbd79d88
commit 72568189a4
1 changed files with 18 additions and 1 deletions

View File

@ -98,11 +98,27 @@ function remove_proprietary_repos {
echo 'remove_proprietary_repos' >> $COMPLETION_FILE echo 'remove_proprietary_repos' >> $COMPLETION_FILE
} }
function https_repos {
# The lack of https repos by default is I think a significant security
# problem, potentially allowing an adversary to modify package downloads,
# checksums or gpg public keys in transit and also to know what is installed
# on your system
# See http://forums.debian.net/viewtopic.php?f=10&t=74444
# https://wiki.debian.org/SecureApt
if grep -Fxq "https_repos" $COMPLETION_FILE; then
return
fi
apt-get -y update
apt-get -y --force-yes install apt-transport-https
# Since at the present time this does not work it's commented out
#sed -i 's/http:/https:/g' /etc/apt/sources.list
echo 'https_repos' >> $COMPLETION_FILE
}
function initial_setup { function initial_setup {
if grep -Fxq "initial_setup" $COMPLETION_FILE; then if grep -Fxq "initial_setup" $COMPLETION_FILE; then
return return
fi fi
apt-get -y update
apt-get -y dist-upgrade apt-get -y dist-upgrade
apt-get -y install ca-certificates emacs24 apt-get -y install ca-certificates emacs24
echo 'initial_setup' >> $COMPLETION_FILE echo 'initial_setup' >> $COMPLETION_FILE
@ -907,6 +923,7 @@ function install_final {
argument_checks argument_checks
remove_proprietary_repos remove_proprietary_repos
https_repos
configure_dns configure_dns
initial_setup initial_setup
install_editor install_editor