SHA256
1
0
forked from pool/opa-ff

- Cleanup install section

- Install and package missing libopamgt (bsc#1083499)

OBS-URL: https://build.opensuse.org/package/show/science:HPC/opa-ff?expand=0&rev=36
This commit is contained in:
Nicolas Morey-Chaisemartin 2018-03-01 16:34:25 +00:00 committed by Git OBS Bridge
parent b00e09c099
commit 9e597a1efc
2 changed files with 127 additions and 111 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Mar 1 16:33:18 UTC 2018 - nmoreychaisemartin@suse.com
- Cleanup install section
- Install and package missing libopamgt (bsc#1083499)
-------------------------------------------------------------------
Mon Nov 20 16:47:51 UTC 2017 - nmoreychaisemartin@suse.com

View File

@ -1,7 +1,7 @@
#
# spec file for package opa-ff
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2018 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
@ -17,6 +17,8 @@
%define git_ver .0.131.0.3ca3fd5
%define opamgt_major 0
%define opasadb_major 1_0_0
%define pseudo_opt %{_prefix}/lib/opa-ff/
%define opasysconfdir %{_sysconfdir}/opa/sysconfig
@ -68,11 +70,11 @@ Requires: atlas
%description -n opa-fastfabric
Contains tools for managing fabric on a managment node.
%package -n libopasadb1_0_0
%package -n libopasadb%{opasadb_major}
Summary: OmniPath Subnet Administrator database library
Group: System/Libraries
%description -n libopasadb1_0_0
%description -n libopasadb%{opasadb_major}
This is to be filled out more concisely later.
%package -n opa-address-resolution
@ -86,7 +88,7 @@ This is to be filled out more concisely later.
%package -n opa-address-resolution-devel
Summary: Development files for the OmniPath Address Resolution manager
Group: Development/Libraries/C and C++
Requires: libopasadb1_0_0 = %{version}
Requires: libopasadb%{opasadb_major} = %{version}
Requires: opa-address-resolution = %{version}
Requires: opa-basic-tools
@ -94,6 +96,22 @@ Requires: opa-basic-tools
This package contains the include files and libraries
required to develop programs for the opa-address-resolution package.
%package -n libopamgt%{opamgt_major}
Summary: Omni-Path management API library
Group: System/Libraries
%description -n libopamgt%{opamgt_major}
This package contains the library necessary to build applications that interface with an Omni-Path FM.
%package -n libopamgt-devel
Summary: Omni-Path library development headers
Group: Development/Libraries/C and C++
Requires: libopamgt%{opamgt_major}
%description -n libopamgt-devel
This package contains the necessary headers for opamgt development.
%prep
%setup -q -n %{name}-%{version}%{git_ver}
%patch1
@ -109,51 +127,19 @@ else
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_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
. OpenIb_Host/ff_filegroups.sh
%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}%{pseudo_opt}/{tools,fm_tools,help,samples,samples/opamgt}
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}%{_includedir}/opamgt/iba/public
mkdir -p %{buildroot}%{_mandir}/man1
mkdir -p %{buildroot}%{_mandir}/man8
mkdir -p %{buildroot}%{_sysconfdir}/sysconfig
@ -164,58 +150,66 @@ mkdir -p %{buildroot}%{_sysconfdir}/sysconfig/opa
cd $(cat %{_builddir}/RELEASE_PATH)
cd bin
cp -t %{buildroot}%{_sbindir} %{basic_tools_sbin}
cp -t %{buildroot}/%{pseudo_opt}/tools/ %{basic_tools_opt}
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}
cp -t %{buildroot}%{_bindir} ${opasadb_bin}
cp -t %{buildroot}%{_includedir}/infiniband ${opasadb_header}
cd ../opamgt
cp -t %{buildroot}%{_includedir}/opamgt $opamgt_headers
cp -t %{buildroot}%{_includedir}/opamgt/iba $opamgt_iba_headers
cp -t %{buildroot}%{_includedir}/opamgt/iba/public $opamgt_iba_public_headers
cp -t %{buildroot}%{pseudo_opt}/samples/opamgt $opamgt_examples
cd ../bin
cp -t %{buildroot}/%{pseudo_opt}/tools/ %{ff_tools_opt}
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}
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}
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}
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/ ${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
cp -t %{buildroot}%{opasysconfdir} allhosts chassis esm_chassis hosts ports switches opaff.xml
cd ..
cd ../man/man1
cp -t %{buildroot}%{_mandir}/man1 %{basic_mans}
cp -t %{buildroot}%{_mandir}/man1 %{opasadb_mans}
cp -t %{buildroot}%{_mandir}/man1 ${basic_mans}
cp -t %{buildroot}%{_mandir}/man1 ${opasadb_mans}
cd ../man8
cp -t %{buildroot}%{_mandir}/man8 %{ff_mans}
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.*
ln -s libopasadb.so.* %{buildroot}%{_libdir}/libopasadb.so
cp -t %{buildroot}%{_libdir}/ibacm libdsap.so.*
ln -s libdsap.so.* %{buildroot}%{_libdir}/ibacm/libdsap.so
cp -t %{buildroot}%{_libdir}/ libopamgt.so.*
ln -s libopamgt.so.* %{buildroot}%{_libdir}/libopamgt.so
ln -s /etc/opa/sysconfig/allhosts %{buildroot}/etc/sysconfig/opa/allhosts
ln -s /etc/opa/sysconfig/chassis %{buildroot}/etc/sysconfig/opa/chassis
@ -235,69 +229,78 @@ cp %{buildroot}%{pseudo_opt}tools/opafastfabric.conf.def %{buildroot}/%{opasysco
#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
# List for basic
(
#Basic tools sbin
for file in ${basic_tools_sbin} ${basic_tools_sbin_sym}; do
echo "%{_sbindir}/${file}"
done
#Basic tools opt
for file in ${basic_tools_opt}; do
echo "%{pseudo_opt}tools/${file}"
done
#Basic man pages
for file in ${basic_mans}; do
# Extra wildcard to accept .1.gz
echo "%{_mandir}/man1/${file}*"
done
) > %{_builddir}/basic_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
# List for opa-fastfabric
(
#FF tools opt
for file in ${ff_tools_opt}; do
echo "%{pseudo_opt}tools/${file}"
done
#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 exp files opt
for file in ${ff_tools_exp}; do
echo "%{pseudo_opt}tools/${file}"
done
#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 misc files opt
for file in ${ff_tools_misc}; do
echo "%{pseudo_opt}tools/${file}"
done
#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 libs misc
for file in ${ff_libs_misc}; do
echo "%{pseudo_opt}tools/${file}"
done
#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 iba samples
for file in ${ff_iba_samples}; do
echo "%{pseudo_opt}samples/${file}"
done
#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 tools to FM configuration
for file in ${ff_tools_fm}; do
echo "%{pseudo_opt}fm_tools/${file}"
done
#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 man pages
for file in ${ff_mans}; do
# Extra wildcard to accept .8.gz
echo "%{_mandir}/man8/${file}*"
done
#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 tools help doc
for file in ${help_doc}; do
echo "%{pseudo_opt}help/${file}"
done
#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
#FF tools sbin
for file in ${ff_tools_sbin}; do
echo "%{_sbindir}/${file}"
done
#Final file listing for 'basic'
cat %{_builddir}/basic_sbin_file.list %{_builddir}/basic_opt_file.list %{_builddir}/basic_mans.list > %{_builddir}/basic_file.list
) > %{_builddir}/ff_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
%post -n libopasadb%{opasadb_major} -p /sbin/ldconfig
%postun -n libopasadb%{opasadb_major} -p /sbin/ldconfig
#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 libopasadb1_0_0 -p /sbin/ldconfig
%postun -n libopasadb1_0_0 -p /sbin/ldconfig
%post -n libopamgt%{opamgt_major} -p /sbin/ldconfig
%postun -n libopamgt%{opamgt_major} -p /sbin/ldconfig
%files -n opa-basic-tools -f %{_builddir}/basic_file.list
%defattr(-,root,root,-)
@ -328,7 +331,6 @@ cat %{_builddir}/ff_sbin_file.list %{_builddir}/ff_help_file.list %{_builddir}/f
%config(noreplace) %{opasysconfdir}/ports
%config(noreplace) %{opasysconfdir}/switches
%config(noreplace) %{opasysconfdir}/opaff.xml
%{opasysconfdir}/opamon.si.conf
%config(noreplace) %{opasysconfdir}/opamon.si.conf
%{pseudo_opt}tools/osid_wrapper
%{_sbindir}/opafmconfigcheck
@ -336,7 +338,7 @@ cat %{_builddir}/ff_sbin_file.list %{_builddir}/ff_help_file.list %{_builddir}/f
# /opt/opa
%files -n libopasadb1_0_0
%files -n libopasadb%{opasadb_major}
%defattr(-,root,root)
%{_libdir}/libopasadb.so.1*
@ -354,8 +356,16 @@ cat %{_builddir}/ff_sbin_file.list %{_builddir}/ff_help_file.list %{_builddir}/f
%config(noreplace) %{_sysconfdir}/rdma/dsap.conf
%files -n opa-address-resolution-devel
%{_includedir}/*
%{_includedir}/infiniband
%{_libdir}/libopasadb.so
%{_libdir}/ibacm/libdsap.so
%files -n libopamgt%{opamgt_major}
%{_libdir}/libopamgt.so.0*
%files -n libopamgt-devel
%{_libdir}/libopamgt.so
%{_includedir}/opamgt
%{pseudo_opt}/samples/opamgt
%changelog