diff --git a/Version b/Version new file mode 100644 index 000000000..616187889 --- /dev/null +++ b/Version @@ -0,0 +1 @@ +2.2 \ No newline at end of file diff --git a/build-debs b/build-debs index 4c6e626f3..78ef1b0b6 100755 --- a/build-debs +++ b/build-debs @@ -2,7 +2,7 @@ # Accepts directories to build packages from on the commandline, but defaults # to building: perl-xCAT and xCAT-client -major="2.1" +major=`cat Version` lintian="" # TODO: lintian fails currently #lintian="--svn-lintian" diff --git a/buildcore.sh b/buildcore.sh index e873112f6..dd0173d25 100755 --- a/buildcore.sh +++ b/buildcore.sh @@ -1,5 +1,6 @@ #!/bin/sh cd `dirname $0` +VER=`cat Version` export BDIR=`pwd` GREP=grep export DESTDIR=`pwd`/core-snap @@ -21,87 +22,84 @@ mkdir -p $DESTDIR mkdir -p $SRCDIR cd xcat-core svn up > ../coresvnup -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 + +# 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 rm -f $DESTDIR/xCAT-client*rpm rm -f $SRCDIR/xCAT-client*rpm - mv /usr/src/$pkg/RPMS/noarch/xCAT-client-2.2*rpm $DESTDIR/ - mv /usr/src/$pkg/SRPMS/xCAT-client-2.2*rpm $SRCDIR/ + mv /usr/src/$pkg/RPMS/noarch/xCAT-client-$VER*rpm $DESTDIR/ + mv /usr/src/$pkg/SRPMS/xCAT-client-$VER*rpm $SRCDIR/ fi if $GREP perl-xCAT ../coresvnup; then UPLOAD=1 ./makeperlxcatrpm rm -f $DESTDIR/perl-xCAT*rpm rm -f $SRCDIR/perl-xCAT*rpm - mv /usr/src/$pkg/RPMS/noarch/perl-xCAT-2.2*rpm $DESTDIR/ - mv /usr/src/$pkg/SRPMS/perl-xCAT-2.2*rpm $SRCDIR/ + 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 +#svn revert perl-xCAT/xCAT/Utils.pm if $GREP xCAT-web ../coresvnup; then UPLOAD=1 rm -f $DESTDIR/xCAT-web* rm -f $SRCDIR/xCAT-web* ./makewebrpm - mv /usr/src/$pkg/RPMS/noarch/xCAT-web-2.2*rpm $DESTDIR - mv /usr/src/$pkg/SRPMS/xCAT-web-2.2*rpm $SRCDIR + mv /usr/src/$pkg/RPMS/noarch/xCAT-web-$VER*rpm $DESTDIR + mv /usr/src/$pkg/SRPMS/xCAT-web-$VER*rpm $SRCDIR fi if $GREP xCAT-server ../coresvnup; then UPLOAD=1 ./makeserverrpm rm -f $DESTDIR/xCAT-server*rpm rm -f $SRCDIR/xCAT-server*rpm - mv /usr/src/$pkg/RPMS/noarch/xCAT-server-2.2*rpm $DESTDIR - mv /usr/src/$pkg/SRPMS/xCAT-server-2.2*rpm $SRCDIR + mv /usr/src/$pkg/RPMS/noarch/xCAT-server-$VER*rpm $DESTDIR + mv /usr/src/$pkg/SRPMS/xCAT-server-$VER*rpm $SRCDIR fi if $GREP xCAT-nbroot ../coresvnup; then UPLOAD=1 - cd xCAT-nbroot - ./mkrpm x86_64 - ./mkrpm ppc64 - ./mkrpm x86 + ./makenbrootrpm x86_64 + ./makenbrootrpm ppc64 + ./makenbrootrpm x86 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 - cd .. fi if $GREP "U xCATsn/" ../coresvnup || $GREP "A xCATsn/" ../coresvnup; then UPLOAD=1 - cd xCATsn - rm -f $DESTDIR/xCATsn-2.2*rpm - rm -f $SRCDIR/xCATsn-2.2*rpm - ./mkrpm x86_64 - mv /usr/src/$pkg/RPMS/*/xCATsn-2*rpm $DESTDIR - mv /usr/src/$pkg/SRPMS/xCATsn-2*rpm $SRCDIR - ./mkrpm i386 - mv /usr/src/$pkg/RPMS/*/xCATsn-2*rpm $DESTDIR - mv /usr/src/$pkg/SRPMS/xCATsn-2*rpm $SRCDIR - ./mkrpm ppc64 - mv /usr/src/$pkg/RPMS/*/xCATsn-2*rpm $DESTDIR - mv /usr/src/$pkg/SRPMS/xCATsn-2*rpm $SRCDIR - cd .. + 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 fi if $GREP "U xCAT/" ../coresvnup || $GREP "A xCAT/" ../coresvnup; then UPLOAD=1 - cd xCAT - rm -f $DESTDIR/xCAT-2.2*rpm - rm -f $SRCDIR/xCAT-2.2*rpm - ./mkrpm x86_64 - mv /usr/src/$pkg/RPMS/*/xCAT-2*rpm $DESTDIR - mv /usr/src/$pkg/SRPMS/xCAT-2*rpm $SRCDIR - ./mkrpm ppc64 - mv /usr/src/$pkg/RPMS/*/xCAT-2*rpm $DESTDIR - ./mkrpm i386 - mv /usr/src/$pkg/RPMS/*/xCAT-2*rpm $DESTDIR - cd .. + 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 fi if [ $UPLOAD == 0 ]; then echo "Nothing new detected" diff --git a/makeclientrpm b/makeclientrpm index 65c77ae6e..fab72e0ea 100755 --- a/makeclientrpm +++ b/makeclientrpm @@ -1,20 +1,28 @@ #!/bin/sh OSNAME=$(uname) -VER="2.2" +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 + #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 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 + 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 if [ -f /etc/redhat-release ] then @@ -22,14 +30,9 @@ else else pkg="packages" fi - source=$PWD - # Trying to avoid having the version on the xCAT-client dir name in svn set -x - cd /usr/src/$pkg/SOURCES - rm -f xCAT-client-$VER; ln -s $source/xCAT-client xCAT-client-$VER # have to make tar think it is in xCAT-client-2.1 - rm -f xCAT-client-$VER.tar.gz - tar -czhf xCAT-client-$VER.tar.gz --exclude=.svn --exclude=.project xCAT-client-$VER + tar --exclude=.svn -czhf /usr/src/$pkg/SOURCES/xCAT-client-$VER.tar.gz xCAT-client rm -f /usr/src/$pkg/SRPMS/xCAT-client-$VER*rpm /usr/src/$pkg/RPMS/noarch/xCAT-client-$VER*rpm - rpmbuild -ta xCAT-client-$VER.tar.gz + rpmbuild -ta /usr/src/$pkg/SOURCES/xCAT-client-$VER.tar.gz fi diff --git a/makenbrootrpm b/makenbrootrpm new file mode 100755 index 000000000..a4e7bdcb2 --- /dev/null +++ b/makenbrootrpm @@ -0,0 +1,16 @@ +#!/bin/sh +VER=`cat Version` +if [ -f /etc/redhat-release ] +then + pkg="redhat" +else + pkg="packages" +fi +cd `dirname $0`/xCAT-nbroot +tar --exclude .svn -czvf /usr/src/$pkg/SOURCES/xcat-nbrootoverlay.tar.gz -C overlay/ . +#mv -f *.gz /usr/src/$pkg/SOURCES +cp LICENSE.html /usr/src/$pkg/BUILD +cp xcat-core-nbroot.spec /usr/src/$pkg/SOURCES +cd - +rm -f /usr/src/$pkg/SRPMS/xCAT-nbroot-$VER*rpm /usr/src/$pkg/RPMS/*/xCAT-nbroot-$VER*rpm +rpmbuild -ba xCAT-nbroot/xcat-core-nbroot.spec --target $1 diff --git a/makeperlxcatrpm b/makeperlxcatrpm index 219906845..2e5e0b4f6 100755 --- a/makeperlxcatrpm +++ b/makeperlxcatrpm @@ -1,20 +1,28 @@ #!/bin/sh OSNAME=$(uname) -VER="2.2" +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 + #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 + + source=/opt/freeware/src/packages + rm -f $source/SRPMS/perl-xCAT*rpm $source/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 + tar -X /tmp/xcat-excludes -cf $source/perl-xCAT-$VER.tar perl-xCAT + gzip -f $source/SOURCES/perl-xCAT-$VER.tar + rpm -ba perl-xCAT/perl-xCAT.spec + #rpm -ta $source/SOURCES/perl-xCAT-$VER.tar.gz else if [ -f /etc/redhat-release ] then @@ -22,14 +30,11 @@ else else pkg="packages" fi - source=$PWD - # Trying to avoid having the version on the perl-xCAT dir name in svn set -x - cd /usr/src/$pkg/SOURCES - rm -f perl-xCAT-$VER; ln -s $source/perl-xCAT perl-xCAT-$VER # have to make tar think it is in perl-xCAT-2.1 - rm -f perl-xCAT-$VER.tar.gz - tar -czhf perl-xCAT-$VER.tar.gz --exclude=.svn --exclude=.project perl-xCAT-$VER + + tar --exclude .svn -czhf /usr/src/$pkg/SOURCES/perl-xCAT-$VER.tar.gz perl-xCAT; rm -f /usr/src/$pkg/SRPMS/perl-xCAT-$VER*rpm /usr/src/$pkg/RPMS/noarch/perl-xCAT-$VER*rpm - rpmbuild -ta perl-xCAT-$VER.tar.gz + rpmbuild -ta /usr/src/$pkg/SOURCES/perl-xCAT-$VER.tar.gz + fi diff --git a/makermcrpm b/makermcrpm index b2ad7829d..c0e4d6d7c 100755 --- a/makermcrpm +++ b/makermcrpm @@ -1,19 +1,27 @@ #!/bin/sh OSNAME=$(uname) -version='2.2' +VER=`cat Version` if [ "$OSNAME" = "AIX" ] then - source=$PWD - cd /opt/freeware/src/packages/SOURCES - rm -f xCAT-rmc-$version; ln -s $source/xCAT-rmc xCAT-rmc-$version - 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-$version.tar xCAT-rmc-$version - gzip -f /opt/freeware/src/packages/SOURCES/xCAT-rmc-$version.tar - cd $source/xCAT-rmc - rpm -ba xCAT-rmc.spec + #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 ] @@ -22,15 +30,10 @@ else else pkg="packages" fi - source=$PWD - # Trying to avoid having the version on the xCAT-rmc dir name in svn set -x - cd /usr/src/$pkg/SOURCES - rm -f xCAT-rmc-$version; ln -s $source/xCAT-rmc xCAT-rmc-$version # have to make tar think it is in xCAT-rmc-2.0 - rm -f xCAT-rmc-$version.tar.gz - tar -czhf xCAT-rmc-$version.tar.gz --exclude=.svn --exclude=.project xCAT-rmc-$version - rm -f /usr/src/$pkg/SRPMS/xCAT-rmc-$version*rpm /usr/src/$pkg/RPMS/noarch/xCAT-rmc-$version*rpm - rpmbuild -ta xCAT-rmc-$version.tar.gz - #rpm -Uvh /usr/src/$pkg/RPMS/noarch/xCAT-rmc-$version*rpm + 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/makeserverrpm b/makeserverrpm index 0a4c60144..6f8a529dd 100755 --- a/makeserverrpm +++ b/makeserverrpm @@ -1,19 +1,27 @@ #!/bin/sh OSNAME=$(uname) -VER=2.2 +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 + #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 if [ -f /etc/redhat-release ] @@ -23,8 +31,8 @@ else pkg="packages" fi - tar --exclude .svn -czf /usr/src/$pkg/SOURCES/xCAT-server-$VER.tar.gz xCAT-server; + tar --exclude .svn -czf /usr/src/$pkg/SOURCES/xCAT-server-$VER.tar.gz xCAT-server rm -f /usr/src/$pkg/SRPMS/xCAT-server-$VER*rpm /usr/src/$pkg/RPMS/noarch/xCAT-server-$VER*rpm - rpmbuild -ta /usr/src/$pkg/SOURCES/xCAT-server-$VER.tar.gz ; + rpmbuild -ta /usr/src/$pkg/SOURCES/xCAT-server-$VER.tar.gz #rpm -Uvh /usr/src/$pkg/RPMS/noarch/xCAT-server-$VER*rpm fi diff --git a/makewebrpm b/makewebrpm index d79cec54d..9b6b4d38d 100755 --- a/makewebrpm +++ b/makewebrpm @@ -1,16 +1,24 @@ #!/bin/sh OSNAME=$(uname) -version='2.2' +VER=`cat Version` if [ "$OSNAME" = "AIX" ] then + #echo '.svn' > /tmp/xcat-excludes + #tar -X /tmp/xcat-excludes -cf /opt/freeware/src/packages/SOURCES/xCAT-web.tar xCAT-web + #gzip -f /opt/freeware/src/packages/SOURCES/xCAT-web.tar + #cd ./xCAT-web + #rm -f /opt/freeware/src/packages/SRPMS/xCAT-web*rpm /opt/freeware/src/packages/RPMS/ppc/xCAT-web*rpm + #rpm -ba xCAT-web.spec + #rpm -Uvh /opt/freeware/src/packages/RPMS/ppc/xCAT-web*rpm + + source=/opt/freeware/src/packages echo '.svn' > /tmp/xcat-excludes - tar -X /tmp/xcat-excludes -cf /opt/freeware/src/packages/SOURCES/xCAT-web.tar xCAT-web - gzip -f /opt/freeware/src/packages/SOURCES/xCAT-web.tar - cd ./xCAT-web - rm -f /opt/freeware/src/packages/SRPMS/xCAT-web*rpm /opt/freeware/src/packages/RPMS/ppc/xCAT-web*rpm - rpm -ba xCAT-web.spec + tar -X /tmp/xcat-excludes -cf $source/SOURCES/xCAT-web-$VER.tar xCAT-web + gzip -f $source/SOURCES/xCAT-web-$VER.tar + rm -f $source/SRPMS/xCAT-web*rpm $source/RPMS/noarch/xCAT-web*rpm + rpm -ba xCAT-web/xCAT-web.spec #rpm -Uvh /opt/freeware/src/packages/RPMS/ppc/xCAT-web*rpm else @@ -20,15 +28,10 @@ else else pkg="packages" fi - source=$PWD - # Trying to avoid having the version # (2.0) on the xCAT-web dir name in svn set -x - cd /usr/src/$pkg/SOURCES - rm -f xCAT-web-$version; ln -s $source/xCAT-web xCAT-web-$version # have to make tar think it is in xCAT-web-2.0 - rm -f xCAT-web-$version.tar.gz - tar -czhf xCAT-web-$version.tar.gz --exclude=.svn --exclude=.project xCAT-web-$version - rm -f /usr/src/$pkg/SRPMS/xCAT-web-$version*rpm /usr/src/$pkg/RPMS/noarch/xCAT-web-$version*rpm - rpmbuild -ta xCAT-web-$version.tar.gz - #rpm -Uvh /usr/src/$pkg/RPMS/noarch/xCAT-web-$version*rpm + tar --exclude=.svn -czf /usr/src/$pkg/SOURCES/xCAT-web-$VER.tar.gz xCAT-web + rm -f /usr/src/$pkg/SRPMS/xCAT-web-$VER*rpm /usr/src/$pkg/RPMS/noarch/xCAT-web-$VER*rpm + rpmbuild -ta /usr/src/$pkg/SOURCES/xCAT-web-$VER.tar.gz + #rpm -Uvh /usr/src/$pkg/RPMS/noarch/xCAT-web-$VER*rpm fi diff --git a/xCAT/mkrpm b/makexcatrpm similarity index 87% rename from xCAT/mkrpm rename to makexcatrpm index 79ae7c75f..495fbf58e 100755 --- a/xCAT/mkrpm +++ b/makexcatrpm @@ -1,12 +1,12 @@ #!/bin/sh OSNAME=$(uname) -VER=2.2 +VER=`cat Version` if [ "$OSNAME" = "AIX" ] then - cd `dirname $0` + cd `dirname $0`/xCAT echo '.svn' > /tmp/xcat-excludes echo 'upflag' >> /tmp/xcat-excludes @@ -19,13 +19,11 @@ then cp xcat.conf /opt/freeware/src/packages/SOURCES rm -f /opt/freeware/src/packages/SRPMS/xCAT-$VER*rpm /opt/freeware/src/packages/RPMS/ppc/xCAT-$VER*rpm - - rpm -ba xCAT.spec - - # don't install - #rpm -Uvh /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 if [ -f /etc/redhat-release ] @@ -35,15 +33,15 @@ else pkg="packages" fi - cd `dirname $0` + cd `dirname $0`/xCAT tar --exclude .svn -czf /usr/src/$pkg/SOURCES/postscripts.tar.gz postscripts LICENSE.html tar --exclude .svn -czf /usr/src/$pkg/SOURCES/templates.tar.gz templates cp xcat.conf /usr/src/$pkg/SOURCES + cd - rm -f /usr/src/$pkg/SRPMS/xCAT-$VER*rpm /usr/src/$pkg/RPMS/*/xCAT-$VER*rpm if [ ! -z "$1" ]; then - rpmbuild -ba xCAT.spec --target $1 + rpmbuild -ba xCAT/xCAT.spec --target $1 else - rpmbuild -ba xCAT.spec + rpmbuild -ba xCAT/xCAT.spec fi - cd - fi diff --git a/xCATsn/mkrpm b/makexcatsnrpm similarity index 82% rename from xCATsn/mkrpm rename to makexcatsnrpm index 9c287fde2..d893db0ca 100755 --- a/xCATsn/mkrpm +++ b/makexcatsnrpm @@ -1,11 +1,11 @@ #!/bin/sh OSNAME=$(uname) -VER=2.2 +VER=`cat Version` if [ "$OSNAME" = "AIX" ] then - cd `dirname $0` + cd `dirname $0`/xCATsn echo '.svn' > /tmp/xcat-excludes tar -X /tmp/xcat-excludes -cf /opt/freeware/src/packages/SOURCES/license.tar LICENSE.html @@ -13,13 +13,11 @@ then cp xcat.conf /opt/freeware/src/packages/SOURCES rm -f /opt/freeware/src/packages/SRPMS/xCATsn-$VER*rpm /opt/freeware/src/packages/RPMS/ppc/xCATsn-$VER*rpm - - rpm -ba xCATsn.spec - - # don't install - #rpm -Uvh /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 if [ -f /etc/redhat-release ] @@ -29,14 +27,14 @@ else pkg="packages" fi - cd `dirname $0` + cd `dirname $0`/xCATsn tar --exclude .svn -czf /usr/src/$pkg/SOURCES/license.tar.gz LICENSE.html cp xcat.conf /usr/src/$pkg/SOURCES rm -f /usr/src/$pkg/SRPMS/xCATsn-$VER*rpm /usr/src/$pkg/RPMS/*/xCATsn-$VER*rpm - if [ ! -z "$1" ]; then - rpmbuild -ba xCATsn.spec --target $1 - else - rpmbuild -ba xCATsn.spec - fi cd - + if [ ! -z "$1" ]; then + rpmbuild -ba xCATsn/xCATsn.spec --target $1 + else + rpmbuild -ba xCATsn/xCATsn.spec + fi fi diff --git a/mkAIXsnap b/mkAIXsnap index 183b03356..86d594076 100755 --- a/mkAIXsnap +++ b/mkAIXsnap @@ -23,6 +23,8 @@ # BLDTOP=`pwd` RPMDIR=$BLDTOP/aix-core-snap +VER=`cat Version` + # upload to SourceForge ?? UPLOAD=0 @@ -54,25 +56,24 @@ echo "# xCAT on AIX - install script" > $RPMDIR/instxcat # build the RPMs # ./makeperlxcatrpm -mv /opt/freeware/src/packages/RPMS/ppc/perl-xCAT-2.*rpm $RPMDIR/ -echo "rpm -Uvh perl-xCAT-2.*rpm" >> $RPMDIR/instxcat +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-2.*rpm $RPMDIR/ -echo "rpm -Uvh xCAT-client-2.*rpm" >> $RPMDIR/instxcat +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-2.*rpm $RPMDIR/ -echo "rpm -Uvh xCAT-server-2.*rpm" >> $RPMDIR/instxcat +mv /opt/freeware/src/packages/RPMS/ppc/xCAT-server-$VER.*rpm $RPMDIR/ +echo "rpm -Uvh xCAT-server-$VER.*rpm" >> $RPMDIR/instxcat ./makermcrpm -mv /opt/freeware/src/packages/RPMS/ppc/xCAT-rmc-2.*rpm $RPMDIR/ -echo "rpm -Uvh xCAT-rmc-2.*rpm" >> $RPMDIR/instxcat +mv /opt/freeware/src/packages/RPMS/ppc/xCAT-rmc-$VER.*rpm $RPMDIR/ +echo "rpm -Uvh xCAT-rmc-$VER.*rpm" >> $RPMDIR/instxcat -cd ./xCAT -./mkrpm -mv /opt/freeware/src/packages/RPMS/ppc/xCAT-2.*rpm $RPMDIR/ -echo "rpm -Uvh xCAT-2.*rpm" >> $RPMDIR/instxcat +./makexcatrpm +mv /opt/freeware/src/packages/RPMS/ppc/xCAT-$VER.*rpm $RPMDIR/ +echo "rpm -Uvh xCAT-$VER.*rpm" >> $RPMDIR/instxcat # # create the tar.gz file to upload @@ -107,7 +108,7 @@ if [ $UPLOAD == 1 ]; then scp core-aix-snap.tar.gz nott,xcat@web.sourceforge.net:/home/groups/x/xc/xcat/htdocs/aix/devel # for dep-aix -#scp dep-aix-2.1.tar.gz nott,xcat@web.sourceforge.net:upload/ +#scp dep-aix-$VER.tar.gz nott,xcat@web.sourceforge.net:upload/ fi diff --git a/perl-xCAT/modifyUtils b/perl-xCAT/modifyUtils new file mode 100755 index 000000000..bd94e8764 --- /dev/null +++ b/perl-xCAT/modifyUtils @@ -0,0 +1,21 @@ +#!/bin/sh +# Put the version, svn revision #, and build date into the Version function in Utils.pm + +if [ -z "$1" ] + then + echo "modifyUtils: Error: must specify the xCAT version as an argument!" + exit + fi +VER=$1 + +SVNINFO=`svn info 2>/dev/null|grep Revision` +#/bin/echo -e $SVNINFO +if [ $? -eq 0 ] + then + SVNREF="svn r"`echo $SVNINFO|awk '{print $2}'`", " + else + SVNREF="" + fi +BUILDDATE=`date` +#echo ". '(${SVNREF}built $BUILDDATE)'" +sed -i -e s/#XCATVERSIONSUBHERE/". '$VER'"/ -e s/#XCATSVNBUILDSUBHERE/". ' (${SVNREF}built $BUILDDATE)'"/ xCAT/Utils.pm diff --git a/perl-xCAT/perl-xCAT.spec b/perl-xCAT/perl-xCAT.spec index 935c126db..0aaf023f9 100644 --- a/perl-xCAT/perl-xCAT.spec +++ b/perl-xCAT/perl-xCAT.spec @@ -1,11 +1,11 @@ Summary: xCAT perl libraries Name: perl-xCAT -Version: 2.2 +Version: %(cat Version) Release: snap%(date +"%Y%m%d%H%M") Epoch: 4 License: EPL Group: System Environment/Libraries -Source: perl-xCAT-2.2.tar.gz +Source: perl-xCAT-%(cat Version).tar.gz Packager: IBM Corp. Vendor: IBM Corp. Distribution: %{?_distribution:%{_distribution}}%{!?_distribution:%{_vendor}} @@ -22,12 +22,15 @@ Provides perl xCAT libraries for core functionality. Required for all xCAT inst Includes xCAT::Table, xCAT::NodeRange, among others. %prep -%setup -q +%setup -q -n perl-xCAT %build # This phase is done in (for RH): /usr/src/redhat/BUILD/perl-xCAT-2.0 # All of the tarball source has been unpacked there and is in the same file structure # as it is in svn. +# Modify the Version() function in xCAT/Utils.pm to automatically have the correct version +./modifyUtils %{version} + # Build the pod version of the man pages for each DB table. It puts them in the man5 and man7 subdirs. # Then convert the pods to man pages and html pages. ./db2man diff --git a/perl-xCAT/xCAT/Utils.pm b/perl-xCAT/xCAT/Utils.pm index f193b1ddc..2662e28bf 100644 --- a/perl-xCAT/xCAT/Utils.pm +++ b/perl-xCAT/xCAT/Utils.pm @@ -260,9 +260,9 @@ sub Version #The following tag tells the build script where to append build info my $version=shift; if ($version eq 'short') { - $version = "2.2"; + $version = '' #XCATVERSIONSUBHERE ; } else { - $version = "Version 2.2"#XCATSVNBUILDSUBHERE + $version = 'Version ' #XCATVERSIONSUBHERE #XCATSVNBUILDSUBHERE ; } ; return $version; diff --git a/xCAT-client/pods/man8/copycds.8.pod b/xCAT-client/pods/man8/copycds.8.pod index 8f8752cc7..df2c1994a 100644 --- a/xCAT-client/pods/man8/copycds.8.pod +++ b/xCAT-client/pods/man8/copycds.8.pod @@ -1,19 +1,63 @@ =head1 NAME -B - Copies Linux distributions and service levels from CDs to install directory. +B - Copies Linux distributions and service levels from CDs/DVDs to install directory. =head1 SYNOPSIS -B [{B<-n|--name|--osver>}=I] [{B<-a|--arch>}=I] I<1st.iso [2nd.iso ...]> +B [{B<-n|--name|--osver>}=I] [{B<-a|--arch>}=I] {I|I} ... B [B<-h>|B<--help>] =head1 DESCRIPTION -The copycds command copies all contents of Distribution CDs or Service Pack CDs to the install directory as -designated in the B table attribute: B. +The B command copies all contents of Distribution CDs/DVDs or Service Pack CDs/DVDs to the install directory as +designated in the B table attribute: B. The B command can copy from one or more ISO files, +or from the CD/DVD device path. If xCAT doesn't recognize the signature of the CD/DVD (e.g. in the .discinfo +file), you must specify the -n and -a options. This is sometimes the case for distros that have very +recently been released, and the xCAT code hasn't been updated for it yet. + + +=head1 OPTIONS + +=over 6 + +=item {B<-n|--name|--osver>}=I + +The linux distro name and version that the ISO/DVD contains. Examples: rhels5.3, centos5.1, fedora9. + +=item {B<-a|--arch>}=I] + +The architecture of the linux distro on the ISO/DVD. Examples: x86, x86_64, ppc64. + +=back + + +=head1 EXAMPLES + +=over 2 + +=item * + +To copy the RPMs from a set of ISOs that represent the CDs of a distro: + +B + +=item * + +To copy the RPMs from a physical DVD: + +B + +=item * + +To copy the RPMs from a DVD ISO of a very recently released distro: + +B + +=back + =head1 SEE ALSO diff --git a/xCAT-client/xCAT-client.spec b/xCAT-client/xCAT-client.spec index 35734b59d..312062fda 100644 --- a/xCAT-client/xCAT-client.spec +++ b/xCAT-client/xCAT-client.spec @@ -1,11 +1,11 @@ Summary: Core executables and data of the xCAT management project Name: xCAT-client -Version: 2.2 +Version: %(cat Version) Release: snap%(date +"%Y%m%d%H%M") Epoch: 4 License: EPL Group: Applications/System -Source: xCAT-client-2.2.tar.gz +Source: xCAT-client-%(cat Version).tar.gz Packager: IBM Corp. Vendor: IBM Corp. Distribution: %{?_distribution:%{_distribution}}%{!?_distribution:%{_vendor}} @@ -23,7 +23,7 @@ Provides: xCAT-client = %{version} xCAT-client provides the fundamental xCAT commands (chtab, chnode, rpower, etc) helpful in administrating systems at scale, with particular attention paid to large HPC clusters. %prep -%setup -q +%setup -q -n xCAT-client %build # This phase is done in (for RH): /usr/src/redhat/BUILD/xCAT-client-2.0 # All of the tarball source has been unpacked there and is in the same file structure diff --git a/xCAT-nbroot/mkrpm b/xCAT-nbroot/mkrpm deleted file mode 100755 index b5625b8c0..000000000 --- a/xCAT-nbroot/mkrpm +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -if [ -f /etc/redhat-release ] -then - pkg="redhat" -else - pkg="packages" -fi -cd `dirname $0` -tar --exclude .svn -czvf xcat-nbrootoverlay.tar.gz -C overlay/ . -mv -f *.gz /usr/src/$pkg/SOURCES -cp LICENSE.html /usr/src/$pkg/BUILD -cp xcat-core-nbroot.spec /usr/src/$pkg/SOURCES -rpmbuild -ba xcat-core-nbroot.spec --target $1 -cd - - diff --git a/xCAT-nbroot/xcat-core-nbroot.spec b/xCAT-nbroot/xcat-core-nbroot.spec index 5887a8475..52d7cf0a8 100644 --- a/xCAT-nbroot/xcat-core-nbroot.spec +++ b/xCAT-nbroot/xcat-core-nbroot.spec @@ -1,4 +1,4 @@ -%define version 2.1 +%define version %(cat Version) %ifarch i386 i586 i686 x86 %define tarch x86 %endif @@ -18,15 +18,12 @@ AutoProv: false - - - Name: %{name} Version: %{version} Group: System/Utilities License: EPL Vendor: IBM Corp. -Summary: xCAT-nbroot-coreprovides opensource components of the netboot image +Summary: xCAT-nbroot-core provides opensource components of the netboot image URL: http://xcat.org Source1: xcat-nbrootoverlay.tar.gz diff --git a/xCAT-rmc/xCAT-rmc.spec b/xCAT-rmc/xCAT-rmc.spec index a4251b05e..8af84ebe1 100644 --- a/xCAT-rmc/xCAT-rmc.spec +++ b/xCAT-rmc/xCAT-rmc.spec @@ -1,11 +1,11 @@ Summary: RMC monitoring plug-in for xCAT Name: xCAT-rmc -Version: 2.2 +Version: %(cat Version) Release: snap%(date +"%Y%m%d%H%M") Epoch: 4 License: EPL Group: System Environment/Libraries -Source: xCAT-rmc-2.2.tar.gz +Source: xCAT-rmc-%(cat Version).tar.gz Packager: IBM Corp. Vendor: IBM Corp. Distribution: %{?_distribution:%{_distribution}}%{!?_distribution:%{_vendor}} @@ -24,7 +24,7 @@ Provides: xCAT-rmc = %{version} Provides RMC monitoring plug-in module for xCAT, configuration scripts, predefined conditions, responses and sensors. %prep -%setup -q +%setup -q -n xCAT-rmc %build %install diff --git a/xCAT-server/xCAT-server.spec b/xCAT-server/xCAT-server.spec index cc80d154f..14c9f8f13 100644 --- a/xCAT-server/xCAT-server.spec +++ b/xCAT-server/xCAT-server.spec @@ -1,11 +1,11 @@ Summary: Server and configuration utilities of the xCAT management project Name: xCAT-server -Version: 2.2 +Version: %(cat Version) Release: snap%(date +"%Y%m%d%H%M") Epoch: 4 License: EPL Group: Applications/System -Source: xCAT-server-2.2.tar.gz +Source: xCAT-server-%(cat Version).tar.gz Packager: IBM Corp. Vendor: IBM Corp. Distribution: %{?_distribution:%{_distribution}}%{!?_distribution:%{_vendor}} diff --git a/xCAT-web/xCAT-web.spec b/xCAT-web/xCAT-web.spec index 2cfe1cf00..cc75f708f 100644 --- a/xCAT-web/xCAT-web.spec +++ b/xCAT-web/xCAT-web.spec @@ -1,12 +1,12 @@ Summary: Web Interface for xCAT 2 Name: xCAT-web -Version: 2.2 +Version: %(cat Version) Release: snap%(date +"%Y%m%d%H%M") Epoch: 4 License: EPL Group: Applications/System -Source: xCAT-web-2.2.tar.gz +Source: xCAT-web-%(cat Version).tar.gz Packager: IBM Corp. Vendor: IBM Corp. URL: http://xcat.org @@ -25,7 +25,7 @@ Requires: httpd Provides a browser-based interface for xCAT (extreme Cluster Administration Tool). %prep -%setup -q +%setup -q -n xCAT-web %build %install diff --git a/xCAT/xCAT.spec b/xCAT/xCAT.spec index e9dad13ff..1215b936a 100644 --- a/xCAT/xCAT.spec +++ b/xCAT/xCAT.spec @@ -1,6 +1,6 @@ Summary: Metapackage for a common, default xCAT setup Name: xCAT -Version: 2.2 +Version: %(cat Version) Release: snap%(date +"%Y%m%d%H%M") License: EPL Group: Applications/System diff --git a/xCAT/xcat.conf b/xCAT/xcat.conf index 88cc2d7fd..89fbd115b 100644 --- a/xCAT/xcat.conf +++ b/xCAT/xcat.conf @@ -1,6 +1,8 @@ # -# This configuration file allows the manual to be accessed at -# http://localhost/manual/ +# This configuration file allows a diskfull install to access the install images +# via http. It also allows the xCAT documentation to be accessed via +# http://localhost/xcat-doc/ +# Updates to xCAT/xcat.conf should also be made to xCATsn/xcat.conf # AliasMatch ^/install/(.*)$ "/install/$1" AliasMatch ^/tftpboot/(.*)$ "/tftpboot/$1" diff --git a/xCATsn/xCATsn.spec b/xCATsn/xCATsn.spec index d77394b25..9c7099408 100644 --- a/xCATsn/xCATsn.spec +++ b/xCATsn/xCATsn.spec @@ -1,6 +1,6 @@ Summary: Metapackage for a common, default xCAT service node setup Name: xCATsn -Version: 2.2 +Version: %(cat Version) Release: snap%(date +"%Y%m%d%H%M") Epoch: 4 License: EPL @@ -12,6 +12,7 @@ Prefix: /opt/xcat BuildRoot: /var/tmp/%{name}-%{version}-%{release}-root #BuildArch: noarch Source1: xcat.conf +Source2: license.tar.gz Provides: xCATsn = %{version} Requires: xCAT-server xCAT-client perl-xCAT perl-XML-Parser @@ -30,13 +31,22 @@ including hardware management and software management. %prep +%ifos linux +tar zxf %{SOURCE2} +%else +cp %{SOURCE2} /opt/freeware/src/packages/BUILD +gunzip -f license.tar.gz +tar -xf license.tar +%endif %build %install +mkdir -p $RPM_BUILD_ROOT/etc/apache2/conf.d mkdir -p $RPM_BUILD_ROOT/etc/httpd/conf.d/ mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/xcat/ -cd - +# cd - +cp %{SOURCE1} $RPM_BUILD_ROOT/etc/apache2/conf.d/xcat.conf cp %{SOURCE1} $RPM_BUILD_ROOT/etc/httpd/conf.d/xcat.conf mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/doc/packages/xCAT @@ -72,5 +82,7 @@ fi %files %{prefix} +# one for sles, one for rhel. yes, it's ugly... /etc/httpd/conf.d/xcat.conf +/etc/apache2/conf.d/xcat.conf %defattr(-,root,root) diff --git a/xCATsn/xcat.conf b/xCATsn/xcat.conf index f2337580f..89fbd115b 100644 --- a/xCATsn/xcat.conf +++ b/xCATsn/xcat.conf @@ -1,19 +1,29 @@ # -# This configuration file allows the manual to be accessed at -# http://localhost/manual/ +# This configuration file allows a diskfull install to access the install images +# via http. It also allows the xCAT documentation to be accessed via +# http://localhost/xcat-doc/ +# Updates to xCAT/xcat.conf should also be made to xCATsn/xcat.conf # AliasMatch ^/install/(.*)$ "/install/$1" AliasMatch ^/tftpboot/(.*)$ "/tftpboot/$1" - Options Indexes + Options Indexes +FollowSymLinks +Includes MultiViews AllowOverride None Order allow,deny Allow from all - Options Indexes + Options Indexes +FollowSymLinks +Includes MultiViews AllowOverride None Order allow,deny Allow from all + +Alias /xcat-doc "/opt/xcat/share/doc" + + Options Indexes + AllowOverride None + Order allow,deny + Allow from all +