diff --git a/buildcore.sh b/buildcore.sh index d7c76862d..d74725dac 100755 --- a/buildcore.sh +++ b/buildcore.sh @@ -175,9 +175,10 @@ fi # Build the rest of the noarch rpms for rpmname in xCAT-client xCAT-server xCAT-IBMhpc xCAT-rmc xCAT-UI xCAT-test xCAT-buildkit; do + if [ "$EMBED" = "zvm" -a "$rpmname" != "xCAT-server" -a "$rpmname" != "xCAT-UI" ]; then continue; fi # for zvm embedded env only need to build server and UI + if [ "$OSNAME" = "AIX" -a "$rpmname" = "xCAT-buildkit" ]; then continue; fi # do not build xCAT-buildkit on aix if $GREP $rpmname $SVNUP || [ "$BUILDALL" == 1 ]; then UPLOAD=1 - if [ "$EMBED" = "zvm" -a "$rpmname" != "xCAT-server" -a "$rpmname" != "xCAT-UI" ]; then continue; fi # for embedded envs only need to build server special maker $rpmname fi if [ "$OSNAME" = "AIX" ]; then diff --git a/makerpm b/makerpm index 1292d99c2..f78930054 100755 --- a/makerpm +++ b/makerpm @@ -32,9 +32,9 @@ function makenoarch { -# Make one of the following rpms: xCAT, xCATsn +# Make one of the following rpms: xCAT, xCATsn, xCAT-buildkit function makexcat { - if [ "$OSNAME" != "AIX" -a -z "$2" ]; then + if [ "$OSNAME" != "AIX" -a "$1" != "xCAT-buildkit" -a -z "$2" ]; then echo 'Usage: makerpm []' exit 1 fi @@ -68,24 +68,34 @@ function makexcat { RC=$? else # linux ARCH="$2" - cd `dirname $0`/$RPMNAME + TARGET="--target $ARCH" if [ "$RPMNAME" = "xCAT" ]; then + cd `dirname $0`/$RPMNAME tar --exclude .svn --exclude upflag -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 + cd - >/dev/null + elif [ "$RPMNAME" = "xCATsn" ]; then + cd `dirname $0`/$RPMNAME tar --exclude .svn -czf $RPMROOT/SOURCES/license.tar.gz LICENSE.html cp xcat.conf $RPMROOT/SOURCES cp xCATSN $RPMROOT/SOURCES + cd - >/dev/null + elif [ "$RPMNAME" = "xCAT-buildkit" ]; then + ARCH="noarch" + TARGET="" + tar --exclude .svn --exclude xCAT-buildkit.spec -czf $RPMROOT/SOURCES/$RPMNAME-$VER.tar.gz $RPMNAME + else # do not recognize rpm + echo "Unrecognized rpm: $RPMNAME" + exit 2 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 $EMBEDTXT..." - rpmbuild $QUIET -ba $RPMNAME/$RPMNAME.spec --target $ARCH + rpmbuild $QUIET -ba $RPMNAME/$RPMNAME.spec $TARGET RC=$? fi } @@ -115,7 +125,7 @@ function makenbroot { -# Make the xCAT-nbroot-core rpm +# Make the xCAT-genesis rpm function makegenesis { DIR="xCAT-nbroot2" RPMNAME="$1" @@ -172,7 +182,7 @@ else # linux fi -if [ "$1" = "xCAT" -o "$1" = "xCATsn" ]; then +if [ "$1" = "xCAT" -o "$1" = "xCATsn" -o "$1" = "xCAT-buildkit" ]; then exportEmbed $3 makexcat $1 $2 elif [ "$1" = "xCAT-nbroot" -o "$1" = "xCAT-nbroot-core" ]; then diff --git a/xCAT-buildkit/xCAT-buildkit.spec b/xCAT-buildkit/xCAT-buildkit.spec index 6010c2088..5faee0c9e 100644 --- a/xCAT-buildkit/xCAT-buildkit.spec +++ b/xCAT-buildkit/xCAT-buildkit.spec @@ -43,9 +43,13 @@ mkdir -p $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT %ifos linux cp -aR share/xcat/kits/* $RPM_BUILD_ROOT/%{prefix}/share/xcat/kits/ -chmod -R 644 $RPM_BUILD_ROOT/%{prefix}/share/xcat/kits/* +#chmod -R 644 $RPM_BUILD_ROOT/%{prefix}/share/xcat/kits/* +find $RPM_BUILD_ROOT/%{prefix}/share/xcat/kits -type d -exec chmod 755 {} \; +find $RPM_BUILD_ROOT/%{prefix}/share/xcat/kits -type f -exec chmod 644 {} \; cp -a lib/perl/xCAT/* $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT -chmod -R 644 $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT/* +#chmod -R 644 $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT/* +find $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT -type d -exec chmod 755 {} \; +find $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT -type f -exec chmod 644 {} \; cp -a bin/* $RPM_BUILD_ROOT/%{prefix}/bin/ chmod -R 755 $RPM_BUILD_ROOT/%{prefix}/bin/* %else @@ -59,8 +63,10 @@ chmod -R 755 $RPM_BUILD_ROOT/%{prefix}/bin/* mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/doc/packages/xCAT-buildkit cp LICENSE.html $RPM_BUILD_ROOT/%{prefix}/share/doc/packages/xCAT-buildkit -chmod 644 $RPM_BUILD_ROOT/%{prefix}/share/doc/packages/xCAT-buildkit/* -echo $RPM_BUILD_ROOT %{prefix} +#chmod 644 $RPM_BUILD_ROOT/%{prefix}/share/doc/packages/xCAT-buildkit/* +find $RPM_BUILD_ROOT/%{prefix}/share/doc/packages/xCAT-buildkit -type d -exec chmod 755 {} \; +find $RPM_BUILD_ROOT/%{prefix}/share/doc/packages/xCAT-buildkit -type f -exec chmod 644 {} \; +#echo $RPM_BUILD_ROOT %{prefix} %clean rm -rf $RPM_BUILD_ROOT