Merge "Fedora: Add support for configuring Yum mirrors"

This commit is contained in:
Jenkins 2014-05-19 15:52:13 +00:00 committed by Gerrit Code Review
commit d69c0fce86
2 changed files with 19 additions and 0 deletions

View File

@ -1,3 +1,11 @@
Use Fedora cloud images as the baseline for built disk images.
If you wish to use a Fedora Yum mirror you can set DIB\_DISTRIBUTION\_MIRROR
before running bin/disk-image-create. Example:
DIB\_DISTRIBUTION\_MIRROR=http://download.fedoraproject.org/pub/fedora/linux
This URL should point to the directory containing the releases/updates/
development/and extras directories.
For further details see the redhat-common README.

View File

@ -0,0 +1,11 @@
#!/bin/bash
set -eu
DIB_DISTRIBUTION_MIRROR=${DIB_DISTRIBUTION_MIRROR:-}
[ -n "$DIB_DISTRIBUTION_MIRROR" ] || exit 0
for FILE in /etc/yum.repos.d/fedora.repo /etc/yum.repos.d/fedora-updates.repo /etc/yum.repos.d/fedora-updates-testing.repo; do
sudo sed -e "s|^#baseurl=http://download.fedoraproject.org/pub/fedora/linux|baseurl=$DIB_DISTRIBUTION_MIRROR|;/^metalink/d" -i $FILE
done