Update configure_mirror to use per-region APT mirrors
Now that we have per-region apt mirrors for ubuntu, we should use them. As part of doing that we need to disable looking for i386 packages since we do not mirror nor use those - and we need to tell APT to not check the GPG signatures of our mirror archive since we're not signing it. We don't need multiverse or restricted in the gate, and they also contain non-free software. Remove them from our configuration. Change-Id: I26f5fc5cec224cf4f4ea361e0f71cecbf320fbb0
This commit is contained in:
parent
3bfd50ab84
commit
7a8b9992c7
@ -25,6 +25,7 @@ NODEPOOL_MIRROR_HOST=${NODEPOOL_MIRROR_HOST:-mirror.$NODEPOOL_REGION.$NODEPOOL_C
|
|||||||
NODEPOOL_MIRROR_HOST=$(echo $NODEPOOL_MIRROR_HOST|tr '[:upper:]' '[:lower:]')
|
NODEPOOL_MIRROR_HOST=$(echo $NODEPOOL_MIRROR_HOST|tr '[:upper:]' '[:lower:]')
|
||||||
NODEPOOL_PYPI_MIRROR=${NODEPOOL_PYPI_MIRROR:-http://$NODEPOOL_MIRROR_HOST/pypi/simple}
|
NODEPOOL_PYPI_MIRROR=${NODEPOOL_PYPI_MIRROR:-http://$NODEPOOL_MIRROR_HOST/pypi/simple}
|
||||||
NODEPOOL_WHEEL_MIRROR=${NODEPOOL_WHEEL_MIRROR:-http://$NODEPOOL_MIRROR_HOST/wheel/$AFS_SLUG}
|
NODEPOOL_WHEEL_MIRROR=${NODEPOOL_WHEEL_MIRROR:-http://$NODEPOOL_MIRROR_HOST/wheel/$AFS_SLUG}
|
||||||
|
NODEPOOL_UBUNTU_MIRROR=${NODEPOOL_UBUNTU_MIRROR:-http://$NODEPOOL_MIRROR_HOST/ubuntu}
|
||||||
|
|
||||||
cat >/tmp/pip.conf <<EOF
|
cat >/tmp/pip.conf <<EOF
|
||||||
[global]
|
[global]
|
||||||
@ -49,48 +50,16 @@ host $NODEPOOL_MIRROR_HOST
|
|||||||
LSBDISTID=$(lsb_release -is)
|
LSBDISTID=$(lsb_release -is)
|
||||||
LSBDISTCODENAME=$(lsb_release -cs)
|
LSBDISTCODENAME=$(lsb_release -cs)
|
||||||
if [ "$LSBDISTID" == "Ubuntu" ] ; then
|
if [ "$LSBDISTID" == "Ubuntu" ] ; then
|
||||||
sudo dd of=/etc/apt/sources.list <<EOF
|
sudo dd of=/etc/apt/sources.list <<EOF
|
||||||
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
|
deb $NODEPOOL_UBUNTU_MIRROR $LSBDISTCODENAME main universe
|
||||||
# newer versions of the distribution.
|
deb $NODEPOOL_UBUNTU_MIRROR $LSBDISTCODENAME-updates main universe
|
||||||
deb http://us.archive.ubuntu.com/ubuntu/ $LSBDISTCODENAME main restricted
|
deb $NODEPOOL_UBUNTU_MIRROR $LSBDISTCODENAME-backports main universe
|
||||||
deb-src http://us.archive.ubuntu.com/ubuntu/ $LSBDISTCODENAME main restricted
|
deb $NODEPOOL_UBUNTU_MIRROR $LSBDISTCODENAME-security main universe
|
||||||
|
EOF
|
||||||
## Major bug fix updates produced after the final release of the
|
# Turn off multi-arch
|
||||||
## distribution.
|
sudo dpkg --remove-architecture i386
|
||||||
deb http://us.archive.ubuntu.com/ubuntu/ $LSBDISTCODENAME-updates main restricted
|
# Turn off checking of GPG signatures
|
||||||
deb-src http://us.archive.ubuntu.com/ubuntu/ $LSBDISTCODENAME-updates main restricted
|
sudo dd of=/etc/apt/apt.conf.d/99unauthenticated <<EOF
|
||||||
|
APT::Get::AllowUnauthenticated "true";
|
||||||
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
|
|
||||||
## team. Also, please note that software in universe WILL NOT receive any
|
|
||||||
## review or updates from the Ubuntu security team.
|
|
||||||
deb http://us.archive.ubuntu.com/ubuntu/ $LSBDISTCODENAME universe
|
|
||||||
deb-src http://us.archive.ubuntu.com/ubuntu/ $LSBDISTCODENAME universe
|
|
||||||
deb http://us.archive.ubuntu.com/ubuntu/ $LSBDISTCODENAME-updates universe
|
|
||||||
deb-src http://us.archive.ubuntu.com/ubuntu/ $LSBDISTCODENAME-updates universe
|
|
||||||
|
|
||||||
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
|
|
||||||
## team, and may not be under a free licence. Please satisfy yourself as to
|
|
||||||
## your rights to use the software. Also, please note that software in
|
|
||||||
## multiverse WILL NOT receive any review or updates from the Ubuntu
|
|
||||||
## security team.
|
|
||||||
deb http://us.archive.ubuntu.com/ubuntu/ $LSBDISTCODENAME multiverse
|
|
||||||
deb-src http://us.archive.ubuntu.com/ubuntu/ $LSBDISTCODENAME multiverse
|
|
||||||
deb http://us.archive.ubuntu.com/ubuntu/ $LSBDISTCODENAME-updates multiverse
|
|
||||||
deb-src http://us.archive.ubuntu.com/ubuntu/ $LSBDISTCODENAME-updates multiverse
|
|
||||||
|
|
||||||
## N.B. software from this repository may not have been tested as
|
|
||||||
## extensively as that contained in the main release, although it includes
|
|
||||||
## newer versions of some applications which may provide useful features.
|
|
||||||
## Also, please note that software in backports WILL NOT receive any review
|
|
||||||
## or updates from the Ubuntu security team.
|
|
||||||
deb http://us.archive.ubuntu.com/ubuntu/ $LSBDISTCODENAME-backports main restricted universe multiverse
|
|
||||||
deb-src http://us.archive.ubuntu.com/ubuntu/ $LSBDISTCODENAME-backports main restricted universe multiverse
|
|
||||||
|
|
||||||
deb http://security.ubuntu.com/ubuntu $LSBDISTCODENAME-security main restricted
|
|
||||||
deb-src http://security.ubuntu.com/ubuntu $LSBDISTCODENAME-security main restricted
|
|
||||||
deb http://security.ubuntu.com/ubuntu $LSBDISTCODENAME-security universe
|
|
||||||
deb-src http://security.ubuntu.com/ubuntu $LSBDISTCODENAME-security universe
|
|
||||||
deb http://security.ubuntu.com/ubuntu $LSBDISTCODENAME-security multiverse
|
|
||||||
deb-src http://security.ubuntu.com/ubuntu $LSBDISTCODENAME-security multiverse
|
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user