2008-07-22 13:37:19 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# mkAIXsnap
|
|
|
|
#
|
|
|
|
# This script can be used to extract, build, tar, compress and upload
|
|
|
|
# the latest xCAT for AIX code.
|
|
|
|
# - this will be the latest development snapshot
|
|
|
|
# - the snapshot should be created as needed
|
|
|
|
# - this script should run in the ../xcat-core/trunk directory
|
|
|
|
# (ex. /u/ntest/svn/workspace/xcat/xcat-core/trunk)
|
|
|
|
#
|
|
|
|
# - you will need SourceForge ssh access set up
|
|
|
|
# ( get the contents of .ssh/id_rsa.pub on your local machine
|
|
|
|
# and add it to .ssh/authorized_keys on shell1.sf.net in
|
|
|
|
# your home dir, ex. /home/users/n/no/no/nott )
|
|
|
|
# - the tarball goes to:
|
|
|
|
# /home/groups/x/xc/xcat/htdocs/aix/devel
|
|
|
|
# - the individual RPMs go to:
|
|
|
|
# /home/groups/x/xc/xcat/htdocs/aix/devel/core-snap
|
|
|
|
# - nothing will be added to the release download area
|
|
|
|
# - Since there is no release available for AIX yet
|
|
|
|
# each snap is complete
|
|
|
|
#
|
|
|
|
BLDTOP=`pwd`
|
|
|
|
RPMDIR=$BLDTOP/aix-core-snap
|
2009-01-28 15:42:14 +00:00
|
|
|
VER=`cat Version`
|
|
|
|
|
2008-07-22 13:37:19 +00:00
|
|
|
|
|
|
|
# upload to SourceForge ??
|
|
|
|
UPLOAD=0
|
|
|
|
if [ "$1" == "UPLOAD" -o "$1" == "upload" ]; then
|
|
|
|
UPLOAD=1
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -d $RPMDIR ]
|
|
|
|
then
|
|
|
|
# clean it up
|
|
|
|
rm -f $RPMDIR/instxcat
|
|
|
|
rm -f $RPMDIR/*.rpm
|
|
|
|
rm -f $RPMDIR/flist
|
|
|
|
rm -f $RPMDIR/*.gz
|
|
|
|
else
|
|
|
|
mkdir -p $RPMDIR
|
|
|
|
fi
|
|
|
|
|
|
|
|
#
|
|
|
|
# do an update from the trunk directory level
|
|
|
|
#
|
2008-10-22 15:56:46 +00:00
|
|
|
svn update | tee $BLDTOP/coresvnup
|
2008-09-24 17:03:25 +00:00
|
|
|
#svn update
|
2008-07-22 13:37:19 +00:00
|
|
|
|
|
|
|
# create a simple install script
|
|
|
|
echo "# xCAT on AIX - install script" > $RPMDIR/instxcat
|
|
|
|
|
|
|
|
#
|
|
|
|
# build the RPMs
|
|
|
|
#
|
|
|
|
./makeperlxcatrpm
|
2009-01-28 15:42:14 +00:00
|
|
|
mv /opt/freeware/src/packages/RPMS/ppc/perl-xCAT-$VER.*rpm $RPMDIR/
|
|
|
|
echo "rpm -Uvh perl-xCAT-$VER.*rpm" >> $RPMDIR/instxcat
|
2008-07-22 13:37:19 +00:00
|
|
|
|
|
|
|
./makeclientrpm
|
2009-01-28 15:42:14 +00:00
|
|
|
mv /opt/freeware/src/packages/RPMS/ppc/xCAT-client-$VER.*rpm $RPMDIR/
|
|
|
|
echo "rpm -Uvh xCAT-client-$VER.*rpm" >> $RPMDIR/instxcat
|
2008-07-22 13:37:19 +00:00
|
|
|
|
|
|
|
./makeserverrpm
|
2009-01-28 15:42:14 +00:00
|
|
|
mv /opt/freeware/src/packages/RPMS/ppc/xCAT-server-$VER.*rpm $RPMDIR/
|
|
|
|
echo "rpm -Uvh xCAT-server-$VER.*rpm" >> $RPMDIR/instxcat
|
2008-07-22 13:37:19 +00:00
|
|
|
|
|
|
|
./makermcrpm
|
2009-01-28 15:42:14 +00:00
|
|
|
mv /opt/freeware/src/packages/RPMS/ppc/xCAT-rmc-$VER.*rpm $RPMDIR/
|
|
|
|
echo "rpm -Uvh xCAT-rmc-$VER.*rpm" >> $RPMDIR/instxcat
|
2008-07-22 13:37:19 +00:00
|
|
|
|
2009-01-28 15:42:14 +00:00
|
|
|
./makexcatrpm
|
|
|
|
mv /opt/freeware/src/packages/RPMS/ppc/xCAT-$VER.*rpm $RPMDIR/
|
|
|
|
echo "rpm -Uvh xCAT-$VER.*rpm" >> $RPMDIR/instxcat
|
2008-07-22 13:37:19 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# create the tar.gz file to upload
|
|
|
|
#
|
|
|
|
cd $RPMDIR
|
|
|
|
chmod +x ./instxcat
|
|
|
|
|
|
|
|
# add all the file names to flist
|
|
|
|
echo "instxcat" > ./flist
|
|
|
|
ls *.rpm >> ./flist
|
|
|
|
|
2008-09-24 17:03:25 +00:00
|
|
|
# add the service node bundle files to the tar file
|
2008-10-29 13:44:36 +00:00
|
|
|
#cp $BLDTOP/xCATaixSN.bnd $RPMDIR
|
|
|
|
#cp $BLDTOP/xCATaixSSH.bnd $RPMDIR
|
|
|
|
#echo "xCATaixSN.bnd" >> ./flist
|
|
|
|
#echo "xCATaixSSH.bnd" >> ./flist
|
2008-09-24 17:03:25 +00:00
|
|
|
|
2008-07-22 13:37:19 +00:00
|
|
|
#TIME=`date +%Y%m%d%H%M`
|
|
|
|
tar -cvf core-aix-snap.tar -L flist
|
|
|
|
gzip core-aix-snap.tar
|
|
|
|
|
|
|
|
#
|
|
|
|
# upload the tar file and RPMs to SourceForge
|
|
|
|
#
|
|
|
|
if [ $UPLOAD == 1 ]; then
|
|
|
|
|
2008-10-29 13:44:36 +00:00
|
|
|
# clear out the old files - do this manually with winscp session!
|
|
|
|
# ssh nott@shell1.sf.net "cd /home/groups/x/xc/xcat/htdocs/aix/devel; rm -f *.gz; cd /home/groups/x/xc/xcat/htdocs/aix/devel/core-snap; rm -f *.rpm"
|
2008-07-22 13:37:19 +00:00
|
|
|
|
2008-10-29 13:44:36 +00:00
|
|
|
scp *.rpm nott,xcat@web.sourceforge.net:/home/groups/x/xc/xcat/htdocs/aix/devel/core-snap
|
2008-07-22 13:37:19 +00:00
|
|
|
|
2008-10-29 13:44:36 +00:00
|
|
|
scp core-aix-snap.tar.gz nott,xcat@web.sourceforge.net:/home/groups/x/xc/xcat/htdocs/aix/devel
|
2008-07-22 13:37:19 +00:00
|
|
|
|
2008-10-29 13:44:36 +00:00
|
|
|
# for dep-aix
|
2009-01-28 15:42:14 +00:00
|
|
|
#scp dep-aix-$VER.tar.gz nott,xcat@web.sourceforge.net:upload/
|
2008-07-22 13:37:19 +00:00
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
exit 0;
|