From 88d9ef21e8f359054c1d1e249e9848b3d2b65692 Mon Sep 17 00:00:00 2001 From: Ian Wienand Date: Tue, 1 Feb 2022 15:40:07 +1100 Subject: [PATCH] Remove contrib/setup-gate-mirrors.sh AFAICS, use of this was removed with I7f98a13091056809fedae8a5c8ee10b0ef8bbb2a and I can't see any other references to it. Correct the comment to describe how it works. Change-Id: I5123729b7457dcbd4f4a51cff49904f7bd071e9b --- contrib/setup-gate-mirrors.sh | 133 ------------------ .../elements/yum-minimal/root.d/08-yum-chroot | 3 +- 2 files changed, 2 insertions(+), 134 deletions(-) delete mode 100755 contrib/setup-gate-mirrors.sh diff --git a/contrib/setup-gate-mirrors.sh b/contrib/setup-gate-mirrors.sh deleted file mode 100755 index 003459db..00000000 --- a/contrib/setup-gate-mirrors.sh +++ /dev/null @@ -1,133 +0,0 @@ -#!/bin/bash - -set -x - -# -# This tool creates repo/sources files that point to the mirrors for -# the host region in the OpenStack CI gate. -# - -# This pre-created on CI nodes by slave scripts -source /etc/ci/mirror_info.sh - -# Tests should probe for this directory and then use the repos/sources -# files inside it for the gate tests. -BASE_DIR=${WORKSPACE:-$(pwd)}/dib-mirror - -mkdir -p $BASE_DIR - -## REPOS - -# all should start with "dib-mirror-" -# gpg check turned off, because we don't have the keys outside the chroot - -# fedora-minimal -FEDORA_MIN_DIR=$BASE_DIR/fedora-minimal/yum.repos.d -mkdir -p $FEDORA_MIN_DIR - -cat < $FEDORA_MIN_DIR/dib-mirror-fedora.repo -[fedora] -name=Fedora \$releasever - \$basearch -baseurl=$NODEPOOL_FEDORA_MIRROR/releases/\$releasever/Everything/\$basearch/os/ -enabled=1 -metadata_expire=7d -gpgcheck=0 -skip_if_unavailable=False -deltarpm=False -deltarpm_percentage=0 -EOF - -cat < $FEDORA_MIN_DIR/dib-mirror-fedora-updates.repo -[updates] -name=Fedora \$releasever - \$basearch - Updates -baseurl=$NODEPOOL_FEDORA_MIRROR/updates/\$releasever/Everything/\$basearch/ -enabled=1 -gpgcheck=0 -metadata_expire=6h -skip_if_unavailable=False -deltarpm=False -deltarpm_percentage=0 -EOF - -# Centos 7 Minimal -CENTOS_MIN_DIR=$BASE_DIR/centos-minimal/yum.repos.d/7 -mkdir -p $CENTOS_MIN_DIR - -cat < $CENTOS_MIN_DIR/dib-mirror-base.repo -[base] -name=CentOS-\$releasever - Base -baseurl=$NODEPOOL_CENTOS_MIRROR/\$releasever/os/\$basearch/ -gpgcheck=0 -EOF - -cat < $CENTOS_MIN_DIR/dib-mirror-updates.repo -#released updates -[updates] -name=CentOS-\$releasever - Updates -baseurl=$NODEPOOL_CENTOS_MIRROR/\$releasever/updates/\$basearch/ -gpgcheck=0 -EOF - -cat < $CENTOS_MIN_DIR/dib-mirror-extras.repo -#additional packages that may be useful -[extras] -name=CentOS-\$releasever - Extras -baseurl=$NODEPOOL_CENTOS_MIRROR/\$releasever/extras/\$basearch/ -gpgcheck=0 -EOF - -# Centos 8 Minimal -CENTOS_MIN_DIR=$BASE_DIR/centos-minimal/yum.repos.d/8 -mkdir -p $CENTOS_MIN_DIR - -cat < $CENTOS_MIN_DIR/dib-mirror-base.repo -[base] -name=CentOS-\$releasever - Base -baseurl=$NODEPOOL_CENTOS_MIRROR/\$releasever/BaseOS/\$basearch/os/ -gpgcheck=0 -EOF - -cat < $CENTOS_MIN_DIR/dib-mirror-appstream.repo -[base] -name=CentOS-\$releasever - AppStream -baseurl=$NODEPOOL_CENTOS_MIRROR/\$releasever/AppStream/\$basearch/os/ -gpgcheck=0 -EOF - - -cat < $CENTOS_MIN_DIR/dib-mirror-extras.repo -#additional packages that may be useful -[extras] -name=CentOS-\$releasever - Extras -baseurl=$NODEPOOL_CENTOS_MIRROR/\$releasever/extras/\$basearch/os/ -gpgcheck=0 -EOF - -# Centos 8-stream Minimal -CENTOS_MIN_DIR=$BASE_DIR/centos-minimal/yum.repos.d/8-stream -mkdir -p $CENTOS_MIN_DIR - -cat < $CENTOS_MIN_DIR/dib-mirror-base.repo -[base] -name=CentOS-\$releasever - Base -baseurl=$NODEPOOL_CENTOS_MIRROR/\$releasever/BaseOS/\$basearch/os/ -gpgcheck=0 -EOF - -cat < $CENTOS_MIN_DIR/dib-mirror-appstream.repo -[base] -name=CentOS-\$releasever - AppStream -baseurl=$NODEPOOL_CENTOS_MIRROR/\$releasever/AppStream/\$basearch/os/ -gpgcheck=0 -EOF - - -cat < $CENTOS_MIN_DIR/dib-mirror-extras.repo -#additional packages that may be useful -[extras] -name=CentOS-\$releasever - Extras -baseurl=$NODEPOOL_CENTOS_MIRROR/\$releasever/extras/\$basearch/os/ -gpgcheck=0 -EOF - -## apt sources (todo) diff --git a/diskimage_builder/elements/yum-minimal/root.d/08-yum-chroot b/diskimage_builder/elements/yum-minimal/root.d/08-yum-chroot index f848cb73..37db36f3 100755 --- a/diskimage_builder/elements/yum-minimal/root.d/08-yum-chroot +++ b/diskimage_builder/elements/yum-minimal/root.d/08-yum-chroot @@ -125,7 +125,8 @@ function _install_repos { # this is copied to TMP_HOOK_PATH by the usual hook-copying # routines. In the gate, environment.d files for the funtional # tests will set DIB_YUM_MINIMAL_BOOTSTRAP_REPOS -- this contains - # mirrors correct for the region setup by contrib/setup-gate-mirrors.sh + # mirrors correct for the region setup by the + # dib-setup-gate-mirrors role. local repo=${DIB_YUM_MINIMAL_BOOTSTRAP_REPOS:-} if [[ -z ${repo} ]]; then # take in preference more specific subdirs