Accepting request 630814 from home:NMoreyChaisemartin:branches:science:HPC
- Add two patches for rxe_cfg * suse-Add-recommends-for-rxe_cfg-requirements.patch adds recommends for the relevant packages * rxe-switch-to-iproute2-for-rxe_cfg.patch switches to iproute2 commands OBS-URL: https://build.opensuse.org/request/show/630814 OBS-URL: https://build.opensuse.org/package/show/science:HPC/rdma-core?expand=0&rev=94
This commit is contained in:
parent
7eacc2089d
commit
5bdc6e9850
@ -1,3 +1,12 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Aug 2 09:25:16 UTC 2018 - nmoreychaisemartin@suse.com
|
||||
|
||||
- Add two patches for rxe_cfg
|
||||
* suse-Add-recommends-for-rxe_cfg-requirements.patch
|
||||
adds recommends for the relevant packages
|
||||
* rxe-switch-to-iproute2-for-rxe_cfg.patch
|
||||
switches to iproute2 commands
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jun 14 08:54:13 UTC 2018 - nmoreychaisemartin@suse.com
|
||||
|
||||
|
@ -50,6 +50,8 @@ Source: rdma-core-%{version}%{git_ver}.tar.gz
|
||||
Source1: baselibs.conf
|
||||
Source2: prebuild-pandoc.sh
|
||||
Source3: prebuilt-pandoc.tgz
|
||||
Patch0: rxe-switch-to-iproute2-for-rxe_cfg.patch
|
||||
Patch1: suse-Add-recommends-for-rxe_cfg-requirements.patch
|
||||
BuildRequires: binutils
|
||||
BuildRequires: cmake >= 2.8.11
|
||||
BuildRequires: gcc
|
||||
@ -315,6 +317,8 @@ on those changes.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}-%{version}%{git_ver}
|
||||
%patch0
|
||||
%patch1
|
||||
#Extract prebuilt pandoc file in the buildlib directory
|
||||
(cd buildlib && tar xf %{S:3})
|
||||
|
||||
|
76
rxe-switch-to-iproute2-for-rxe_cfg.patch
Normal file
76
rxe-switch-to-iproute2-for-rxe_cfg.patch
Normal file
@ -0,0 +1,76 @@
|
||||
commit 310719781cf21b656f2bda440b85634c91093f17
|
||||
Author: Nicolas Morey-Chaisemartin <nmoreychaisemartin@suse.com>
|
||||
Date: Wed Aug 1 14:59:43 2018 +0200
|
||||
|
||||
rxe: switch to iproute2 for rxe_cfg
|
||||
|
||||
ifconfig is now deprecated in most distro in favour on iproute2.
|
||||
Drop ifconfig support and use iproute2
|
||||
|
||||
Signed-off-by: Nicolas Morey-Chaisemartin <nmoreychaisemartin@suse.com>
|
||||
|
||||
diff --git debian/control debian/control
|
||||
index 340e8ec96291..2e1c4b835c98 100644
|
||||
--- debian/control
|
||||
+++ debian/control
|
||||
@@ -29,7 +29,7 @@ Depends: lsb-base (>= 3.2-14~),
|
||||
${misc:Depends},
|
||||
${perl:Depends},
|
||||
${shlibs:Depends}
|
||||
-Recommends: dmidecode, ethtool, net-tools
|
||||
+Recommends: dmidecode, ethtool, iproute2
|
||||
Breaks: infiniband-diags (<< 2.0.0)
|
||||
Replaces: infiniband-diags (<< 2.0.0)
|
||||
Description: RDMA core userspace infrastructure and documentation
|
||||
diff --git providers/rxe/rxe_cfg.in providers/rxe/rxe_cfg.in
|
||||
index 0a8583da1860..e3956d82b450 100755
|
||||
--- providers/rxe/rxe_cfg.in
|
||||
+++ providers/rxe/rxe_cfg.in
|
||||
@@ -189,22 +189,22 @@ sub get_dev_info {
|
||||
$ipv4_addr{$eth} = " ";
|
||||
$eth_mtu{$eth} = "";
|
||||
|
||||
- @lines = `ifconfig $eth`;
|
||||
+ @lines = `ip addr show $eth`;
|
||||
foreach $line (@lines) {
|
||||
- # get IP address
|
||||
- if ($line =~ /inet addr/) {
|
||||
- $line =~ s/^\s+inet addr://g;
|
||||
- @fields = split(/\s+/, $line);
|
||||
- $ipv4_addr{$eth} = $fields[0];
|
||||
- }
|
||||
+ # get IP address
|
||||
+ if ($line =~ /inet /) {
|
||||
+ $line =~ s/^\s+inet ([0-9.]+)\//$1 /g;
|
||||
+ @fields = split(/\s+/, $line);
|
||||
+ $ipv4_addr{$eth} = $fields[0];
|
||||
+ }
|
||||
|
||||
- # get ethernet mtu
|
||||
- if ($line =~ /MTU:/) {
|
||||
- $line =~ s/^.*MTU://g;
|
||||
- @fields = split(/\s+/, $line);
|
||||
- $eth_mtu{$eth} = $fields[0];
|
||||
- }
|
||||
- }
|
||||
+ # get ethernet mtu
|
||||
+ if ($line =~ /mtu /) {
|
||||
+ $line =~ s/^.*mtu //g;
|
||||
+ @fields = split(/\s+/, $line);
|
||||
+ $eth_mtu{$eth} = $fields[0];
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
|
||||
# get rxe mtu
|
||||
@@ -525,8 +525,8 @@ sub do_start {
|
||||
foreach my $rxe (@rxe_array) {
|
||||
my $stat = get_devinfo($rxe);
|
||||
if ($stat =~ "PORT_DOWN") {
|
||||
- my $cmd = "ifconfig $eth_names{$rxe} up";
|
||||
- system($cmd);
|
||||
+ my $cmd = "ip link set $eth_names{$rxe} up";
|
||||
+ system($cmd);
|
||||
}
|
||||
}
|
||||
|
26
suse-Add-recommends-for-rxe_cfg-requirements.patch
Normal file
26
suse-Add-recommends-for-rxe_cfg-requirements.patch
Normal file
@ -0,0 +1,26 @@
|
||||
commit b48bd3c32dceed87981acf27057b62658b3c5f4c
|
||||
Author: Nicolas Morey-Chaisemartin <nmoreychaisemartin@suse.com>
|
||||
Date: Wed Aug 1 15:32:54 2018 +0200
|
||||
|
||||
suse: Add recommends for rxe_cfg requirements
|
||||
|
||||
rxe_cfg requires ethtool and iproute2 or net-tools.
|
||||
net-tools (more precisely ifconfig) being deprecated on all recent SUSE version,
|
||||
recommends iproute2
|
||||
|
||||
Signed-off-by: Nicolas Morey-Chaisemartin <nmoreychaisemartin@suse.com>
|
||||
|
||||
diff --git suse/rdma-core.spec suse/rdma-core.spec
|
||||
index 1df500af58ce..2743596aa6cf 100644
|
||||
--- suse/rdma-core.spec
|
||||
+++ suse/rdma-core.spec
|
||||
@@ -166,6 +166,9 @@ Obsoletes: librxe-rdmav2 < %{version}-%{release}
|
||||
Requires: %{mlx4_lname} = %{version}-%{release}
|
||||
Requires: %{mlx5_lname} = %{version}-%{release}
|
||||
%endif
|
||||
+# Recommended packages for rxe_cfg
|
||||
+Recommends: ethtool
|
||||
+Recommends: iproute2
|
||||
|
||||
%description -n libibverbs
|
||||
libibverbs is a library that allows userspace processes to use RDMA
|
Loading…
x
Reference in New Issue
Block a user