2013-06-26 18:52:41 +00:00
|
|
|
Summary: Meta-Metapackage for a common, default xCAT management node setup with OpenStack
|
|
|
|
Name: xCAT-OpenStack
|
|
|
|
Version: %(cat Version)
|
|
|
|
Release: snap%(date +"%Y%m%d%H%M")
|
|
|
|
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
|
2013-06-26 20:45:11 +00:00
|
|
|
#BuildArch: noarch
|
2013-06-26 18:52:41 +00:00
|
|
|
Source: xCAT-OpenStack-%(cat Version).tar.gz
|
|
|
|
|
|
|
|
Provides: xCAT-OpenStack = %{version}
|
|
|
|
Requires: xCAT
|
|
|
|
|
|
|
|
%description
|
|
|
|
xCAT-OpenStack is an xCAT management node package intended for at-scale
|
|
|
|
management with OpenStack, including hardware management and software
|
|
|
|
management.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n xCAT-OpenStack
|
|
|
|
|
|
|
|
%build
|
2013-11-01 20:38:35 +00:00
|
|
|
# Build the pod version of the man pages for each DB table. It puts them in the man5 and man7 subdirs.
|
|
|
|
# Then convert the pods to man pages and html pages.
|
|
|
|
./db2man
|
2013-06-26 18:52:41 +00:00
|
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_schema
|
2013-10-22 14:45:41 +00:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin
|
2013-10-24 02:56:17 +00:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/install/postscripts
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/xcat/mypostscript
|
2013-11-01 20:38:35 +00:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/xcat/templates
|
2013-10-24 02:56:17 +00:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{prefix}/sbin
|
2013-06-26 18:52:41 +00:00
|
|
|
|
2013-11-01 20:38:35 +00:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/man/man5
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/doc/man5
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/man/man7
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/doc/man7
|
|
|
|
|
2013-06-26 18:52:41 +00:00
|
|
|
cp -a lib/perl/xCAT_schema/* $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_schema
|
|
|
|
find $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_schema -type d -exec chmod 755 {} \;
|
|
|
|
find $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_schema -type f -exec chmod 644 {} \;
|
|
|
|
|
2013-10-22 14:45:41 +00:00
|
|
|
cp -a lib/perl/xCAT_plugin/* $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin
|
2013-10-24 02:56:17 +00:00
|
|
|
chmod 644 $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/*
|
2013-10-22 14:45:41 +00:00
|
|
|
|
2013-10-24 02:56:17 +00:00
|
|
|
cp -a lib/perl/xCAT/* $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT
|
|
|
|
chmod 644 $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT/*
|
|
|
|
|
|
|
|
cp sbin/* $RPM_BUILD_ROOT/%{prefix}/sbin
|
|
|
|
chmod 755 $RPM_BUILD_ROOT/%{prefix}/sbin/*
|
|
|
|
|
2013-11-01 20:38:35 +00:00
|
|
|
# These were built dynamically in the build phase
|
|
|
|
cp share/man/man5/* $RPM_BUILD_ROOT/%{prefix}/share/man/man5
|
|
|
|
chmod 644 $RPM_BUILD_ROOT/%{prefix}/share/man/man5/*
|
|
|
|
cp share/doc/man5/* $RPM_BUILD_ROOT/%{prefix}/share/doc/man5
|
|
|
|
chmod 644 $RPM_BUILD_ROOT/%{prefix}/share/doc/man5/*
|
|
|
|
cp share/man/man7/* $RPM_BUILD_ROOT/%{prefix}/share/man/man7
|
|
|
|
chmod 644 $RPM_BUILD_ROOT/%{prefix}/share/man/man7/*
|
|
|
|
cp share/doc/man7/* $RPM_BUILD_ROOT/%{prefix}/share/doc/man7
|
|
|
|
chmod 644 $RPM_BUILD_ROOT/%{prefix}/share/doc/man7/*
|
2013-10-24 02:56:17 +00:00
|
|
|
|
|
|
|
#ln -sf ../bin/xcatclientnnr $RPM_BUILD_ROOT/%{prefix}/sbin/makeclouddata
|
|
|
|
|
|
|
|
#cd -
|
|
|
|
cp -a postscripts/* $RPM_BUILD_ROOT/install/postscripts
|
|
|
|
chmod 755 $RPM_BUILD_ROOT/install/postscripts/*
|
|
|
|
|
2013-10-31 21:06:27 +00:00
|
|
|
cp -a share/xcat/* $RPM_BUILD_ROOT/%{prefix}/share/xcat/
|
2013-11-01 20:38:35 +00:00
|
|
|
find $RPM_BUILD_ROOT/%{prefix}/share/xcat -type d -exec chmod 755 {} \;
|
|
|
|
find $RPM_BUILD_ROOT/%{prefix}/share/xcat -type f -exec chmod 644 {} \;
|
2013-06-26 18:52:41 +00:00
|
|
|
|
|
|
|
%clean
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
|
|
%files
|
|
|
|
%{prefix}
|
2013-10-24 02:56:17 +00:00
|
|
|
/install/postscripts
|
2013-06-26 18:52:41 +00:00
|
|
|
%defattr(-,root,root)
|
|
|
|
|
|
|
|
|
2013-07-03 15:31:10 +00:00
|
|
|
%post
|
|
|
|
%ifos linux
|
|
|
|
if [ -f "/proc/cmdline" ]; then # prevent running it during install into chroot image
|
|
|
|
if [ -f $RPM_INSTALL_PREFIX0/sbin/xcatd ]; then
|
2014-05-12 14:46:39 +00:00
|
|
|
/etc/init.d/xcatd restart
|
2013-07-03 15:31:10 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
%endif
|
|
|
|
exit 0
|
|
|
|
|