Blame tests/0_common/00_qa_repo_config.sh
|
Karanbir Singh |
43deec |
#!/bin/bash
|
|
Karanbir Singh |
43deec |
|
|
Karanbir Singh |
43deec |
# Disable the normal repositories and points to the QA repo
|
|
Karanbir Singh |
43deec |
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.disabled
|
|
Karanbir Singh |
43deec |
touch /etc/yum.repos.d/CentOS-Base.repo
|
|
Karanbir Singh |
43deec |
|
|
Karanbir Singh |
43deec |
cat >> /etc/yum.repos.d/CentOS-QA.repo << EOF
|
|
Karanbir Singh |
43deec |
|
|
Karanbir Singh |
43deec |
[QA-base]
|
|
Karanbir Singh |
43deec |
name=CentOS-\$releasever - OS
|
|
Karanbir Singh |
43deec |
baseurl=http://repo.centos.qa/srv/CentOS/\$releasever/os/\$basearch/
|
|
Karanbir Singh |
43deec |
gpgcheck=1
|
|
Karanbir Singh |
43deec |
enabled=1
|
|
Karanbir Singh |
43deec |
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
|
|
Karanbir Singh |
43deec |
|
|
Karanbir Singh |
43deec |
[QA-updates]
|
|
Karanbir Singh |
43deec |
name=CentOS-\$releasever - Updates
|
|
Karanbir Singh |
43deec |
baseurl=http://repo.centos.qa/srv/CentOS/\$releasever/updates/\$basearch/
|
|
Karanbir Singh |
43deec |
gpgcheck=1
|
|
Karanbir Singh |
43deec |
enabled=1
|
|
Karanbir Singh |
43deec |
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
|
|
Karanbir Singh |
43deec |
|
|
Karanbir Singh |
43deec |
[QA-extras]
|
|
Karanbir Singh |
43deec |
name=CentOS-\$releasever - Extras
|
|
Karanbir Singh |
43deec |
baseurl=http://repo.centos.qa/srv/CentOS/\$releasever/extras/\$basearch/
|
|
Karanbir Singh |
43deec |
gpgcheck=1
|
|
Karanbir Singh |
43deec |
enabled=1
|
|
Karanbir Singh |
43deec |
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
|
|
Karanbir Singh |
43deec |
|
|
Karanbir Singh |
43deec |
[qa-centosplus]
|
|
Karanbir Singh |
43deec |
name=CentOS-$releasever - CentOSPlus
|
|
Karanbir Singh |
43deec |
baseurl=http://repo.centos.qa/srv/CentOS/\$releasever/centosplus/\$basearch/
|
|
Karanbir Singh |
43deec |
gpgcheck=1
|
|
Karanbir Singh |
43deec |
enabled=0
|
|
Karanbir Singh |
43deec |
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
|
|
Karanbir Singh |
43deec |
|
|
Karanbir Singh |
43deec |
EOF
|
|
Karanbir Singh |
43deec |
|
|
Karanbir Singh |
43deec |
yum clean all
|
|
Karanbir Singh |
43deec |
echo "Modifying yum repositories for QA purposes ..."
|
|
Karanbir Singh |
43deec |
yum repolist
|
|
Karanbir Singh |
43deec |
|
|
Karanbir Singh |
43deec |
if [ $? -eq 0 ]; then
|
|
Karanbir Singh |
43deec |
echo ' PASS'
|
|
Karanbir Singh |
43deec |
else
|
|
Karanbir Singh |
43deec |
echo ' Fail'
|
|
Karanbir Singh |
43deec |
exit 1
|
|
Karanbir Singh |
43deec |
fi
|
|
Karanbir Singh |
43deec |
|