From 3457d2f8e82ee936ffe227e71379b437f9632a1c Mon Sep 17 00:00:00 2001 From: Ian Wienand Date: Mon, 17 Jul 2017 14:29:34 +1000 Subject: [PATCH] Remove DIB_[DISTRO]_DISTRIBUTION_MIRROR We added the DIB_distro_DISTRIBUTION_MIRROR arguments with I92964b17ec3e47cf97e3a3091f054b2a205ac768 as a way that we could source a list of mirrors and then have the distro elements choose which one applied to them. However, this hasn't worked out to be so useful. The openstack-ci-mirrors element is working as a mirror setup script -- it translates the openstack CI mirror list variables into the generic "DIB_DISTRIBUTION_MIRROR" as appropriate for each distro's build. Also, it turns out there's other things that need to be done, such as turning off gpg checking, which mean the idea of "just export variables" hasn't turned out as valid ... you need actual code involved to get it right. AFAICT we never actually documented these, and they do not seem to be in use. They have caused considerable confusion when dealing with new platforms as we try to keep consistency. Remove them. [1] http://codesearch.openstack.org/?q=DIB_.*_DISTRIBUTION_MIRROR&i=nope&files=&repos= Change-Id: Ifc4ab700631ffdfbe790068558f670f9a11dde5e --- .../centos7/environment.d/10-centos7-distro-name.bash | 3 --- .../fedora/environment.d/10-fedora-distro-name.bash | 3 --- .../environment.d/10-ubuntu-distro-name.bash | 4 ---- .../notes/dib-distribution-mirror-8c241c0d3d4a539a.yaml | 9 +++++++++ 4 files changed, 9 insertions(+), 10 deletions(-) create mode 100644 releasenotes/notes/dib-distribution-mirror-8c241c0d3d4a539a.yaml diff --git a/diskimage_builder/elements/centos7/environment.d/10-centos7-distro-name.bash b/diskimage_builder/elements/centos7/environment.d/10-centos7-distro-name.bash index c0c42a51..9291e56d 100644 --- a/diskimage_builder/elements/centos7/environment.d/10-centos7-distro-name.bash +++ b/diskimage_builder/elements/centos7/environment.d/10-centos7-distro-name.bash @@ -4,6 +4,3 @@ export DIB_RELEASE=GenericCloud # Useful for elements that work with fedora (dnf) & centos export YUM=${YUM:-yum} -if [ -n "${DIB_CENTOS_DISTRIBUTION_MIRROR:-}" ]; then - export DIB_DISTRIBUTION_MIRROR=$DIB_CENTOS_DISTRIBUTION_MIRROR -fi diff --git a/diskimage_builder/elements/fedora/environment.d/10-fedora-distro-name.bash b/diskimage_builder/elements/fedora/environment.d/10-fedora-distro-name.bash index 5c83ef2e..0ffbc4f4 100644 --- a/diskimage_builder/elements/fedora/environment.d/10-fedora-distro-name.bash +++ b/diskimage_builder/elements/fedora/environment.d/10-fedora-distro-name.bash @@ -1,5 +1,2 @@ export DISTRO_NAME=fedora export DIB_RELEASE=${DIB_RELEASE:-25} -if [ -n "${DIB_FEDORA_DISTRIBUTION_MIRROR:-}" ]; then - export DIB_DISTRIBUTION_MIRROR=$DIB_FEDORA_DISTRIBUTION_MIRROR -fi diff --git a/diskimage_builder/elements/ubuntu-minimal/environment.d/10-ubuntu-distro-name.bash b/diskimage_builder/elements/ubuntu-minimal/environment.d/10-ubuntu-distro-name.bash index db0197f7..c6154267 100644 --- a/diskimage_builder/elements/ubuntu-minimal/environment.d/10-ubuntu-distro-name.bash +++ b/diskimage_builder/elements/ubuntu-minimal/environment.d/10-ubuntu-distro-name.bash @@ -2,10 +2,6 @@ export DISTRO_NAME=ubuntu export DIB_RELEASE=${DIB_RELEASE:-xenial} export DIB_DEBIAN_COMPONENTS=${DIB_DEBIAN_COMPONENTS:-main,universe} -if [ -n "${DIB_UBUNTU_DISTRIBUTION_MIRROR:-}" ]; then - DIB_DISTRIBUTION_MIRROR=$DIB_UBUNTU_DISTRIBUTION_MIRROR -fi - # There are two default distro mirrors depending on architecture ARCH=${ARCH:-} if [[ "arm64 armhf powerpc ppc64el s390x" =~ "$ARCH" ]]; then diff --git a/releasenotes/notes/dib-distribution-mirror-8c241c0d3d4a539a.yaml b/releasenotes/notes/dib-distribution-mirror-8c241c0d3d4a539a.yaml new file mode 100644 index 00000000..a501d533 --- /dev/null +++ b/releasenotes/notes/dib-distribution-mirror-8c241c0d3d4a539a.yaml @@ -0,0 +1,9 @@ +--- +deprecations: + - The ``DIB_[DISTRO]_DISTRIBUTION_MIRROR`` variables have been + removed. These were undocumented ways to set + ``DIB_DISTRIBUTION_MIRROR`` for some elements. It was not + implemented consistently and causing some confusion. If you need + to setup mirrors for testing purposes, the + ``openstack-ci-mirrors`` element is a good example that is used by + OpenStack gate testing. \ No newline at end of file