Blame tests/0_common/00_qa_repo_config.sh

Karanbir Singh 43deec
#!/bin/bash
Karanbir Singh 43deec
Karanbir Singh 2dd0be
t_Log "Running $0 - modifying yum repositories for QA purposes."
Karanbir Singh 9c88e3
if [ $SKIP_QA_HARNESS -eq 1 ]; then
Karanbir Singh 070442
  echo 'Skip..'
Karanbir Singh 070442
  exit 0
Karanbir Singh 070442
fi
Karanbir Singh 2dd0be
Karanbir Singh 43deec
# Disable the normal repositories and points to the QA repo
205917
#mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.disabled
205917
sed -i s#gpgcheck=1#gpgcheck=1\\nenabled=0#g /etc/yum.repos.d/CentOS-Base.repo
Karanbir Singh 43deec
fbf041
fbf041
Karanbir Singh 2dd0be
cat << EOF > /etc/yum.repos.d/CentOS-QA.repo
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/
6ed902
gpgcheck=1
Karanbir Singh 43deec
enabled=1
8c92f1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-\$releasever
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/
6ed902
gpgcheck=1
Karanbir Singh 43deec
enabled=1
fbf041
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-\$releasever
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/
6ed902
gpgcheck=1
Karanbir Singh 43deec
enabled=1
fbf041
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-\$releasever
Karanbir Singh 43deec
Karanbir Singh 43deec
[qa-centosplus]
fbf041
name=CentOS-\$releasever - CentOSPlus
Karanbir Singh 43deec
baseurl=http://repo.centos.qa/srv/CentOS/\$releasever/centosplus/\$basearch/
6ed902
gpgcheck=1
Karanbir Singh 43deec
enabled=0
fbf041
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-\$releasever
fbf041
fbf041
[qa-cr]
fbf041
name=CentOS-\$releasever - CR
bf64c5
baseurl=http://repo.centos.qa/srv/CentOS/\$releasever/cr/\$basearch/
fbf041
gpgcheck=1
fbf041
enabled=0
fbf041
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-\$releasever
fbf041
Karanbir Singh 43deec
Karanbir Singh 43deec
EOF
Karanbir Singh 43deec
8c92f1
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-$(t_DistCheck)
Karanbir Singh 43deec
yum clean all
ab76b0
yum repolist >/dev/null 2>&1
Karanbir Singh 43deec
8c92f1
Karanbir Singh 2dd0be
t_CheckExitStatus $?
Karanbir Singh 43deec