457d738a29
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@449 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
74 lines
1.9 KiB
RPMSpec
74 lines
1.9 KiB
RPMSpec
Summary: Metapackage for a common, default xCAT service node setup
|
|
Name: xCATsn
|
|
Version: 2.0
|
|
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
|
|
#BuildArch: noarch
|
|
Source1: xcat.conf
|
|
Provides: xCATsn = %{version}
|
|
Requires: xCAT-server xCAT-client perl-xCAT
|
|
|
|
%ifos linux
|
|
Requires: tftp-server dhcp httpd nfs-utils expect conserver fping bind
|
|
%endif
|
|
|
|
%ifarch i386 i586 i686 x86 x86_64
|
|
Requires: xCAT-nbroot-oss-x86_64 xCAT-nbroot-core-x86_64 xCAT-nbkernel-x86_64
|
|
Requires: ipmitool >= 1.8.9
|
|
%endif
|
|
|
|
%description
|
|
xCATsn is a service node management package intended for at-scale management,
|
|
including hardware management and software management.
|
|
|
|
|
|
%prep
|
|
|
|
%build
|
|
|
|
%install
|
|
mkdir -p $RPM_BUILD_ROOT/etc/httpd/conf.d/
|
|
mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/xcat/
|
|
cd -
|
|
cp %{SOURCE1} $RPM_BUILD_ROOT/etc/httpd/conf.d/xcat.conf
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/doc/packages/xCAT
|
|
cp LICENSE.html $RPM_BUILD_ROOT/%{prefix}/share/doc/packages/xCAT
|
|
|
|
|
|
%post
|
|
|
|
if [ "$1" = "1" ]; then #Only if installing for the first time..
|
|
|
|
mkdir -p /var/log/consoles
|
|
if ! grep /tftpboot /etc/exports; then
|
|
echo '/tftpboot *(rw,root_squash,sync)' >> /etc/exports #SECURITY: this has potential for sharing private host/user keys
|
|
fi
|
|
if ! grep /install /etc/exports; then
|
|
echo '/install *(ro,no_root_squash,sync)' >> /etc/exports #SECURITY: this has potential for sharing private host/user keys
|
|
service nfs restart
|
|
chkconfig nfs on
|
|
fi
|
|
|
|
|
|
### Start the xcatd daemon
|
|
|
|
XCATROOT=$RPM_INSTALL_PREFIX0 /etc/init.d/xcatd start
|
|
service httpd restart
|
|
chkconfig httpd on
|
|
echo "xCATsn is now installed"
|
|
fi
|
|
|
|
%clean
|
|
|
|
%files
|
|
%{prefix}
|
|
/etc/httpd/conf.d/xcat.conf
|
|
%defattr(-,root,root)
|