[openib-general] Add bonding suuport to OFED

Moni Shoua monis at voltaire.com
Sun Jan 28 03:24:34 PST 2007


Vladimir Sokolovsky wrote:
> Hi Moni,
> Please review the following patch to ib-bonding.spec:
> 
> Use %{_prefix} in RPM spec file instead of hard-coded /usr/local/ofed.
>     
> Signed-off-by: Vladimir Sokolovsky <vlad at mellanox.co.il>
> ---
> 
> diff --git a/ib-bonding.spec b/ib-bonding.spec
> index db02fe8..77e51e0 100644
> --- a/ib-bonding.spec
> +++ b/ib-bonding.spec
> @@ -5,6 +5,8 @@
>  
>  %define _build_name_fmt %%{ARCH}/%%{NAME}-%%{VERSION}-%%{RELEASE}-%%{DISTRIBUTION}-%%{ARCH}.rpm
>  
> +%{!?_prefix: %define _prefix /usr/local/ofed}
> +
>  Summary         : ib_bonding patch and modules.
>  Name            : %{name}
>  Version         : %{version}
> @@ -39,11 +41,11 @@ fi
>  %install
>  [ "${RPM_BUILD_ROOT}" != "/" -a -d ${RPM_BUILD_ROOT} ] && rm -rf ${RPM_BUILD_ROOT}
>  mkdir -p ${RPM_BUILD_ROOT}/lib/modules/%{kversion}/kernel/drivers/net/bonding/
> -mkdir -p ${RPM_BUILD_ROOT}/usr/local/ofed/bin
> -mkdir -p ${RPM_BUILD_ROOT}/usr/local/ofed/docs
> +mkdir -p ${RPM_BUILD_ROOT}%{_prefix}/bin
> +mkdir -p ${RPM_BUILD_ROOT}%{_prefix}/docs
>  install  -m 755 linux/drivers/net/bonding/bonding.ko ${RPM_BUILD_ROOT}/lib/modules/%{kversion}/kernel/drivers/net/bonding/
> -install  -m 755 bin/bond-init.sh ${RPM_BUILD_ROOT}/usr/local/ofed/bin
> -install  -m 755 docs/ib-bonding.txt ${RPM_BUILD_ROOT}/usr/local/ofed/docs
> +install  -m 755 bin/bond-init.sh ${RPM_BUILD_ROOT}%{_prefix}/bin
> +install  -m 755 docs/ib-bonding.txt ${RPM_BUILD_ROOT}%{_prefix}/docs
>  
>  
>  
> @@ -51,7 +53,7 @@ install  -m 755 docs/ib-bonding.txt ${RP
>  if [ ! -z $STACK_PREFIX ] ; then
>          backup_dir=$STACK_PREFIX/backup
>  else
> -        backup_dir=/usr/local/ofed/backup
> +        backup_dir=%{_prefix}/backup
>  fi
>  
>  
> @@ -69,7 +71,7 @@ STACK_PREFIX=$(test -x /etc/infiniband/i
>  if [ ! -z $STACK_PREFIX ] ; then
>          backup_dir=$STACK_PREFIX/backup
>  else
> -        backup_dir=/usr/local/ofed/backup
> +        backup_dir=%{_prefix}/backup
>  fi
>  cd $backup_dir
>  found_file=$(find -name bonding.ko)
> @@ -81,6 +83,6 @@ fi
>  
>  %files 
>  /lib/modules/%{kversion}/kernel/drivers/net/bonding/bonding.ko
> -/usr/local/ofed/bin/bond-init.sh
> -/usr/local/ofed/docs/ib-bonding.txt
> +%{_prefix}/bin/bond-init.sh
> +%{_prefix}/docs/ib-bonding.txt
>  
> 
> 
Thabks.
I applied that.





More information about the general mailing list