if $centos; then
for dist in ${CENTOS_DIST}; do
case $dist in
+ centos5)
+ F=5.5;;
centos6)
- D=6;;
+ F=6;;
centos7)
- D=7;;
+ F=7;;
*)
echo "$dist not supported"
exit 1
esac
- ssh ${UPLOAD_HOST} "mkdir -p ${UPLOAD_PATH}/${PRODUCT}/redhat/centos/$D/RPMS"
- ssh ${UPLOAD_HOST} "mkdir -p ${UPLOAD_PATH}/${PRODUCT}/redhat/centos/$D/SRPMS"
- scp -r build/centos/$dist/rpmbuild/RPMS ${UPLOAD_URI}/redhat/centos/$D
- scp -r build/centos/$dist/rpmbuild/SRPMS ${UPLOAD_URI}/redhat/centos/$D
+ ssh ${UPLOAD_HOST} "mkdir -p ${UPLOAD_PATH}/${PRODUCT}/redhat/centos/$F/RPMS"
+ ssh ${UPLOAD_HOST} "mkdir -p ${UPLOAD_PATH}/${PRODUCT}/redhat/centos/$F/SRPMS"
+ scp -r build/centos/$dist/rpmbuild/RPMS ${UPLOAD_URI}/redhat/centos/$F
+ scp -r build/centos/$dist/rpmbuild/SRPMS ${UPLOAD_URI}/redhat/centos/$F
done
if ! ssh ${UPLOAD_HOST} "sudo -n /home/indexdata/proj/git-tools/update-archive/update-yum-archive.sh" >yum-update.log 2>&1; then
echo "update-yum-archive.sh failed; inspect yum-update.log"
if test "${CENTOS_DIST}"; then
for dist in ${CENTOS_DIST}; do
case $dist in
+ centos5)
+ F=5.5
+ D=5;;
centos6)
+ F=6
D=6;;
centos7)
+ F=7
D=7;;
*)
echo "$dist not supported"
echo "FROM centos:$D" >Dockerfile
echo "RUN yum install -y wget yum-utils rpm-build gcc gcc-c++ make" >>Dockerfile
- echo "RUN rpm --import http://ftp.indexdata.com/pub/yum/centos/$D/RPM-GPG-KEY-indexdata" >>Dockerfile
- echo "RUN wget http://ftp.indexdata.com/pub/yum/centos/$D/indexdata.repo -P /etc/yum.repos.d/" >>Dockerfile
+ echo "RUN rpm --import http://ftp.indexdata.com/pub/yum/centos/$F/RPM-GPG-KEY-indexdata" >>Dockerfile
+ echo "RUN wget http://ftp.indexdata.com/pub/yum/centos/$F/indexdata.repo -P /etc/yum.repos.d/" >>Dockerfile
echo 'ENTRYPOINT ["/bin/sh", "-c"]' >>Dockerfile
docker build -t indexdata-build-centos-$D .
echo -n "$dist "
groupadd -g 1000 bob
useradd -u 1000 -g bob bob
-yum-builddep -y SPECS/*.spec
+rpmbuild -bs --nodeps SPECS/*.spec
-rpmbuild -ba SPECS/*.spec
+yum-builddep -y SRPMS/*.src.rpm
+
+rpmbuild -bb SPECS/*.spec
RET=$?