Options:
[--debian=distros]
[--ubuntu=distros]
+ [--centos=distros]
[--upload]
[--concurrency=N]
[--product=X]
--ubuntu=*)
UBUNTU_DIST=$optarg
;;
+ --centos=*)
+ CENTOS_DIST=$optarg
+ ;;
--upload)
upload=true
;;
echo "Dsc $PKG . Product $PRODUCT"
echo "Ubuntu distros: $UBUNTU_DIST"
echo "Debian distros: $DEBIAN_DIST"
+echo "Centos distros: $CENTOS_DIST"
if test "${SUDO_USER}"; then
echo "Running as sudo."
echo "Tip: You can avoid it by adding the following in /etc/sudoers"
fi
if $upload; then
+ for dist in ${CENTOS_DIST}; do
+ arch=amd64
+ prodver=${PRODUCT}-${VERSION}
+ if ssh $dist "cd rpmbuild/SOURCES/${prodver} && ../../../proj/git-tools/id-rpm-build/upload-rpms.sh ${PRODUCT}.spec"; then
+ :
+ else
+ echo "Upload failed for $dist"
+ exit 1
+ fi
+ done
for dist in ${UBUNTU_DIST}; do
scp ${dist}-*/* ftp.indexdata.dk:/home/ftp/pub/${PRODUCT}/ubuntu/${dist}
done
done
echo ""
echo "===================================================="
- echo "Remember to update APT on ftp.indexdata.dk !!!"
+ echo "Remember to update APT/YUM on ftp.indexdata.dk !!!"
echo ""
echo "ssh ftp.indexdata.dk"
echo "cd ~/proj/git-tools/update-archive"
echo "sudo su"
echo "./update-archive.sh"
+ if test ${CENTOS_DIST}; then
+ echo "./update-yum-archive.sh"
+ fi
echo "===================================================="
exit 0
fi
+
rm -f *.log
+# copy tars to centos build hosts
+for dist in ${CENTOS_DIST}; do
+ arch=amd64
+ prodver=${PRODUCT}-${VERSION}
+ tarname=${prodver}.tar.gz
+ if test ! -f ../${tarname}; then
+ echo "$tarname: missing"
+ exit 1
+ fi
+
+ if ssh $dist "test -f .rpmmacros && test -d rpmbuild/SOURCES && test -d rpmbuild/RPMS && test -d rpmbuild/SRPMS && test -x proj/git-tools/id-rpm-build/upload-rpms.sh"; then
+ :
+ else
+ echo "Host $dist does not seem to be prepared with git-tools and rpmbuild directories"
+ exit 1
+ fi
+
+ if scp ../${tarname} $dist:rpmbuild/SOURCES/ ; then
+ :
+ else
+ echo "Could not copy $tarname to $dist"
+ exit 1
+ fi
+ if ssh $dist "cd rpmbuild/SOURCES && rm -fr $prodver && tar zxf $tarname && cd ${prodver} && rpmbuild -ba ${PRODUCT}.spec" >${dist}-${arch}.log 2>&1; then
+ :
+ else
+ echo "FAILED: See ${dist}-${arch}.log"
+ exit 1
+ fi
+done
+
# call our privileged wrapper to clean the directories, no --dsc option
for dist in ${DEBIAN_DIST} ${UBUNTU_DIST}; do
for arch in ${USE_ARCHS}; do
fi
done
done
+
date
echo "Done"
# Local Variables: