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
|
2012-11-09 16:47:02 +00:00
|
|
|
Requires: httpd nfs-utils expect nmap fping bind perl-XML-Parser vsftpd
|
|
|
|
# On RHEL this pulls in dhcp, on SLES it pulls in dhcp-server
|
|
|
|
Requires: /usr/sbin/dhcpd
|
2012-10-22 19:47:01 +00:00
|
|
|
%ifnarch s390x
|
2011-11-30 09:37:44 +00:00
|
|
|
Requires: /etc/xinetd.d/tftp
|
2012-10-22 19:47:01 +00:00
|
|
|
# yaboot-xcat is pulled in so any SN can manage ppc nodes
|
2011-11-30 09:37:44 +00:00
|
|
|
Requires: conserver-xcat yaboot-xcat perl-Net-Telnet
|
2009-03-26 22:38:47 +00:00
|
|
|
%endif
|
2012-11-27 22:25:06 +00:00
|
|
|
%ifarch ppc64
|
|
|
|
Requires: perl-IO-Stty
|
|
|
|
%endif
|
2008-02-12 14:32:03 +00:00
|
|
|
%endif
|
|
|
|
|
|
|
|
%ifarch i386 i586 i686 x86 x86_64
|
2013-11-26 19:42:01 +00:00
|
|
|
# The xCAT-genesis-x86_64 rpm is used for dhcp-based discovery, and flashing, so for now we do not need it on a ppc MN.
|
|
|
|
Requires: syslinux xCAT-genesis-x86_64
|
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 14:29:20 +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 14:29:20 +00:00
|
|
|
%post
|
2012-12-04 09:21:47 +00:00
|
|
|
# create dir for the current pid and move the original ones from /tmp/xcat to /var/run/xcat
|
|
|
|
mkdir -p /var/run/xcat
|
|
|
|
if [ -r "/tmp/xcat/installservice.pid" ]; then
|
|
|
|
mv /tmp/xcat/installservice.pid /var/run/xcat/installservice.pid
|
|
|
|
fi
|
|
|
|
if [ -r "/tmp/xcat/udpservice.pid" ]; then
|
|
|
|
mv /tmp/xcat/udpservice.pid /var/run/xcat/udpservice.pid
|
|
|
|
fi
|
|
|
|
if [ -r "/tmp/xcat/mainservice.pid" ]; then
|
|
|
|
mv /tmp/xcat/mainservice.pid /var/run/xcat/mainservice.pid
|
|
|
|
fi
|
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"
|
2013-01-02 14:33:50 +00:00
|
|
|
%else
|
|
|
|
# start xcatd on AIX
|
|
|
|
XCATROOT=$RPM_INSTALL_PREFIX0 $RPM_INSTALL_PREFIX0/sbin/restartxcatd
|
|
|
|
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)
|