2009-04-13 16:10:39 +00:00
|
|
|
Summary: Meta-package for a common, default xCAT setup
|
2007-10-26 22:44:33 +00:00
|
|
|
Name: xCAT
|
2009-01-28 15:42:14 +00:00
|
|
|
Version: %(cat Version)
|
2007-10-26 22:44:33 +00:00
|
|
|
Release: snap%(date +"%Y%m%d%H%M")
|
|
|
|
License: EPL
|
|
|
|
Group: Applications/System
|
|
|
|
Vendor: IBM Corp.
|
|
|
|
Packager: IBM Corp.
|
|
|
|
Distribution: %{?_distribution:%{_distribution}}%{!?_distribution:%{_vendor}}
|
2007-12-13 22:12:47 +00:00
|
|
|
Prefix: /opt/xcat
|
2007-10-26 22:44:33 +00:00
|
|
|
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-root
|
2008-01-17 18:23:31 +00:00
|
|
|
#BuildArch: noarch
|
2007-10-26 22:44:33 +00:00
|
|
|
Source1: xcat.conf
|
|
|
|
Source2: postscripts.tar.gz
|
|
|
|
Source3: templates.tar.gz
|
|
|
|
|
|
|
|
Provides: xCAT = %{version}
|
2008-04-05 14:53:35 +00:00
|
|
|
Requires: xCAT-server xCAT-client perl-DBD-SQLite
|
2008-01-23 18:00:13 +00:00
|
|
|
|
2008-01-17 18:23:31 +00:00
|
|
|
%ifos linux
|
2009-05-05 20:22:26 +00:00
|
|
|
Requires: atftp dhcp httpd nfs-utils expect nmap fping bind perl-XML-Parser vsftpd
|
2009-03-26 22:38:47 +00:00
|
|
|
%ifarch s390x
|
|
|
|
# No additional requires for zLinux right now
|
|
|
|
%else
|
2009-05-05 20:22:26 +00:00
|
|
|
# yaboot-xcat is pulled in so any MN can manage ppc nodes
|
2009-07-11 12:02:20 +00:00
|
|
|
Requires: conserver yaboot-xcat perl-Net-Telnet
|
2009-05-05 20:22:26 +00:00
|
|
|
%endif
|
2009-04-07 06:44:15 +00:00
|
|
|
%ifarch ppc64
|
|
|
|
Requires: perl-IO-Stty
|
|
|
|
%endif
|
2009-03-26 22:38:47 +00:00
|
|
|
%endif
|
2008-01-23 18:00:13 +00:00
|
|
|
|
2008-01-17 18:23:31 +00:00
|
|
|
%ifarch i386 i586 i686 x86 x86_64
|
2009-03-26 22:38:47 +00:00
|
|
|
# All versions of the nb rpms are pulled in so an x86 MN can manage nodes of any arch.
|
|
|
|
# The nb rpms are used for dhcp-based discovery, and flashing, so for now we do not need them on a ppc MN.
|
|
|
|
Requires: xCAT-nbroot-oss-x86 xCAT-nbroot-core-x86 xCAT-nbkernel-x86 xCAT-nbroot-oss-x86_64 xCAT-nbroot-core-x86_64 xCAT-nbkernel-x86_64 xCAT-nbroot-oss-ppc64 xCAT-nbroot-core-ppc64 xCAT-nbkernel-ppc64 syslinux
|
2007-10-26 22:44:33 +00:00
|
|
|
Requires: ipmitool >= 1.8.9
|
2008-01-17 18:23:31 +00:00
|
|
|
%endif
|
|
|
|
|
2007-10-26 22:44:33 +00:00
|
|
|
%description
|
|
|
|
xCAT is a server management package intended for at-scale management, including
|
|
|
|
hardware management and software management.
|
|
|
|
|
|
|
|
%prep
|
2008-01-23 18:00:13 +00:00
|
|
|
%ifos linux
|
2008-04-05 14:53:35 +00:00
|
|
|
tar zxf %{SOURCE2}
|
2008-01-23 18:00:13 +00:00
|
|
|
%else
|
|
|
|
rm -rf postscripts
|
|
|
|
cp %{SOURCE2} /opt/freeware/src/packages/BUILD
|
2008-04-05 14:53:35 +00:00
|
|
|
gunzip -f postscripts.tar.gz
|
|
|
|
tar -xf postscripts.tar
|
2008-01-23 18:00:13 +00:00
|
|
|
%endif
|
|
|
|
|
2007-10-26 22:44:33 +00:00
|
|
|
%build
|
2008-01-23 18:00:13 +00:00
|
|
|
|
2007-10-26 22:44:33 +00:00
|
|
|
%install
|
2008-07-07 21:14:14 +00:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/etc/apache2/conf.d
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/etc/httpd/conf.d
|
2007-10-26 22:44:33 +00:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/install/postscripts
|
2007-12-13 22:12:47 +00:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/xcat/
|
|
|
|
cd $RPM_BUILD_ROOT/%{prefix}/share/xcat/
|
2008-01-23 18:00:13 +00:00
|
|
|
|
|
|
|
%ifos linux
|
2008-04-05 14:53:35 +00:00
|
|
|
tar zxf %{SOURCE3}
|
2008-01-23 18:00:13 +00:00
|
|
|
%else
|
|
|
|
cp %{SOURCE3} $RPM_BUILD_ROOT/%{prefix}/share/xcat
|
2008-04-05 14:53:35 +00:00
|
|
|
gunzip -f templates.tar.gz
|
|
|
|
tar -xf templates.tar
|
2008-01-23 18:00:13 +00:00
|
|
|
rm templates.tar
|
|
|
|
%endif
|
|
|
|
|
2007-10-26 22:44:33 +00:00
|
|
|
cd -
|
|
|
|
cd $RPM_BUILD_ROOT/install
|
2008-01-23 18:00:13 +00:00
|
|
|
|
|
|
|
%ifos linux
|
2008-04-05 14:53:35 +00:00
|
|
|
tar zxf %{SOURCE2}
|
2008-01-23 18:00:13 +00:00
|
|
|
%else
|
|
|
|
cp %{SOURCE2} $RPM_BUILD_ROOT/install
|
2008-04-05 14:53:35 +00:00
|
|
|
gunzip -f postscripts.tar.gz
|
|
|
|
tar -xf postscripts.tar
|
2008-01-23 18:00:13 +00:00
|
|
|
rm postscripts.tar
|
|
|
|
%endif
|
|
|
|
|
2007-10-26 22:44:33 +00:00
|
|
|
rm LICENSE.html
|
|
|
|
mkdir -p postscripts/hostkeys
|
|
|
|
cd -
|
2008-07-07 21:14:14 +00:00
|
|
|
cp %{SOURCE1} $RPM_BUILD_ROOT/etc/apache2/conf.d/xcat.conf
|
2007-10-26 22:44:33 +00:00
|
|
|
cp %{SOURCE1} $RPM_BUILD_ROOT/etc/httpd/conf.d/xcat.conf
|
2007-12-13 22:12:47 +00:00
|
|
|
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/doc/packages/xCAT
|
|
|
|
cp LICENSE.html $RPM_BUILD_ROOT/%{prefix}/share/doc/packages/xCAT
|
|
|
|
|
2007-10-26 22:44:33 +00:00
|
|
|
%post
|
2008-01-23 18:00:13 +00:00
|
|
|
%ifnos linux
|
2008-03-04 14:15:38 +00:00
|
|
|
. /etc/profile
|
2008-01-23 18:00:13 +00:00
|
|
|
%else
|
2008-03-04 14:15:38 +00:00
|
|
|
. /etc/profile.d/xcat.sh
|
2008-03-26 02:39:36 +00:00
|
|
|
%endif
|
2009-07-31 14:57:18 +00:00
|
|
|
if [ "$1" = "1" ]; then #Only if installing for the first time..
|
|
|
|
$RPM_INSTALL_PREFIX0/sbin/xcatconfig -i
|
|
|
|
else
|
|
|
|
$RPM_INSTALL_PREFIX0/sbin/xcatconfig -u
|
2007-10-26 22:44:33 +00:00
|
|
|
fi
|
|
|
|
%clean
|
|
|
|
|
|
|
|
%files
|
2007-12-13 22:12:47 +00:00
|
|
|
%{prefix}
|
2008-07-09 14:10:24 +00:00
|
|
|
# one for sles, one for rhel. yes, it's ugly...
|
2007-10-26 22:44:33 +00:00
|
|
|
/etc/httpd/conf.d/xcat.conf
|
2008-07-07 21:14:14 +00:00
|
|
|
/etc/apache2/conf.d/xcat.conf
|
2007-10-26 22:44:33 +00:00
|
|
|
/install/postscripts
|
|
|
|
%defattr(-,root,root)
|