# $Id: openib.spec 6922 2006-05-04 12:49:48Z vlad $ %define build_root %(if [ ! -z "${build_root}" ]; then echo -n ${build_root}; else echo -n "/var/tmp/OFED"; fi) %define STACK_PREFIX /usr/ofed %define TMPDIR /tmp/openib %define VERSION 1.0 %define NAME openib %define RELVER 1.0 %define all_user_arch i386 ia64 x86_64 ppc %define IB_CONF_DIR /etc/infiniband %ifarch i386 ppc ia64 %define LIB_DIR %{STACK_PREFIX}/lib %else %define LIB_DIR %{STACK_PREFIX}/lib64 %endif # Disable brp-lib64-linux #%ifarch x86_64 ia64 #%define __arch_install_post %{nil} #%endif Summary: Infiniband HCA Driver Prereq: /sbin/ldconfig Name: %{NAME} Version: %{VERSION} Release: 1%{?dist} License: GPL/BSD Url: http://openib.org/ Group: System Environment/Base Source: %{NAME}-%{RELVER}.tgz Source1: ofed-docs-1.0.tar.gz Source2: %{NAME}-%{RELVER}-openib.conf Source3: %{NAME}-%{RELVER}-openibd.init Source4: %{NAME}-%{RELVER}-opensm.conf Source5: %{NAME}-%{RELVER}-opensmd.init Patch: openib-1.0-libehca_configure.patch Patch1: openib-1.0-Makefile.patch Patch2: openib-1.0-libmthca_cq_error.patch Patch3: openib-1.0-libehca_paranoia.patch BuildRoot: %{build_root} ExclusiveArch: %{all_user_arch} ppc64 BuildRequires: sysfsutils-devel %description InfiniBand "verbs", Access Layer and ULPs %ifarch %{all_user_arch} %package -n kernel-ib Version: %{VERSION} Summary: Infiniband updates for udev and boot time kernel module loading Group: System Environment/Libraries %description -n kernel-ib Infiniband updates for udev and boot time kernel module loading %endif # We don't package up modules, just the udev rules file and module loader # init script in the kernel-ib package, so there's no need for a devel package #%package -n kernel-ib-devel #Version: %{VERSION} #Release: %{krelver} #Summary: Infiniband Driver and ULPs kernel modules sources #Group: System Environment/Libraries #%description -n kernel-ib-devel #Core, HW and ULPs kernel modules sources %package -n libibverbs Version: 1.0.3 Summary: A library for direct userspace use of InfiniBand Prereq: kernel-ib Group: System Environment/Libraries %description -n libibverbs libibverbs is a library that allows userspace processes to use InfiniBand "verbs" as described in the InfiniBand Architecture Specification. This includes direct hardware access for fast path operations. %package -n libibverbs-devel Version: 1.0.3 Summary: Development files for the libibverbs library Group: System Environment/Libraries # Requires: %{name} = %{version}-%{release} sysfsutils-devel %description -n libibverbs-devel Static libraries and header files for the libibverbs verbs library. %ifarch %{all_user_arch} %package -n libibverbs-utils Version: 1.0.3 Summary: Examples for the libibverbs library Prereq: kernel-ib Group: System Environment/Libraries # Requires: %{name} = %{version}-%{release} %description -n libibverbs-utils Useful libibverbs1 example programs such as ibv_devinfo, which displays information about InfiniBand devices. %endif %package -n libibcm Version: 0.9.0 Summary: Userspace InfiniBand Connection Manager. Prereq: kernel-ib Group: System Environment/Libraries %description -n libibcm Along with the OpenIB kernel drivers, libibcm provides a userspace InfiniBand Connection Managment API. %package -n libmthca Version: 1.0.2 Summary: Mellanox InfiniBand HCA Userspace Driver Prereq: kernel-ib Group: System Environment/Libraries %description -n libmthca libmthca provides a device-specific userspace driver for Mellanox HCAs (MT23108 InfiniHost and MT25208 InfiniHost III Ex) for use with the libibverbs library. %package -n libmthca-devel Version: 1.0.2 Summary: Development files for the libmthca driver Group: System Environment/Libraries # Requires: %{name} = %{version}-%{release} %description -n libmthca-devel Static version of libmthca that may be linked directly to an application, which may be useful for debugging. %ifarch x86_64 %define with_ipath --with-libipathverbs %package -n libipathverbs Version: 1.0 Summary: PathScale InfiniPath HCA Userspace Driver Prereq: kernel-ib Group: System Environment/Libraries %description -n libipathverbs libipathverbs provides a device-specific userspace driver for PathScale HCAs. %package -n libipathverbs-devel Version: 1.0 Summary: Development files for the libipathverbs driver Group: System Environment/Libraries %description -n libipathverbs-devel Static version of libipathverbs that may be linked directly to an application, which may be useful for debugging. %else %define with_ipath --without-libipathverbs %endif %ifarch ppc ppc64 %define with_ehca --with-libehca %package -n libehca Version: 1.0 Summary: IBM eServer eHCA Infiniband device driver for Linux on POWER Prereq: kernel-ib Group: System Environment/Libraries %description -n libehca libehca provides a device-specific userspace driver for IBM's ehca InfiniBand cards. %package -n libehca-devel Version: 1.0 Summary: development files for eHCA Infiniband device driver Group: System Environment/Libraries %description -n libehca-devel Static version of libecha library that can be directly linked to an application, which may be useful for debugging. %else %define with_ehca --without-libehca %endif %package -n libsdp Version: 0.9.0 Epoch: 1 Summary: LD_PRELOAD-able library for using SDP Prereq: kernel-ib Group: System Environment/Libraries %description -n libsdp libsdp can be LD_PRELOAD-ed to have a sockets application use InfiniBand Sockets Direct Protocol (SDP) instead of TCP, transparently and without recompiling the application. %ifarch %{all_user_arch} %define with_srptools --with-srptools %package -n srptools Version: 0.0.4 Summary: Tools for SRP/IB Prereq: kernel-ib Group: Applications/System %description -n srptools In conjunction with the kernel ib_srp driver, srptools allows you to discover and use SCSI devices via the SCSI RDMA Protocol over InfiniBand. %else %define with_srptools --without-srptools %endif %ifarch %{all_user_arch} %define with_tvflash --with-tvflash %package -n tvflash Version: 0.9.0 # BuildRequires: pciutils-devel Summary: Tool to manage Mellanox HCA firmware flash memory Prereq: kernel-ib Group: Applications/System %description -n tvflash tvflash is used to query and update the firmware flash memory attached to Mellanox InfiniBand HCAs. %else %define with_tvflash --without-tvflash %endif %package -n libibcommon Version: 1.0 Summary: OpenIB InfiniBand Management and Diagnostic Tools Prereq: kernel-ib Group: System Environment/Libraries %description -n libibcommon libibcommon provides common utility functions for the IB diagnostic and management tools. %package -n libibcommon-devel Version: 1.0 Summary: Development files for the libibcommon library Group: System Environment/Libraries %description -n libibcommon-devel Development files for the libibcommon library %package -n libibmad Version: 1.0 Summary: OpenIB InfiniBand Management and Diagnostic Tools Prereq: kernel-ib Group: System Environment/Libraries %description -n libibmad libibmad provides low layer IB functions for use by the IB diagnostic and management programs. These include MAD, SA, SMP, and other basic IB functions. %package -n libibmad-devel Version: 1.0 Summary: Development files for the libibmad library. Group: System Environment/Libraries %description -n libibmad-devel Development files for the libibmad library. %package -n libibumad Version: 1.0 Summary: OpenIB InfiniBand Management and Diagnostic Tools Prereq: kernel-ib Group: System Environment/Libraries %description -n libibumad libibumad provides the user MAD library functions which sit on top of the user MAD modules in the kernel. These are used by the IB diagnostic and management tools, including OpenSM. %package -n libibumad-devel Version: 1.0 Summary: Development files for the libibumad library. Group: System Environment/Libraries %description -n libibumad-devel Development files for the libibumad library. %ifarch %{all_user_arch} %define with_openib_diags --with-openib-diags %package -n openib-diags Version: 1.0 Summary: OpenIB InfiniBand Diagnostic Tools Prereq: kernel-ib Group: System Environment/Libraries %description -n openib-diags diags provides IB diagnostic programs and scripts needed to diagnose an IB subnet. %else %define with_openib_diags --without-openib-diags %endif %ifarch %{all_user_arch} %define with_opensm --with-opensm %package -n opensm Version: 1.2.0 Summary: InfiniBand subnet manager and administration libraries Prereq: kernel-ib Group: System Environment/Libraries %description -n opensm OpenSM provides an implementation for an InfiniBand Subnet Manager and Administration. Such a software entity is required to run for in order to initialize the InfiniBand hardware (at least one per each InfiniBand subnet). %else %define with_opensm --without-opensm %endif %package -n opensm-libs Version: 1.2.0 Summary: InfiniBand subnet manager and administration libraries Prereq: kernel-ib Group: System Environment/Libraries %description -n opensm-libs OpenSM provides an implementation for an InfiniBand Subnet Manager and Administration. Such a software entity is required to run for in order to initialize the InfiniBand hardware (at least one per each InfiniBand subnet). %package -n opensm-devel Version: 1.2.0 Summary: Development files for OpenSM Group: System Environment/Libraries %description -n opensm-devel Static libraries and header files for OpenSM. %ifarch %{all_user_arch} %define with_perftest --with-perftest %package -n perftest Version: 1.0 Summary: IB Performance tests Prereq: kernel-ib Group: System Environment/Libraries %description -n perftest gen2 uverbs microbenchmarks %else %define with_perftest --without-perftest %endif %ifarch %{all_user_arch} %define with_mstflint --with-mstflint %package -n mstflint Version: 1.0 Summary: Burning Firmware Application Prereq: kernel-ib Group: Applications/System %description -n mstflint This package contains a burning tool for Mellanox manufactured HCA cards. It also provides access to the relevant source code. %else %define with_mstflint --without-mstflint %endif %package -n librdmacm Version: 0.9.0 Summary: RDMA cm library. Prereq: kernel-ib Group: System Environment/Libraries %description -n librdmacm RDMA cm library. %ifnarch ppc %define with_dapl --with-dapl %package -n dapl Version: 1.2.0 Summary: Userspace DAT and DAPL API. Prereq: kernel-ib Group: System Environment/Libraries Obsoletes: udapl <= 1.2 %description -n dapl Along with the OpenIB kernel drivers, libdat and libdapl provides a userspace RDMA API that supports DAT 1.2 specification %package -n dapl-devel Version: 1.2.0 Summary: Development files for the libdat and libdapl libraries Group: System Environment/Libraries Obsoletes: udapl-devel <= 1.2 %description -n dapl-devel Static libraries and header files for the libdat and libdapl library. %else %define with_dapl --without-dapl %endif ################################################################################################################################# %prep %setup -q -a 1 %patch -p1 ./configure --without-patch --prefix=%{STACK_PREFIX} --libdir=%{LIB_DIR} --with-libibverbs --with-libmthca %{with_ipath} %{with_ehca} --with-libibcm --with-libsdp --with-librdmacm %{with_dapl} --with-management-libs --with-libibcommon --with-libibumad --with-libibmad %{with_opensm} %{with_openib_diags} --without-mpi %{with_perftest} %{with_srptools} %{with_tvflash} %{with_mstflint} --without-memtrack %patch1 -p1 %patch2 -p1 %patch3 -p1 %build make user ### ### install ### %install rm -rf $RPM_BUILD_ROOT make DESTDIR=$RPM_BUILD_ROOT install_user # Copy infiniband configuration install -d $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig install -m 0644 $RPM_SOURCE_DIR/%{NAME}-%{RELVER}-openib.conf $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/openib.conf %ifnarch ppc # udapl configuration file perl -ni -e "s@/usr/lib@%{LIB_DIR}@;print" $RPM_BUILD_ROOT/%{STACK_PREFIX}/etc/dat.conf install -m 0644 $RPM_BUILD_ROOT/%{STACK_PREFIX}/etc/dat.conf $RPM_BUILD_ROOT/etc/dat.conf %endif rm -f $RPM_BUILD_ROOT/%{STACK_PREFIX}/etc/dat.conf # libsdp configuration file install -m 0644 $RPM_BUILD_ROOT/%{STACK_PREFIX}/etc/libsdp.conf $RPM_BUILD_ROOT/etc/ rm -f $RPM_BUILD_ROOT/%{STACK_PREFIX}/etc/libsdp.conf %ifarch %{all_user_arch} # Install openib service script install -d $RPM_BUILD_ROOT/%{_initrddir} install -m 0755 $RPM_SOURCE_DIR/%{NAME}-%{RELVER}-openibd.init $RPM_BUILD_ROOT/%{_initrddir}/openibd install -m 0644 $RPM_SOURCE_DIR/%{NAME}-%{RELVER}-opensm.conf $RPM_BUILD_ROOT/etc/opensm.conf install -m 0755 $RPM_SOURCE_DIR/%{NAME}-%{RELVER}-opensmd.init $RPM_BUILD_ROOT/%{_initrddir}/opensmd # Add sldd.sh (W/A for handover issue) install -m 0755 $RPM_BUILD_DIR/%{NAME}-%{RELVER}/sldd.sh $RPM_BUILD_ROOT/%{STACK_PREFIX}/bin/sldd.sh install -d $RPM_BUILD_ROOT/etc/udev/rules.d install -m 0644 $RPM_BUILD_DIR/%{NAME}-%{RELVER}/90-ib.rules $RPM_BUILD_ROOT/etc/udev/rules.d # Put the BUILD_ID file in place install -m 0644 $RPM_BUILD_DIR/%{NAME}-%{RELVER}/ofed-docs-1.0/BUILD_ID $RPM_BUILD_ROOT/%{STACK_PREFIX} # Install the release notes mkdir $RPM_BUILD_ROOT/%{STACK_PREFIX}/docs install -m 0644 $RPM_BUILD_DIR/%{NAME}-%{RELVER}/ofed-docs-1.0/docs/*{.txt,-example} $RPM_BUILD_ROOT/%{STACK_PREFIX}/docs # Move the man pages where they will be in the normal man search path mkdir -p $RPM_BUILD_ROOT/usr/share mv $RPM_BUILD_ROOT/%{STACK_PREFIX}/man $RPM_BUILD_ROOT/usr/share %endif # Remove the .la files from the install tree find $RPM_BUILD_ROOT -name \*.la | xargs rm %clean #Remove installed driver after rpm build finished # Leave $RPM_BUILD_ROOT in order to build dependent packages rm -rf $RPM_BUILD_DIR/%{NAME}-%{RELVER} ### ### pre section ### ### ### post section ### %ifarch %{all_user_arch} %post -n kernel-ib if [ $1 = 1 ]; then # 1 : This package is being installed for the first time /sbin/chkconfig --add openibd fi # END of post -n kernel-ib %endif %post -n libibverbs if [ $1 = 1 ]; then # 1 : This package is being installed for the first time # Update /etc/ld.so.conf perl -ni -e "print unless (m@%{LIB_DIR}\b@)" /etc/ld.so.conf echo "%{LIB_DIR}" >> /etc/ld.so.conf /sbin/ldconfig fi # END of post -n libibverbs %post -n libibverbs-devel if [ $1 = 1 ]; then # 1 : This package is being installed for the first time # Update /etc/ld.so.conf perl -ni -e "print unless (m@%{LIB_DIR}\b@)" /etc/ld.so.conf echo "%{LIB_DIR}" >> /etc/ld.so.conf /sbin/ldconfig fi # END of post -n libibverbs-devel %ifarch %{all_user_arch} %post -n libibverbs-utils if [ $1 = 1 ]; then # 1 : This package is being installed for the first time if [ -d %{STACK_PREFIX} ]; then case %{STACK_PREFIX//\//} in usr|bin|usrlocal|usrsbin|opt|root) ;; *) ln -snf %{STACK_PREFIX}/bin/ibv_asyncwatch /usr/bin ln -snf %{STACK_PREFIX}/bin/ibv_devices /usr/bin ln -snf %{STACK_PREFIX}/bin/ibv_devinfo /usr/bin ln -snf %{STACK_PREFIX}/bin/ibv_rc_pingpong /usr/bin ln -snf %{STACK_PREFIX}/bin/ibv_srq_pingpong /usr/bin ln -snf %{STACK_PREFIX}/bin/ibv_uc_pingpong /usr/bin ln -snf %{STACK_PREFIX}/bin/ibv_ud_pingpong /usr/bin ;; esac fi # Update /etc/ld.so.conf perl -ni -e "print unless (m@%{LIB_DIR}\b@)" /etc/ld.so.conf echo "%{LIB_DIR}" >> /etc/ld.so.conf /sbin/ldconfig fi %endif # END of post -n libibverbs-utils %post -n libibcm if [ $1 = 1 ]; then # 1 : This package is being installed for the first time # Update /etc/ld.so.conf perl -ni -e "print unless (m@%{LIB_DIR}\b@)" /etc/ld.so.conf echo "%{LIB_DIR}" >> /etc/ld.so.conf /sbin/ldconfig fi %post -n libmthca if [ $1 = 1 ]; then # 1 : This package is being installed for the first time # Update /etc/ld.so.conf perl -ni -e "print unless (m@%{LIB_DIR}\b@)" /etc/ld.so.conf echo "%{LIB_DIR}" >> /etc/ld.so.conf /sbin/ldconfig fi %post -n libmthca-devel if [ $1 = 1 ]; then # 1 : This package is being installed for the first time # Update /etc/ld.so.conf perl -ni -e "print unless (m@%{LIB_DIR}\b@)" /etc/ld.so.conf echo "%{LIB_DIR}" >> /etc/ld.so.conf /sbin/ldconfig fi %ifarch x86_64 %post -n libipathverbs if [ $1 = 1 ]; then # 1 : This package is being installed for the first time # Update /etc/ld.so.conf perl -ni -e "print unless (m@%{LIB_DIR}\b@)" /etc/ld.so.conf echo "%{LIB_DIR}" >> /etc/ld.so.conf /sbin/ldconfig fi %post -n libipathverbs-devel if [ $1 = 1 ]; then # 1 : This package is being installed for the first time # Update /etc/ld.so.conf perl -ni -e "print unless (m@%{LIB_DIR}\b@)" /etc/ld.so.conf echo "%{LIB_DIR}" >> /etc/ld.so.conf /sbin/ldconfig fi %endif %post -n libsdp if [ $1 = 1 ]; then # 1 : This package is being installed for the first time perl -ni -e "print unless (m@%{LIB_DIR}\b@)" /etc/ld.so.conf echo "%{LIB_DIR}" >> /etc/ld.so.conf /sbin/ldconfig fi %ifarch %{all_user_arch} %post -n srptools if [ $1 = 1 ]; then # 1 : This package is being installed for the first time echo fi %endif %ifarch %{all_user_arch} %post -n tvflash if [ $1 = 1 ]; then # 1 : This package is being installed for the first time echo fi %endif %post -n libibcommon if [ $1 = 1 ]; then # 1 : This package is being installed for the first time # Update /etc/ld.so.conf perl -ni -e "print unless (m@%{LIB_DIR}\b@)" /etc/ld.so.conf echo "%{LIB_DIR}" >> /etc/ld.so.conf /sbin/ldconfig fi %post -n libibcommon-devel if [ $1 = 1 ]; then # 1 : This package is being installed for the first time # Update /etc/ld.so.conf perl -ni -e "print unless (m@%{LIB_DIR}\b@)" /etc/ld.so.conf echo "%{LIB_DIR}" >> /etc/ld.so.conf /sbin/ldconfig fi %post -n libibmad if [ $1 = 1 ]; then # 1 : This package is being installed for the first time # Update /etc/ld.so.conf perl -ni -e "print unless (m@%{LIB_DIR}\b@)" /etc/ld.so.conf echo "%{LIB_DIR}" >> /etc/ld.so.conf /sbin/ldconfig fi %post -n libibmad-devel if [ $1 = 1 ]; then # 1 : This package is being installed for the first time # Update /etc/ld.so.conf perl -ni -e "print unless (m@%{LIB_DIR}\b@)" /etc/ld.so.conf echo "%{LIB_DIR}" >> /etc/ld.so.conf /sbin/ldconfig fi %post -n libibumad if [ $1 = 1 ]; then # 1 : This package is being installed for the first time # Update /etc/ld.so.conf perl -ni -e "print unless (m@%{LIB_DIR}\b@)" /etc/ld.so.conf echo "%{LIB_DIR}" >> /etc/ld.so.conf /sbin/ldconfig fi %post -n libibumad-devel if [ $1 = 1 ]; then # 1 : This package is being installed for the first time # Update /etc/ld.so.conf perl -ni -e "print unless (m@%{LIB_DIR}\b@)" /etc/ld.so.conf echo "%{LIB_DIR}" >> /etc/ld.so.conf /sbin/ldconfig fi %ifarch %{all_user_arch} %post -n openib-diags if [ $1 = 1 ]; then # 1 : This package is being installed for the first time # Create links to bin files from /usr/bin if [ -d %{STACK_PREFIX} ]; then case %{STACK_PREFIX//\//} in usr|bin|usrlocal|usrsbin|opt|root) ;; *) # Diags ln -snf %{STACK_PREFIX}/bin/ibaddr /usr/bin ln -snf %{STACK_PREFIX}/bin/ibnetdiscover /usr/bin ln -snf %{STACK_PREFIX}/bin/ibping /usr/bin ln -snf %{STACK_PREFIX}/bin/ibroute /usr/bin ln -snf %{STACK_PREFIX}/bin/ibstat /usr/bin ln -snf %{STACK_PREFIX}/bin/ibsysstat /usr/bin ln -snf %{STACK_PREFIX}/bin/ibtracert /usr/bin ln -snf %{STACK_PREFIX}/bin/perfquery /usr/bin ln -snf %{STACK_PREFIX}/bin/sminfo /usr/bin ln -snf %{STACK_PREFIX}/bin/smpquery /usr/bin # ln -snf %{STACK_PREFIX}/bin/saquery /usr/bin ln -snf %{STACK_PREFIX}/bin/smpdump /usr/bin ln -snf %{STACK_PREFIX}/bin/ibchecknet /usr/bin ln -snf %{STACK_PREFIX}/bin/ibchecknode /usr/bin ln -snf %{STACK_PREFIX}/bin/ibcheckerrors /usr/bin ln -snf %{STACK_PREFIX}/bin/ibcheckport /usr/bin ln -snf %{STACK_PREFIX}/bin/ibhosts /usr/bin ln -snf %{STACK_PREFIX}/bin/ibstatus /usr/bin ln -snf %{STACK_PREFIX}/bin/ibswitches /usr/bin ;; esac fi fi %endif %ifarch %{all_user_arch} %post -n opensm if [ $1 = 1 ]; then # 1 : This package is being installed for the first time # Don't add this by default since you only run opensm on a few machines # in the entire grid. # /sbin/chkconfig --add opensmd # Update /etc/ld.so.conf perl -ni -e "print unless (m@%{LIB_DIR}\b@)" /etc/ld.so.conf echo "%{LIB_DIR}" >> /etc/ld.so.conf /sbin/ldconfig if [ -d %{STACK_PREFIX} ]; then case %{STACK_PREFIX//\//} in usr|bin|usrlocal|usrsbin|opt|root) ;; *) ln -snf %{STACK_PREFIX}/bin/opensm /usr/bin ln -snf %{STACK_PREFIX}/bin/osmtest /usr/bin ;; esac fi fi # 1 : Closed %endif %ifarch %{all_user_arch} %post -n perftest #if [ $1 = 1 ]; then # 1 : This package is being installed for the first time #if [ -d %{STACK_PREFIX} ]; then # case %{STACK_PREFIX//\//} in # usr|bin|usrlocal|usrsbin|opt|root) # ;; # *) # ln -snf %{STACK_PREFIX}/bin/rdma_lat /usr/bin # ln -snf %{STACK_PREFIX}/bin/rdma_bw /usr/bin # ln -snf %{STACK_PREFIX}/bin/write_lat /usr/bin # ln -snf %{STACK_PREFIX}/bin/write_bw /usr/bin # ln -snf %{STACK_PREFIX}/bin/send_lat /usr/bin # ln -snf %{STACK_PREFIX}/bin/send_bw /usr/bin # ln -snf %{STACK_PREFIX}/bin/read_lat /usr/bin # ln -snf %{STACK_PREFIX}/bin/read_bw /usr/bin # ln -snf %{STACK_PREFIX}/bin/runme /usr/bin # ln -snf %{STACK_PREFIX}/bin/write_bw_postlist /usr/bin # ln -snf %{STACK_PREFIX}/bin/clock_test /usr/bin # ;; # esac #fi #fi %endif %ifarch %{all_user_arch} %post -n mstflint if [ $1 = 1 ]; then # 1 : This package is being installed for the first time # Create links to bin files from /usr/bin if [ -d %{STACK_PREFIX} ]; then case %{STACK_PREFIX//\//} in usr|bin|usrlocal|usrsbin|opt|root) ;; *) ln -snf %{STACK_PREFIX}/bin/mread /usr/bin ln -snf %{STACK_PREFIX}/bin/mwrite /usr/bin ln -snf %{STACK_PREFIX}/bin/mstflint /usr/bin ;; esac fi fi %endif %post -n librdmacm if [ $1 = 1 ]; then # 1 : This package is being installed for the first time # Update /etc/ld.so.conf perl -ni -e "print unless (m@%{LIB_DIR}\b@)" /etc/ld.so.conf echo "%{LIB_DIR}" >> /etc/ld.so.conf /sbin/ldconfig fi %ifnarch ppc %post -n dapl if [ $1 = 1 ]; then # 1 : This package is being installed for the first time # Update /etc/ld.so.conf perl -ni -e "print unless (m@%{LIB_DIR}\b@)" /etc/ld.so.conf echo "%{LIB_DIR}" >> /etc/ld.so.conf /sbin/ldconfig fi %post -n dapl-devel if [ $1 = 1 ]; then # 1 : This package is being installed for the first time # Update /etc/ld.so.conf perl -ni -e "print unless (m@%{LIB_DIR}\b@)" /etc/ld.so.conf echo "%{LIB_DIR}" >> /etc/ld.so.conf /sbin/ldconfig fi %endif ### ### preun section ### %ifarch %{all_user_arch} %preun -n kernel-ib if [ $1 = 0 ]; then # 1 : Erase, not upgrade /sbin/chkconfig --del openibd fi %endif %preun -n libibverbs if [ $1 = 0 ]; then # 1 : Erase, not upgrade # Update /etc/ld.so.conf if [ ! -d %{LIB_DIR} ]; then perl -ni -e "print unless (m@%{LIB_DIR}\b@)" /etc/ld.so.conf /sbin/ldconfig fi fi %preun -n libibverbs-devel if [ $1 = 0 ]; then # 1 : Erase, not upgrade echo fi %ifarch %{all_user_arch} %preun -n libibverbs-utils if [ $1 = 0 ]; then # 1 : Erase, not upgrade /bin/rm -f /usr/bin/ibv_asyncwatch /bin/rm -f /usr/bin/ibv_devices /bin/rm -f /usr/bin/ibv_devinfo /bin/rm -f /usr/bin/ibv_rc_pingpong /bin/rm -f /usr/bin/ibv_srq_pingpong /bin/rm -f /usr/bin/ibv_uc_pingpong /bin/rm -f /usr/bin/ibv_ud_pingpong fi %endif %preun -n libibcm # if [ $1 = 0 ]; then # 1 : Erase, not upgrade # echo # fi %preun -n libmthca # if [ $1 = 0 ]; then # 1 : Erase, not upgrade # echo # fi %preun -n libmthca-devel # if [ $1 = 0 ]; then # 1 : Erase, not upgrade # echo # fi %ifarch x86_64 %preun -n libipathverbs # if [ $1 = 0 ]; then # 1 : Erase, not upgrade # echo # fi %preun -n libipathverbs-devel # if [ $1 = 0 ]; then # 1 : Erase, not upgrade # echo # fi %endif %preun -n libsdp # if [ $1 = 0 ]; then # 1 : Erase, not upgrade # echo # fi %ifarch %{all_user_arch} %preun -n srptools # if [ $1 = 0 ]; then # 1 : Erase, not upgrade # echo # fi %endif %ifarch %{all_user_arch} %preun -n tvflash # if [ $1 = 0 ]; then # 1 : Erase, not upgrade # echo # fi %endif %preun -n libibcommon # if [ $1 = 0 ]; then # 1 : Erase, not upgrade # echo # fi %preun -n libibcommon-devel # if [ $1 = 0 ]; then # 1 : Erase, not upgrade # echo # fi %preun -n libibmad # if [ $1 = 0 ]; then # 1 : Erase, not upgrade # echo # fi %preun -n libibumad # if [ $1 = 0 ]; then # 1 : Erase, not upgrade # echo # fi %ifarch %{all_user_arch} %preun -n openib-diags if [ $1 = 0 ]; then # 1 : Erase, not upgrade # Remove diags binaries /bin/rm -f /usr/bin/ibaddr /bin/rm -f /usr/bin/ibnetdiscover /bin/rm -f /usr/bin/ibping /bin/rm -f /usr/bin/ibroute /bin/rm -f /usr/bin/ibstat /bin/rm -f /usr/bin/ibsysstat /bin/rm -f /usr/bin/ibtracert /bin/rm -f /usr/bin/perfquery /bin/rm -f /usr/bin/sminfo /bin/rm -f /usr/bin/smpquery # /bin/rm -f /usr/bin/saquery /bin/rm -f /usr/bin/smpdump /bin/rm -f /usr/bin/ibchecknet /bin/rm -f /usr/bin/ibchecknode /bin/rm -f /usr/bin/ibcheckerrors /bin/rm -f /usr/bin/ibcheckport /bin/rm -f /usr/bin/ibhosts /bin/rm -f /usr/bin/ibstatus /bin/rm -f /usr/bin/ibswitches fi %endif %ifarch %{all_user_arch} %preun -n opensm if [ $1 = 0 ]; then # 1 : Erase, not upgrade /sbin/chkconfig --del opensmd fi %endif %ifarch %{all_user_arch} %preun -n perftest #if [ $1 = 0 ]; then # 1 : Erase, not upgrade # /bin/rm -f /usr/bin/rdma_lat # /bin/rm -f /usr/bin/rdma_bw # /bin/rm -f /usr/bin/write_lat # /bin/rm -f /usr/bin/write_bw # /bin/rm -f /usr/bin/send_lat # /bin/rm -f /usr/bin/send_bw # /bin/rm -f /usr/bin/read_lat # /bin/rm -f /usr/bin/read_bw # /bin/rm -f /usr/bin/runme # /bin/rm -f /usr/bin/write_bw_postlist # /bin/rm -f /usr/bin/clock_test #fi %endif %ifarch %{all_user_arch} %preun -n mstflint if [ $1 = 0 ]; then # 1 : Erase, not upgrade /bin/rm -f /usr/bin/mread /bin/rm -f /usr/bin/mwrite /bin/rm -f /usr/bin/mstflint fi %endif %preun -n librdmacm # if [ $1 = 0 ]; then # 1 : Erase, not upgrade # echo # fi %ifnarch ppc %preun -n dapl # if [ $1 = 0 ]; then # 1 : Erase, not upgrade # echo # fi %preun -n dapl-devel # if [ $1 = 0 ]; then # 1 : Erase, not upgrade # echo # fi %endif ### ### post uninstall section ### %ifarch %{all_user_arch} %postun -n kernel-ib #if [ $1 = 0 ]; then # 1 : Erase, not upgrade #fi %endif %postun -n libibverbs #if [ $1 = 0 ]; then # 1 : Erase, not upgrade # echo #fi %postun -n libibverbs-devel #if [ $1 = 0 ]; then # 1 : Erase, not upgrade # echo #fi %ifarch %{all_user_arch} %postun -n libibverbs-utils #if [ $1 = 0 ]; then # 1 : Erase, not upgrade # echo #fi %endif %postun -n libibcm #if [ $1 = 0 ]; then # 1 : Erase, not upgrade # echo #fi %postun -n libmthca #if [ $1 = 0 ]; then # 1 : Erase, not upgrade # echo #fi %postun -n libmthca-devel #if [ $1 = 0 ]; then # 1 : Erase, not upgrade # echo #fi %ifarch x86_64 %postun -n libipathverbs #if [ $1 = 0 ]; then # 1 : Erase, not upgrade # echo #fi %postun -n libipathverbs-devel #if [ $1 = 0 ]; then # 1 : Erase, not upgrade # echo #fi %endif %postun -n libsdp #if [ $1 = 0 ]; then # 1 : Erase, not upgrade # echo #fi %ifarch %{all_user_arch} %postun -n srptools #if [ $1 = 0 ]; then # 1 : Erase, not upgrade # echo #fi %endif %ifarch %{all_user_arch} %postun -n tvflash #if [ $1 = 0 ]; then # 1 : Erase, not upgrade # echo #fi %endif %postun -n libibcommon #if [ $1 = 0 ]; then # 1 : Erase, not upgrade # echo #fi %postun -n libibcommon-devel #if [ $1 = 0 ]; then # 1 : Erase, not upgrade # echo #fi %postun -n libibmad #if [ $1 = 0 ]; then # 1 : Erase, not upgrade # echo #fi %postun -n libibumad #if [ $1 = 0 ]; then # 1 : Erase, not upgrade # echo #fi %ifarch %{all_user_arch} %postun -n openib-diags #if [ $1 = 0 ]; then # 1 : Erase, not upgrade # echo #fi %endif %ifarch %{all_user_arch} %postun -n opensm #if [ $1 = 0 ]; then # 1 : Erase, not upgrade # echo #fi %endif %ifarch %{all_user_arch} %postun -n perftest #if [ $1 = 0 ]; then # 1 : Erase, not upgrade # echo #fi %endif %ifarch %{all_user_arch} %postun -n mstflint #if [ $1 = 0 ]; then # 1 : Erase, not upgrade # echo #fi %endif %postun -n librdmacm #if [ $1 = 0 ]; then # 1 : Erase, not upgrade # echo #fi %ifnarch ppc %postun -n dapl #if [ $1 = 0 ]; then # 1 : Erase, not upgrade # echo #fi %postun -n dapl-devel #if [ $1 = 0 ]; then # 1 : Erase, not upgrade # echo #fi %endif ### ### Files ### %ifarch %{all_user_arch} %files -n kernel-ib %defattr(-,root,root,-) %config(noreplace) %{_sysconfdir}/sysconfig/openib.conf %{STACK_PREFIX}/docs %{STACK_PREFIX}/BUILD_ID %{_initrddir}/openibd /etc/udev/rules.d/90-ib.rules %endif %files -n libibverbs %defattr(-,root,root,-) %{LIB_DIR}/libibverbs*.so.* %files -n libibverbs-devel %defattr(-,root,root,-) %{LIB_DIR}/libibverbs*.a %{LIB_DIR}/libibverbs*.so %{STACK_PREFIX}/include/infiniband/arch.h %{STACK_PREFIX}/include/infiniband/driver.h %{STACK_PREFIX}/include/infiniband/kern-abi.h %{STACK_PREFIX}/include/infiniband/marshall.h %{STACK_PREFIX}/include/infiniband/opcode.h %{STACK_PREFIX}/include/infiniband/sa.h %{STACK_PREFIX}/include/infiniband/sa-kern-abi.h %{STACK_PREFIX}/include/infiniband/verbs.h #%{_includedir}/* %ifarch %{all_user_arch} %files -n libibverbs-utils %defattr(-,root,root,-) # %{_bindir}/* %{STACK_PREFIX}/bin/ibv_* %{_mandir}/man1/ibv_* %endif %files -n libibcm %defattr(-,root,root,-) %{LIB_DIR}/libibcm.so* %{STACK_PREFIX}/include/infiniband/cm_abi.h %{STACK_PREFIX}/include/infiniband/cm.h %files -n libmthca %defattr(-,root,root,-) %{LIB_DIR}/infiniband/mthca.so # %doc AUTHORS COPYING ChangeLog README %files -n libmthca-devel %defattr(-,root,root,-) %{LIB_DIR}/infiniband/mthca.a %ifarch x86_64 %files -n libipathverbs %defattr(-,root,root,-) %{LIB_DIR}/infiniband/ipathverbs.so # %doc AUTHORS COPYING ChangeLog README %files -n libipathverbs-devel %defattr(-,root,root,-) %{LIB_DIR}/infiniband/ipathverbs.a %endif %ifarch ppc ppc64 %files -n libehca %defattr(-,root,root,-) %{LIB_DIR}/infiniband/ehca.so # %doc AUTHORS COPYING ChangeLog README %files -n libehca-devel %defattr(-,root,root,-) %{LIB_DIR}/infiniband/ehca.a %endif %files -n libsdp %defattr(-,root,root) %{LIB_DIR}/libsdp*.so.* %config(noreplace) %{_sysconfdir}/libsdp.conf %ifarch %{all_user_arch} %files -n srptools %defattr(-,root,root) %{STACK_PREFIX}/sbin/ibsrpdm %endif %ifarch %{all_user_arch} %files -n tvflash %defattr(-,root,root) %{STACK_PREFIX}/sbin/tvflash %endif %files -n libibcommon %defattr(-,root,root) %{LIB_DIR}/libibcommon*.so.* %files -n libibcommon-devel %defattr(-,root,root) %{LIB_DIR}/libibcommon.a %{LIB_DIR}/libibcommon*.so %{STACK_PREFIX}/include/infiniband/common.h %files -n libibmad %defattr(-,root,root) %{LIB_DIR}/libibmad*.so.* %files -n libibmad-devel %defattr(-,root,root) %{LIB_DIR}/libibmad.a %{LIB_DIR}/libibmad.so %{STACK_PREFIX}/include/infiniband/mad.h %files -n libibumad %defattr(-,root,root) %{LIB_DIR}/libibumad*.so.* %files -n libibumad-devel %defattr(-,root,root) %{LIB_DIR}/libibumad.so %{LIB_DIR}/libibumad.a %{STACK_PREFIX}/include/infiniband/umad.h %ifarch %{all_user_arch} %files -n openib-diags %defattr(-,root,root) %{STACK_PREFIX}/bin/ibaddr %{STACK_PREFIX}/bin/ibnetdiscover %{STACK_PREFIX}/bin/ibping %{STACK_PREFIX}/bin/ibroute %{STACK_PREFIX}/bin/ibstat %{STACK_PREFIX}/bin/ibsysstat %{STACK_PREFIX}/bin/ibtracert %{STACK_PREFIX}/bin/perfquery %{STACK_PREFIX}/bin/sminfo %{STACK_PREFIX}/bin/smpquery #%{STACK_PREFIX}/bin/saquery %{STACK_PREFIX}/bin/smpdump %{STACK_PREFIX}/bin/ibchecknet %{STACK_PREFIX}/bin/ibchecknode %{STACK_PREFIX}/bin/ibcheckerrors %{STACK_PREFIX}/bin/ibcheckport %{STACK_PREFIX}/bin/ibhosts %{STACK_PREFIX}/bin/ibstatus %{STACK_PREFIX}/bin/ibswitches %{STACK_PREFIX}/bin/discover.pl %{STACK_PREFIX}/bin/ibcheckerrs %{STACK_PREFIX}/bin/ibcheckportstate %{STACK_PREFIX}/bin/ibcheckportwidth %{STACK_PREFIX}/bin/ibcheckstate %{STACK_PREFIX}/bin/ibcheckwidth %{STACK_PREFIX}/bin/ibclearcounters %{STACK_PREFIX}/bin/ibclearerrors %{STACK_PREFIX}/bin/ibnodes %{STACK_PREFIX}/bin/ibportstate %{STACK_PREFIX}/bin/set_mthca_nodedesc.sh %endif %ifarch %{all_user_arch} %files -n opensm %defattr(-,root,root) %{STACK_PREFIX}/bin/opensm %{STACK_PREFIX}/bin/osmtest %{STACK_PREFIX}/bin/sldd.sh %config(noreplace) %{_sysconfdir}/opensm.conf %{_initrddir}/opensmd %endif %files -n opensm-libs %defattr(-,root,root) %{LIB_DIR}/libosm*so.* %{LIB_DIR}/libopensm.*so.* %files -n opensm-devel %defattr(-,root,root) %{STACK_PREFIX}/include/infiniband/vendor %{STACK_PREFIX}/include/infiniband/opensm %{STACK_PREFIX}/include/infiniband/complib %{STACK_PREFIX}/include/infiniband/iba %{LIB_DIR}/libosm*so %{LIB_DIR}/libopensm.*so %{LIB_DIR}/libosm*.a %{LIB_DIR}/libopensm.a %ifarch %{all_user_arch} %files -n perftest %defattr(-,root,root) %{STACK_PREFIX}/bin/ib_rdma_lat %{STACK_PREFIX}/bin/ib_rdma_bw %{STACK_PREFIX}/bin/ib_write_lat %{STACK_PREFIX}/bin/ib_write_bw %{STACK_PREFIX}/bin/ib_send_lat %{STACK_PREFIX}/bin/ib_send_bw %{STACK_PREFIX}/bin/ib_read_lat %{STACK_PREFIX}/bin/ib_read_bw %{STACK_PREFIX}/bin/runme %{STACK_PREFIX}/bin/ib_write_bw_postlist %{STACK_PREFIX}/bin/ib_clock_test %endif %ifarch %{all_user_arch} %files -n mstflint %defattr(-,root,root) %{STACK_PREFIX}/bin/mread %{STACK_PREFIX}/bin/mwrite %{STACK_PREFIX}/bin/mstflint %endif %files -n librdmacm %defattr(-,root,root) %{LIB_DIR}/librdmacm*.so %{STACK_PREFIX}/bin/rping %{STACK_PREFIX}/bin/ucmatose %{STACK_PREFIX}/include/rdma/rdma_cma_abi.h %{STACK_PREFIX}/include/rdma/rdma_cma.h %ifnarch ppc %files -n dapl %defattr(-,root,root) %{LIB_DIR}/libda*.so.* %config(noreplace) %{_sysconfdir}/dat.conf %files -n dapl-devel %defattr(-,root,root) %{LIB_DIR}/libda*.so %{LIB_DIR}/libda*.a %{STACK_PREFIX}/include/dat/dat.h %{STACK_PREFIX}/include/dat/dat_error.h %{STACK_PREFIX}/include/dat/dat_platform_specific.h %{STACK_PREFIX}/include/dat/dat_redirection.h %{STACK_PREFIX}/include/dat/dat_registry.h %{STACK_PREFIX}/include/dat/dat_vendor_specific.h %{STACK_PREFIX}/include/dat/udat_config.h %{STACK_PREFIX}/include/dat/udat.h %{STACK_PREFIX}/include/dat/udat_redirection.h %{STACK_PREFIX}/include/dat/udat_vendor_specific.h %endif # END Files %changelog * Wed Apr 27 2006 Vladimir Sokolovsky - Removed libibat * Wed Apr 5 2006 Vladimir Sokolovsky - Added dapl and dapl-devel packages * Sun Apr 2 2006 Vladimir Sokolovsky - Changed ibdiag to ibutils. Added ibis, ibdm and ibmgtsim packages * Thu Mar 23 2006 Vladimir Sokolovsky - Added libibcommon-devel, libibmad-devel and libibumad-devel packages * Tue Mar 14 2006 Vladimir Sokolovsky - Added ibdiag tools * Mon Mar 13 2006 Vladimir Sokolovsky - Changed osm to opensm, added opensm-devel package * Wed Mar 8 2006 Vladimir Sokolovsky - Added header files: include/infiniband/... * Sun Mar 5 2006 Vladimir Sokolovsky - Repackaging: openib like RPMs * Mon Jan 2 2006 Vladimir Sokolovsky - Added libsdp 32 bit libraries for x86_64 platform * Mon Nov 14 2005 Vladimir Sokolovsky - Initial packaging for openib gen2 stack