From a09b6bf08bb64ccea8eb6ace862789f2f2ddc866 Mon Sep 17 00:00:00 2001 From: bp-sawyers Date: Mon, 23 Feb 2009 21:03:18 +0000 Subject: [PATCH] Update xcat build script git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@2798 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- buildcore.sh | 36 +++++++++++++++++------------------- builddep.sh | 2 +- 2 files changed, 18 insertions(+), 20 deletions(-) diff --git a/buildcore.sh b/buildcore.sh index dd0173d25..a5cfd2b3b 100755 --- a/buildcore.sh +++ b/buildcore.sh @@ -1,7 +1,14 @@ #!/bin/sh + +# Build and upload the xcat-core code. Run this script from a dir in which you want +# 2 subdirs created: core-snap and core-snap-srpms. + +# you can change this if you need to +UPLOADUSER=bp-sawyers + +export HOME=/root cd `dirname $0` VER=`cat Version` -export BDIR=`pwd` GREP=grep export DESTDIR=`pwd`/core-snap export SRCDIR=`pwd`/core-snap-srpms @@ -20,18 +27,9 @@ fi #rm -rf $SRCDIR mkdir -p $DESTDIR mkdir -p $SRCDIR -cd xcat-core +#cd xcat-core svn up > ../coresvnup -# 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 - if $GREP xCAT-client ../coresvnup; then UPLOAD=1 ./makeclientrpm @@ -48,7 +46,6 @@ if $GREP perl-xCAT ../coresvnup; then mv /usr/src/$pkg/RPMS/noarch/perl-xCAT-$VER*rpm $DESTDIR/ mv /usr/src/$pkg/SRPMS/perl-xCAT-$VER*rpm $SRCDIR/ fi -#svn revert perl-xCAT/xCAT/Utils.pm if $GREP xCAT-web ../coresvnup; then UPLOAD=1 rm -f $DESTDIR/xCAT-web* @@ -105,19 +102,20 @@ if [ $UPLOAD == 0 ]; then echo "Nothing new detected" exit 0; fi -$BDIR/sign.exp $DESTDIR/*rpm -$BDIR/sign.exp $SRCDIR/*rpm +build-utils/rpmsign.exp $DESTDIR/*rpm +build-utils/rpmsign.exp $SRCDIR/*rpm createrepo $DESTDIR createrepo $SRCDIR 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 +chgrp -R xcat $DESTDIR +chmod -R g+w $DESTDIR cd $DESTDIR/.. export CFNAME=core-rpms-snap.tar.bz2 -export DFNAME=dep-rpms-snap.tar.bz2 -#tar jcvf $DFNAME dep-snap 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" +chgrp xcat $CFNAME +chmod g+w $CFNAME +scp $CFNAME $UPLOADUSER,xcat@web.sourceforge.net:htdocs/yum/devel/ +rsync -rlv --delete core-snap $UPLOADUSER,xcat@web.sourceforge.net:htdocs/yum/devel/ diff --git a/builddep.sh b/builddep.sh index 5937e2e66..4f48a9264 100755 --- a/builddep.sh +++ b/builddep.sh @@ -38,7 +38,7 @@ chmod -R g+w * # Build the tarball VER=`cat $XCATCOREDIR/Version` -DFNAME=xcat-dep-$VER-snap`date +%Y.%m.%d`.tar.bz2 +DFNAME=xcat-dep-$VER-snap`date +%Y%m%d%H%M`.tar.bz2 cd .. tar jcvf $DFNAME xcat-dep cd xcat-dep