2007-10-26 22:44:33 +00:00
|
|
|
Summary: Server and configuration utilities of the xCAT management project
|
|
|
|
Name: xCAT-server
|
2008-06-02 13:02:07 +00:00
|
|
|
Version: 2.1
|
2007-10-26 22:44:33 +00:00
|
|
|
Release: snap%(date +"%Y%m%d%H%M")
|
2008-06-26 18:42:36 +00:00
|
|
|
Epoch: 4
|
2007-10-26 22:44:33 +00:00
|
|
|
License: EPL
|
|
|
|
Group: Applications/System
|
2008-06-03 15:00:37 +00:00
|
|
|
Source: xCAT-server-2.1.tar.gz
|
2007-10-26 22:44:33 +00:00
|
|
|
Packager: IBM Corp.
|
|
|
|
Vendor: IBM Corp.
|
|
|
|
Distribution: %{?_distribution:%{_distribution}}%{!?_distribution:%{_vendor}}
|
2007-12-11 19:14:43 +00:00
|
|
|
Prefix: /opt/xcat
|
2007-10-26 22:44:33 +00:00
|
|
|
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-root
|
|
|
|
|
|
|
|
# AIX will build with an arch of "ppc"
|
|
|
|
# also need to fix Requires for AIX
|
|
|
|
%ifos linux
|
|
|
|
BuildArch: noarch
|
2008-07-03 14:03:08 +00:00
|
|
|
Requires: perl-IO-Socket-SSL perl-XML-Simple perl-IO-Tty
|
2007-10-26 22:44:33 +00:00
|
|
|
%endif
|
|
|
|
|
2008-06-19 16:50:18 +00:00
|
|
|
Requires: perl-xCAT >= %{epoch}:%{version}
|
|
|
|
Requires: xCAT-client >= %{epoch}:%{version}
|
2007-10-26 22:44:33 +00:00
|
|
|
|
2008-06-07 15:26:30 +00:00
|
|
|
Provides: xCAT-server = %{epoch}:%{version}
|
2007-10-26 22:44:33 +00:00
|
|
|
|
|
|
|
%description
|
|
|
|
xCAT-server provides the core server and configuration management components of xCAT. This package should be installed on your management server
|
|
|
|
|
2008-06-03 20:02:58 +00:00
|
|
|
%prep -n xCAT-server
|
2008-06-06 21:40:18 +00:00
|
|
|
%setup -q -n xCAT-server
|
2007-10-26 22:44:33 +00:00
|
|
|
%build
|
|
|
|
%install
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
2007-11-30 15:24:09 +00:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{prefix}/sbin
|
2008-04-16 21:15:13 +00:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{prefix}/bin
|
2008-02-29 14:54:32 +00:00
|
|
|
#mkdir -p $RPM_BUILD_ROOT/%{prefix}/rc.d
|
2007-11-30 15:24:09 +00:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/xcat/install
|
2008-01-29 01:04:45 +00:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/xcat/netboot
|
2007-11-30 15:24:09 +00:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/xcat/ca
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/xcat/scripts
|
2008-03-27 18:37:07 +00:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/xcat/tools
|
2007-11-30 15:24:09 +00:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/xcat/cons
|
2007-12-11 19:14:43 +00:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin
|
2007-12-12 13:52:59 +00:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/opt/xcat/xdsh/Context
|
2007-12-11 19:14:43 +00:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_monitoring/samples
|
2007-10-26 22:44:33 +00:00
|
|
|
|
|
|
|
|
2007-11-27 16:05:05 +00:00
|
|
|
%ifos linux
|
2007-11-30 15:24:09 +00:00
|
|
|
cp -a share/xcat/install/* $RPM_BUILD_ROOT/%{prefix}/share/xcat/install/
|
2008-01-29 01:04:45 +00:00
|
|
|
cp -a share/xcat/netboot/* $RPM_BUILD_ROOT/%{prefix}/share/xcat/netboot/
|
2007-11-27 16:05:05 +00:00
|
|
|
%else
|
2007-11-30 15:24:09 +00:00
|
|
|
cp -hpR share/xcat/install/* $RPM_BUILD_ROOT/%{prefix}/share/xcat/install/
|
2008-01-29 01:04:45 +00:00
|
|
|
cp -hpR share/xcat/netboot/* $RPM_BUILD_ROOT/%{prefix}/share/xcat/netboot/
|
2007-11-27 16:05:05 +00:00
|
|
|
%endif
|
|
|
|
|
2008-03-04 14:18:40 +00:00
|
|
|
%ifos linux
|
2008-06-06 21:40:18 +00:00
|
|
|
pwd
|
2008-02-25 14:30:25 +00:00
|
|
|
cp -d sbin/* $RPM_BUILD_ROOT/%{prefix}/sbin
|
2007-11-30 15:24:09 +00:00
|
|
|
chmod 755 $RPM_BUILD_ROOT/%{prefix}/sbin/*
|
2008-04-16 21:15:13 +00:00
|
|
|
cp -d bin/* $RPM_BUILD_ROOT/%{prefix}/bin
|
|
|
|
chmod 755 $RPM_BUILD_ROOT/%{prefix}/bin/*
|
2008-03-04 14:18:40 +00:00
|
|
|
%else
|
|
|
|
cp -h sbin/* $RPM_BUILD_ROOT/%{prefix}/sbin
|
|
|
|
chmod -h 755 $RPM_BUILD_ROOT/%{prefix}/sbin/*
|
2008-04-16 21:15:13 +00:00
|
|
|
cp -h bin/* $RPM_BUILD_ROOT/%{prefix}/bin
|
|
|
|
chmod -h 755 $RPM_BUILD_ROOT/%{prefix}/bin/*
|
2008-03-04 14:18:40 +00:00
|
|
|
%endif
|
|
|
|
|
2008-02-29 14:54:32 +00:00
|
|
|
#cp rc.d/* $RPM_BUILD_ROOT/%{prefix}/rc.d
|
|
|
|
#chmod 755 $RPM_BUILD_ROOT/%{prefix}/rc.d/*
|
2007-10-26 22:44:33 +00:00
|
|
|
|
2007-11-30 15:24:09 +00:00
|
|
|
cp share/xcat/ca/* $RPM_BUILD_ROOT/%{prefix}/share/xcat/ca
|
|
|
|
chmod 644 $RPM_BUILD_ROOT/%{prefix}/share/xcat/ca/*
|
2007-10-26 22:44:33 +00:00
|
|
|
|
2007-11-30 15:24:09 +00:00
|
|
|
cp share/xcat/scripts/* $RPM_BUILD_ROOT/%{prefix}/share/xcat/scripts
|
2008-03-27 18:37:07 +00:00
|
|
|
cp share/xcat/tools/* $RPM_BUILD_ROOT/%{prefix}/share/xcat/tools
|
2007-11-30 15:24:09 +00:00
|
|
|
cp share/xcat/cons/* $RPM_BUILD_ROOT/%{prefix}/share/xcat/cons
|
|
|
|
chmod 755 $RPM_BUILD_ROOT/%{prefix}/share/xcat/cons/*
|
|
|
|
ln -sf /%{prefix}/share/xcat/cons/hmc $RPM_BUILD_ROOT/%{prefix}/share/xcat/cons/ivm
|
2007-10-26 22:44:33 +00:00
|
|
|
|
2007-12-11 19:14:43 +00:00
|
|
|
cp lib/xcat/plugins/* $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin
|
|
|
|
chmod 644 $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/*
|
2007-10-26 22:44:33 +00:00
|
|
|
|
2008-01-23 14:15:18 +00:00
|
|
|
# For now, don't ship these plugins - to avoid AIX dependency on SNMP.
|
|
|
|
%ifnos linux
|
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/blade.pm
|
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/ipmi.pm
|
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/nodediscover.pm
|
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/switch.pm
|
2008-07-29 18:11:52 +00:00
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/xen.pm
|
2008-01-23 14:15:18 +00:00
|
|
|
%endif
|
|
|
|
|
2007-12-12 13:52:59 +00:00
|
|
|
cp lib/xcat/dsh/Context/* $RPM_BUILD_ROOT/opt/xcat/xdsh/Context
|
|
|
|
chmod 644 $RPM_BUILD_ROOT/opt/xcat/xdsh/Context/*
|
2007-10-26 22:44:33 +00:00
|
|
|
|
2007-12-11 19:14:43 +00:00
|
|
|
cp -r lib/xcat/monitoring/* $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_monitoring
|
|
|
|
chmod 644 $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_monitoring/*
|
2007-10-26 22:44:33 +00:00
|
|
|
|
2007-12-11 19:14:43 +00:00
|
|
|
chmod 755 $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_monitoring/samples
|
|
|
|
chmod 644 $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_monitoring/samples/*
|
2007-10-26 22:44:33 +00:00
|
|
|
|
2007-12-11 19:14:43 +00:00
|
|
|
cp lib/xcat/shfunctions $RPM_BUILD_ROOT/%{prefix}/lib
|
|
|
|
chmod 644 $RPM_BUILD_ROOT/%{prefix}/lib/shfunctions
|
2007-10-26 22:44:33 +00:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/etc/init.d
|
|
|
|
cp etc/init.d/xcatd $RPM_BUILD_ROOT/etc/init.d
|
2007-11-30 15:24:09 +00:00
|
|
|
#TODO: the next has to me moved to postscript, to detect /etc/xcat vs /etc/opt/xcat
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/etc/xcat
|
2007-10-26 22:44:33 +00:00
|
|
|
cp etc/xcat/postscripts.rules $RPM_BUILD_ROOT/etc/xcat/
|
|
|
|
|
2007-12-11 19:14:43 +00:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/doc/packages/xCAT-server
|
|
|
|
cp LICENSE.html $RPM_BUILD_ROOT/%{prefix}/share/doc/packages/xCAT-server
|
|
|
|
chmod 644 $RPM_BUILD_ROOT/%{prefix}/share/doc/packages/xCAT-server/*
|
2008-02-29 17:33:27 +00:00
|
|
|
#echo $RPM_BUILD_ROOT %{prefix}
|
2007-10-26 22:44:33 +00:00
|
|
|
|
|
|
|
%clean
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
2007-12-11 19:14:43 +00:00
|
|
|
#%doc LICENSE.html
|
2007-11-30 15:24:09 +00:00
|
|
|
%{prefix}
|
2007-10-26 22:44:33 +00:00
|
|
|
/etc/xcat
|
|
|
|
/etc/init.d/xcatd
|
|
|
|
|
|
|
|
%changelog
|
2007-11-30 15:24:09 +00:00
|
|
|
* Fri Nov 20 2007 - Jarrod Johnson <jbjohnso@us.ibm.com>
|
|
|
|
- Changes for relocatible rpm.
|
|
|
|
|
2007-10-26 22:44:33 +00:00
|
|
|
* Wed May 2 2007 - Norm Nott <nott@us.ibm.com>
|
|
|
|
- Made changes to make this work on AIX
|
|
|
|
|
|
|
|
* Tue Feb 27 2007 Jarrod Johnson <jbjohnso@us.ibm.com>
|
|
|
|
- Spawn server rpm for the server half of things, fix requires
|
|
|
|
|
|
|
|
* Tue Feb 20 2007 Jarrod Johnson <jbjohnso@us.ibm.com>
|
|
|
|
- Start core rpm for 1.3 work
|
|
|
|
|
2008-02-29 17:33:27 +00:00
|
|
|
%post
|
2008-01-22 18:58:04 +00:00
|
|
|
%ifos linux
|
2007-12-11 19:14:43 +00:00
|
|
|
ln -sf $RPM_INSTALL_PREFIX0/sbin/xcatd /usr/sbin/xcatd
|
2007-10-26 22:44:33 +00:00
|
|
|
if [ -x /usr/lib/lsb/install_initd ]; then
|
|
|
|
/usr/lib/lsb/install_initd /etc/init.d/xcatd
|
|
|
|
elif [ -x /sbin/chkconfig ]; then
|
|
|
|
/sbin/chkconfig --add xcatd
|
2008-02-29 17:33:27 +00:00
|
|
|
else
|
2007-10-26 22:44:33 +00:00
|
|
|
echo "Unable to register init scripts on this system"
|
|
|
|
fi
|
2008-04-25 19:49:20 +00:00
|
|
|
if [ "$1" -gt "1" ]; then #only on upgrade...
|
2008-05-21 16:22:09 +00:00
|
|
|
if [ -f "/proc/cmdline" ]; then # prevent running it during install into chroot image
|
|
|
|
/etc/init.d/xcatd restart
|
|
|
|
fi
|
2007-10-26 22:44:33 +00:00
|
|
|
fi
|
2008-01-22 18:58:04 +00:00
|
|
|
%endif
|
2007-10-26 22:44:33 +00:00
|
|
|
|
|
|
|
%preun
|
2008-01-22 18:58:04 +00:00
|
|
|
%ifos linux
|
2007-10-26 22:44:33 +00:00
|
|
|
if [ $1 == 0 ]; then #This means only on -e
|
2008-05-21 16:22:09 +00:00
|
|
|
if [ -f "/proc/cmdline" ]; then # prevent running it during install into chroot image
|
|
|
|
/etc/init.d/xcatd stop
|
|
|
|
fi
|
2007-10-26 22:44:33 +00:00
|
|
|
if [ -x /usr/lib/lsb/remove_initd ]; then
|
2007-12-11 19:14:43 +00:00
|
|
|
/usr/lib/lsb/remove_initd /etc/init.d/xcatd
|
2007-10-26 22:44:33 +00:00
|
|
|
elif [ -x /sbin/chkconfig ]; then
|
|
|
|
/sbin/chkconfig --del xcatd
|
|
|
|
fi
|
2008-02-29 17:33:27 +00:00
|
|
|
rm -f /usr/sbin/xcatd #remove the symbolic
|
2007-10-26 22:44:33 +00:00
|
|
|
fi
|
2008-01-22 18:58:04 +00:00
|
|
|
%endif
|
2007-12-11 19:14:43 +00:00
|
|
|
|
2007-10-26 22:44:33 +00:00
|
|
|
|
|
|
|
|
|
|
|
|