2008-02-12 14:32:03 +00:00
|
|
|
Summary: Metapackage for a common, default xCAT service node setup
|
|
|
|
Name: xCATsn
|
2009-01-28 15:42:14 +00:00
|
|
|
Version: %(cat Version)
|
2008-02-12 14:32:03 +00:00
|
|
|
Release: snap%(date +"%Y%m%d%H%M")
|
2008-06-26 18:42:36 +00:00
|
|
|
Epoch: 4
|
2008-02-12 14:32:03 +00:00
|
|
|
License: EPL
|
|
|
|
Group: Applications/System
|
|
|
|
Vendor: IBM Corp.
|
|
|
|
Packager: IBM Corp.
|
|
|
|
Distribution: %{?_distribution:%{_distribution}}%{!?_distribution:%{_vendor}}
|
|
|
|
Prefix: /opt/xcat
|
|
|
|
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-root
|
|
|
|
#BuildArch: noarch
|
|
|
|
Source1: xcat.conf
|
2009-01-28 15:42:14 +00:00
|
|
|
Source2: license.tar.gz
|
2008-02-12 14:32:03 +00:00
|
|
|
Provides: xCATsn = %{version}
|
2008-05-21 16:22:09 +00:00
|
|
|
Requires: xCAT-server xCAT-client perl-xCAT perl-XML-Parser
|
2008-02-12 14:32:03 +00:00
|
|
|
|
|
|
|
%ifos linux
|
2009-03-26 22:38:47 +00:00
|
|
|
# yaboot-xcat is pulled in so any SN can manage ppc nodes
|
2009-07-11 12:02:20 +00:00
|
|
|
Requires: atftp dhcp httpd nfs-utils expect nmap fping bind
|
2009-03-26 22:38:47 +00:00
|
|
|
%ifarch s390x
|
|
|
|
# No additional requires for zLinux right now
|
|
|
|
%else
|
2009-07-11 12:02:20 +00:00
|
|
|
Requires: conserver yaboot-xcat perl-Net-Telnet
|
2009-03-26 22:38:47 +00:00
|
|
|
%endif
|
2008-02-12 14:32:03 +00:00
|
|
|
%endif
|
|
|
|
|
|
|
|
%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
|
2008-02-12 14:32:03 +00:00
|
|
|
Requires: ipmitool >= 1.8.9
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%description
|
|
|
|
xCATsn is a service node management package intended for at-scale management,
|
2009-03-21 13:54:13 +00:00
|
|
|
including hardware management and software management.
|
2008-02-12 14:32:03 +00:00
|
|
|
|
|
|
|
|
|
|
|
%prep
|
2009-01-28 15:42:14 +00:00
|
|
|
%ifos linux
|
|
|
|
tar zxf %{SOURCE2}
|
|
|
|
%else
|
|
|
|
cp %{SOURCE2} /opt/freeware/src/packages/BUILD
|
|
|
|
gunzip -f license.tar.gz
|
|
|
|
tar -xf license.tar
|
|
|
|
%endif
|
2008-02-12 14:32:03 +00:00
|
|
|
|
|
|
|
%build
|
|
|
|
|
|
|
|
%install
|
2009-01-28 15:42:14 +00:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/etc/apache2/conf.d
|
2008-02-12 14:32:03 +00:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/etc/httpd/conf.d/
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/xcat/
|
2009-01-28 15:42:14 +00:00
|
|
|
# cd -
|
|
|
|
cp %{SOURCE1} $RPM_BUILD_ROOT/etc/apache2/conf.d/xcat.conf
|
2008-02-12 14:32:03 +00:00
|
|
|
cp %{SOURCE1} $RPM_BUILD_ROOT/etc/httpd/conf.d/xcat.conf
|
|
|
|
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/doc/packages/xCAT
|
|
|
|
cp LICENSE.html $RPM_BUILD_ROOT/%{prefix}/share/doc/packages/xCAT
|
|
|
|
|
|
|
|
|
|
|
|
%post
|
|
|
|
|
|
|
|
if [ "$1" = "1" ]; then #Only if installing for the first time..
|
2008-05-16 11:11:59 +00:00
|
|
|
# so conserver will start
|
|
|
|
mkdir -p /var/log/consoles
|
2008-02-12 14:32:03 +00:00
|
|
|
|
2008-02-18 13:11:05 +00:00
|
|
|
# makes it a service node
|
2008-05-21 16:22:09 +00:00
|
|
|
touch /etc/xCATSN
|
2008-11-20 17:43:54 +00:00
|
|
|
# remove any management node file
|
2008-11-21 13:15:40 +00:00
|
|
|
if [ -f /etc/xCATMN ]; then
|
2008-11-20 17:43:54 +00:00
|
|
|
rm /etc/xCATMN
|
2008-11-21 13:15:40 +00:00
|
|
|
fi
|
2008-02-18 13:11:05 +00:00
|
|
|
|
|
|
|
|
|
|
|
### Start the xcatd daemon
|
2008-02-12 14:32:03 +00:00
|
|
|
|
|
|
|
chkconfig httpd on
|
2008-05-21 17:45:27 +00:00
|
|
|
if [ -f "/proc/cmdline" ]; then # prevent running it during install into chroot image
|
2008-05-21 16:22:09 +00:00
|
|
|
XCATROOT=$RPM_INSTALL_PREFIX0 /etc/init.d/xcatd start
|
2008-10-17 17:59:57 +00:00
|
|
|
/etc/init.d/httpd stop
|
|
|
|
/etc/init.d/httpd start
|
2008-05-21 17:45:27 +00:00
|
|
|
fi
|
2008-02-12 14:32:03 +00:00
|
|
|
echo "xCATsn is now installed"
|
|
|
|
fi
|
|
|
|
|
|
|
|
%clean
|
|
|
|
|
|
|
|
%files
|
|
|
|
%{prefix}
|
2009-01-28 15:42:14 +00:00
|
|
|
# one for sles, one for rhel. yes, it's ugly...
|
2008-02-12 14:32:03 +00:00
|
|
|
/etc/httpd/conf.d/xcat.conf
|
2009-01-28 15:42:14 +00:00
|
|
|
/etc/apache2/conf.d/xcat.conf
|
2008-02-12 14:32:03 +00:00
|
|
|
%defattr(-,root,root)
|