2008-07-22 13:37:19 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# mkAIXsnap
|
|
|
|
#
|
|
|
|
# This script can be used to extract, build, tar, compress and upload
|
2009-01-30 17:54:03 +00:00
|
|
|
# the latest xCAT for AIX snapshot code.
|
2008-07-22 13:37:19 +00:00
|
|
|
# - 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
|
2009-01-30 17:54:03 +00:00
|
|
|
# - nothing is added to the release download area
|
2008-07-22 13:37:19 +00:00
|
|
|
#
|
2009-04-03 15:25:54 +00:00
|
|
|
|
2008-07-22 13:37:19 +00:00
|
|
|
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
|
|
|
|
#
|
2009-03-10 13:56:52 +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 20:36:04 +00:00
|
|
|
mv /opt/freeware/src/packages/RPMS/ppc/perl-xCAT-$VER-*rpm $RPMDIR/
|
2009-01-28 20:54:29 +00:00
|
|
|
echo "rpm -Uvh perl-xCAT-$VER-*rpm" >> $RPMDIR/instxcat
|
2008-07-22 13:37:19 +00:00
|
|
|
|
|
|
|
./makeclientrpm
|
2009-01-28 20:36:04 +00:00
|
|
|
mv /opt/freeware/src/packages/RPMS/ppc/xCAT-client-$VER-*rpm $RPMDIR/
|
2009-01-28 20:54:29 +00:00
|
|
|
echo "rpm -Uvh xCAT-client-$VER-*rpm" >> $RPMDIR/instxcat
|
2008-07-22 13:37:19 +00:00
|
|
|
|
|
|
|
./makeserverrpm
|
2009-01-28 20:36:04 +00:00
|
|
|
mv /opt/freeware/src/packages/RPMS/ppc/xCAT-server-$VER-*rpm $RPMDIR/
|
2009-05-13 19:49:52 +00:00
|
|
|
echo "rpm -Uvh --nodeps xCAT-server-$VER-*rpm" >> $RPMDIR/instxcat
|
2008-07-22 13:37:19 +00:00
|
|
|
|
2009-01-28 15:42:14 +00:00
|
|
|
./makexcatrpm
|
2009-01-28 20:36:04 +00:00
|
|
|
mv /opt/freeware/src/packages/RPMS/ppc/xCAT-$VER-*rpm $RPMDIR/
|
2009-01-28 20:54:29 +00:00
|
|
|
echo "rpm -Uvh xCAT-$VER-*rpm" >> $RPMDIR/instxcat
|
2008-07-22 13:37:19 +00:00
|
|
|
|
2009-04-03 15:25:54 +00:00
|
|
|
./makermcrpm
|
|
|
|
mv /opt/freeware/src/packages/RPMS/ppc/xCAT-rmc-$VER-*rpm $RPMDIR/
|
|
|
|
echo "rpm -Uvh xCAT-rmc-$VER-*rpm" >> $RPMDIR/instxcat
|
|
|
|
|
2009-07-07 07:53:19 +00:00
|
|
|
./makeuirpm
|
|
|
|
mv /opt/freeware/src/packages/RPMS/noarch/xCAT-UI-$VER-*rpm $RPMDIR/
|
2009-06-30 17:17:24 +00:00
|
|
|
#echo "rpm -Uvh xCAT-web-$VER-*rpm" >> $RPMDIR/instxcat
|
2009-06-02 14:28:17 +00:00
|
|
|
|
2008-07-22 13:37:19 +00:00
|
|
|
#
|
|
|
|
# create the tar.gz file to upload
|
|
|
|
#
|
2009-03-26 17:03:55 +00:00
|
|
|
chmod +x $RPMDIR/instxcat
|
|
|
|
|
|
|
|
# add to flist
|
|
|
|
echo "instxcat" > $RPMDIR/flist
|
2008-07-22 13:37:19 +00:00
|
|
|
|
2009-03-26 17:03:55 +00:00
|
|
|
# add the service node bundle files
|
|
|
|
cp $BLDTOP/xCATaixSN.bnd $RPMDIR/
|
2009-07-07 13:28:43 +00:00
|
|
|
cp $BLDTOP/xCATaixSN2.bnd $RPMDIR/
|
2009-03-26 17:03:55 +00:00
|
|
|
cp $BLDTOP/xCATaixSSH.bnd $RPMDIR/
|
|
|
|
cp $BLDTOP/xCATaixSSL.bnd $RPMDIR/
|
|
|
|
echo "xCATaixSN.bnd" >> $RPMDIR/flist
|
2009-08-03 14:43:50 +00:00
|
|
|
echo "xCATaixSN2.bnd" >> $RPMDIR/flist
|
2009-03-26 17:03:55 +00:00
|
|
|
echo "xCATaixSSH.bnd" >> $RPMDIR/flist
|
|
|
|
echo "xCATaixSSL.bnd" >> $RPMDIR/flist
|
2008-07-22 13:37:19 +00:00
|
|
|
|
2009-03-26 17:03:55 +00:00
|
|
|
cd $RPMDIR
|
|
|
|
ls *.rpm >> 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
|
|
|
|
|
2009-05-14 16:57:36 +00:00
|
|
|
chgrp xcat *
|
|
|
|
chmod g+w *
|
|
|
|
|
2008-07-22 13:37:19 +00:00
|
|
|
#
|
|
|
|
# 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!
|
2009-09-18 11:59:28 +00:00
|
|
|
#while ! rsync -urLv --delete aix-core-snap nott,xcat@web.sourceforge.net:/home/groups/x/xc/xcat/htdocs/aix/devel/
|
|
|
|
#do : ; done
|
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
|
|
|
|
2009-09-18 11:59:28 +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
|
|
|
|
2009-09-18 11:59:28 +00:00
|
|
|
# scp *.rpm nott,xcat@web.sourceforge.net:/home/groups/x/xc/xcat/htdocs/aix/devel/xcat-core
|
|
|
|
#scp core-aix-2.3.tar.gz nott,xcat@web.sourceforge.net:/home/groups/x/xc/xcat/htdocs/aix/devel
|
2009-09-24 19:01:55 +00:00
|
|
|
|
|
|
|
# for dep-aix & mysql etc.
|
|
|
|
#scp ./dep-aix-2.3-200909241259.tar.gz nott,xcat@web.sourceforge.net:/home/frs/project/x/xc/xcat/xcat-dep/2.x_AIX/
|
2008-07-22 13:37:19 +00:00
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
exit 0;
|