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
|
2010-01-25 13:41:46 +00:00
|
|
|
Source3: xCATSN
|
2008-02-12 14:32:03 +00:00
|
|
|
Provides: xCATsn = %{version}
|
2010-12-15 15:47:28 +00:00
|
|
|
Requires: xCAT-server xCAT-client perl-xCAT perl-DBD-SQLite
|
2010-02-08 19:48:57 +00:00
|
|
|
|
|
|
|
%ifos linux
|
|
|
|
Requires: perl-XML-Parser
|
|
|
|
%endif
|
|
|
|
|
|
|
|
Conflicts: xCAT
|
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
|
2010-05-03 19:52:56 +00:00
|
|
|
Requires: dhcp httpd nfs-utils expect nmap fping bind perl-XML-Parser vsftpd
|
2010-11-08 02:46:22 +00:00
|
|
|
%ifarch ppc64
|
|
|
|
Requires: perl-IO-Stty
|
|
|
|
%endif
|
2009-03-26 22:38:47 +00:00
|
|
|
%ifarch s390x
|
|
|
|
# No additional requires for zLinux right now
|
|
|
|
%else
|
2011-11-30 09:37:44 +00:00
|
|
|
Obsoletes: atftp-xcat
|
|
|
|
Requires: /etc/xinetd.d/tftp
|
|
|
|
Requires: conserver-xcat 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
|
2011-11-29 14:41:29 +00:00
|
|
|
Requires: ipmitool-xcat >= 1.8.9
|
2009-09-03 15:17:18 +00:00
|
|
|
Requires: xnba-undi syslinux-xcat
|
2008-02-12 14:32:03 +00:00
|
|
|
%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
|
2010-02-08 19:48:57 +00:00
|
|
|
|
|
|
|
%ifos linux
|
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
|
2010-01-25 13:41:46 +00:00
|
|
|
cp %{SOURCE3} $RPM_BUILD_ROOT/etc/xCATSN
|
2008-02-12 14:32:03 +00:00
|
|
|
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/doc/packages/xCAT
|
|
|
|
cp LICENSE.html $RPM_BUILD_ROOT/%{prefix}/share/doc/packages/xCAT
|
2010-02-08 19:48:57 +00:00
|
|
|
%else
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/etc/
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/opt/xcat/
|
|
|
|
cp %{SOURCE3} $RPM_BUILD_ROOT/etc/xCATSN
|
|
|
|
%endif
|
2008-02-12 14:32:03 +00:00
|
|
|
|
|
|
|
%post
|
|
|
|
|
2010-12-15 15:47:28 +00:00
|
|
|
|
2008-02-12 14:32:03 +00:00
|
|
|
if [ "$1" = "1" ]; then #Only if installing for the first time..
|
2010-12-15 15:47:28 +00:00
|
|
|
|
|
|
|
# setup sqlite if no other database
|
|
|
|
|
|
|
|
%ifos linux
|
|
|
|
if [ -f "/proc/cmdline" ]; then #check to make sure this is not image install
|
2010-12-15 16:13:32 +00:00
|
|
|
if [ ! -s /etc/xcat/cfgloc ]; then # database is sqlite
|
2010-12-15 15:47:28 +00:00
|
|
|
$RPM_INSTALL_PREFIX0/sbin/xcatconfig -d
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
%endif
|
|
|
|
|
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-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
|
|
|
|
2010-02-08 19:48:57 +00:00
|
|
|
%ifos linux
|
2010-04-01 08:16:00 +00:00
|
|
|
if [ -e "/etc/redhat-release" ]; then
|
|
|
|
apachedaemon='httpd'
|
|
|
|
else # SuSE
|
|
|
|
apachedaemon='apache2'
|
|
|
|
fi
|
|
|
|
|
2010-01-22 14:06:02 +00:00
|
|
|
# start xcatd
|
2010-04-01 08:16:00 +00:00
|
|
|
chkconfig $apachedaemon 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
|
2010-04-01 08:16:00 +00:00
|
|
|
/etc/init.d/$apachedaemon reload
|
2008-05-21 17:45:27 +00:00
|
|
|
fi
|
2008-02-12 14:32:03 +00:00
|
|
|
echo "xCATsn is now installed"
|
2010-02-08 19:48:57 +00:00
|
|
|
%endif
|
2008-02-12 14:32:03 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
%clean
|
|
|
|
|
|
|
|
%files
|
|
|
|
%{prefix}
|
2009-01-28 15:42:14 +00:00
|
|
|
# one for sles, one for rhel. yes, it's ugly...
|
2010-02-08 19:48:57 +00:00
|
|
|
%ifos linux
|
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
|
2010-02-08 19:48:57 +00:00
|
|
|
%endif
|
2010-01-25 13:41:46 +00:00
|
|
|
/etc/xCATSN
|
2008-02-12 14:32:03 +00:00
|
|
|
%defattr(-,root,root)
|