From 54e6c0386b84202c6102ffc655fb61546d580fc7 Mon Sep 17 00:00:00 2001 From: bp-sawyers Date: Mon, 19 Dec 2011 17:01:18 +0000 Subject: [PATCH] Modify build scripts to have a non-verbose mode and keep track of build errors git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@11267 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- build-utils/rpmsign.exp | 2 +- buildcore.sh | 321 ++++++++++++++---------------- builddep.sh | 19 +- makeclientrpm | 45 ----- makehpcrpm | 38 ---- makenbrootrpm | 23 --- makeperlxcatrpm | 52 ----- makermcrpm | 39 ---- makerpm | 172 ++++++++++++++++ makeserverrpm | 46 ----- maketestrpm | 27 --- makeuirpm | 37 ---- makexcatrpm | 58 ------ makexcatsnrpm | 54 ----- mkAIXdeps | 194 ------------------ mkAIXsnap | 138 ------------- perl-xCAT/perl-xCAT.spec | 2 - xCAT-IBMhpc/xCAT-IBMhpc.spec | 4 - xCAT-UI/xCAT-UI.spec | 2 - xCAT-client/xCAT-client.spec | 2 - xCAT-nbroot/xcat-core-nbroot.spec | 2 +- xCAT-rmc/xCAT-rmc.spec | 2 - xCAT-server/xCAT-server.spec | 19 +- xCAT-test/xCAT-test.spec | 3 - xCAT/xCAT.spec | 2 - 25 files changed, 350 insertions(+), 953 deletions(-) delete mode 100755 makeclientrpm delete mode 100755 makehpcrpm delete mode 100755 makenbrootrpm delete mode 100755 makeperlxcatrpm delete mode 100755 makermcrpm create mode 100755 makerpm delete mode 100755 makeserverrpm delete mode 100755 maketestrpm delete mode 100755 makeuirpm delete mode 100755 makexcatrpm delete mode 100755 makexcatsnrpm delete mode 100755 mkAIXdeps delete mode 100755 mkAIXsnap diff --git a/build-utils/rpmsign.exp b/build-utils/rpmsign.exp index 81d75d057..cf2291696 100755 --- a/build-utils/rpmsign.exp +++ b/build-utils/rpmsign.exp @@ -49,7 +49,7 @@ if {$force_conservative} { set timeout -1 -spawn sh -c "rpm --resign $argv" +spawn sh -c "rpm --quiet --resign $argv" match_max 100000 expect -exact "Enter pass phrase: " send -- "\r" diff --git a/buildcore.sh b/buildcore.sh index c1ed4cbdd..8269b3c32 100755 --- a/buildcore.sh +++ b/buildcore.sh @@ -25,18 +25,32 @@ # xcat-core tarball to the SF web site instead of the FRS area. # UP=0 or UP=1 - override the default upload behavior # SVNUP= - control which rpms get built by specifying a coresvnup file +# FRSYUM=1 - put the yum repo and snap builds in the FRS area instead of project web area. +# VERBOSE=1 - to see lots of verbose output # you can change this if you need to UPLOADUSER=bp-sawyers +FRS=/home/frs/project/x/xc/xcat -OSNAME=$(uname) +# Process cmd line variable assignments, assigning each attr=val pair to a variable of same name +for i in $*; do + #declare `echo $i|cut -d '=' -f 1`=`echo $i|cut -d '=' -f 2` + export $i +done +if [ "$VERBOSE" = "1" -o "$VERBOSE" = "yes" ]; then + set -x + VERBOSEMODE=1 +fi +# Find where this script is located to set some build variables cd `dirname $0` -# Strip the /src/xcat-core from the end of the dir to get the next dir up and use as the release -CURDIR=`pwd` -#D=${CURDIR/\/src\/xcat-core/} -D=${CURDIR%/src/xcat-core} -REL=`basename $D` +# strip the /src/xcat-core from the end of the dir to get the next dir up and use as the release +if [ -z $REL ]; then + curdir=`pwd` + D=${curdir%/src/xcat-core} + REL=`basename $D` +fi +OSNAME=$(uname) if [ "$OSNAME" != "AIX" ]; then GSA=http://pokgsa.ibm.com/projects/x/xcat/build/linux @@ -47,22 +61,23 @@ if [ "$OSNAME" != "AIX" ]; then echo "Can't get lock /var/lock/xcatbld-$REL.lock. Someone else must be doing a build right now. Exiting...." exit 1 fi -fi - -set -x - -# Process cmd line variable assignments, assigning each attr=val pair to a variable of same name -for i in $*; do - #declare `echo $i|cut -d '=' -f 1`=`echo $i|cut -d '=' -f 2` - export $i -done - -if [ "$OSNAME" != "AIX" ]; then + export HOME=/root # This is so rpm and gpg will know home, even in sudo fi -XCATCORE="xcat-core" -svn up Version +# this is needed only when we are transitioning the yum over to frs +if [ "$FRSYUM" = 1 ]; then + YUMDIR=$FRS + YUMREPOURL="https://sourceforge.net/projects/xcat/files/yum" +else + YUMDIR=htdocs + YUMREPOURL="http://xcat.sourceforge.net/yum" +fi + +# Set variables based on which type of build we are doing +XCATCORE="xcat-core" # core-snap is a sym link to xcat-core +echo "svn --quiet up Version" +svn --quiet up Version VER=`cat Version` SHORTVER=`cat Version|cut -d. -f 1,2` SHORTSHORTVER=`cat Version|cut -d. -f 1` @@ -89,8 +104,12 @@ if [ "$PROMOTE" != 1 ]; then # very long if statement to not do builds if w mkdir -p $DESTDIR SRCDIR=../../$SRCD mkdir -p $SRCDIR -GREP=grep -# currently aix builds ppc rpms, but it should build noarch +if [ -n "$VERBOSEMODE" ]; then + GREP=grep +else + GREP="grep -q" +fi +# currently aix builds ppc rpms, but someday it should build noarch if [ "$OSNAME" = "AIX" ]; then NOARCH=ppc else @@ -100,172 +119,113 @@ UPLOAD=0 if [ "$OSNAME" = "AIX" ]; then source=/opt/freeware/src/packages else - if [ -f /etc/redhat-release ]; then - source="/usr/src/redhat" - else - source="/usr/src/packages" + source=`rpmbuild --eval '%_topdir' xCATsn/xCATsn.spec` + if [ $? -gt 0 ]; then + echo "Error: Could not determine rpmbuild's root directory." + exit 2 fi + #echo "source=$source" fi # If they have not given us a premade update file, do an svn update and capture the results if [ -z "$SVNUP" ]; then SVNUP=../coresvnup + echo "svn up > $SVNUP" svn up > $SVNUP fi # If anything has changed, we should always rebuild perl-xCAT if ! $GREP 'At revision' $SVNUP; then # Use to be: $GREP perl-xCAT $SVNUP; then - UPLOAD=1 - ./makeperlxcatrpm - rm -f $DESTDIR/perl-xCAT*rpm - rm -f $SRCDIR/perl-xCAT*rpm - mv $source/RPMS/$NOARCH/perl-xCAT-$VER*rpm $DESTDIR/ - mv $source/SRPMS/perl-xCAT-$VER*rpm $SRCDIR/ + UPLOAD=1 + ./makerpm perl-xCAT + if [ $? -ne 0 ]; then + FAILEDRPMS="perl-xCAT" + else + rm -f $DESTDIR/perl-xCAT*rpm + rm -f $SRCDIR/perl-xCAT*rpm + mv $source/RPMS/$NOARCH/perl-xCAT-$VER*rpm $DESTDIR/ + mv $source/SRPMS/perl-xCAT-$VER*rpm $SRCDIR/ + fi fi if [ "$OSNAME" = "AIX" ]; then # For the 1st one we overwrite, not append echo "rpm -Uvh perl-xCAT-$SHORTSHORTVER*rpm" > $DESTDIR/instxcat fi -if $GREP xCAT-client $SVNUP; then - UPLOAD=1 - ./makeclientrpm - rm -f $DESTDIR/xCAT-client*rpm - rm -f $SRCDIR/xCAT-client*rpm - mv $source/RPMS/$NOARCH/xCAT-client-$VER*rpm $DESTDIR/ - mv $source/SRPMS/xCAT-client-$VER*rpm $SRCDIR/ -fi -if [ "$OSNAME" = "AIX" ]; then - echo "rpm -Uvh xCAT-client-$SHORTSHORTVER*rpm" >> $DESTDIR/instxcat -fi - -if $GREP xCAT-UI $SVNUP; then - UPLOAD=1 - rm -f $DESTDIR/xCAT-UI*rpm - rm -f $SRCDIR/xCAT-UI*rpm - ./makeuirpm - mv $source/RPMS/noarch/xCAT-UI-$VER*rpm $DESTDIR - mv $source/SRPMS/xCAT-UI-$VER*rpm $SRCDIR -fi -# Do not automatically install xCAT-UI on AIX -#if [ "$OSNAME" = "AIX" ]; then -# echo "rpm -Uvh xCAT-UI-$SHORTSHORTVER*rpm" >> $DESTDIR/instxcat -#fi - -if $GREP xCAT-IBMhpc $SVNUP; then - UPLOAD=1 - rm -f $DESTDIR/xCAT-IBMhpc*rpm - rm -f $SRCDIR/xCAT-IBMhpc*rpm - ./makehpcrpm - mv $source/RPMS/$NOARCH/xCAT-IBMhpc-$VER*rpm $DESTDIR - mv $source/SRPMS/xCAT-IBMhpc-$VER*rpm $SRCDIR -fi -# Do not automatically install xCAT-IBMhpc on AIX -#if [ "$OSNAME" = "AIX" ]; then -# echo "rpm -Uvh xCAT-IBMhpc-$SHORTSHORTVER*rpm" >> $DESTDIR/instxcat -#fi - -if $GREP xCAT-server $SVNUP; then - UPLOAD=1 - ./makeserverrpm - rm -f $DESTDIR/xCAT-server*rpm - rm -f $SRCDIR/xCAT-server*rpm - mv $source/RPMS/$NOARCH/xCAT-server-$VER*rpm $DESTDIR - mv $source/SRPMS/xCAT-server-$VER*rpm $SRCDIR -fi -if [ "$OSNAME" = "AIX" ]; then - echo "rpm -Uvh xCAT-server-$SHORTSHORTVER*rpm" >> $DESTDIR/instxcat -fi - -if $GREP xCAT-rmc $SVNUP; then - UPLOAD=1 - ./makermcrpm - rm -f $DESTDIR/xCAT-rmc*rpm - rm -f $SRCDIR/xCAT-rmc*rpm - mv $source/RPMS/$NOARCH/xCAT-rmc-$VER*rpm $DESTDIR - mv $source/SRPMS/xCAT-rmc-$VER*rpm $SRCDIR -fi -# Note: not putting xCAT-rmc into instxcat for aix here, because it has to be installed -# after xCAT. - -if $GREP xCAT-test $SVNUP; then - UPLOAD=1 - ./maketestrpm - rm -f $DESTDIR/xCAT-test*rpm - rm -f $SRCDIR/xCAT-test*rpm - mv $source/RPMS/$NOARCH/xCAT-test-$VER*rpm $DESTDIR - mv $source/SRPMS/xCAT-test-$VER*rpm $SRCDIR -fi -# Note: not putting xCAT-test into instxcat for aix, because it is optional +# Build the rest of the noarch rpms +for rpmname in xCAT-client xCAT-server xCAT-IBMhpc xCAT-rmc xCAT-UI xCAT-test; do + if $GREP $rpmname $SVNUP; then + UPLOAD=1 + ./makerpm $rpmname + if [ $? -ne 0 ]; then + FAILEDRPMS="$FAILEDRPMS $rpmname" + else + rm -f $DESTDIR/$rpmname*rpm + rm -f $SRCDIR/$rpmname*rpm + mv $source/RPMS/$NOARCH/$rpmname-$VER*rpm $DESTDIR/ + mv $source/SRPMS/$rpmname-$VER*rpm $SRCDIR/ + fi + fi + if [ "$OSNAME" = "AIX" ]; then + if [ "$rpmname" = "xCAT-client" -o "$rpmname" = "xCAT-server" ]; then # we do not automatically install the rest of the rpms on AIX + echo "rpm -Uvh $rpmname-$SHORTSHORTVER*rpm" >> $DESTDIR/instxcat + fi + fi +done if [ "$OSNAME" != "AIX" ]; then if $GREP xCAT-nbroot $SVNUP; then - UPLOAD=1 - ./makenbrootrpm x86_64 - ./makenbrootrpm ppc64 - ./makenbrootrpm x86 - rm -f $DESTDIR/xCAT-nbroot-core*rpm - rm -f $SRCDIR/xCAT-nbroot-core*rpm - mv $source/RPMS/noarch/xCAT-nbroot-core-*rpm $DESTDIR - mv $source/SRPMS/xCAT-nbroot-core-*rpm $SRCDIR + UPLOAD=1 + ORIGFAILEDRPMS="$FAILEDRPMS" + for arch in x86_64 x86 ppc64; do + ./makerpm xCAT-nbroot-core $arch + if [ $? -ne 0 ]; then FAILEDRPMS="$FAILEDRPMS xCAT-nbroot-core-$arch"; fi + done + if [ "$FAILEDRPMS" = "ORIGFAILEDRPMS" ]; then # all succeeded + rm -f $DESTDIR/xCAT-nbroot-core*rpm + rm -f $SRCDIR/xCAT-nbroot-core*rpm + mv $source/RPMS/noarch/xCAT-nbroot-core-*rpm $DESTDIR + mv $source/SRPMS/xCAT-nbroot-core-*rpm $SRCDIR + fi fi fi -if $GREP -E '^[UAD] +xCATsn/' $SVNUP; then - UPLOAD=1 - rm -f $DESTDIR/xCATsn-*rpm - rm -f $SRCDIR/xCATsn-*rpm - if [ "$OSNAME" = "AIX" ]; then - ./makexcatsnrpm - mv $source/RPMS/*/xCATsn-$VER*rpm $DESTDIR - mv $source/SRPMS/xCATsn-$VER*rpm $SRCDIR - else - ./makexcatsnrpm x86_64 - mv $source/RPMS/*/xCATsn-$VER*rpm $DESTDIR - mv $source/SRPMS/xCATsn-$VER*rpm $SRCDIR - ./makexcatsnrpm i386 - mv $source/RPMS/*/xCATsn-$VER*rpm $DESTDIR - ./makexcatsnrpm ppc64 - mv $source/RPMS/*/xCATsn-$VER*rpm $DESTDIR - ./makexcatsnrpm s390x - mv $source/RPMS/*/xCATsn-$VER*rpm $DESTDIR +# Build the xCAT and xCATsn rpms for all platforms +for rpmname in xCAT xCATsn; do + if $GREP -E "^[UAD] +$rpmname/" $SVNUP; then + UPLOAD=1 + ORIGFAILEDRPMS="$FAILEDRPMS" + if [ "$OSNAME" = "AIX" ]; then + ./makerpm $rpmname + if [ $? -ne 0 ]; then FAILEDRPMS="$FAILEDRPMS $rpmname"; fi + else + for arch in x86_64 i386 ppc64 s390x; do + ./makerpm $rpmname $arch + if [ $? -ne 0 ]; then FAILEDRPMS="$FAILEDRPMS $rpmname-$arch"; fi + done + fi + if [ "$FAILEDRPMS" = "ORIGFAILEDRPMS" ]; then # all succeeded + rm -f $DESTDIR/$rpmname-*rpm + rm -f $SRCDIR/$rpmname-*rpm + mv $source/RPMS/*/$rpmname-$VER*rpm $DESTDIR + mv $source/SRPMS/$rpmname-$VER*rpm $SRCDIR + fi fi -fi - -if $GREP -E '^[UAD] +xCAT/' $SVNUP; then - UPLOAD=1 - rm -f $DESTDIR/xCAT-$SHORTSHORTVER*rpm - rm -f $SRCDIR/xCAT-$SHORTSHORTVER*rpm - if [ "$OSNAME" = "AIX" ]; then - ./makexcatrpm - mv $source/RPMS/*/xCAT-$VER*rpm $DESTDIR - mv $source/SRPMS/xCAT-$VER*rpm $SRCDIR - else - ./makexcatrpm x86_64 - mv $source/RPMS/*/xCAT-$VER*rpm $DESTDIR - mv $source/SRPMS/xCAT-$VER*rpm $SRCDIR - ./makexcatrpm i386 - mv $source/RPMS/*/xCAT-$VER*rpm $DESTDIR - ./makexcatrpm ppc64 - mv $source/RPMS/*/xCAT-$VER*rpm $DESTDIR - ./makexcatrpm s390x - mv $source/RPMS/*/xCAT-$VER*rpm $DESTDIR - fi -fi +done if [ "$OSNAME" = "AIX" ]; then echo "rpm -Uvh xCAT-$SHORTSHORTVER*rpm" >> $DESTDIR/instxcat echo "rpm -Uvh xCAT-rmc-$SHORTSHORTVER*rpm" >> $DESTDIR/instxcat - # add the service node bundle files - # these are now shipped as part of xCAT-server !!!! - # - installed in /opt/xcat/share/xcat/installp_bundles - # cp xCATaixSN.bnd xCATaixSN2.bnd xCATaixSSH.bnd xCATaixSSL.bnd $DESTDIR/ fi # Decide if anything was built or not +if [ -n "$FAILEDRPMS" ]; then + echo "Error: build of the following RPMs failed: $FAILEDRPMS" + exit 2 +fi if [ $UPLOAD == 0 -a "$UP" != 1 ]; then echo "Nothing new detected" - exit 0; + exit 0 fi #else we will continue @@ -283,14 +243,14 @@ if [ "$OSNAME" != "AIX" ]; then done # tell rpm to use gpg to sign MACROS=$HOME/.rpmmacros - if ! $GREP -q '%_signature gpg' $MACROS 2>/dev/null; then + if ! $GREP '%_signature gpg' $MACROS 2>/dev/null; then echo '%_signature gpg' >> $MACROS fi - if ! $GREP -q '%_gpg_name' $MACROS 2>/dev/null; then + if ! $GREP '%_gpg_name' $MACROS 2>/dev/null; then echo '%_gpg_name Jarrod Johnson' >> $MACROS fi - build-utils/rpmsign.exp $DESTDIR/*rpm - build-utils/rpmsign.exp $SRCDIR/*rpm + build-utils/rpmsign.exp $DESTDIR/*rpm | grep -v 'was already signed' + build-utils/rpmsign.exp $SRCDIR/*rpm | grep -v 'was already signed' createrepo $DESTDIR createrepo $SRCDIR rm -f $SRCDIR/repodata/repomd.xml.asc @@ -307,10 +267,14 @@ fi # make everything have a group of xcat, so anyone can manage them once they get on SF if [ "$OSNAME" = "AIX" ]; then - mkgroup xcat 2>/dev/null + if ! lsgroup xcat >/dev/null 2>&1; then + mkgroup xcat + fi chmod +x $DESTDIR/instxcat -else - groupadd -f xcat +else # linux + if ! $GREP xcat /etc/group; then + groupadd xcat + fi fi chgrp -R xcat $DESTDIR chmod -R g+w $DESTDIR @@ -328,10 +292,10 @@ if [ "$OSNAME" != "AIX" ]; then cat >xCAT-core.repo << EOF [xcat-2-core] name=xCAT 2 Core packages -baseurl=http://xcat.sourceforge.net/yum/$REL/$CORE +baseurl=$YUMREPOURL/$REL/$CORE enabled=1 gpgcheck=1 -gpgkey=http://xcat.sourceforge.net/yum/$REL/$CORE/repodata/repomd.xml.key +gpgkey=$YUMREPOURL/$REL/$CORE/repodata/repomd.xml.key EOF # Create the mklocalrepo script @@ -348,12 +312,18 @@ fi # not AIX # Build the tarball cd .. +if [ -n "$VERBOSEMODE" ]; then + verbosetar="-v" +else + verbosetar="" +fi +echo "Creating $TARNAME ..." if [ "$OSNAME" = "AIX" ]; then - tar -hcvf ${TARNAME%.gz} $XCATCORE + tar $verbosetar -hcf ${TARNAME%.gz} $XCATCORE rm -f $TARNAME gzip ${TARNAME%.gz} else - tar -hjcvf $TARNAME $XCATCORE + tar $verbosetar -hjcf $TARNAME $XCATCORE fi chgrp xcat $TARNAME chmod g+w $TARNAME @@ -374,22 +344,29 @@ if [ ! -e core-snap ]; then ln -s xcat-core core-snap fi if [ "$REL" = "devel" -o "$PREGA" != 1 ]; then - while ! rsync -urLv --delete $CORE $UPLOADUSER,xcat@web.sourceforge.net:htdocs/$YUM/$REL/ + i=0 + echo "Uploading RPMs from $CORE to $YUMDIR/$YUM/$REL/ ..." + while [ $((i++)) -lt 10 ] && ! rsync -urLv --delete $CORE $UPLOADUSER,xcat@web.sourceforge.net:$YUMDIR/$YUM/$REL/ do : ; done fi # Upload the individual source RPMs to sourceforge -while ! rsync -urLv --delete $SRCD $UPLOADUSER,xcat@web.sourceforge.net:htdocs/$YUM/$REL/ +i=0 +echo "Uploading src RPMs from $SRCD to $YUMDIR/$YUM/$REL/ ..." +while [ $((i++)) -lt 10 ] && ! rsync -urLv --delete $SRCD $UPLOADUSER,xcat@web.sourceforge.net:$YUMDIR/$YUM/$REL/ do : ; done # Upload the tarball to sourceforge if [ "$PROMOTE" = 1 -a "$REL" != "devel" -a "$PREGA" != 1 ]; then # upload tarball to FRS area - #scp $TARNAME $UPLOADUSER@web.sourceforge.net:uploads/ - while ! rsync -v $TARNAME $UPLOADUSER,xcat@web.sourceforge.net:/home/frs/project/x/xc/xcat/xcat/$REL.x_$OSNAME/ + i=0 + echo "Uploading $TARNAME to $FRS/xcat/$REL.x_$OSNAME/ ..." + while [ $((i++)) -lt 10 ] && ! rsync -v $TARNAME $UPLOADUSER,xcat@web.sourceforge.net:$FRS/xcat/$REL.x_$OSNAME/ do : ; done else - while ! rsync -v $TARNAME $UPLOADUSER,xcat@web.sourceforge.net:htdocs/$YUM/$REL/ + i=0 + echo "Uploading $TARNAME to $YUMDIR/$YUM/$REL/ ..." + while [ $((i++)) -lt 10 ] && ! rsync -v $TARNAME $UPLOADUSER,xcat@web.sourceforge.net:$YUMDIR/$YUM/$REL/ do : ; done fi @@ -401,7 +378,9 @@ if [ "$OSNAME" != "AIX" -a "$REL" = "devel" -a "$PROMOTE" != 1 ]; then rpm2cpio ../$XCATCORE/xCAT-client-*.$NOARCH.rpm | cpio -id '*.html' rpm2cpio ../$XCATCORE/perl-xCAT-*.$NOARCH.rpm | cpio -id '*.html' rpm2cpio ../$XCATCORE/xCAT-test-*.$NOARCH.rpm | cpio -id '*.html' - while ! rsync -rv opt/xcat/share/doc/man1 opt/xcat/share/doc/man3 opt/xcat/share/doc/man5 opt/xcat/share/doc/man7 opt/xcat/share/doc/man8 $UPLOADUSER,xcat@web.sourceforge.net:htdocs/ + i=0 + echo "Uploading man pages to htdocs/ ..." + while [ $((i++)) -lt 10 ] && ! rsync -rv opt/xcat/share/doc/man1 opt/xcat/share/doc/man3 opt/xcat/share/doc/man5 opt/xcat/share/doc/man7 opt/xcat/share/doc/man8 $UPLOADUSER,xcat@web.sourceforge.net:htdocs/ do : ; done cd .. fi diff --git a/builddep.sh b/builddep.sh index ea50d2657..6cc897eb9 100755 --- a/builddep.sh +++ b/builddep.sh @@ -15,19 +15,18 @@ # DESTDIR= - the dir to place the dep tarball in. The default is ../../../xcat-dep, relative # to where this script is located. # UP=0 or UP=1 - override the default upload behavior +# FRSYUM=1 - put the directory of individual rpms in the FRS area instead of project web area. # you can change this if you need to UPLOADUSER=bp-sawyers +FRS=/home/frs/project/x/xc/xcat OSNAME=$(uname) if [ "$OSNAME" == "AIX" ]; then GSA=/gsa/pokgsa/projects/x/xcat/build/aix/xcat-dep else GSA=/gsa/pokgsa/projects/x/xcat/build/linux/xcat-dep -fi - -if [ "$OSNAME" != "AIX" ]; then export HOME=/root # This is so rpm and gpg will know home, even in sudo fi @@ -37,6 +36,13 @@ for i in $*; do export $i done +# this is needed only when we are transitioning the yum over to frs +if [ "$FRSYUM" = 1 ]; then + YUMDIR=$FRS +else + YUMDIR=htdocs +fi + if [ ! -d $GSA ]; then echo "builddep: It appears that you do not have gsa installed to access the xcat-dep pkgs." exit 1; @@ -214,11 +220,12 @@ fi # Upload the dir structure to SF yum area. Currently we do not have it preserving permissions # because that gives errors when different users try to do it. -while ! rsync -rlv --delete * $UPLOADUSER,xcat@web.sourceforge.net:htdocs/$YUM/xcat-dep/ +i=0 +while [ $((i++)) -lt 10 ] && ! rsync -rlv --delete * $UPLOADUSER,xcat@web.sourceforge.net:$YUMDIR/$YUM/xcat-dep/ do : ; done #ssh jbjohnso@shell1.sf.net "cd /home/groups/x/xc/xcat/htdocs/yum/; rm -rf dep-snap; tar jxvf $DFNAME" # Upload the tarball to the SF FRS Area -#scp ../$DFNAME $UPLOADUSER@web.sourceforge.net:/home/frs/project/x/xc/xcat/xcat-dep/2.x_Linux/ -while ! rsync -v ../$DFNAME $UPLOADUSER,xcat@web.sourceforge.net:/home/frs/project/x/xc/xcat/xcat-dep/$FRSDIR/ +i=0 +while [ $((i++)) -lt 10 ] && ! rsync -v ../$DFNAME $UPLOADUSER,xcat@web.sourceforge.net:$FRS/xcat-dep/$FRSDIR/ do : ; done diff --git a/makeclientrpm b/makeclientrpm deleted file mode 100755 index e6223cd61..000000000 --- a/makeclientrpm +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/sh - -OSNAME=$(uname) -VER=`cat Version` - -if [ "$OSNAME" = "AIX" ] -then - - #source=$PWD - #cd /opt/freeware/src/packages/SOURCES - #rm -f xCAT-client-$VER; ln -s $source/xCAT-client xCAT-client-$VER - #rm -f /opt/freeware/src/packages/SRPMS/xCAT-client*rpm /opt/freeware/src/packages/RPMS/ppc/xCAT-client*rpm - #echo '.svn' > /tmp/xcat-excludes - #tar -X /tmp/xcat-excludes -cf xCAT-client-$VER.tar xCAT-client-$VER - #gzip -f /opt/freeware/src/packages/SOURCES/xCAT-client-$VER.tar - #cd $source/xCAT-client - #rpm -ba xCAT-client.spec - - source=/opt/freeware/src/packages - echo '.svn' > /tmp/xcat-excludes - tar -X /tmp/xcat-excludes -cf $source/SOURCES/xCAT-client-$VER.tar xCAT-client - gzip -f $source/SOURCES/xCAT-client-$VER.tar - rm -f $source/SRPMS/xCAT-client*rpm $source/RPMS/ppc/xCAT-client*rpm - rpm -ba xCAT-client/xCAT-client.spec - #rpm -ta $source/SOURCES/xCAT-client-$VER.tar.gz -else - rpmbuild --version > /dev/null - if [ $? -gt 0 ] - then - echo "Error: Is rpmbuild installed and working?" - exit 1 - fi - RPMROOT=`rpmbuild --eval '%_topdir' xCATsn/xCATsn.spec` - if [ $? -gt 0 ] - then - echo "Could not determine rpmbuild's root" - exit 1 - fi - echo "The location for rpm building is ${RPMROOT}" - - set -x - tar --exclude=.svn -czhf $RPMROOT/SOURCES/xCAT-client-$VER.tar.gz xCAT-client - rm -f $RPMROOT/SRPMS/xCAT-client-$VER*rpm $RPMROOT/RPMS/noarch/xCAT-client-$VER*rpm - rpmbuild -ta $RPMROOT/SOURCES/xCAT-client-$VER.tar.gz -fi diff --git a/makehpcrpm b/makehpcrpm deleted file mode 100755 index 6171aebb0..000000000 --- a/makehpcrpm +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/sh - -OSNAME=$(uname) -VER=`cat Version` - -if [ "$OSNAME" = "AIX" ] -then - - #echo '.svn' > /tmp/xcat-excludes - #tar -X /tmp/xcat-excludes -cf /opt/freeware/src/packages/SOURCES/xCAT-IBMhpc-$VER.tar xCAT-IBMhpc - #gzip -f /opt/freeware/src/packages/SOURCES/xCAT-IBMhpc-$VER.tar - #cd ./xCAT-IBMhpc - #rm -f /opt/freeware/src/packages/SRPMS/xCAT-IBMhpc-$VER*rpm /opt/freeware/src/packages/RPMS/ppc/xCAT-IBMhpc-$VER*rpm - #rpm -ba xCAT-IBMhpc.spec - #rpm -Uvh /opt/freeware/src/packages/RPMS/ppc/xCAT-IBMhpc-$VER*rpm - - source=/opt/freeware/src/packages - echo '.svn' > /tmp/xcat-excludes - tar -X /tmp/xcat-excludes -cf $source/SOURCES/xCAT-IBMhpc-$VER.tar xCAT-IBMhpc - gzip -f $source/SOURCES/xCAT-IBMhpc-$VER.tar - rm -f $source/SRPMS/xCAT-IBMhpc-$VER*rpm $source/RPMS/ppc/xCAT-IBMhpc-$VER*rpm - rpm -ba xCAT-IBMhpc/xCAT-IBMhpc.spec - #rpm -ta $source/SOURCES/xCAT-IBMhpc-$VER.tar.gz - -else - - if [ -f /etc/redhat-release ] - then - pkg="redhat" - else - pkg="packages" - fi - - tar --exclude .svn -czf /usr/src/$pkg/SOURCES/xCAT-IBMhpc-$VER.tar.gz xCAT-IBMhpc - rm -f /usr/src/$pkg/SRPMS/xCAT-IBMhpc-$VER*rpm /usr/src/$pkg/RPMS/noarch/xCAT-IBMhpc-$VER*rpm - rpmbuild -ta /usr/src/$pkg/SOURCES/xCAT-IBMhpc-$VER.tar.gz - #rpm -Uvh /usr/src/$pkg/RPMS/noarch/xCAT-IBMhpc-$VER*rpm -fi diff --git a/makenbrootrpm b/makenbrootrpm deleted file mode 100755 index e86153e74..000000000 --- a/makenbrootrpm +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh -VER=`cat Version` -rpmbuild --version > /dev/null -if [ $? -gt 0 ] -then - echo "Error: Is rpmbuild installed and working?" - exit 1 -fi -RPMROOT=`rpmbuild --eval '%_topdir' xCATsn/xCATsn.spec` -if [ $? -gt 0 ] -then - echo "Could not determine rpmbuild's root" - exit 1 -fi -echo "The location for rpm building is ${RPMROOT}" -cd `dirname $0`/xCAT-nbroot -tar --exclude .svn -czvf $RPMROOT/SOURCES/xcat-nbrootoverlay.tar.gz -C overlay/ . -#mv -f *.gz $RPMROOT/SOURCES -cp LICENSE.html $RPMROOT/BUILD -cp xcat-core-nbroot.spec $RPMROOT/SOURCES -cd - -rm -f $RPMROOT/SRPMS/xCAT-nbroot-$VER*rpm $RPMROOT/RPMS/*/xCAT-nbroot-$VER*rpm -rpmbuild -ba xCAT-nbroot/xcat-core-nbroot.spec --target $1 diff --git a/makeperlxcatrpm b/makeperlxcatrpm deleted file mode 100755 index 83956b812..000000000 --- a/makeperlxcatrpm +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/sh - -OSNAME=$(uname) -VER=`cat Version` - -if [ "$OSNAME" = "AIX" ] -then - - #source=$PWD - #cd /opt/freeware/src/packages/SOURCES - #rm -f perl-xCAT-$VER; ln -s $source/perl-xCAT perl-xCAT-$VER - #rm -f /opt/freeware/src/packages/SRPMS/perl-xCAT*rpm /opt/freeware/src/packages/RPMS/ppc/perl-xCAT*rpm - #echo '.svn' > /tmp/xcat-excludes - #tar -X /tmp/xcat-excludes -cf perl-xCAT-$VER.tar perl-xCAT-$VER - #gzip -f /opt/freeware/src/packages/SOURCES/perl-xCAT-$VER.tar - #cd $source/perl-xCAT - #rpm -ba perl-xCAT.spec - - svn info > perl-xCAT/.svninfo - source=/opt/freeware/src/packages - echo '.svn' > /tmp/xcat-excludes - tar -X /tmp/xcat-excludes -cf $source/SOURCES/perl-xCAT-$VER.tar perl-xCAT - gzip -f $source/SOURCES/perl-xCAT-$VER.tar - rm perl-xCAT/.svninfo - rm -f $source/SRPMS/perl-xCAT*rpm $source/RPMS/ppc/perl-xCAT*rpm - rpm -ba perl-xCAT/perl-xCAT.spec - #rpm -ta $source/SOURCES/perl-xCAT-$VER.tar.gz -else - - rpmbuild --version > /dev/null - if [ $? -gt 0 ] - then - echo "Error: Is rpmbuild installed and working?" - exit 1 - fi - RPMROOT=`rpmbuild --eval '%_topdir' xCATsn/xCATsn.spec` - if [ $? -gt 0 ] - then - echo "Could not determine rpmbuild's root" - exit 1 - fi - echo "The location for rpm building is ${RPMROOT}" - - set -x - - svn info > perl-xCAT/.svninfo - tar --exclude .svn -czhf $RPMROOT/SOURCES/perl-xCAT-$VER.tar.gz perl-xCAT; - rm perl-xCAT/.svninfo - rm -f $RPMROOT/SRPMS/perl-xCAT-$VER*rpm $RPMROOT/RPMS/noarch/perl-xCAT-$VER*rpm - rpmbuild -ta $RPMROOT/SOURCES/perl-xCAT-$VER.tar.gz - -fi diff --git a/makermcrpm b/makermcrpm deleted file mode 100755 index c0e4d6d7c..000000000 --- a/makermcrpm +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh -OSNAME=$(uname) -VER=`cat Version` - -if [ "$OSNAME" = "AIX" ] -then - #source=$PWD - #cd /opt/freeware/src/packages/SOURCES - #rm -f xCAT-rmc-$VER; ln -s $source/xCAT-rmc xCAT-rmc-$VER - #rm -f /opt/freeware/src/packages/SRPMS/xCAT-rmc*rpm /opt/freeware/src/packages/RPMS/ppc/xCAT-rmc*rpm - #echo '.svn' > /tmp/xcat-excludes - #tar -X /tmp/xcat-excludes -cf xCAT-rmc-$VER.tar xCAT-rmc-$VER - #gzip -f /opt/freeware/src/packages/SOURCES/xCAT-rmc-$VER.tar - #cd $source/xCAT-rmc - #rpm -ba xCAT-rmc.spec - #rpm -Uvh /opt/freeware/src/packages/RPMS/ppc/xCAT-rmc*rpm - - source=/opt/freeware/src/packages - echo '.svn' > /tmp/xcat-excludes - tar -X /tmp/xcat-excludes -cf $source/SOURCES/xCAT-rmc-$VER.tar xCAT-rmc - gzip -f $source/SOURCES/xCAT-rmc-$VER.tar - rm -f /opt/freeware/src/packages/SRPMS/xCAT-rmc*rpm /opt/freeware/src/packages/RPMS/ppc/xCAT-rmc*rpm - rpm -ba xCAT-rmc/xCAT-rmc.spec - #rpm -Uvh $source/RPMS/ppc/xCAT-rmc*rpm - -else - if [ -f /etc/redhat-release ] - then - pkg="redhat" - else - pkg="packages" - fi - - set -x - tar --exclude=.svn -czhf /usr/src/$pkg/SOURCES/xCAT-rmc-$VER.tar.gz xCAT-rmc - rm -f /usr/src/$pkg/SRPMS/xCAT-rmc-$VER*rpm /usr/src/$pkg/RPMS/noarch/xCAT-rmc-$VER*rpm - rpmbuild -ta /usr/src/$pkg/SOURCES/xCAT-rmc-$VER.tar.gz - #rpm -Uvh /usr/src/$pkg/RPMS/noarch/xCAT-rmc-$VER*rpm -fi diff --git a/makerpm b/makerpm new file mode 100755 index 000000000..9cc29dabc --- /dev/null +++ b/makerpm @@ -0,0 +1,172 @@ +# The shell is commented out so that it will run in bash on linux and ksh on aix +# !/bin/bash + +# Common script to make any one the xcat rpms. To build locally, run in the top dir of local svn repository, for example: +# ./makerpm xCAT-server +# ./makerpm xCAT x86_64 + +# set -x + +# Make one of the following rpms: perl-xCAT, xCAT-server, xCAT-client, xCAT-IBMhpc, xCAT-rmc, xCAT-UI, xCAT-test +function makenoarch { + RPMNAME=$1 + if [ "$OSNAME" = "AIX" ]; then + echo '.svn' > /tmp/xcat-excludes + tar -X /tmp/xcat-excludes -cf $RPMROOT/SOURCES/$RPMNAME-$VER.tar $RPMNAME + gzip -f $RPMROOT/SOURCES/$RPMNAME-$VER.tar + rm -f $RPMROOT/SRPMS/$RPMNAME-$VER*rpm $RPMROOT/RPMS/ppc/$RPMNAME-$VER*rpm + echo "Building $RPMROOT/RPMS/ppc/$RPMNAME-$VER-snap*.ppc.rpm ..." + rpm $QUIET -ba $RPMNAME/$RPMNAME.spec + RC=$? + else # linux + echo "Building $RPMROOT/RPMS/noarch/$RPMNAME-$VER-snap*.noarch.rpm ..." + tar --exclude .svn -czf $RPMROOT/SOURCES/$RPMNAME-$VER.tar.gz $RPMNAME + rm -f $RPMROOT/SRPMS/xCAT-server-$VER*rpm $RPMROOT/RPMS/noarch/$RPMNAME-$VER*rpm + rpmbuild $QUIET -ta $RPMROOT/SOURCES/$RPMNAME-$VER.tar.gz + RC=$? + fi +} + + + +# Make one of the following rpms: xCAT, xCATsn +function makexcat { + if [ "$OSNAME" != "AIX" -a -z "$2" ]; then + echo 'Usage: makerpm ' + exit 1 + fi + + RPMNAME="$1" + + if [ "$OSNAME" = "AIX" ]; then + source=/opt/freeware/src/packages + cd `dirname $0`/$RPMNAME + echo '.svn' > /tmp/xcat-excludes + echo 'upflag' >> /tmp/xcat-excludes + + if [ "$RPMNAME" = "xCAT" ]; then + tar -X /tmp/xcat-excludes -cf $RPMROOT/SOURCES/postscripts.tar postscripts LICENSE.html + gzip -f $RPMROOT/SOURCES/postscripts.tar + tar -X /tmp/xcat-excludes -cf $RPMROOT/SOURCES/templates.tar templates + gzip -f $RPMROOT/SOURCES/templates.tar + cp xcat.conf $RPMROOT/SOURCES + cp xCATMN $RPMROOT/SOURCES + else # xCATsn + tar -X /tmp/xcat-excludes -cf $RPMROOT/SOURCES/license.tar LICENSE.html + gzip -f $RPMROOT/SOURCES/license.tar + cp xCATSN $RPMROOT/SOURCES + fi + + rm -f $RPMROOT/SRPMS/$RPMNAME-$VER*rpm $RPMROOT/RPMS/ppc/$RPMNAME-$VER*rpm + cd - >/dev/null + + echo "Building $RPMROOT/RPMS/ppc/$RPMNAME-$VER-snap*.ppc.rpm ..." + rpm $QUIET -ba $RPMNAME/$RPMNAME.spec + RC=$? + else # linux + ARCH="$2" + cd `dirname $0`/$RPMNAME + + if [ "$RPMNAME" = "xCAT" ]; then + tar --exclude .svn -czf $RPMROOT/SOURCES/postscripts.tar.gz postscripts LICENSE.html + tar --exclude .svn -czf $RPMROOT/SOURCES/prescripts.tar.gz prescripts + tar --exclude .svn -czf $RPMROOT/SOURCES/templates.tar.gz templates + cp xcat.conf $RPMROOT/SOURCES + cp xCATMN $RPMROOT/SOURCES + else # xCATsn + tar --exclude .svn -czf $RPMROOT/SOURCES/license.tar.gz LICENSE.html + cp xcat.conf $RPMROOT/SOURCES + cp xCATSN $RPMROOT/SOURCES + fi + + cd - >/dev/null + rm -f $RPMROOT/SRPMS/$RPMNAME-$VER*rpm $RPMROOT/RPMS/$ARCH/$RPMNAME-$VER*rpm + echo "Building $RPMROOT/RPMS/$ARCH/$RPMNAME-$VER-snap*.$ARCH.rpm ..." + rpmbuild $QUIET -ba $RPMNAME/$RPMNAME.spec --target $ARCH + RC=$? + fi +} + + + +# Make the xCAT-nbroot-core rpm +function makenbroot { + if [ -z "$2" ]; then + echo 'Usage: makerpm xCAT-nbroot-core ' + exit 1 + fi + + DIR="xCAT-nbroot" + ARCH="$2" + RPMNAME="xCAT-nbroot-core-$ARCH" + SPEC="xcat-core-nbroot" + cd `dirname $0`/$DIR + tar --exclude .svn -czf $RPMROOT/SOURCES/xcat-nbrootoverlay.tar.gz -C overlay/ . + cp LICENSE.html $RPMROOT/BUILD + cp $SPEC.spec $RPMROOT/SOURCES + cd - >/dev/null + rm -f $RPMROOT/SRPMS/$RPMNAME-$VER*rpm $RPMROOT/RPMS/noarch/$RPMNAME-$VER*rpm + echo "Building $RPMROOT/RPMS/noarch/$RPMNAME-$VER-snap*.noarch.rpm ..." + rpmbuild $QUIET -ba $DIR/$SPEC.spec --target $ARCH +} + + + +# Make the xCAT-nbroot-core rpm +function makegenesis { + DIR="xCAT-nbroot2" + RPMNAME="$1" + cd `dirname $0`/$DIR + tar --exclude .svn -cjf $RPMROOT/SOURCES/$RPMNAME.tar.bz2 . + cp LICENSE.html $RPMROOT/BUILD + cp $RPMNAME.spec $RPMROOT/SOURCES + cd - >/dev/null + rm -f $RPMROOT/SRPMS/$RPMNAME-$VER*rpm $RPMROOT/RPMS/noarch/$RPMNAME-$VER*rpm + echo "Building $RPMROOT/RPMS/noarch/$RPMNAME-$VER-snap*.noarch.rpm ..." + rpmbuild $QUIET -ba $DIR/$RPMNAME.spec +} + + + +# Main code.... + +if [ -z "$1" ]; then + echo 'Usage: makerpm []' + exit 1 +fi + +OSNAME=$(uname) +VER=`cat Version` +if [ "$VERBOSE" = "1" -o "$VERBOSE" = "yes" ];then + QUIET="" +else + QUIET="--quiet" +fi + +if [ "$OSNAME" = "AIX" ]; then + RPMROOT=/opt/freeware/src/packages +else # linux + rpmbuild --version > /dev/null + if [ $? -gt 0 ]; then + echo "Error: rpmbuild does not appear to be installed or working." + exit 2 + fi + RPMROOT=`rpmbuild --eval '%_topdir' xCATsn/xCATsn.spec` + if [ $? -gt 0 ]; then + echo "Error: Could not determine rpmbuild's root directory." + exit 2 + fi +fi + + +if [ "$1" = "xCAT" -o "$1" = "xCATsn" ]; then + makexcat $* +elif [ "$1" = "xCAT-nbroot" -o "$1" = "xCAT-nbroot-core" ]; then + makenbroot xCAT-nbroot-core $2 +elif [ "$1" = "xCAT-genesis-builder" ]; then + makegenesis $* +else # must be one of the noarch rpms + makenoarch $* +fi + +exit $RC diff --git a/makeserverrpm b/makeserverrpm deleted file mode 100755 index 3a295f0a5..000000000 --- a/makeserverrpm +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/sh - -OSNAME=$(uname) -VER=`cat Version` - -if [ "$OSNAME" = "AIX" ] -then - - #echo '.svn' > /tmp/xcat-excludes - #tar -X /tmp/xcat-excludes -cf /opt/freeware/src/packages/SOURCES/xCAT-server-$VER.tar xCAT-server - #gzip -f /opt/freeware/src/packages/SOURCES/xCAT-server-$VER.tar - #cd ./xCAT-server - #rm -f /opt/freeware/src/packages/SRPMS/xCAT-server-$VER*rpm /opt/freeware/src/packages/RPMS/ppc/xCAT-server-$VER*rpm - #rpm -ba xCAT-server.spec - #rpm -Uvh /opt/freeware/src/packages/RPMS/ppc/xCAT-server-$VER*rpm - - source=/opt/freeware/src/packages - echo '.svn' > /tmp/xcat-excludes - tar -X /tmp/xcat-excludes -cf $source/SOURCES/xCAT-server-$VER.tar xCAT-server - gzip -f $source/SOURCES/xCAT-server-$VER.tar - rm -f $source/SRPMS/xCAT-server-$VER*rpm $source/RPMS/ppc/xCAT-server-$VER*rpm - rpm -ba xCAT-server/xCAT-server.spec - #rpm -ta $source/SOURCES/xCAT-server-$VER.tar.gz - -else - - rpmbuild --version > /dev/null - if [ $? -gt 0 ] - then - echo "Error: Is rpmbuild installed and working?" - exit 1 - fi - RPMROOT=`rpmbuild --eval '%_topdir' xCATsn/xCATsn.spec` - if [ $? -gt 0 ] - then - echo "Could not determine rpmbuild's root" - exit 1 - fi - echo "The location for rpm building is ${RPMROOT}" - - tar --exclude .svn -czf $RPMROOT/SOURCES/xCAT-server-$VER.tar.gz xCAT-server - rm -f $RPMROOT/SRPMS/xCAT-server-$VER*rpm $RPMROOT/RPMS/noarch/xCAT-server-$VER*rpm - rpmbuild -ta $RPMROOT/SOURCES/xCAT-server-$VER.tar.gz - #rpm -Uvh $RPMROOT/RPMS/noarch/xCAT-server-$VER*rpm - -fi diff --git a/maketestrpm b/maketestrpm deleted file mode 100755 index e57209832..000000000 --- a/maketestrpm +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/sh - -OSNAME=$(uname) -VER=`cat Version` - -if [ "$OSNAME" = "AIX" ] -then - source=/opt/freeware/src/packages - echo '.svn' > /tmp/xcat-excludes - tar -X /tmp/xcat-excludes -cf $source/SOURCES/xCAT-test-$VER.tar xCAT-test - gzip -f $source/SOURCES/xCAT-test-$VER.tar - rm -f $source/SRPMS/xCAT-test*rpm $source/RPMS/ppc/xCAT-test*rpm - rpm -ba xCAT-test/xCAT-test.spec - #rpm -ta $source/SOURCES/xCAT-test-$VER.tar.gz -else - if [ -f /etc/redhat-release ] - then - pkg="redhat" - else - pkg="packages" - fi - - set -x - tar --exclude=.svn -czhf /usr/src/$pkg/SOURCES/xCAT-test-$VER.tar.gz xCAT-test - rm -f /usr/src/$pkg/SRPMS/xCAT-test-$VER*rpm /usr/src/$pkg/RPMS/noarch/xCAT-test-$VER*rpm - rpmbuild -ta /usr/src/$pkg/SOURCES/xCAT-test-$VER.tar.gz -fi diff --git a/makeuirpm b/makeuirpm deleted file mode 100755 index 5d3595031..000000000 --- a/makeuirpm +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/sh - -OSNAME=$(uname) -VER=`cat Version` - -if [ "$OSNAME" = "AIX" ] -then - #echo '.svn' > /tmp/xcat-excludes - #tar -X /tmp/xcat-excludes -cf /opt/freeware/src/packages/SOURCES/xCAT-UI.tar xCAT-UI - #gzip -f /opt/freeware/src/packages/SOURCES/xCAT-UI.tar - #cd ./xCAT-UI - #rm -f /opt/freeware/src/packages/SRPMS/xCAT-UI*rpm /opt/freeware/src/packages/RPMS/ppc/xCAT-UI*rpm - #rpm -ba xCAT-UI.spec - #rpm -Uvh /opt/freeware/src/packages/RPMS/ppc/xCAT-UI*rpm - - source=/opt/freeware/src/packages - echo '.svn' > /tmp/xcat-excludes - tar -X /tmp/xcat-excludes -cf $source/SOURCES/xCAT-UI-$VER.tar xCAT-UI - gzip -f $source/SOURCES/xCAT-UI-$VER.tar - rm -f $source/SRPMS/xCAT-UI*rpm $source/RPMS/noarch/xCAT-UI*rpm - rpm -ba xCAT-UI/xCAT-UI.spec - #rpm -Uvh /opt/freeware/src/packages/RPMS/ppc/xCAT-UI*rpm - -else - if [ -f /etc/redhat-release ] - then - pkg="redhat" - else - pkg="packages" - fi - - set -x - tar --exclude=.svn -czf /usr/src/$pkg/SOURCES/xCAT-UI-$VER.tar.gz xCAT-UI - rm -f /usr/src/$pkg/SRPMS/xCAT-UI-$VER*rpm /usr/src/$pkg/RPMS/noarch/xCAT-UI-$VER*rpm - rpmbuild -ta /usr/src/$pkg/SOURCES/xCAT-UI-$VER.tar.gz - #rpm -Uvh /usr/src/$pkg/RPMS/noarch/xCAT-UI-$VER*rpm -fi diff --git a/makexcatrpm b/makexcatrpm deleted file mode 100755 index 8220fa2fd..000000000 --- a/makexcatrpm +++ /dev/null @@ -1,58 +0,0 @@ -#!/bin/sh - -OSNAME=$(uname) -VER=`cat Version` - -if [ "$OSNAME" = "AIX" ] -then - - cd `dirname $0`/xCAT - echo '.svn' > /tmp/xcat-excludes - echo 'upflag' >> /tmp/xcat-excludes - - tar -X /tmp/xcat-excludes -cf /opt/freeware/src/packages/SOURCES/postscripts.tar postscripts LICENSE.html - gzip -f /opt/freeware/src/packages/SOURCES/postscripts.tar - - tar -X /tmp/xcat-excludes -cf /opt/freeware/src/packages/SOURCES/templates.tar templates - gzip -f /opt/freeware/src/packages/SOURCES/templates.tar - - cp xcat.conf /opt/freeware/src/packages/SOURCES - cp xCATMN /opt/freeware/src/packages/SOURCES - - rm -f /opt/freeware/src/packages/SRPMS/xCAT-$VER*rpm /opt/freeware/src/packages/RPMS/ppc/xCAT-$VER*rpm - cd - - - rpm -ba xCAT/xCAT.spec - #rpm -Uvh /opt/freeware/src/packages/RPMS/ppc/xCAT-$VER*rpm - -else - - rpmbuild --version > /dev/null - if [ $? -gt 0 ] - then - echo "Error: Is rpmbuild installed and working?" - exit 1 - fi - RPMROOT=`rpmbuild --eval '%_topdir' xCATsn/xCATsn.spec` - if [ $? -gt 0 ] - then - echo "Could not determine rpmbuild's root" - exit 1 - fi - echo "The location for rpm building is ${RPMROOT}" - - cd `dirname $0`/xCAT - tar --exclude .svn -czf $RPMROOT/SOURCES/postscripts.tar.gz postscripts LICENSE.html - tar --exclude .svn -czf $RPMROOT/SOURCES/prescripts.tar.gz prescripts - tar --exclude .svn -czf $RPMROOT/SOURCES/templates.tar.gz templates - cp xcat.conf $RPMROOT/SOURCES - cp xCATMN $RPMROOT/SOURCES - cd - - rm -f $RPMROOT/SRPMS/xCAT-$VER*rpm $RPMROOT/RPMS/*/xCAT-$VER*rpm - if [ ! -z "$1" ]; then - rpmbuild -ba xCAT/xCAT.spec --target $1 - else - rpmbuild -ba xCAT/xCAT.spec - fi - -fi diff --git a/makexcatsnrpm b/makexcatsnrpm deleted file mode 100755 index 50341f04f..000000000 --- a/makexcatsnrpm +++ /dev/null @@ -1,54 +0,0 @@ -#!/bin/sh - -OSNAME=$(uname) -VER=`cat Version` - -if [ "$OSNAME" = "AIX" ] -then - - cd `dirname $0`/xCATsn - echo '.svn' > /tmp/xcat-excludes - echo 'upflag' >> /tmp/xcat-excludes - - tar -X /tmp/xcat-excludes -cf /opt/freeware/src/packages/SOURCES/license.tar LICENSE.html - gzip -f /opt/freeware/src/packages/SOURCES/license.tar - - #cp xcat.conf /opt/freeware/src/packages/SOURCES - #cp xCATSN /usr/src/$pkg/SOURCES - - cp xCATSN /opt/freeware/src/packages/SOURCES - rm -f /opt/freeware/src/packages/SRPMS/xCATsn-$VER*rpm /opt/freeware/src/packages/RPMS/ppc/xCATsn-$VER*rpm - cd - - - rpm -ba xCATsn/xCATsn.spec - #rpm -Uvh /opt/freeware/src/packages/RPMS/ppc/xCATsn-$VER*rpm - -else - - rpmbuild --version > /dev/null - if [ $? -gt 0 ] - then - echo "Error: Is rpmbuild installed and working?" - exit 1 - fi - RPMROOT=`rpmbuild --eval '%_topdir' xCATsn/xCATsn.spec` - if [ $? -gt 0 ] - then - echo "Could not determine rpmbuild's root" - exit 1 - fi - echo "The location for rpm building is ${RPMROOT}" - - cd `dirname $0`/xCATsn - tar --exclude .svn -czf $RPMROOT/SOURCES/license.tar.gz LICENSE.html - cp xcat.conf $RPMROOT/SOURCES - cp xCATSN $RPMROOT/SOURCES - rm -f $RPMROOT/SRPMS/xCATsn-$VER*rpm $RPMROOT/RPMS/*/xCATsn-$VER*rpm - cd - - if [ ! -z "$1" ]; then - rpmbuild -ba xCATsn/xCATsn.spec --target $1 - else - rpmbuild -ba xCATsn/xCATsn.spec - fi - -fi diff --git a/mkAIXdeps b/mkAIXdeps deleted file mode 100755 index 18234c26c..000000000 --- a/mkAIXdeps +++ /dev/null @@ -1,194 +0,0 @@ -#!/bin/sh - -# This script packages the AIX RPM dependencies -# - it should be run in the ../xcat/xcat-core/trunk directory -# - it puts everything in a aix-dep-snap subdirectory -# -# to upload deps gz file to FRS SourceForge location -#scp ./dep-aix-200909241259.tar.gz nott,xcat@web.sourceforge.net:/home/frs/project/x/xc/xcat/xcat-dep/2.x_AIX/ - -BLDTOP=`pwd` -RPMDIR=$BLDTOP/aix-dep-snap -VER=`cat $BLDTOP/Version` -DATE=`date +"%Y%m%d%H%M"` -#SNAP="snap$DATE" -SNAP="$DATE" - -if [ -d $RPMDIR ] -then - # clean it up - rm -f $RPMDIR/instoss - rm -f $RPMDIR/instmysql - rm -f $RPMDIR/README - rm -f $RPMDIR/*.rpm - rm -f $RPMDIR/*.bnd - rm -f $RPMDIR/flist - rm -f $RPMDIR/flist2 - rm -f $RPMDIR/*.gz -else - mkdir -p $RPMDIR -fi - -cd $RPMDIR - -# build tar.gz for default required RPMs and a second tar.gz for mysql - -# create a simple install script -echo "#!/bin/sh" > $RPMDIR/instoss -echo "# IBM(c) 2007 EPL license http://www.eclipse.org/legal/epl-v10.html" >> $RPMDIR/instoss -echo "# xCAT on AIX - prerequisite install script" >> $RPMDIR/instoss - -cp /opt/freeware/src/packages/RPMS/ppc/perl-DBI-1.55-1.aix5.3.ppc.rpm $RPMDIR/ -echo "rpm -Uvh perl-DBI-1.55-1.aix5.3.ppc.rpm" >> $RPMDIR/instoss - -cp /opt/freeware/src/packages/RPMS/ppc/bash-3.2-1.aix5.2.ppc.rpm $RPMDIR/ -echo "rpm -Uvh bash-3.2-1.aix5.2.ppc.rpm" >> $RPMDIR/instoss - -cp /opt/freeware/src/packages/RPMS/ppc/perl-DBD-SQLite-1.13-1.aix5.3.ppc.rpm $RPMDIR/ -echo "rpm -Uvh perl-DBD-SQLite-1.13-1.aix5.3.ppc.rpm" >> $RPMDIR/instoss - -cp /opt/freeware/src/packages/RPMS/ppc/popt-1.7-2.aix5.1.ppc.rpm $RPMDIR/ -echo "rpm -Uvh popt-1.7-2.aix5.1.ppc.rpm" >> $RPMDIR/instoss - -cp /opt/freeware/src/packages/RPMS/ppc/rsync-3.0.6-1.aix5.3.ppc.rpm $RPMDIR/ -echo "rpm -Uvh rsync-3.0.6-1.aix5.3.ppc.rpm" >> $RPMDIR/instoss - -cp /opt/freeware/src/packages/RPMS/ppc/wget-1.9.1-1.aix5.1.ppc.rpm $RPMDIR/ -echo "rpm -Uvh wget-1.9.1-1.aix5.1.ppc.rpm" >> $RPMDIR/instoss - -cp /opt/freeware/src/packages/RPMS/ppc/libxml2-2.6.21-4.aix5.2.ppc.rpm $RPMDIR/ -echo "rpm -Uvh libxml2-2.6.21-4.aix5.2.ppc.rpm" >> $RPMDIR/instoss - -cp /opt/freeware/src/packages/RPMS/ppc/curl-7.19.6-1ssl.aix5.3.ppc.rpm $RPMDIR/ -echo "rpm -Uvh curl-7.19.6-1ssl.aix5.3.ppc.rpm" >> $RPMDIR/instoss - -cp /opt/freeware/src/packages/RPMS/ppc/expat-2.0.1-2.aix5.1.ppc.rpm $RPMDIR/ -echo "rpm -Uvh expat-2.0.1-2.aix5.1.ppc.rpm" >> $RPMDIR/instoss - -cp /opt/freeware/src/packages/RPMS/ppc/conserver-8.1.16-2.aix5.3.ppc.rpm $RPMDIR/ -echo "rpm -Uvh conserver-8.1.16-2.aix5.3.ppc.rpm" >> $RPMDIR/instoss - -cp /opt/freeware/src/packages/RPMS/ppc/perl-Expect-1.21-1.aix5.3.ppc.rpm $RPMDIR/ -echo "rpm -Uvh perl-Expect-1.21-1.aix5.3.ppc.rpm" >> $RPMDIR/instoss - -cp /opt/freeware/src/packages/RPMS/ppc/perl-IO-Tty-1.07-1.aix5.3.ppc.rpm $RPMDIR/ -echo "rpm -Uvh perl-IO-Tty-1.07-1.aix5.3.ppc.rpm" >> $RPMDIR/instoss - -cp /opt/freeware/src/packages/RPMS/ppc/perl-IO-Stty-.02-1.aix5.3.ppc.rpm $RPMDIR/ -echo "rpm -Uvh perl-IO-Stty-.02-1.aix5.3.ppc.rpm" >> $RPMDIR/instoss - -cp /opt/freeware/src/packages/RPMS/ppc/perl-IO-Socket-SSL-1.06-1.aix5.3.ppc.rpm $RPMDIR/ -echo "rpm -Uvh perl-IO-Socket-SSL-1.06-1.aix5.3.ppc.rpm" >> $RPMDIR/instoss - -cp /opt/freeware/src/packages/RPMS/ppc/perl-Net_SSLeay.pm-1.30-1.aix5.3.ppc.rpm $RPMDIR/ -echo "rpm -Uvh perl-Net_SSLeay.pm-1.30-1.aix5.3.ppc.rpm" >> $RPMDIR/instoss - -cp /opt/freeware/src/packages/RPMS/ppc/perl-Digest-SHA1-2.11-1.aix5.3.ppc.rpm $RPMDIR/ -echo "rpm -Uvh perl-Digest-SHA1-2.11-1.aix5.3.ppc.rpm" >> $RPMDIR/instoss - -cp /opt/freeware/src/packages/RPMS/ppc/perl-Digest-SHA-5.48-1.aix5.3.ppc.rpm $RPMDIR/ -echo "rpm -Uvh perl-Digest-SHA-5.48-1.aix5.3.ppc.rpm" >> $RPMDIR/instoss - -cp /opt/freeware/src/packages/RPMS/ppc/perl-Digest-HMAC-1.01-1.aix5.3.ppc.rpm $RPMDIR/ -echo "rpm -Uvh perl-Digest-HMAC-1.01-1.aix5.3.ppc.rpm" >> $RPMDIR/instoss - -cp /opt/freeware/src/packages/RPMS/ppc/perl-Net-DNS-0.66-1.aix5.3.ppc.rpm $RPMDIR/ -echo "rpm -Uvh --nodeps perl-Net-DNS-0.66-1.aix5.3.ppc.rpm" >> $RPMDIR/instoss - -cp /opt/freeware/src/packages/RPMS/ppc/perl-Net-IP-1.25-1.aix5.3.ppc.rpm $RPMDIR/ -echo "rpm -Uvh perl-Net-IP-1.25-1.aix5.3.ppc.rpm" >> $RPMDIR/instoss - -cp /opt/freeware/src/packages/RPMS/ppc/perl-Digest-MD5-2.36-1.aix5.3.ppc.rpm $RPMDIR/ -echo "rpm -Uvh perl-Digest-MD5-2.36-1.aix5.3.ppc.rpm" >> $RPMDIR/instoss - -cp /opt/freeware/src/packages/RPMS/ppc/fping-2.4b2_to-1.aix5.3.ppc.rpm $RPMDIR/ -echo "rpm -Uvh fping-2.4b2_to-1.aix5.3.ppc.rpm" >> $RPMDIR/instoss - -cp /opt/freeware/src/packages/RPMS/ppc/openslp-xcat-1.2.1-1.aix5.3.ppc.rpm $RPMDIR/ -echo "rpm -Uvh openslp-xcat-1.2.1-1.aix5.3.ppc.rpm" >> $RPMDIR/instoss - -cp /opt/freeware/src/packages/RPMS/ppc/perl-Crypt-SSLeay-0.57-1.aix5.3.ppc.rpm $RPMDIR/ -echo "rpm -Uvh perl-Crypt-SSLeay-0.57-1.aix5.3.ppc.rpm" >> $RPMDIR/instoss - -cp /opt/freeware/src/packages/RPMS/ppc/perl-Net-Telnet-3.03-1.2.aix5.3.ppc.rpm $RPMDIR/ -echo "rpm -Uvh perl-Net-Telnet-3.03-1.2.aix5.3.ppc.rpm" >> $RPMDIR/instoss - -cp /opt/freeware/src/packages/RPMS/ppc/net-snmp-5.4.2.1-1.aix5.3.ppc.rpm $RPMDIR/ -echo "rpm -Uvh net-snmp-5.4.2.1-1.aix5.3.ppc.rpm" >> $RPMDIR/instoss - -cp /opt/freeware/src/packages/RPMS/ppc/net-snmp-devel-5.4.2.1-1.aix5.3.ppc.rpm $RPMDIR/ -echo "rpm -Uvh net-snmp-devel-5.4.2.1-1.aix5.3.ppc.rpm" >> $RPMDIR/instoss - -cp /opt/freeware/src/packages/RPMS/ppc/net-snmp-perl-5.4.2.1-1.aix5.3.ppc.rpm $RPMDIR/ -echo "rpm -Uvh net-snmp-perl-5.4.2.1-1.aix5.3.ppc.rpm" >> $RPMDIR/instoss - -cp /opt/freeware/src/packages/RPMS/ppc/unixODBC-2.2.15-32bit.aix5.3.ppc.rpm $RPMDIR/ -echo "rpm -Uvh unixODBC-2.2.15-32bit.aix5.3.ppc.rpm" >> $RPMDIR/instoss - -# get the OSS README file -cp ./../../../xcat-dep/trunk/AIX/README $RPMDIR/ - -# make the default required RPM tar.gz file -ls *.rpm > $RPMDIR/flist -echo "README" >> $RPMDIR/flist -echo "instoss" >> $RPMDIR/flist - -chmod 664 $RPMDIR/* -chmod +x $RPMDIR/instoss - -chgrp xcat * -chmod g+w * - -tar -cvf $RPMDIR/dep-aix-$SNAP.tar -L $RPMDIR/flist -gzip $RPMDIR/dep-aix-$SNAP.tar - -# make a second tar.gz for mysql packages -cp /opt/freeware/src/packages/RPMS/ppc/perl-DBD-mysql-4.007-1.aix5.3.ppc.rpm $RPMDIR/ -echo "rpm -Uvh perl-DBD-mysql-4.007-1.aix5.3.ppc.rpm" >> $RPMDIR/instmysql -echo "perl-DBD-mysql-4.007-1.aix5.3.ppc.rpm" > $RPMDIR/flist2 - -cp /opt/freeware/src/packages/RPMS/ppc/xcat-mysql-5.1-37.aix5.3.ppc.rpm $RPMDIR/ -echo "rpm -Uvh xcat-mysql-5.1-37.aix5.3.ppc.rpm" >> $RPMDIR/instmysql -echo "xcat-mysql-5.1-37.aix5.3.ppc.rpm" >> $RPMDIR/flist2 - -cp /opt/freeware/src/packages/RPMS/ppc/mysql-connector-odbc-3.51.27-32bit.aix5.3.ppc.rpm $RPMDIR/ -echo "mysql-connector-odbc-3.51.27-32bit.aix5.3.ppc.rpm" >> $RPMDIR/flist2 - - -chmod +x $RPMDIR/instmysql -echo "instmysql" >> $RPMDIR/flist2 -echo "README" >> $RPMDIR/flist2 - -chgrp xcat * -chmod g+w * - -tar -cvf $RPMDIR/xcat-mysql-$SNAP.tar -L $RPMDIR/flist2 -gzip $RPMDIR/xcat-mysql-$SNAP.tar - - -# create xcat-web-dep tar ball -cp /xcat-web-dep.tar.gz $RPMDIR/ - -# get the PHP5 readme file -#cd ./../../../xcat-dep/trunk/AIX/php5/ -#cp README $RPMDIR/web-dep.README -# make a third tar.gz for xcat-web-dep package -#cp *.rpm $RPMDIR/ -#ls *.rpm > $RPMDIR/flist3 -#cd $RPMDIR -#cp /opt/freeware/src/packages/RPMS/ppc/php-5.2.6-0.aix5.3.ppc.rpm $RPMDIR/ -#echo "rpm -Uvh php-5.2.6-0.aix5.3.ppc.rpm" >> $RPMDIR/instwebdep -#echo "php-5.2.6-0.aix5.3.ppc.rpm" >> $RPMDIR/flist3 - -#chmod +x $RPMDIR/instwebdep -#echo "instwebdep" >> $RPMDIR/flist3 -#echo "web-dep.README" >> $RPMDIR/flist3 -#tar -cvf $RPMDIR/xcat-web-dep-$SNAP.tar -L $RPMDIR/flist3 -#gzip $RPMDIR/xcat-web-dep-$SNAP.tar - -cd $RPMDIR - -chgrp xcat * -chmod g+w * - -exit 0; diff --git a/mkAIXsnap b/mkAIXsnap deleted file mode 100755 index 9008de3ba..000000000 --- a/mkAIXsnap +++ /dev/null @@ -1,138 +0,0 @@ -#!/bin/sh - -# mkAIXsnap -# -# This script can be used to extract, build, tar, compress and upload -# the latest xCAT for AIX snapshot 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 is added to the release download area -# - -BLDTOP=`pwd` -RPMDIR=$BLDTOP/aix-core-snap -VER=`cat Version` - -# 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 -# -#svn update | tee $BLDTOP/coresvnup -#svn update - -# create a simple install script -echo "# xCAT on AIX - install script" > $RPMDIR/instxcat - -# -# build the RPMs -# -./makeperlxcatrpm -mv /opt/freeware/src/packages/RPMS/ppc/perl-xCAT-$VER-*rpm $RPMDIR/ -echo "rpm -Uvh perl-xCAT-$VER-*rpm" >> $RPMDIR/instxcat - -./makeclientrpm -mv /opt/freeware/src/packages/RPMS/ppc/xCAT-client-$VER-*rpm $RPMDIR/ -echo "rpm -Uvh xCAT-client-$VER-*rpm" >> $RPMDIR/instxcat - -./makeserverrpm -mv /opt/freeware/src/packages/RPMS/ppc/xCAT-server-$VER-*rpm $RPMDIR/ -echo "rpm -Uvh --nodeps xCAT-server-$VER-*rpm" >> $RPMDIR/instxcat - -./makexcatrpm -mv /opt/freeware/src/packages/RPMS/ppc/xCAT-$VER-*rpm $RPMDIR/ -echo "rpm -Uvh xCAT-$VER-*rpm" >> $RPMDIR/instxcat - -./makexcatsnrpm -mv /opt/freeware/src/packages/RPMS/ppc/xCATsn-$VER-*rpm $RPMDIR/ - -./makermcrpm -mv /opt/freeware/src/packages/RPMS/ppc/xCAT-rmc-$VER-*rpm $RPMDIR/ -echo "rpm -Uvh xCAT-rmc-$VER-*rpm" >> $RPMDIR/instxcat - -./makeuirpm -mv /opt/freeware/src/packages/RPMS/noarch/xCAT-UI-$VER-*rpm $RPMDIR/ -#echo "rpm -Uvh xCAT-web-$VER-*rpm" >> $RPMDIR/instxcat - -# -# create the tar.gz file to upload -# -chmod +x $RPMDIR/instxcat - -# add to flist -echo "instxcat" > $RPMDIR/flist - -# add the service node bundle files -cp $BLDTOP/xCATaixSN.bnd $RPMDIR/ -cp $BLDTOP/xCATaixSN2.bnd $RPMDIR/ -cp $BLDTOP/xCATaixSSH.bnd $RPMDIR/ -cp $BLDTOP/xCATaixSSL.bnd $RPMDIR/ -echo "xCATaixSN.bnd" >> $RPMDIR/flist -echo "xCATaixSN2.bnd" >> $RPMDIR/flist -echo "xCATaixSSH.bnd" >> $RPMDIR/flist -echo "xCATaixSSL.bnd" >> $RPMDIR/flist - -cd $RPMDIR -ls *.rpm >> flist - -#TIME=`date +%Y%m%d%H%M` -tar -cvf core-aix-snap.tar -L flist -gzip core-aix-snap.tar - -chgrp xcat * -chmod g+w * - -# -# upload the tar file and RPMs to SourceForge -# -if [ $UPLOAD == 1 ]; then - - # clear out the old files - do this manually with winscp session! -#while ! rsync -urLv --delete aix-core-snap nott,xcat@web.sourceforge.net:/home/groups/x/xc/xcat/htdocs/aix/devel/ -#do : ; done - -# devel snapshot -scp *.rpm nott,xcat@web.sourceforge.net:/home/groups/x/xc/xcat/htdocs/aix/devel/core-snap -scp core-aix-snap.tar.gz nott,xcat@web.sourceforge.net:/home/groups/x/xc/xcat/htdocs/aix/devel - -# release snapshot - -scp *.rpm nott,xcat@web.sourceforge.net:/home/groups/x/xc/xcat/htdocs/aix/2.3/core-snap -scp core-aix-snap.tar.gz nott,xcat@web.sourceforge.net:/home/groups/x/xc/xcat/htdocs/aix/2.3 - - -# new release -scp core-aix-2.3.tar.gz nott,xcat@web.sourceforge.net:/home/frs/project/x/xc/xcat/xcat/2.3.x_AIX/ - - -# 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/ - -fi - -exit 0; diff --git a/perl-xCAT/perl-xCAT.spec b/perl-xCAT/perl-xCAT.spec index 1548e85d9..22b3335c0 100644 --- a/perl-xCAT/perl-xCAT.spec +++ b/perl-xCAT/perl-xCAT.spec @@ -50,7 +50,6 @@ mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/doc/man5 mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/man/man7 mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/doc/man7 -set +x cp -r xCAT/* $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT/ chmod 644 $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT/* chmod 755 $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT/data @@ -77,7 +76,6 @@ cp share/man/man7/* $RPM_BUILD_ROOT/%{prefix}/share/man/man7 chmod 644 $RPM_BUILD_ROOT/%{prefix}/share/man/man7/* cp share/doc/man7/* $RPM_BUILD_ROOT/%{prefix}/share/doc/man7 chmod 644 $RPM_BUILD_ROOT/%{prefix}/share/doc/man7/* -set -x %clean # This step does not happen until *after* the %files packaging below diff --git a/xCAT-IBMhpc/xCAT-IBMhpc.spec b/xCAT-IBMhpc/xCAT-IBMhpc.spec index 7ba078a79..c7886b1e4 100644 --- a/xCAT-IBMhpc/xCAT-IBMhpc.spec +++ b/xCAT-IBMhpc/xCAT-IBMhpc.spec @@ -43,8 +43,6 @@ mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/xcat/IBMhpc/loadl mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/xcat/IBMhpc/pe mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/xcat/IBMhpc/rsct -set +x - %ifos linux cp -a share/xcat/IBMhpc/* $RPM_BUILD_ROOT/%{prefix}/share/xcat/IBMhpc/ chmod -R 755 $RPM_BUILD_ROOT/%{prefix}/share/xcat/IBMhpc/* @@ -53,8 +51,6 @@ cp -hpR share/xcat/IBMhpc/* $RPM_BUILD_ROOT/%{prefix}/share/xcat/IBMhpc/ chmod -R 755 $RPM_BUILD_ROOT/%{prefix}/share/xcat/IBMhpc/* %endif -set -x - mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/doc/packages/xCAT-IBMhpc cp LICENSE.html $RPM_BUILD_ROOT/%{prefix}/share/doc/packages/xCAT-IBMhpc chmod 644 $RPM_BUILD_ROOT/%{prefix}/share/doc/packages/xCAT-IBMhpc/* diff --git a/xCAT-UI/xCAT-UI.spec b/xCAT-UI/xCAT-UI.spec index bd0d3e328..329c2daaa 100644 --- a/xCAT-UI/xCAT-UI.spec +++ b/xCAT-UI/xCAT-UI.spec @@ -75,10 +75,8 @@ IFS=' #********** Install ********** rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT%{prefix}/ui -set +x cp -r * $RPM_BUILD_ROOT%{prefix}/ui chmod 755 $RPM_BUILD_ROOT%{prefix}/ui/* -set -x %files %defattr(-,root,root) diff --git a/xCAT-client/xCAT-client.spec b/xCAT-client/xCAT-client.spec index 5ecec8053..5103998ec 100644 --- a/xCAT-client/xCAT-client.spec +++ b/xCAT-client/xCAT-client.spec @@ -59,7 +59,6 @@ mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/doc/man3 mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/doc/man5 mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/doc/man8 -set +x %ifos linux mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/xcat/rvid cp share/xcat/rvid/* $RPM_BUILD_ROOT/%{prefix}/share/xcat/rvid/ @@ -197,7 +196,6 @@ ln -sf ../bin/xcatclientnnr $RPM_BUILD_ROOT/%{prefix}/sbin/makeroutes ln -sf ../bin/xcatclientnnr $RPM_BUILD_ROOT/%{prefix}/sbin/snmove ln -sf ../bin/xcatclientnnr $RPM_BUILD_ROOT/%{prefix}/bin/lsxcatd ln -sf ../bin/xcatclient $RPM_BUILD_ROOT/%{prefix}/bin/postage -set -x %clean diff --git a/xCAT-nbroot/xcat-core-nbroot.spec b/xCAT-nbroot/xcat-core-nbroot.spec index 52d7cf0a8..9afcc5e73 100644 --- a/xCAT-nbroot/xcat-core-nbroot.spec +++ b/xCAT-nbroot/xcat-core-nbroot.spec @@ -42,7 +42,7 @@ All files included are as they were downloadable on 4/7/2007 rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/xcat/netboot/%{tarch}/nbroot cd $RPM_BUILD_ROOT/%{prefix}/share/xcat/netboot/%{tarch}/nbroot -tar zxvf %{SOURCE1} +tar zxf %{SOURCE1} chmod 755 etc/init.d/S40network bin/getdestiny bin/getdestiny.awk bin/getipmi bin/getipmi.awk cd - diff --git a/xCAT-rmc/xCAT-rmc.spec b/xCAT-rmc/xCAT-rmc.spec index bcb5aa15e..442c29983 100644 --- a/xCAT-rmc/xCAT-rmc.spec +++ b/xCAT-rmc/xCAT-rmc.spec @@ -34,7 +34,6 @@ mkdir -p $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_monitoring/rmc mkdir -p $RPM_BUILD_ROOT/%{prefix}/sbin/rmcmon mkdir -p $RPM_BUILD_ROOT/%{prefix}/lib/perl/TEAL -set +x cp plugin/* $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_monitoring cp -r resources $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_monitoring/rmc @@ -42,7 +41,6 @@ cp scripts/* $RPM_BUILD_ROOT/%{prefix}/sbin/rmcmon chmod 755 $RPM_BUILD_ROOT/%{prefix}/sbin/rmcmon/* cp lib/perl/TEAL/* $RPM_BUILD_ROOT/%{prefix}/lib/perl/TEAL -set -x %clean diff --git a/xCAT-server/xCAT-server.spec b/xCAT-server/xCAT-server.spec index aebb63f22..edab9ec9f 100644 --- a/xCAT-server/xCAT-server.spec +++ b/xCAT-server/xCAT-server.spec @@ -32,11 +32,23 @@ Provides: xCAT-server = %{epoch}:%{version} %description xCAT-server provides the core server and configuration management components of xCAT. This package should be installed on your management server +# %define VERBOSE %(if [ "$VERBOSE" = "1" -o "$VERBOSE" = "yes" ];then echo 1; else echo 0; fi) +# %define NOVERBOSE %(if [ "$VERBOSE" = "1" -o "$VERBOSE" = "yes" ];then echo 0; else echo 1; fi) +# %define NOVERBOSE %{?VERBOSE:1}%{!?VERBOSE:0} + %prep +# %if %NOVERBOSE +# echo NOVERBOSE is on +# set +x +# %elseif +# set -x +# %endif + %setup -q -n xCAT-server %build %install rm -rf $RPM_BUILD_ROOT +#cp foo bar mkdir -p $RPM_BUILD_ROOT/%{prefix}/sbin mkdir -p $RPM_BUILD_ROOT/%{prefix}/bin #mkdir -p $RPM_BUILD_ROOT/%{prefix}/rc.d @@ -60,7 +72,6 @@ mkdir -p $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_monitoring/pcp mkdir -p $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_schema/samples mkdir -p $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT -set +x %ifos linux cp -a share/xcat/install/* $RPM_BUILD_ROOT/%{prefix}/share/xcat/install/ cp -a share/xcat/netboot/* $RPM_BUILD_ROOT/%{prefix}/share/xcat/netboot/ @@ -70,7 +81,7 @@ cp -hpR share/xcat/netboot/* $RPM_BUILD_ROOT/%{prefix}/share/xcat/netboot/ %endif %ifos linux -pwd +# pwd cp -d sbin/* $RPM_BUILD_ROOT/%{prefix}/sbin chmod 755 $RPM_BUILD_ROOT/%{prefix}/sbin/* cp -d bin/* $RPM_BUILD_ROOT/%{prefix}/bin @@ -107,8 +118,6 @@ chmod 644 $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT/* chmod 755 $RPM_BUILD_ROOT/%{prefix}/share/xcat/netboot/sles/*.postinstall -set -x - # For now, don't ship these plugins - to avoid AIX dependency. %ifnos linux rm $RPM_BUILD_ROOT/%{prefix}/sbin/stopstartxcatd @@ -127,7 +136,6 @@ rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/activedirectory.pm cp lib/xcat/dsh/Context/* $RPM_BUILD_ROOT/%{prefix}/xdsh/Context chmod 644 $RPM_BUILD_ROOT/%{prefix}/xdsh/Context/* -set +x cp -r lib/xcat/monitoring/* $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_monitoring chmod 644 $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_monitoring/* @@ -141,7 +149,6 @@ chmod 644 $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_schema/* chmod 755 $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_schema/samples chmod 644 $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_schema/samples/* -set -x cp lib/xcat/shfunctions $RPM_BUILD_ROOT/%{prefix}/lib diff --git a/xCAT-test/xCAT-test.spec b/xCAT-test/xCAT-test.spec index a7c218f2e..5672ed42f 100644 --- a/xCAT-test/xCAT-test.spec +++ b/xCAT-test/xCAT-test.spec @@ -43,8 +43,6 @@ mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/xcat/tools/autotest mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/man/man1 mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/doc/man1 -set +x - cp xcattest $RPM_BUILD_ROOT/%{prefix}/bin chmod 755 $RPM_BUILD_ROOT/%{prefix}/bin/* @@ -55,7 +53,6 @@ cp share/doc/man1/* $RPM_BUILD_ROOT/%{prefix}/share/doc/man1 chmod 644 $RPM_BUILD_ROOT/%{prefix}/share/doc/man1/* cp -r autotest $RPM_BUILD_ROOT/%{prefix}/share/xcat/tools -set -x %clean diff --git a/xCAT/xCAT.spec b/xCAT/xCAT.spec index 9ae0bf891..73f4e0e31 100644 --- a/xCAT/xCAT.spec +++ b/xCAT/xCAT.spec @@ -111,9 +111,7 @@ tar -xf postscripts.tar rm postscripts.tar %endif -set +x chmod 755 $RPM_BUILD_ROOT/install/postscripts/* -set -x rm LICENSE.html mkdir -p postscripts/hostkeys