Fix build problem in xCAT-buildkit

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@14232 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
bp-sawyers 2012-11-02 14:19:47 +00:00
parent 21c5691293
commit afcce5d64e
3 changed files with 30 additions and 13 deletions

View File

@ -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

26
makerpm
View File

@ -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 <RPMname> <arch> [<embedded-system>]'
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

View File

@ -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