#!/usr/bin/env bash
set -x
set -e

sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo
sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo
sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo

yum install -y epel-release
yum install -y \
    dbus-devel \
    gcc \
    git \
    libidn-devel \
    make \
    python-pbr \
    python-setuptools \
    python-urllib3 \
    python2-devel \
    python3-devel \
    python3-pbr \
    python3-setuptools \
    python3-urllib3 \
    rpm-build
