2008-03-04 18:10:05 +00:00
|
|
|
#!/bin/sh
|
|
|
|
cd `dirname $0`
|
2009-01-28 15:42:14 +00:00
|
|
|
VER=`cat Version`
|
2009-01-26 14:25:00 +00:00
|
|
|
export BDIR=`pwd`
|
2008-03-04 18:10:05 +00:00
|
|
|
GREP=grep
|
|
|
|
export DESTDIR=`pwd`/core-snap
|
|
|
|
export SRCDIR=`pwd`/core-snap-srpms
|
|
|
|
UPLOAD=0
|
|
|
|
if [ "$1" == "UPLOAD" ]; then
|
|
|
|
UPLOAD=1
|
|
|
|
fi
|
|
|
|
if [ -f /etc/redhat-release ]
|
|
|
|
then
|
|
|
|
pkg="redhat"
|
|
|
|
else
|
|
|
|
pkg="packages"
|
|
|
|
fi
|
|
|
|
|
|
|
|
#rm -rf $DESTDIR
|
|
|
|
#rm -rf $SRCDIR
|
|
|
|
mkdir -p $DESTDIR
|
|
|
|
mkdir -p $SRCDIR
|
|
|
|
cd xcat-core
|
|
|
|
svn up > ../coresvnup
|
2009-01-28 15:42:14 +00:00
|
|
|
|
|
|
|
# This update of Utils.pm is now done in the perl-xCAT spec file
|
|
|
|
#if [ `wc -l ../coresvnup|awk '{print $1}'` != 1 ] && ! grep "^At revision" ../coresvnup; then
|
|
|
|
# SVNREF=r`svn info|grep Revision|awk '{print $2}'`
|
|
|
|
# BUILDDATE=`date`
|
|
|
|
# VERADD=". ' (svn $SVNREF\/built $BUILDDATE)'"
|
|
|
|
# sed -i s/#XCATSVNBUILDSUBHERE/"$VERADD"/ perl-xCAT/xCAT/Utils.pm
|
|
|
|
# echo perl-xCAT >> ../coresvnup
|
|
|
|
#fi
|
|
|
|
|
2008-03-04 18:10:05 +00:00
|
|
|
if $GREP xCAT-client ../coresvnup; then
|
|
|
|
UPLOAD=1
|
|
|
|
./makeclientrpm
|
|
|
|
rm -f $DESTDIR/xCAT-client*rpm
|
|
|
|
rm -f $SRCDIR/xCAT-client*rpm
|
2009-01-28 15:42:14 +00:00
|
|
|
mv /usr/src/$pkg/RPMS/noarch/xCAT-client-$VER*rpm $DESTDIR/
|
|
|
|
mv /usr/src/$pkg/SRPMS/xCAT-client-$VER*rpm $SRCDIR/
|
2008-03-04 18:10:05 +00:00
|
|
|
fi
|
|
|
|
if $GREP perl-xCAT ../coresvnup; then
|
|
|
|
UPLOAD=1
|
|
|
|
./makeperlxcatrpm
|
|
|
|
rm -f $DESTDIR/perl-xCAT*rpm
|
|
|
|
rm -f $SRCDIR/perl-xCAT*rpm
|
2009-01-28 15:42:14 +00:00
|
|
|
mv /usr/src/$pkg/RPMS/noarch/perl-xCAT-$VER*rpm $DESTDIR/
|
|
|
|
mv /usr/src/$pkg/SRPMS/perl-xCAT-$VER*rpm $SRCDIR/
|
2009-01-26 14:25:00 +00:00
|
|
|
fi
|
2009-01-28 15:42:14 +00:00
|
|
|
#svn revert perl-xCAT/xCAT/Utils.pm
|
2009-01-26 14:25:00 +00:00
|
|
|
if $GREP xCAT-web ../coresvnup; then
|
|
|
|
UPLOAD=1
|
|
|
|
rm -f $DESTDIR/xCAT-web*
|
|
|
|
rm -f $SRCDIR/xCAT-web*
|
|
|
|
./makewebrpm
|
2009-01-28 15:42:14 +00:00
|
|
|
mv /usr/src/$pkg/RPMS/noarch/xCAT-web-$VER*rpm $DESTDIR
|
|
|
|
mv /usr/src/$pkg/SRPMS/xCAT-web-$VER*rpm $SRCDIR
|
2008-03-04 18:10:05 +00:00
|
|
|
fi
|
|
|
|
if $GREP xCAT-server ../coresvnup; then
|
|
|
|
UPLOAD=1
|
|
|
|
./makeserverrpm
|
|
|
|
rm -f $DESTDIR/xCAT-server*rpm
|
|
|
|
rm -f $SRCDIR/xCAT-server*rpm
|
2009-01-28 15:42:14 +00:00
|
|
|
mv /usr/src/$pkg/RPMS/noarch/xCAT-server-$VER*rpm $DESTDIR
|
|
|
|
mv /usr/src/$pkg/SRPMS/xCAT-server-$VER*rpm $SRCDIR
|
2008-03-04 18:10:05 +00:00
|
|
|
fi
|
|
|
|
if $GREP xCAT-nbroot ../coresvnup; then
|
|
|
|
UPLOAD=1
|
2009-01-28 15:42:14 +00:00
|
|
|
./makenbrootrpm x86_64
|
|
|
|
./makenbrootrpm ppc64
|
|
|
|
./makenbrootrpm x86
|
2008-03-04 18:10:05 +00:00
|
|
|
rm -f $DESTDIR/xCAT-nbroot-core*rpm
|
|
|
|
rm -f $SRCDIR/xCAT-nbroot-core*rpm
|
|
|
|
mv /usr/src/$pkg/RPMS/noarch/xCAT-nbroot-core-*rpm $DESTDIR
|
|
|
|
mv /usr/src/$pkg/SRPMS/xCAT-nbroot-core-*rpm $SRCDIR
|
|
|
|
fi
|
2008-03-18 20:02:53 +00:00
|
|
|
if $GREP "U xCATsn/" ../coresvnup || $GREP "A xCATsn/" ../coresvnup; then
|
|
|
|
UPLOAD=1
|
2009-01-28 15:42:14 +00:00
|
|
|
rm -f $DESTDIR/xCATsn-$VER*rpm
|
|
|
|
rm -f $SRCDIR/xCATsn-$VER*rpm
|
|
|
|
./makexcatsnrpm x86_64
|
|
|
|
mv /usr/src/$pkg/RPMS/*/xCATsn-$VER*rpm $DESTDIR
|
|
|
|
mv /usr/src/$pkg/SRPMS/xCATsn-$VER*rpm $SRCDIR
|
|
|
|
./makexcatsnrpm i386
|
|
|
|
mv /usr/src/$pkg/RPMS/*/xCATsn-$VER*rpm $DESTDIR
|
|
|
|
mv /usr/src/$pkg/SRPMS/xCATsn-$VER*rpm $SRCDIR
|
|
|
|
./makexcatsnrpm ppc64
|
|
|
|
mv /usr/src/$pkg/RPMS/*/xCATsn-$VER*rpm $DESTDIR
|
|
|
|
mv /usr/src/$pkg/SRPMS/xCATsn-$VER*rpm $SRCDIR
|
2008-03-18 20:02:53 +00:00
|
|
|
fi
|
|
|
|
if $GREP "U xCAT/" ../coresvnup || $GREP "A xCAT/" ../coresvnup; then
|
2008-03-04 18:10:05 +00:00
|
|
|
UPLOAD=1
|
2009-01-28 15:42:14 +00:00
|
|
|
rm -f $DESTDIR/xCAT-$VER*rpm
|
|
|
|
rm -f $SRCDIR/xCAT-$VER*rpm
|
|
|
|
./makexcatrpm x86_64
|
|
|
|
mv /usr/src/$pkg/RPMS/*/xCAT-$VER*rpm $DESTDIR
|
|
|
|
mv /usr/src/$pkg/SRPMS/xCAT-$VER*rpm $SRCDIR
|
|
|
|
./makexcatrpm ppc64
|
|
|
|
mv /usr/src/$pkg/RPMS/*/xCAT-$VER*rpm $DESTDIR
|
|
|
|
./makexcatrpm i386
|
|
|
|
mv /usr/src/$pkg/RPMS/*/xCAT-$VER*rpm $DESTDIR
|
2008-03-04 18:10:05 +00:00
|
|
|
fi
|
|
|
|
if [ $UPLOAD == 0 ]; then
|
|
|
|
echo "Nothing new detected"
|
|
|
|
exit 0;
|
|
|
|
fi
|
2009-01-26 14:25:00 +00:00
|
|
|
$BDIR/sign.exp $DESTDIR/*rpm
|
|
|
|
$BDIR/sign.exp $SRCDIR/*rpm
|
2008-03-04 18:10:05 +00:00
|
|
|
createrepo $DESTDIR
|
|
|
|
createrepo $SRCDIR
|
2009-01-26 14:25:00 +00:00
|
|
|
rm $SRCDIR/repodata/repomd.xml.asc
|
|
|
|
rm $DESTDIR/repodata/repomd.xml.asc
|
|
|
|
gpg -a --detach-sign $DESTDIR/repodata/repomd.xml
|
|
|
|
gpg -a --detach-sign $SRCDIR/repodata/repomd.xml
|
2008-03-04 18:10:05 +00:00
|
|
|
cd $DESTDIR/..
|
2008-03-18 20:02:53 +00:00
|
|
|
export CFNAME=core-rpms-snap.tar.bz2
|
|
|
|
export DFNAME=dep-rpms-snap.tar.bz2
|
2008-03-04 18:10:05 +00:00
|
|
|
#tar jcvf $DFNAME dep-snap
|
2009-01-26 14:25:00 +00:00
|
|
|
tar jcvf $CFNAME core-snap
|
|
|
|
scp $CFNAME jbjohnso@web.sourceforge.net:/home/groups/x/xc/xcat/htdocs/yum/devel/
|
|
|
|
rsync -av --delete core-snap jbjohnso@web.sourceforge.net:/home/groups/x/xc/xcat/htdocs/yum/devel/
|
|
|
|
#ssh jbjohnso@shell2.sourceforge.net "cd /home/groups/x/xc/xcat/htdocs/yum/devel; tar jcvf $CFNAME core-snap"
|