2007-10-26 22:44:33 +00:00
|
|
|
Summary: Core executables and data of the xCAT management project
|
|
|
|
Name: xCAT-client
|
2008-06-02 13:02:07 +00:00
|
|
|
Version: 2.1
|
2007-10-26 22:44:33 +00:00
|
|
|
Release: snap%(date +"%Y%m%d%H%M")
|
2008-06-07 15:20:29 +00:00
|
|
|
Epoch: 2
|
2007-10-26 22:44:33 +00:00
|
|
|
License: EPL
|
|
|
|
Group: Applications/System
|
2008-06-03 15:00:37 +00:00
|
|
|
Source: xCAT-client-2.1.tar.gz
|
2007-10-26 22:44:33 +00:00
|
|
|
Packager: IBM Corp.
|
|
|
|
Vendor: IBM Corp.
|
|
|
|
Distribution: %{?_distribution:%{_distribution}}%{!?_distribution:%{_vendor}}
|
2007-12-11 19:15:28 +00:00
|
|
|
Prefix: /opt/xcat
|
2007-10-26 22:44:33 +00:00
|
|
|
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-root
|
|
|
|
|
|
|
|
# AIX will build with an arch of "ppc"
|
|
|
|
%ifos linux
|
|
|
|
BuildArch: noarch
|
|
|
|
%endif
|
|
|
|
|
|
|
|
Provides: xCAT-client = %{version}
|
|
|
|
|
|
|
|
%description
|
|
|
|
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.
|
|
|
|
|
2008-06-03 20:02:58 +00:00
|
|
|
%prep -n xCAT-client
|
2007-10-26 22:44:33 +00:00
|
|
|
%setup -q
|
|
|
|
%build
|
2008-02-27 19:52:07 +00:00
|
|
|
# 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
|
|
|
|
# as it is in svn.
|
|
|
|
|
2008-02-25 13:41:10 +00:00
|
|
|
# Convert pods to man pages, e.g.: pod2man pods/man1/tabdump.1.pod share/man/man1/tabdump.1
|
2008-03-17 13:34:40 +00:00
|
|
|
# for i in pods/*/*.pod; do
|
|
|
|
# man="share/man${i#pods}" # the substitute form is not supported on aix: ${i/pods/share\/man}
|
|
|
|
# mkdir -p ${man%/*}
|
|
|
|
# pod2man $i ${man%.pod}
|
|
|
|
# done
|
|
|
|
|
|
|
|
# Convert pods to man pages and html pages
|
|
|
|
./xpod2man
|
2008-02-25 13:41:10 +00:00
|
|
|
|
2007-10-26 22:44:33 +00:00
|
|
|
%install
|
2008-02-27 19:52:07 +00:00
|
|
|
# The install phase puts all of the files in the paths they should be in when the rpm is
|
|
|
|
# installed on a system. The RPM_BUILD_ROOT is a simulated root file system and usually
|
|
|
|
# has a value like: /var/tmp/xCAT-client-2.0-snap200802270932-root
|
2007-10-26 22:44:33 +00:00
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
2007-11-30 15:38:30 +00:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{prefix}/bin
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{prefix}/sbin
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/xcat/scripts
|
2007-12-05 18:17:28 +00:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/man/man1
|
2008-02-07 19:09:44 +00:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/man/man3
|
2007-12-05 18:17:28 +00:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/man/man5
|
2008-03-14 21:03:11 +00:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/man/man8
|
2007-12-11 19:15:28 +00:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/doc/packages/xCAT-client
|
2008-03-17 13:34:40 +00:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/doc/man1
|
|
|
|
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
|
2007-10-26 22:44:33 +00:00
|
|
|
|
2007-11-30 15:38:30 +00:00
|
|
|
cp bin/* $RPM_BUILD_ROOT/%{prefix}/bin
|
|
|
|
chmod 755 $RPM_BUILD_ROOT/%{prefix}/bin/*
|
|
|
|
cp sbin/* $RPM_BUILD_ROOT/%{prefix}/sbin
|
|
|
|
chmod 755 $RPM_BUILD_ROOT/%{prefix}/sbin/*
|
2008-02-27 19:52:07 +00:00
|
|
|
|
2008-03-17 13:34:40 +00:00
|
|
|
# These were built dynamically in the build phase
|
2007-12-05 18:17:28 +00:00
|
|
|
cp share/man/man1/* $RPM_BUILD_ROOT/%{prefix}/share/man/man1
|
|
|
|
chmod 444 $RPM_BUILD_ROOT/%{prefix}/share/man/man1/*
|
2008-02-07 19:09:44 +00:00
|
|
|
cp share/man/man3/* $RPM_BUILD_ROOT/%{prefix}/share/man/man3
|
|
|
|
chmod 444 $RPM_BUILD_ROOT/%{prefix}/share/man/man3/*
|
2007-12-05 18:17:28 +00:00
|
|
|
cp share/man/man5/* $RPM_BUILD_ROOT/%{prefix}/share/man/man5
|
|
|
|
chmod 444 $RPM_BUILD_ROOT/%{prefix}/share/man/man5/*
|
2008-03-14 21:03:11 +00:00
|
|
|
cp share/man/man8/* $RPM_BUILD_ROOT/%{prefix}/share/man/man8
|
|
|
|
chmod 444 $RPM_BUILD_ROOT/%{prefix}/share/man/man8/*
|
2008-02-27 19:52:07 +00:00
|
|
|
|
2008-03-17 13:34:40 +00:00
|
|
|
# %ifos linux
|
|
|
|
# cp share/doc/xCAT2.0.odt $RPM_BUILD_ROOT/%{prefix}/share/doc
|
|
|
|
# cp share/doc/xCAT2.0.pdf $RPM_BUILD_ROOT/%{prefix}/share/doc
|
|
|
|
# %else
|
|
|
|
# cp share/doc/xCAT2onAIX.odt $RPM_BUILD_ROOT/%{prefix}/share/doc
|
|
|
|
# cp share/doc/xCAT2onAIX.pdf $RPM_BUILD_ROOT/%{prefix}/share/doc
|
|
|
|
# %endif
|
|
|
|
cp -r share/doc/* $RPM_BUILD_ROOT/%{prefix}/share/doc
|
|
|
|
chmod 755 $RPM_BUILD_ROOT/%{prefix}/share/doc/*
|
|
|
|
# These were built dynamically during the build phase
|
|
|
|
# cp share/doc/man1/* $RPM_BUILD_ROOT/%{prefix}/share/doc/man1
|
|
|
|
chmod 644 $RPM_BUILD_ROOT/%{prefix}/share/doc/man1/*
|
|
|
|
# cp share/doc/man3/* $RPM_BUILD_ROOT/%{prefix}/share/doc/man3
|
|
|
|
chmod 644 $RPM_BUILD_ROOT/%{prefix}/share/doc/man3/*
|
|
|
|
# cp share/doc/man5/* $RPM_BUILD_ROOT/%{prefix}/share/doc/man5
|
|
|
|
chmod 644 $RPM_BUILD_ROOT/%{prefix}/share/doc/man5/*
|
|
|
|
# cp share/doc/man8/* $RPM_BUILD_ROOT/%{prefix}/share/doc/man8
|
|
|
|
chmod 644 $RPM_BUILD_ROOT/%{prefix}/share/doc/man8/*
|
2008-03-11 14:57:56 +00:00
|
|
|
|
2007-12-11 19:15:28 +00:00
|
|
|
cp LICENSE.html $RPM_BUILD_ROOT/%{prefix}/share/doc/packages/xCAT-client
|
|
|
|
chmod 644 $RPM_BUILD_ROOT/%{prefix}/share/doc/packages/xCAT-client/*
|
2007-10-26 22:44:33 +00:00
|
|
|
|
|
|
|
#cp usr/share/xcat/scripts/setup-local-client.sh $RPM_BUILD_ROOT/usr/share/xcat/scripts/setup-local-client.sh
|
|
|
|
#chmod 755 $RPM_BUILD_ROOT/usr/share/xcat/scripts/setup-local-client.sh
|
|
|
|
|
2008-02-27 19:52:07 +00:00
|
|
|
# These links get made in the RPM_BUILD_ROOT/prefix area
|
2007-11-30 16:20:53 +00:00
|
|
|
ln -sf xcatclient $RPM_BUILD_ROOT/%{prefix}/bin/rpower
|
|
|
|
ln -sf xcatclient $RPM_BUILD_ROOT/%{prefix}/bin/rscan
|
|
|
|
ln -sf ../bin/xcatclient $RPM_BUILD_ROOT/%{prefix}/sbin/makedhcp
|
|
|
|
ln -sf ../bin/xcatclient $RPM_BUILD_ROOT/%{prefix}/sbin/makehosts
|
|
|
|
ln -sf ../bin/xcatclient $RPM_BUILD_ROOT/%{prefix}/sbin/nodeset
|
2008-02-04 16:55:14 +00:00
|
|
|
ln -sf ../bin/xcatclient $RPM_BUILD_ROOT/%{prefix}/sbin/setupiscsidev
|
2007-11-30 16:20:53 +00:00
|
|
|
ln -sf ../bin/xcatclient $RPM_BUILD_ROOT/%{prefix}/sbin/makeconservercf
|
|
|
|
ln -sf ../bin/xcatclient $RPM_BUILD_ROOT/%{prefix}/bin/rbeacon
|
|
|
|
ln -sf ../bin/xcatclient $RPM_BUILD_ROOT/%{prefix}/bin/rvitals
|
2008-02-26 00:15:08 +00:00
|
|
|
ln -sf ../bin/xcatclient $RPM_BUILD_ROOT/%{prefix}/bin/nodestat
|
2007-11-30 16:20:53 +00:00
|
|
|
ln -sf ../bin/xcatclient $RPM_BUILD_ROOT/%{prefix}/bin/rinv
|
|
|
|
ln -sf ../bin/xcatclient $RPM_BUILD_ROOT/%{prefix}/bin/rspreset
|
|
|
|
ln -sf ../bin/xcatclient $RPM_BUILD_ROOT/%{prefix}/bin/rsetboot
|
|
|
|
ln -sf ../bin/xcatclient $RPM_BUILD_ROOT/%{prefix}/bin/rbootseq
|
|
|
|
ln -sf ../bin/xcatclient $RPM_BUILD_ROOT/%{prefix}/bin/reventlog
|
|
|
|
ln -sf ../bin/xcatclient $RPM_BUILD_ROOT/%{prefix}/bin/nodels
|
|
|
|
ln -sf ../bin/xcatclient $RPM_BUILD_ROOT/%{prefix}/bin/nodech
|
|
|
|
ln -sf ../bin/xcatclient $RPM_BUILD_ROOT/%{prefix}/bin/noderm
|
|
|
|
ln -sf ../bin/xcatclient $RPM_BUILD_ROOT/%{prefix}/bin/rnetboot
|
|
|
|
ln -sf ../bin/xcatclient $RPM_BUILD_ROOT/%{prefix}/bin/getmacs
|
|
|
|
ln -sf ../bin/xcatclient $RPM_BUILD_ROOT/%{prefix}/bin/mkvm
|
|
|
|
ln -sf ../bin/xcatclient $RPM_BUILD_ROOT/%{prefix}/bin/rmvm
|
|
|
|
ln -sf ../bin/xcatclient $RPM_BUILD_ROOT/%{prefix}/bin/lsvm
|
|
|
|
ln -sf ../bin/xcatclient $RPM_BUILD_ROOT/%{prefix}/bin/chvm
|
2008-01-18 16:47:26 +00:00
|
|
|
ln -sf ../bin/xcatclient $RPM_BUILD_ROOT/%{prefix}/bin/tabgrep
|
2007-12-18 16:08:45 +00:00
|
|
|
ln -sf ../bin/xcatclientnnr $RPM_BUILD_ROOT/%{prefix}/bin/lsslp
|
2007-11-30 16:20:53 +00:00
|
|
|
ln -sf ../bin/xcatclientnnr $RPM_BUILD_ROOT/%{prefix}/sbin/tabdump
|
2008-02-01 16:23:20 +00:00
|
|
|
ln -sf ../bin/xcatclientnnr $RPM_BUILD_ROOT/%{prefix}/sbin/packimage
|
2007-11-30 16:20:53 +00:00
|
|
|
ln -sf ../bin/xcatclientnnr $RPM_BUILD_ROOT/%{prefix}/sbin/makedns
|
|
|
|
ln -sf ../bin/xcatclientnnr $RPM_BUILD_ROOT/%{prefix}/bin/gettab
|
|
|
|
ln -sf ../bin/xcatclientnnr $RPM_BUILD_ROOT/%{prefix}/sbin/nodeadd
|
|
|
|
ln -sf ../bin/xcatclientnnr $RPM_BUILD_ROOT/%{prefix}/sbin/makenetworks
|
|
|
|
ln -sf ../bin/xcatclientnnr $RPM_BUILD_ROOT/%{prefix}/sbin/copycds
|
|
|
|
ln -sf ../bin/xcatclientnnr $RPM_BUILD_ROOT/%{prefix}/bin/regnotif
|
|
|
|
ln -sf ../bin/xcatclientnnr $RPM_BUILD_ROOT/%{prefix}/bin/unregnotif
|
2008-03-21 20:32:41 +00:00
|
|
|
ln -sf ../bin/xcatclientnnr $RPM_BUILD_ROOT/%{prefix}/bin/monstart
|
|
|
|
ln -sf ../bin/xcatclientnnr $RPM_BUILD_ROOT/%{prefix}/bin/monstop
|
|
|
|
ln -sf ../bin/xcatclientnnr $RPM_BUILD_ROOT/%{prefix}/bin/monls
|
|
|
|
ln -sf ../bin/xcatclientnnr $RPM_BUILD_ROOT/%{prefix}/sbin/monupdate
|
|
|
|
ln -sf ../bin/xcatclientnnr $RPM_BUILD_ROOT/%{prefix}/sbin/monaddnode
|
|
|
|
ln -sf ../bin/xcatclientnnr $RPM_BUILD_ROOT/%{prefix}/sbin/monrmnode
|
2008-03-31 12:01:29 +00:00
|
|
|
ln -sf ../bin/xcatclientnnr $RPM_BUILD_ROOT/%{prefix}/bin/mkdsklsnode
|
2008-06-08 13:36:27 +00:00
|
|
|
ln -sf ../bin/xcatclientnnr $RPM_BUILD_ROOT/%{prefix}/bin/rmdsklsnode
|
|
|
|
ln -sf ../bin/xcatclientnnr $RPM_BUILD_ROOT/%{prefix}/bin/mknimimage
|
|
|
|
ln -sf ../bin/xcatclientnnr $RPM_BUILD_ROOT/%{prefix}/bin/rmnimimage
|
2007-11-30 16:20:53 +00:00
|
|
|
ln -sf ../bin/xcatDBcmds $RPM_BUILD_ROOT/%{prefix}/bin/mkdef
|
|
|
|
ln -sf ../bin/xcatDBcmds $RPM_BUILD_ROOT/%{prefix}/bin/chdef
|
|
|
|
ln -sf ../bin/xcatDBcmds $RPM_BUILD_ROOT/%{prefix}/bin/lsdef
|
|
|
|
ln -sf ../bin/xcatDBcmds $RPM_BUILD_ROOT/%{prefix}/bin/rmdef
|
2007-12-12 19:21:54 +00:00
|
|
|
ln -sf ../bin/xcatDBcmds $RPM_BUILD_ROOT/%{prefix}/bin/xcat2nim
|
2007-11-30 16:20:53 +00:00
|
|
|
ln -sf ../bin/xdsh $RPM_BUILD_ROOT/%{prefix}/bin/xdcp
|
2007-10-26 22:44:33 +00:00
|
|
|
|
|
|
|
%clean
|
2008-02-27 19:52:07 +00:00
|
|
|
# This step does not happen until *after* the %files packaging below
|
2007-10-26 22:44:33 +00:00
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
2007-12-11 19:15:28 +00:00
|
|
|
#%doc LICENSE.html
|
2008-02-27 19:52:07 +00:00
|
|
|
# Just package everything that has been copied into RPM_BUILD_ROOT
|
2007-11-30 15:38:30 +00:00
|
|
|
%{prefix}
|
2007-10-26 22:44:33 +00:00
|
|
|
|
|
|
|
%changelog
|
|
|
|
* Wed May 2 2007 - Norm Nott <nott@us.ibm.com>
|
|
|
|
- Made changes to make this work on AIX
|
|
|
|
|
|
|
|
* Tue Feb 20 2007 Jarrod Johnson <jbjohnso@us.ibm.com>
|
|
|
|
- Start core rpm for 1.3 work
|
|
|
|
|
2008-02-25 13:41:10 +00:00
|
|
|
%post
|
2007-12-11 19:15:28 +00:00
|
|
|
%ifos linux
|
2007-12-11 19:44:58 +00:00
|
|
|
echo "XCATROOT=$RPM_INSTALL_PREFIX0
|
2007-12-11 19:15:28 +00:00
|
|
|
PATH=\$PATH:\$XCATROOT/bin:\$XCATROOT/sbin
|
|
|
|
MANPATH=\$MANPATH:\$XCATROOT/share/man
|
2008-05-21 16:22:09 +00:00
|
|
|
export XCATROOT PATH MANPATH
|
|
|
|
export PERL_BADLANG=0" >/etc/profile.d/xcat.sh
|
2007-12-11 19:15:28 +00:00
|
|
|
|
2007-12-11 19:44:58 +00:00
|
|
|
echo "setenv XCATROOT \"$RPM_INSTALL_PREFIX0\"
|
2007-12-11 19:15:28 +00:00
|
|
|
setenv PATH \${PATH}:\${XCATROOT}/bin:\${XCATROOT}/sbin
|
2008-05-21 16:22:09 +00:00
|
|
|
setenv MANPATH \${MANPATH}:\${XCATROOT}/share/man
|
|
|
|
setenv PERL_BADLANG 0" >/etc/profile.d/xcat.csh
|
2007-12-11 19:15:28 +00:00
|
|
|
chmod 755 /etc/profile.d/xcat.*
|
2008-01-14 16:53:45 +00:00
|
|
|
|
|
|
|
%else
|
|
|
|
echo "
|
|
|
|
# xCAT setup
|
|
|
|
XCATROOT=$RPM_INSTALL_PREFIX0
|
|
|
|
PATH=\$PATH:\$XCATROOT/bin:\$XCATROOT/sbin
|
|
|
|
MANPATH=\$MANPATH:\$XCATROOT/share/man
|
|
|
|
export XCATROOT PATH MANPATH" >>/etc/profile
|
|
|
|
|
2007-12-11 19:15:28 +00:00
|
|
|
%endif
|
|
|
|
|
|
|
|
%preun
|
|
|
|
%ifos linux
|
|
|
|
if [ $1 == 0 ]; then #This means only on -e
|
|
|
|
rm /etc/profile.d/xcat.*
|
|
|
|
fi
|
|
|
|
%endif
|
|
|
|
|