forked from pool/opa-ff
338 lines
15 KiB
RPMSpec
338 lines
15 KiB
RPMSpec
#
|
|
# spec file for package opa-ff
|
|
#
|
|
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
%define pseudo_opt %{_prefix}/lib/opa-ff/
|
|
%define opasysconfdir %{_sysconfdir}/opa/sysconfig
|
|
Name: opa-ff
|
|
Version: 10.3.1
|
|
Release: 0
|
|
Summary: Intel Omni-Path basic tools and libraries for fabric managment
|
|
License: BSD-3-Clause or GPL-2.0
|
|
Group: System/Libraries
|
|
Url: http://www.intel.com/
|
|
Source: opa-ff.tar.gz
|
|
Source1: opa-ff.rpmlintrc
|
|
Patch1: opa-ff_fix_suse_build_issue.patch
|
|
Patch2: 0001-Add-shebang-for-exp-files.patch
|
|
BuildRequires: gcc-c++
|
|
BuildRequires: ibacm-devel
|
|
BuildRequires: libexpat-devel
|
|
BuildRequires: libibmad-devel
|
|
BuildRequires: libibumad-devel
|
|
BuildRequires: libibverbs-devel
|
|
BuildRequires: libopenssl-devel
|
|
BuildRequires: ncurses-devel
|
|
BuildRequires: tcl-devel
|
|
BuildRequires: zlib-devel
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
#Currently ONLY builds on x86_64
|
|
ExclusiveArch: x86_64
|
|
|
|
%description
|
|
The %{name} contains basic tools and libraries for Intel Omni-Path fabric management applications. This
|
|
includes: the opa-fastfabric opa-basic-tools, opa-address-resolution-devel
|
|
|
|
%package -n opa-basic-tools
|
|
Summary: Managment level tools and scripts
|
|
Group: System/Libraries
|
|
Requires: rdma
|
|
AutoReq: no
|
|
|
|
%description -n opa-basic-tools
|
|
Contains basic tools for fabric managment necessary on all compute nodes.
|
|
|
|
%package -n opa-fastfabric
|
|
Summary: Management level tools and scripts
|
|
Group: System/Libraries
|
|
Requires: opa-basic-tools
|
|
AutoReq: no
|
|
%if 0%{?rhel}
|
|
Requires: atlas
|
|
%endif
|
|
|
|
%description -n opa-fastfabric
|
|
Contains tools for managing fabric on a managment node.
|
|
|
|
%package -n opa-address-resolution-devel
|
|
Summary: Contains Address Resolution manager
|
|
Group: Development/Libraries/C and C++
|
|
Requires: opa-basic-tools
|
|
AutoReq: no
|
|
|
|
%description -n opa-address-resolution-devel
|
|
This is to be filled out more concisely later.
|
|
|
|
%prep
|
|
%setup -q -n opa-ff
|
|
%patch1 -p1
|
|
%patch2 -p1
|
|
|
|
%build
|
|
export RPM_OPT_FLAGS
|
|
if [ -d OpenIb_Host ]
|
|
then
|
|
cd OpenIb_Host && ./ff_build.sh %{_builddir} $FF_BUILD_ARGS
|
|
else
|
|
./ff_build.sh %{_builddir} $FF_BUILD_ARGS
|
|
fi
|
|
|
|
%install
|
|
%define basic_tools_sbin opacapture opagetvf opagetvf_env opahfirev opapacketcapture opaportinfo oparesolvehfiport opasaquery opashowmc opasmaquery opainfo opafabricinfo
|
|
%define basic_tools_sbin_sym opapmaquery opaportconfig
|
|
|
|
%define basic_tools_opt setup_self_ssh usemem opaipcalc
|
|
|
|
%define basic_mans opacapture.1 opaconfig.1 opahfirev.1 opapmaquery.1 opaportconfig.1 opaportinfo.1 oparesolvehfiport.1 opasaquery.1 opashowmc.1 opasmaquery.1
|
|
|
|
%define ff_tools_opt opaswquery opaswconfigure opaswfwconfigure opaswfwupdate opaswfwverify opaswping opaswreset
|
|
|
|
%define ff_tools_exp basic.exp chassis.exp chassis_configure.exp chassis_fmconfig.exp chassis_fmcontrol.exp chassis_fmgetconfig.exp chassis_getconfig.exp chassis_reboot.exp chassis_fmgetsecurityfiles.exp chassis_fmsecurityfiles.exp chassis_upgrade.exp common_funcs.exp configipoib.exp extmng.exp ff_function.exp ib.exp opa_to_xml.exp ibtools.exp install.exp ipoibping.exp load.exp mpi.exp mpiperf.exp mpiperfdeviation.exp network.exp proc_mgr.exp reboot.exp sacache.exp sm_control.exp switch_capture.exp switch_configure.exp switch_dump.exp switch_fwverify.exp switch_getconfig.exp switch_hwvpd.exp switch_info.exp switch_ping.exp switch_reboot.exp switch_upgrade.exp target.exp tools.exp upgrade.exp tclIndex tcl_proc comm12 front
|
|
|
|
%define ff_tools_sbin opacabletest opacheckload opaextracterror opaextractlink opaextractperf opaextractstat opaextractstat2 opafindgood opafirmware opagenchassis opagenesmchassis opagenswitches opalinkanalysis opareport opareports opasorthosts opatop opaxlattopology opaxlattopology_cust opaxmlextract opaxmlfilter opaxmlgenerate opaxmlindent opaallanalysis opacaptureall opachassisanalysis opacmdall opadownloadall opaesmanalysis opafabricanalysis opafastfabric opahostsmanalysis opadisablehosts opadisableports opaenableports opaexpandfile opaextractbadlinks opaextractlids opaextractsellinks opaswdisableall opaverifyhosts opahostadmin opachassisadmin opaswitchadmin opapingall opascpall opasetupssh opashowallports opauploadall opapaquery opafequery opaswenableall
|
|
#opashowmc
|
|
%define ff_tools_misc ff_funcs opachassisip opagenswitcheshelper chassis_setup switch_setup opagetipaddrtype opafastfabric.conf.def
|
|
|
|
%define ff_tools_fm config_generate config_diff config_check config_convert
|
|
|
|
%define ff_libs_misc libqlgc_fork.so
|
|
|
|
%define ff_mans opaallanalysis.8 opacabletest.8 opacaptureall.8 opachassisadmin.8 opachassisanalysis.8 opacheckload.8 opacmdall.8 opadisablehosts.8 opadisableports.8 opadownloadall.8 opaenableports.8 opaesmanalysis.8 opaexpandfile.8 opaextractbadlinks.8 opaextracterror.8 opaextractlids.8 opaextractlink.8 opaextractperf.8 opaextractsellinks.8 opaextractstat.8 opaextractstat2.8 opafabricanalysis.8 opafastfabric.8 opafequery.8 opafindgood.8 opagenchassis.8 opagenesmchassis.8 opagenswitches.8 opagentopology.8 opahostadmin.8 opahostsmanalysis.8 opalinkanalysis.8 opapaquery.8 opapingall.8 opareport.8 opareports.8 opascpall.8 opasetupssh.8 opasorthosts.8 opaswitchadmin.8 opatop.8 opauploadall.8 opaverifyhosts.8 opaxlattopology.8 opaxlattopology_cust.8 opashowmc.8 opaxmlextract.8 opaxmlfilter.8 opaxmlgenerate.8 opaxmlindent.8 opashowallports.8 opaswdisableall.8 opaswenableall.8
|
|
%define ff_iba_samples hostverify.sh opatopology_FIs.txt opatopology_links.txt opatopology_SMs.txt opatopology_SWs.txt linksum_swd06.csv linksum_swd24.csv README.topology README.xlat_topology topology_cust.xlsx topology.xlsx allhosts-sample chassis-sample hosts-sample switches-sample ports-sample opaff.xml-sample mac_to_dhcp filterFile.txt triggerFile.txt opamon.conf-sample opamon.si.conf-sample opafastfabric.conf-sample opa_ca_openssl.cnf-sample opa_comp_openssl.cnf-sample
|
|
#opagentopology esm_chassis-sample
|
|
|
|
%define help_doc opatop_group_bw.hlp opatop_group_config.hlp opatop_group_err.hlp opatop_group_focus.hlp opatop_group_info_sel.hlp opatop_img_config.hlp opatop_pm_config.hlp opatop_port_stats.hlp opatop_summary.hlp opatop_vf_bw.hlp opatop_vf_info_sel.hlp opatop_vf_config.hlp
|
|
|
|
%define opasadb_bin opa_osd_dump opa_osd_exercise opa_osd_perf opa_osd_query
|
|
|
|
%define opasadb_header opasadb_path.h opasadb_route.h opasadb_route2.h
|
|
|
|
%define opasadb_mans opa_osd_dump.1 opa_osd_exercise.1 opa_osd_perf.1 opa_osd_query.1
|
|
|
|
%define shmem_apps_files Makefile mpi_hosts.sample prepare_run README select_mpi run_barrier run_get_bibw run_get_bw run_get_latency run_put_bibw run_put_bw run_put_latency run_reduce run_hello run_alltoall run_rand shmem-hello.c
|
|
|
|
%define release_string IntelOPA-Tools-FF.$BUILD_TARGET_OS_ID.$MODULEVERSION
|
|
|
|
|
|
#rm -rf $RPM_BUILD_ROOT
|
|
mkdir -p %{buildroot}%{_bindir}
|
|
mkdir -p %{buildroot}%{_sbindir}
|
|
#mkdir -p #{buildroot}/opt/opa/{tools,fm_tools,help,samples,src/mpi_apps,src/shmem_apps}
|
|
mkdir -p %{buildroot}%{pseudo_opt}/{tools,fm_tools,help,samples,src/mpi_apps,src/shmem_apps}
|
|
mkdir -p %{buildroot}%{_libdir}/ibacm
|
|
mkdir -p %{buildroot}%{_sysconfdir}/rdma
|
|
mkdir -p %{buildroot}%{_sysconfdir}/opa
|
|
mkdir -p %{buildroot}%{opasysconfdir}
|
|
mkdir -p %{buildroot}%{_includedir}/infiniband
|
|
mkdir -p %{buildroot}%{_mandir}/man1
|
|
mkdir -p %{buildroot}%{_mandir}/man8
|
|
mkdir -p %{buildroot}/opt
|
|
ln -s %{pseudo_opt} %{buildroot}/opt/opa
|
|
mkdir -p %{buildroot}%{_sysconfdir}/sysconfig
|
|
mkdir -p %{buildroot}%{_sysconfdir}/sysconfig/opa
|
|
|
|
#Binaries and scripts installing (basic tools)
|
|
#cd builtbin.OPENIB_FF.release
|
|
cd $(cat %{_builddir}/RELEASE_PATH)
|
|
|
|
cd bin
|
|
cp -t %{buildroot}%{_sbindir} %{basic_tools_sbin}
|
|
cp -t %{buildroot}/%{pseudo_opt}/tools/ %{basic_tools_opt}
|
|
ln -s ./opaportinfo %{buildroot}%{_sbindir}/opaportconfig
|
|
ln -s ./opasmaquery %{buildroot}%{_sbindir}/opapmaquery
|
|
|
|
cd ../opasadb
|
|
cp -t %{buildroot}%{_bindir} %{opasadb_bin}
|
|
cp -t %{buildroot}%{_includedir}/infiniband %{opasadb_header}
|
|
|
|
cd ../bin
|
|
cp -t %{buildroot}/%{pseudo_opt}/tools/ %{ff_tools_opt}
|
|
|
|
cd ../fastfabric
|
|
cp -t %{buildroot}%{_sbindir} %{ff_tools_sbin}
|
|
cp -t %{buildroot}%{pseudo_opt}tools/ %{ff_tools_misc}
|
|
cp -t %{buildroot}%{pseudo_opt}help %{help_doc}
|
|
|
|
cd ../etc
|
|
cp -t %{buildroot}/%{pseudo_opt}fm_tools/ %{ff_tools_fm}
|
|
ln -s %{pseudo_opt}/fm_tools/config_check %{buildroot}%{_sbindir}/opafmconfigcheck
|
|
ln -s %{pseudo_opt}/fm_tools/config_diff %{buildroot}%{_sbindir}/opafmconfigdiff
|
|
|
|
cd ../fastfabric/samples
|
|
cp -t %{buildroot}%{pseudo_opt}samples %{ff_iba_samples}
|
|
cd ..
|
|
|
|
cd ../fastfabric/tools
|
|
chmod 755 *.exp
|
|
cp -t %{buildroot}%{pseudo_opt}tools/ %{ff_tools_exp}
|
|
cp -t %{buildroot}%{pseudo_opt}tools/ %{ff_libs_misc}
|
|
cp -t %{buildroot}%{pseudo_opt}tools/ osid_wrapper
|
|
cp -t %{buildroot}%{opasysconfdir} allhosts chassis hosts ports switches opaff.xml esm_chassis
|
|
|
|
cd ..
|
|
cd ../man/man1
|
|
cp -t %{buildroot}%{_mandir}/man1 %{basic_mans}
|
|
cp -t %{buildroot}%{_mandir}/man1 %{opasadb_mans}
|
|
cd ../man8
|
|
cp -t %{buildroot}%{_mandir}/man8 %{ff_mans}
|
|
cd ..
|
|
|
|
#Config files
|
|
cd ../config
|
|
cp -t %{buildroot}%{_sysconfdir}/rdma dsap.conf
|
|
cp -t %{buildroot}/%{opasysconfdir} opamon.conf opamon.si.conf
|
|
#cd ..
|
|
#Libraries installing
|
|
cd $(cat %{_builddir}/LIB_PATH)
|
|
cp -t %{buildroot}%{_libdir} libopasadb.so.*
|
|
cp -t %{buildroot}%{_libdir}/ibacm libdsap.so.*
|
|
|
|
ln -s /etc/opa/sysconfig/allhosts %{buildroot}/etc/sysconfig/opa/allhosts
|
|
ln -s /etc/opa/sysconfig/chassis %{buildroot}/etc/sysconfig/opa/chassis
|
|
ln -s /etc/opa/sysconfig/esm_chassis %{buildroot}//etc/sysconfig/opa/esm_chassis
|
|
ln -s /etc/opa/sysconfig/hosts %{buildroot}/etc/sysconfig/opa/hosts
|
|
ln -s /etc/opa/sysconfig/opafastfabric.conf %{buildroot}/etc/sysconfig/opa/opafastfabric.conf
|
|
ln -s /etc/opa/sysconfig/opaff.xml %{buildroot}/etc/sysconfig/opa/opaff.xml
|
|
ln -s /etc/opa/sysconfig/opamon.conf %{buildroot}/etc/sysconfig/opa/opamon.conf
|
|
ln -s /etc/opa/sysconfig/opamon.si.conf %{buildroot}/etc/sysconfig/opa/opamon.si.conf
|
|
ln -s /etc/opa/sysconfig/ports %{buildroot}/etc/sysconfig/opa/ports
|
|
ln -s /etc/opa/sysconfig/switches %{buildroot}/etc/sysconfig/opa/switches
|
|
|
|
# Now that we've put everything in the buildroot, copy any default config files to their expected location for user
|
|
# to edit. To prevent nuking existing user configs, the files section of this spec file will reference these as noreplace
|
|
# config files.
|
|
cp %{buildroot}%{pseudo_opt}tools/opafastfabric.conf.def %{buildroot}/%{opasysconfdir}/opafastfabric.conf
|
|
|
|
#Now we do a bunch of work to build the file listing of what belongs to each RPM
|
|
|
|
#Basic tools sbin
|
|
echo "%{_sbindir}/%{basic_tools_sbin} %{basic_tools_sbin_sym}" > %{_builddir}/basic_sbin_file.list
|
|
sed -i 's;[ ];\n%{_sbindir}/;g' %{_builddir}/basic_sbin_file.list
|
|
|
|
#Basic tools opt
|
|
echo "%{pseudo_opt}tools/%{basic_tools_opt}" > %{_builddir}/basic_opt_file.list
|
|
sed -i 's;[ ];\n%{pseudo_opt}tools/;g' %{_builddir}/basic_opt_file.list
|
|
|
|
#Basic man pages
|
|
echo "%{_mandir}/man1/%{basic_mans}" > %{_builddir}/basic_mans.list
|
|
sed -i 's;[ ];\n/usr/share/man/man1/;g' %{_builddir}/basic_mans.list
|
|
sed -i 's;\.1;\.1*;g' %{_builddir}/basic_mans.list
|
|
|
|
#FF tools opt
|
|
echo "%{pseudo_opt}tools/%{ff_tools_opt}" > %{_builddir}/ff_opt_file.list
|
|
sed -i 's;[ ];\n%{pseudo_opt}tools/;g' %{_builddir}/ff_opt_file.list
|
|
|
|
#FF exp files opt
|
|
echo "%{pseudo_opt}tools/%{ff_tools_exp}" > %{_builddir}/ff_tools_exp.list
|
|
sed -i 's;[ ];\n%{pseudo_opt}tools/;g' %{_builddir}/ff_tools_exp.list
|
|
|
|
#FF misc files opt
|
|
echo "%{pseudo_opt}tools/%{ff_tools_misc}" > %{_builddir}/ff_tools_misc.list
|
|
sed -i 's;[ ];\n%{pseudo_opt}tools/;g' %{_builddir}/ff_tools_misc.list
|
|
|
|
#FF libs misc
|
|
echo "%{pseudo_opt}tools/%{ff_libs_misc}" > %{_builddir}/ff_libs_misc.list
|
|
sed -i 's;[ ];\n%{pseudo_opt}tools/;g' %{_builddir}/ff_libs_misc.list
|
|
|
|
#FF iba samples
|
|
echo "%{pseudo_opt}samples/%{ff_iba_samples}" > %{_builddir}/ff_iba_samples.list
|
|
sed -i 's;[ ];\n%{pseudo_opt}samples/;g' %{_builddir}/ff_iba_samples.list
|
|
|
|
#FF tools to FM configuration
|
|
echo "%{pseudo_opt}fm_tools/%{ff_tools_fm}" > %{_builddir}/ff_tools_fm.list
|
|
sed -i 's;[ ];\n%{pseudo_opt}fm_tools/;g' %{_builddir}/ff_tools_fm.list
|
|
|
|
#FF man pages
|
|
echo "%{_mandir}/man8/%{ff_mans}" > %{_builddir}/ff_mans.list
|
|
sed -i 's;[ ];\n/usr/share/man/man8/;g' %{_builddir}/ff_mans.list
|
|
sed -i 's;\.8;\.8*;g' %{_builddir}/ff_mans.list
|
|
|
|
#Final file listing for 'basic'
|
|
cat %{_builddir}/basic_sbin_file.list %{_builddir}/basic_opt_file.list %{_builddir}/basic_mans.list > %{_builddir}/basic_file.list
|
|
|
|
#FF tools help doc
|
|
echo "%{pseudo_opt}help/%{help_doc}" > %{_builddir}/ff_help_file.list
|
|
sed -i 's;[ ];\n%{pseudo_opt}help/;g' %{_builddir}/ff_help_file.list
|
|
|
|
#FF tools sbin
|
|
echo "%{_sbindir}/%{ff_tools_sbin}" > %{_builddir}/ff_sbin_file.list
|
|
sed -i 's;[ ];\n%{_sbindir}/;g' %{_builddir}/ff_sbin_file.list
|
|
|
|
#Final file listing for 'ff'
|
|
cat %{_builddir}/ff_sbin_file.list %{_builddir}/ff_help_file.list %{_builddir}/ff_tools_exp.list %{_builddir}/ff_tools_misc.list %{_builddir}/ff_libs_misc.list %{_builddir}/ff_iba_samples.list %{_builddir}/ff_mans.list %{_builddir}/ff_tools_fm.list %{_builddir}/ff_opt_file.list > %{_builddir}/ff_file.list
|
|
|
|
#TODO/
|
|
#preun fastfabric
|
|
#cd /opt/opa/src/mpi_apps >/dev/null 2>&1
|
|
#make -k clean >/dev/null 2>&1 || : # suppress all errors and return codes from the make clean.
|
|
|
|
|
|
%post -n opa-address-resolution-devel -p /sbin/ldconfig
|
|
%postun -n opa-address-resolution-devel -p /sbin/ldconfig
|
|
|
|
%files -n opa-basic-tools -f %{_builddir}/basic_file.list
|
|
%defattr(-,root,root,-)
|
|
%dir %{pseudo_opt}
|
|
%dir %{pseudo_opt}tools/
|
|
|
|
%doc README LICENSE
|
|
|
|
%files -n opa-fastfabric -f %{_builddir}/ff_file.list
|
|
%defattr(-,root,root,0755)
|
|
%dir %{pseudo_opt}
|
|
%dir %{pseudo_opt}fm_tools
|
|
%dir %{pseudo_opt}help
|
|
%dir %{pseudo_opt}samples
|
|
%dir %{pseudo_opt}tools
|
|
|
|
%dir %{_sysconfdir}/opa
|
|
%dir %{opasysconfdir}
|
|
%dir %{_sysconfdir}/sysconfig/opa
|
|
/etc/sysconfig/opa/*
|
|
|
|
%config(noreplace) %{opasysconfdir}/opafastfabric.conf
|
|
%config(noreplace) %{opasysconfdir}/opamon.conf
|
|
%config(noreplace) %{opasysconfdir}/allhosts
|
|
%config(noreplace) %{opasysconfdir}/chassis
|
|
%config(noreplace) %{opasysconfdir}/esm_chassis
|
|
%config(noreplace) %{opasysconfdir}/hosts
|
|
%config(noreplace) %{opasysconfdir}/ports
|
|
%config(noreplace) %{opasysconfdir}/switches
|
|
%config(noreplace) %{opasysconfdir}/opaff.xml
|
|
%{opasysconfdir}/opamon.si.conf
|
|
%{pseudo_opt}tools/osid_wrapper
|
|
%{_sbindir}/opafmconfigcheck
|
|
%{_sbindir}/opafmconfigdiff
|
|
|
|
/opt/opa
|
|
|
|
%files -n opa-address-resolution-devel
|
|
%defattr(-,root,root,-)
|
|
%dir %{_sysconfdir}/rdma/
|
|
#Everything under the bin directory belongs exclusively to opasadb at this time.
|
|
%{_bindir}/*
|
|
%{_libdir}/*
|
|
%{_includedir}/*
|
|
%{_mandir}/man1/opa_osd_dump.1*
|
|
%{_mandir}/man1/opa_osd_exercise.1*
|
|
%{_mandir}/man1/opa_osd_perf.1*
|
|
%{_mandir}/man1/opa_osd_query.1*
|
|
%config(noreplace) %{_sysconfdir}/rdma/dsap.conf
|
|
|
|
%changelog
|