cd1965f7b7
Most of our distros support DIB_DISTRIBUTION_MIRROR for setting the mirror to be used when building. This has a major downside where if someone would like to create a static configuration for building various distro images it cannot set DIB_DISTRIBUTION_MIRROR (think of the case where we want to run our tests). By adding support for DIB_$DISTRO_DISTRIBUTION_MIRROR this problem is resolved. Change-Id: I92964b17ec3e47cf97e3a3091f054b2a205ac768
19 lines
341 B
Bash
Executable File
19 lines
341 B
Bash
Executable File
#!/bin/bash
|
|
|
|
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
|
|
set -x
|
|
fi
|
|
set -eu
|
|
set -o pipefail
|
|
|
|
DIB_DISTRIBUTION_MIRROR=${DIB_DISTRIBUTION_MIRROR:-http://mirror.centos.org/centos}
|
|
|
|
cat << EOF > /etc/yum.repos.d/centos6-latest.repo
|
|
[rhel6]
|
|
name=centos6
|
|
baseurl=$DIB_DISTRIBUTION_MIRROR/6/os/x86_64/
|
|
enabled=1
|
|
metadata_expire=7d
|
|
gpgcheck=0
|
|
EOF
|