2007-10-26 22:44:33 +00:00
|
|
|
Summary: Server and configuration utilities of the xCAT management project
|
|
|
|
Name: xCAT-server
|
2009-01-28 15:42:14 +00:00
|
|
|
Version: %(cat Version)
|
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
|
2009-01-28 15:42:14 +00:00
|
|
|
Source: xCAT-server-%(cat Version).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
|
|
|
|
|
2010-03-12 07:04:44 +00:00
|
|
|
%ifnos linux
|
|
|
|
AutoReqProv: no
|
|
|
|
%endif
|
|
|
|
|
2007-10-26 22:44:33 +00:00
|
|
|
# AIX will build with an arch of "ppc"
|
|
|
|
# also need to fix Requires for AIX
|
|
|
|
%ifos linux
|
|
|
|
BuildArch: noarch
|
2012-10-25 09:12:25 +00:00
|
|
|
Requires: perl-IO-Socket-SSL perl-XML-Simple perl-XML-Parser
|
2012-06-28 16:43:23 +00:00
|
|
|
Obsoletes: atftp-xcat
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%define fsm %(if [ "$fsm" = "1" ];then echo 1; else echo 0; fi)
|
|
|
|
|
|
|
|
%if %fsm
|
|
|
|
# nothing needed here
|
2012-06-15 14:17:07 +00:00
|
|
|
%else
|
2012-06-28 16:43:23 +00:00
|
|
|
%ifos linux
|
|
|
|
# do this for non-fsm linux
|
|
|
|
Requires: perl-IO-Tty perl-Crypt-SSLeay make
|
2012-06-15 14:17:07 +00:00
|
|
|
%endif
|
2007-10-26 22:44:33 +00:00
|
|
|
%endif
|
|
|
|
|
2012-06-28 16:43:23 +00:00
|
|
|
|
2012-03-20 15:49:33 +00:00
|
|
|
Requires: perl-xCAT >= %{epoch}:%(cat Version)
|
2009-06-25 19:21:30 +00:00
|
|
|
Requires: xCAT-client >= %{epoch}:%(cat Version|cut -d. -f 1,2)
|
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
|
|
|
|
|
2012-01-27 00:23:24 +00:00
|
|
|
%define zvm %(if [ "$zvm" = "1" ];then echo 1; else echo 0; fi)
|
|
|
|
|
2011-12-19 17:01:18 +00:00
|
|
|
# %define VERBOSE %(if [ "$VERBOSE" = "1" -o "$VERBOSE" = "yes" ];then echo 1; else echo 0; fi)
|
|
|
|
# %define NOVERBOSE %(if [ "$VERBOSE" = "1" -o "$VERBOSE" = "yes" ];then echo 0; else echo 1; fi)
|
|
|
|
# %define NOVERBOSE %{?VERBOSE:1}%{!?VERBOSE:0}
|
|
|
|
|
2008-08-04 14:25:15 +00:00
|
|
|
%prep
|
2011-12-19 17:01:18 +00:00
|
|
|
# %if %NOVERBOSE
|
|
|
|
# echo NOVERBOSE is on
|
|
|
|
# set +x
|
|
|
|
# %elseif
|
|
|
|
# set -x
|
|
|
|
# %endif
|
|
|
|
|
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
|
2011-12-19 17:01:18 +00:00
|
|
|
#cp foo bar
|
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
|
2008-10-28 13:38:30 +00:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/xcat/rollupdate
|
2010-05-06 13:59:54 +00:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/xcat/installp_bundles
|
2010-08-20 19:25:40 +00:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/xcat/image_data
|
2009-01-07 14:16:55 +00:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/xcat/ib/scripts
|
2010-03-22 18:05:44 +00:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/xcat/ib/netboot/sles
|
2012-03-29 04:51:46 +00:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/xcat/ib/netboot/rh
|
2011-10-17 14:21:43 +00:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/xcat/ib/scripts/Mellanox
|
2012-11-19 13:47:34 +00:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/xcat/devicetype
|
2007-12-11 19:14:43 +00:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin
|
2010-06-03 17:58:06 +00:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{prefix}/xdsh/Context
|
2007-12-11 19:14:43 +00:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_monitoring/samples
|
2008-09-16 15:40:47 +00:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_monitoring/pcp
|
2009-01-09 22:25:35 +00:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_schema/samples
|
2009-03-20 21:36:49 +00:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT
|
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
|
2011-12-19 17:01: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
|
2013-01-08 02:48:30 +00:00
|
|
|
cp -r share/xcat/tools/* $RPM_BUILD_ROOT/%{prefix}/share/xcat/tools
|
2008-10-28 13:38:30 +00:00
|
|
|
cp share/xcat/rollupdate/* $RPM_BUILD_ROOT/%{prefix}/share/xcat/rollupdate
|
2010-05-06 13:59:54 +00:00
|
|
|
cp share/xcat/installp_bundles/* $RPM_BUILD_ROOT/%{prefix}/share/xcat/installp_bundles
|
2010-08-20 19:25:40 +00:00
|
|
|
cp share/xcat/image_data/* $RPM_BUILD_ROOT/%{prefix}/share/xcat/image_data
|
2007-11-30 15:24:09 +00:00
|
|
|
cp share/xcat/cons/* $RPM_BUILD_ROOT/%{prefix}/share/xcat/cons
|
2011-10-17 14:21:43 +00:00
|
|
|
cp -r share/xcat/ib/scripts/* $RPM_BUILD_ROOT/%{prefix}/share/xcat/ib/scripts
|
2010-03-22 18:05:44 +00:00
|
|
|
cp share/xcat/ib/netboot/sles/* $RPM_BUILD_ROOT/%{prefix}/share/xcat/ib/netboot/sles
|
2012-03-29 04:51:46 +00:00
|
|
|
cp share/xcat/ib/netboot/rh/* $RPM_BUILD_ROOT/%{prefix}/share/xcat/ib/netboot/rh
|
2012-11-19 13:47:34 +00:00
|
|
|
cp -r share/xcat/devicetype/* $RPM_BUILD_ROOT/%{prefix}/share/xcat/devicetype
|
2012-11-13 22:03:57 +00:00
|
|
|
|
2007-11-30 15:24:09 +00:00
|
|
|
chmod 755 $RPM_BUILD_ROOT/%{prefix}/share/xcat/cons/*
|
2009-06-23 07:00:47 +00:00
|
|
|
chmod 755 $RPM_BUILD_ROOT/%{prefix}/share/xcat/ib/scripts/*
|
2010-03-22 18:05:44 +00:00
|
|
|
chmod 755 $RPM_BUILD_ROOT/%{prefix}/share/xcat/ib/netboot/sles/*
|
2012-03-29 04:51:46 +00:00
|
|
|
chmod 755 $RPM_BUILD_ROOT/%{prefix}/share/xcat/ib/netboot/rh/*
|
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
|
|
|
|
2009-03-20 21:36:49 +00:00
|
|
|
cp lib/perl/xCAT/* $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT
|
|
|
|
chmod 644 $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT/*
|
2011-10-18 02:46:24 +00:00
|
|
|
|
|
|
|
chmod 755 $RPM_BUILD_ROOT/%{prefix}/share/xcat/netboot/sles/*.postinstall
|
2012-08-21 01:36:58 +00:00
|
|
|
chmod 755 $RPM_BUILD_ROOT/%{prefix}/share/xcat/netboot/rh/*.postinstall
|
2011-10-18 02:46:24 +00:00
|
|
|
|
2012-01-27 00:23:24 +00:00
|
|
|
# For now, don't ship these plugins on AIX to avoid AIX dependency.
|
2008-01-23 14:15:18 +00:00
|
|
|
%ifnos linux
|
2009-12-03 08:01:33 +00:00
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/sbin/stopstartxcatd
|
2009-03-25 14:35:49 +00:00
|
|
|
#rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/blade.pm
|
2009-11-13 20:00:31 +00:00
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/hpblade.pm
|
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/hpilo.pm
|
2009-11-27 08:26:24 +00:00
|
|
|
#rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/ipmi.pm
|
2008-01-23 14:15:18 +00:00
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/nodediscover.pm
|
2012-02-13 17:58:24 +00:00
|
|
|
#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
|
2009-03-10 15:43:25 +00:00
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/kvm.pm
|
2009-03-15 22:03:18 +00:00
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/vbox.pm
|
2010-03-30 15:05:13 +00:00
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/activedirectory.pm
|
2008-01-23 14:15:18 +00:00
|
|
|
%endif
|
|
|
|
|
2012-02-01 01:01:27 +00:00
|
|
|
cp lib/xcat/dsh/Context/* $RPM_BUILD_ROOT/%{prefix}/xdsh/Context
|
|
|
|
chmod 644 $RPM_BUILD_ROOT/%{prefix}/xdsh/Context/*
|
|
|
|
|
|
|
|
cp -r lib/xcat/monitoring/* $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_monitoring
|
|
|
|
chmod 644 $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_monitoring/*
|
|
|
|
|
|
|
|
chmod 755 $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_monitoring/samples
|
|
|
|
chmod 644 $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_monitoring/samples/*
|
|
|
|
chmod 755 $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_monitoring/pcp
|
|
|
|
chmod 644 $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_monitoring/pcp/*
|
|
|
|
|
|
|
|
cp -r lib/xcat/schema/* $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_schema
|
|
|
|
chmod 644 $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_schema/*
|
|
|
|
|
|
|
|
chmod 755 $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_schema/samples
|
|
|
|
chmod 644 $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_schema/samples/*
|
|
|
|
|
2012-01-27 00:23:24 +00:00
|
|
|
# Don't ship these on zVM, to reduce dependencies
|
|
|
|
%if %zvm
|
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/sbin/stopstartxcatd
|
2012-02-01 01:01:27 +00:00
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/activedirectory.pm
|
2012-06-14 18:11:23 +00:00
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/blade.pm
|
2012-01-27 00:23:24 +00:00
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/hpblade.pm
|
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/hpilo.pm
|
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/ipmi.pm
|
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/ipmi.pm.legacy
|
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/nodediscover.pm
|
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/switch.pm
|
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/xen.pm
|
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/kvm.pm
|
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/vbox.pm
|
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/aixinstall.pm
|
2012-06-18 21:35:53 +00:00
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/slpdiscover.pm
|
2013-01-09 21:28:11 +00:00
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/remoteimmsetup.pm
|
2013-01-10 18:53:01 +00:00
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT/IMMUtils.pm
|
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT/RShellAPI.pm
|
2012-01-27 00:23:24 +00:00
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/bmcconfig.pm
|
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/bpa.pm
|
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/esx.pm
|
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/FIP.pm
|
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/fsp.pm
|
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/hmc.pm
|
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/ivm.pm
|
2012-06-18 21:35:53 +00:00
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/lsslp.pm
|
2012-01-27 00:23:24 +00:00
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/pxe.pm
|
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/toolscenter.pm
|
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/windows.pm
|
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/xcat2nim.pm
|
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/xnba.pm
|
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT/IPMI.pm
|
2012-06-19 00:31:31 +00:00
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT/SSHInteract.pm
|
2012-01-27 00:23:24 +00:00
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT/MellanoxIB.pm
|
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT/PPC.pm
|
2012-02-01 01:01:27 +00:00
|
|
|
# Can not remove this, because it is needed by Templates.pm
|
|
|
|
#rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT/ADUtils.pm
|
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/share/xcat/cons/hmc
|
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/share/xcat/cons/ivm
|
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/share/xcat/cons/multiple
|
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/share/xcat/cons/fsp
|
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_monitoring/snmpmon.pm
|
2012-06-14 18:11:23 +00:00
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/sbin/xcat_traphandler
|
|
|
|
%endif
|
|
|
|
|
|
|
|
# Don't ship these on FSM, to reduce dependencies
|
|
|
|
%if %fsm
|
|
|
|
rm -rf $RPM_BUILD_ROOT/%{prefix}/share/xcat/installp_bundles
|
|
|
|
rm -rf $RPM_BUILD_ROOT/%{prefix}/share/xcat/cons
|
2012-06-21 16:41:16 +00:00
|
|
|
rm -rf $RPM_BUILD_ROOT/%{prefix}/share/xcat/install
|
2012-07-03 21:03:33 +00:00
|
|
|
rm -rf $RPM_BUILD_ROOT/%{prefix}/share/xcat/netboot/add-on
|
|
|
|
rm -rf $RPM_BUILD_ROOT/%{prefix}/share/xcat/netboot/aix
|
|
|
|
rm -rf $RPM_BUILD_ROOT/%{prefix}/share/xcat/netboot/centos
|
|
|
|
rm -rf $RPM_BUILD_ROOT/%{prefix}/share/xcat/netboot/debian
|
|
|
|
rm -rf $RPM_BUILD_ROOT/%{prefix}/share/xcat/netboot/esxi/48.esxifixup
|
|
|
|
rm -rf $RPM_BUILD_ROOT/%{prefix}/share/xcat/netboot/esxi/xcatsplash
|
|
|
|
rm -rf $RPM_BUILD_ROOT/%{prefix}/share/xcat/netboot/fedora*
|
|
|
|
rm -rf $RPM_BUILD_ROOT/%{prefix}/share/xcat/netboot/imgutils
|
|
|
|
rm -rf $RPM_BUILD_ROOT/%{prefix}/share/xcat/netboot/rh
|
2013-01-10 18:53:01 +00:00
|
|
|
rm -rf $RPM_BUILD_ROOT/%{prefix}/share/xcat/netboot/ol
|
|
|
|
rm -rf $RPM_BUILD_ROOT/%{prefix}/share/xcat/devicetype
|
2012-07-03 21:03:33 +00:00
|
|
|
rm -rf $RPM_BUILD_ROOT/%{prefix}/share/xcat/netboot/SL
|
|
|
|
rm -rf $RPM_BUILD_ROOT/%{prefix}/share/xcat/netboot/sles
|
|
|
|
rm -rf $RPM_BUILD_ROOT/%{prefix}/share/xcat/netboot/suse
|
|
|
|
rm -rf $RPM_BUILD_ROOT/%{prefix}/share/xcat/netboot/syslinux
|
|
|
|
rm -rf $RPM_BUILD_ROOT/%{prefix}/share/xcat/netboot/ubuntu
|
|
|
|
rm -rf $RPM_BUILD_ROOT/%{prefix}/share/xcat/netboot/windows
|
|
|
|
|
2012-06-14 18:11:23 +00:00
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/sbin/stopstartxcatd
|
2013-01-10 18:53:01 +00:00
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/sbin/rshell_api
|
2012-06-14 18:11:23 +00:00
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/hpblade.pm
|
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/share/xcat/tools/detect_dhcpd
|
2012-06-15 14:17:07 +00:00
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/AAsn.pm
|
2012-06-14 18:11:23 +00:00
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/hpilo.pm
|
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/ipmi.pm
|
2012-06-15 14:17:07 +00:00
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/blade.pm
|
2012-06-14 18:11:23 +00:00
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/ipmi.pm.legacy
|
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/nodediscover.pm
|
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/switch.pm
|
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/xen.pm
|
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/kvm.pm
|
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/vbox.pm
|
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/aixinstall.pm
|
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/bmcconfig.pm
|
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/bpa.pm
|
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/ddns.pm
|
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/dhcp.pm
|
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/FIP.pm
|
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/fsp.pm
|
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/hmc.pm
|
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/ivm.pm
|
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/lsslp.pm
|
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/slpdiscover.pm
|
2013-01-09 21:28:11 +00:00
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/remoteimmsetup.pm
|
2013-01-10 18:53:01 +00:00
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT/IMMUtils.pm
|
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT/RShellAPI.pm
|
2012-06-14 18:11:23 +00:00
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/pxe.pm
|
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/toolscenter.pm
|
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/xcat2nim.pm
|
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/xnba.pm
|
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT/IPMI.pm
|
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT/SSHInteract.pm
|
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT/MellanoxIB.pm
|
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT/PPC.pm
|
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_monitoring/snmpmon.pm
|
2012-02-01 01:01:27 +00:00
|
|
|
rm $RPM_BUILD_ROOT/%{prefix}/sbin/xcat_traphandler
|
2012-01-27 00:23:24 +00:00
|
|
|
%endif
|
|
|
|
|
2009-01-09 22:25:35 +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
|
2012-08-08 21:03:25 +00:00
|
|
|
%if %fsm
|
|
|
|
%else
|
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
|
2012-08-08 21:03:25 +00:00
|
|
|
%endif
|
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
|
|
|
|
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
|
|
|
|
2012-01-12 03:01:59 +00:00
|
|
|
# genereate the configuration files for web service (REST API)
|
2011-11-02 19:45:48 +00:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{prefix}/ws
|
2012-01-12 03:01:59 +00:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/etc/apache2/conf.d
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/etc/httpd/conf.d
|
2011-11-02 19:45:48 +00:00
|
|
|
cp xCAT-wsapi/* $RPM_BUILD_ROOT/%{prefix}/ws
|
2012-06-21 19:46:19 +00:00
|
|
|
%if %fsm
|
|
|
|
%else
|
2012-08-20 13:59:00 +00:00
|
|
|
echo "ScriptAlias /xcatrhevh %{prefix}/ws/xcatrhevh.cgi" > $RPM_BUILD_ROOT/etc/apache2/conf.d/xcat-ws.conf
|
2012-09-03 09:08:11 +00:00
|
|
|
echo "ScriptAlias /xcatws %{prefix}/ws/xcatws.cgi" >> $RPM_BUILD_ROOT/etc/apache2/conf.d/xcat-ws.conf
|
2012-01-12 03:01:59 +00:00
|
|
|
cat $RPM_BUILD_ROOT/%{prefix}/ws/xcat-ws.conf.apache2 >> $RPM_BUILD_ROOT/etc/apache2/conf.d/xcat-ws.conf
|
2011-11-02 19:45:48 +00:00
|
|
|
|
2012-08-20 13:59:00 +00:00
|
|
|
echo "ScriptAlias /xcatrhevh %{prefix}/ws/xcatrhevh.cgi" > $RPM_BUILD_ROOT/etc/httpd/conf.d/xcat-ws.conf
|
2012-09-03 09:08:11 +00:00
|
|
|
echo "ScriptAlias /xcatws %{prefix}/ws/xcatws.cgi" >> $RPM_BUILD_ROOT/etc/httpd/conf.d/xcat-ws.conf
|
2012-01-12 03:01:59 +00:00
|
|
|
cat $RPM_BUILD_ROOT/%{prefix}/ws/xcat-ws.conf.httpd >> $RPM_BUILD_ROOT/etc/httpd/conf.d/xcat-ws.conf
|
2012-06-21 19:46:19 +00:00
|
|
|
%endif
|
2012-01-12 03:01:59 +00:00
|
|
|
rm -f $RPM_BUILD_ROOT/%{prefix}/ws/xcat-ws.conf.apache2
|
|
|
|
rm -f $RPM_BUILD_ROOT/%{prefix}/ws/xcat-ws.conf.httpd
|
2011-11-02 19:45:48 +00:00
|
|
|
|
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
|
2012-06-21 19:46:19 +00:00
|
|
|
%if %fsm
|
|
|
|
%else
|
2012-08-08 21:03:25 +00:00
|
|
|
/etc/init.d/xcatd
|
2012-01-12 08:45:42 +00:00
|
|
|
/etc/apache2/conf.d/xcat-ws.conf
|
|
|
|
/etc/httpd/conf.d/xcat-ws.conf
|
2012-06-21 19:46:19 +00:00
|
|
|
%endif
|
2007-10-26 22:44:33 +00:00
|
|
|
|
|
|
|
%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
|
|
|
|
|
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-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
|
2011-11-05 10:48:41 +00:00
|
|
|
|
|
|
|
if [ "$1" = "1" ]; then #Only if installing for the first time..
|
|
|
|
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
|
|
|
|
else
|
|
|
|
echo "Unable to register init scripts on this system"
|
|
|
|
fi
|
2007-10-26 22:44:33 +00:00
|
|
|
fi
|
2008-04-25 19:49:20 +00:00
|
|
|
if [ "$1" -gt "1" ]; then #only on upgrade...
|
2009-02-03 17:16:17 +00:00
|
|
|
#migration issue for monitoring
|
|
|
|
XCATROOT=$RPM_INSTALL_PREFIX0 $RPM_INSTALL_PREFIX0/sbin/chtab filename=monitorctrl.pm notification -d
|
|
|
|
|
2007-10-26 22:44:33 +00:00
|
|
|
fi
|
2008-09-12 19:25:50 +00:00
|
|
|
%else
|
|
|
|
if [ "$1" -gt "1" ]; then #only on upgrade for AIX...
|
|
|
|
#migration issue for monitoring
|
|
|
|
XCATROOT=$RPM_INSTALL_PREFIX0 $RPM_INSTALL_PREFIX0/sbin/chtab filename=monitorctrl.pm notification -d
|
2009-12-03 08:01:33 +00:00
|
|
|
|
2008-09-12 19:25:50 +00:00
|
|
|
fi
|
2008-01-22 18:58:04 +00:00
|
|
|
%endif
|
2011-11-02 19:45:48 +00:00
|
|
|
|
|
|
|
|
2010-12-20 02:56:35 +00:00
|
|
|
exit 0
|
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
|
2012-01-12 03:01:59 +00:00
|
|
|
|
|
|
|
rm -f /etc/httpd/conf.d/xcat-ws.conf
|
|
|
|
rm -f /etc/httpd/conf.d/xcat-ws.conf
|
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
|
|
|
|