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}
|
2012-10-25 09:12:25 +00:00
|
|
|
Requires: xCAT-server xCAT-client perl-DBD-SQLite
|
2010-02-08 19:48:57 +00:00
|
|
|
|
|
|
|
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
|
2012-10-25 09:12:25 +00:00
|
|
|
Requires: httpd nfs-utils nmap bind
|
|
|
|
# On RHEL this pulls in dhcp, on SLES it pulls in dhcp-server
|
|
|
|
Requires: /usr/sbin/dhcpd
|
|
|
|
# On RHEL this pulls in openssh-server, on SLES it pulls in openssh
|
|
|
|
Requires: /usr/bin/ssh
|
2012-10-22 17:18:39 +00:00
|
|
|
%ifnarch s390x
|
2011-11-30 09:37:44 +00:00
|
|
|
Requires: /etc/xinetd.d/tftp
|
2012-10-25 09:12:25 +00:00
|
|
|
# yaboot-xcat is pulled in so any MN can manage ppc nodes
|
2012-09-12 15:47:43 +00:00
|
|
|
Requires: conserver-xcat yaboot-xcat
|
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
|
2012-10-25 09:12:25 +00:00
|
|
|
Requires: syslinux xCAT-genesis-x86_64 elilo-xcat
|
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
|
|
|
|
2012-05-04 17:16:42 +00:00
|
|
|
%pre
|
|
|
|
# only need to check on AIX
|
|
|
|
%ifnos linux
|
|
|
|
if [ -x /usr/sbin/emgr ]; then # Check for emgr cmd
|
|
|
|
/usr/sbin/emgr -l 2>&1 | grep -i xCAT # Test for any xcat ifixes - msg and exit if found
|
|
|
|
if [ $? = 0 ]; then
|
|
|
|
echo "Error: One or more xCAT emgr ifixes are installed. You must use the /usr/sbin/emgr command to uninstall each xCAT emgr ifix prior to RPM installation."
|
|
|
|
exit 2
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
%endif
|
2008-02-12 14:32:03 +00:00
|
|
|
|
2012-05-04 17:16:42 +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
|
2012-08-16 14:58:41 +00:00
|
|
|
if [ -f "/proc/cmdline" ]; then # prevent running it during install into chroot image
|
|
|
|
XCATROOT=$RPM_INSTALL_PREFIX0 /etc/init.d/xcatd restart
|
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)
|