
This updates diskimage-builder to support current Fedora releases (27 and 28) and removes support for Fedora 26 which is EOL as of June 2018. Change-Id: I602b22ed4d5397b39dc1eef67964f6fbdcd93060 Signed-off-by: Paul Belanger <pabelanger@redhat.com>
24 lines
749 B
Bash
Executable File
24 lines
749 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:-}
|
|
|
|
[ -n "$DIB_DISTRIBUTION_MIRROR" ] || exit 0
|
|
|
|
if [[ ${DIB_RELEASE} -gt 27 ]]; then
|
|
# urgh, the repo is wrong in the "baseurl" line, see
|
|
# https://pagure.io/fedora/repos/issue/70
|
|
for FILE in /etc/yum.repos.d/fedora-updates.repo /etc/yum.repos.d/fedora-updates-testing.repo; do
|
|
sed -i "s|/os/||" $FILE
|
|
done
|
|
fi
|
|
|
|
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
|