summary refs log tree commit diff
path: root/pkgs/os-specific/linux/iproute
diff options
context:
space:
mode:
authorAlexander Ried <ried@mytum.de>2016-09-25 15:07:03 +0200
committerFranz Pletz <fpletz@fnordicwalking.de>2016-09-25 15:07:03 +0200
commit7615d6385ad13f28123e59b82eb9547144056f71 (patch)
tree1dbfc7f9de3ab769b30478c87a33cba7e0d28ab8 /pkgs/os-specific/linux/iproute
parent30ae939142f30c2cd28fd6fbf00bf3fa7fa38626 (diff)
downloadnixpkgs-7615d6385ad13f28123e59b82eb9547144056f71.tar
nixpkgs-7615d6385ad13f28123e59b82eb9547144056f71.tar.gz
nixpkgs-7615d6385ad13f28123e59b82eb9547144056f71.tar.bz2
nixpkgs-7615d6385ad13f28123e59b82eb9547144056f71.tar.lz
nixpkgs-7615d6385ad13f28123e59b82eb9547144056f71.tar.xz
nixpkgs-7615d6385ad13f28123e59b82eb9547144056f71.tar.zst
nixpkgs-7615d6385ad13f28123e59b82eb9547144056f71.zip
iproute2: 4.5.0 -> 4.7.0 (#18435)
iproute now packages a bash-completion file which it installs to
$BASH_COMPDIR.

* fanpatch: adjust for new version

- The patch did not apply because the code around the additions changed.
- The patch uses functions that got changed [1] & [2], I adjusted the
  patch to use the safe version. Probably not needed but better safe
  than sorry.
[1] format_host: http://git.kernel.org/cgit/linux/kernel/git/shemminger/iproute2.git/commit/?id=a418e451643e77fe36861e53359587ba8aa41873
[2] rt_addr_n2a: http://git.kernel.org/cgit/linux/kernel/git/shemminger/iproute2.git/commit/?id=7faf1588a755edb9c9cabbe1d3211265e9826d28
Diffstat (limited to 'pkgs/os-specific/linux/iproute')
-rw-r--r--pkgs/os-specific/linux/iproute/1000-ubuntu-poc-fan-driver.patch2
-rw-r--r--pkgs/os-specific/linux/iproute/1001-ubuntu-poc-fan-driver-v3.patch4
-rw-r--r--pkgs/os-specific/linux/iproute/1002-ubuntu-poc-fan-driver-vxlan.patch12
-rw-r--r--pkgs/os-specific/linux/iproute/default.nix6
4 files changed, 13 insertions, 11 deletions
diff --git a/pkgs/os-specific/linux/iproute/1000-ubuntu-poc-fan-driver.patch b/pkgs/os-specific/linux/iproute/1000-ubuntu-poc-fan-driver.patch
index ca91b816000..e0c8278d488 100644
--- a/pkgs/os-specific/linux/iproute/1000-ubuntu-poc-fan-driver.patch
+++ b/pkgs/os-specific/linux/iproute/1000-ubuntu-poc-fan-driver.patch
@@ -57,7 +57,7 @@ Index: iproute2-4.1.1/ip/link_iptnl.c
 +
 +		if (addr)
 +			fprintf(f, "underlay %s ",
-+				format_host(AF_INET, 4, &addr, s1, sizeof(s1)));
++				format_host_r(AF_INET, 4, &addr, s1, sizeof(s1)));
 +	}
 +
  	if (tb[IFLA_IPTUN_LINK] && rta_getattr_u32(tb[IFLA_IPTUN_LINK])) {
diff --git a/pkgs/os-specific/linux/iproute/1001-ubuntu-poc-fan-driver-v3.patch b/pkgs/os-specific/linux/iproute/1001-ubuntu-poc-fan-driver-v3.patch
index a940b341ea0..634daa0de29 100644
--- a/pkgs/os-specific/linux/iproute/1001-ubuntu-poc-fan-driver-v3.patch
+++ b/pkgs/os-specific/linux/iproute/1001-ubuntu-poc-fan-driver-v3.patch
@@ -111,9 +111,9 @@ Index: iproute2-4.1.1/ip/link_iptnl.c
 +		p = RTA_PAYLOAD(i);
 +		m = RTA_DATA(i);
 +		fprintf(f, "%s/%d:%s/%d ",
-+			rt_addr_n2a(AF_INET, p, &m->overlay, b1, INET_ADDRSTRLEN),
++			rt_addr_n2a_r(AF_INET, p, &m->overlay, b1, INET_ADDRSTRLEN),
 +			m->overlay_prefix,
-+			rt_addr_n2a(AF_INET, p, &m->underlay, b2, INET_ADDRSTRLEN),
++			rt_addr_n2a_r(AF_INET, p, &m->underlay, b2, INET_ADDRSTRLEN),
 +			m->underlay_prefix);
 +	}
 +}
diff --git a/pkgs/os-specific/linux/iproute/1002-ubuntu-poc-fan-driver-vxlan.patch b/pkgs/os-specific/linux/iproute/1002-ubuntu-poc-fan-driver-vxlan.patch
index 2ddc2840bdd..070023d0b92 100644
--- a/pkgs/os-specific/linux/iproute/1002-ubuntu-poc-fan-driver-vxlan.patch
+++ b/pkgs/os-specific/linux/iproute/1002-ubuntu-poc-fan-driver-vxlan.patch
@@ -6,9 +6,9 @@ Index: iproute2-4.3.0/include/linux/if_link.h
 --- iproute2-4.3.0.orig/include/linux/if_link.h
 +++ iproute2-4.3.0/include/linux/if_link.h
 @@ -392,6 +392,7 @@ enum {
- 	IFLA_VXLAN_GBP,
- 	IFLA_VXLAN_REMCSUM_NOPARTIAL,
  	IFLA_VXLAN_COLLECT_METADATA,
+ 	IFLA_VXLAN_LABEL,
+ 	IFLA_VXLAN_GPE,
 +	IFLA_VXLAN_FAN_MAP = 33,
  	__IFLA_VXLAN_MAX
  };
@@ -88,9 +88,9 @@ Index: iproute2-4.3.0/ip/iplink_vxlan.c
  			  struct nlmsghdr *n)
  {
 @@ -201,6 +243,10 @@ static int vxlan_parse_opt(struct link_u
- 			udp6zerocsumrx = 0;
- 		} else if (!matches(*argv, "gbp")) {
  			gbp = 1;
+ 		} else if (!matches(*argv, "gpe")) {
+ 			gpe = 1;
 +		} else if (!matches(*argv, "fan-map")) {
 +			NEXT_ARG();
 +			if (fan_parse_map(&argc, &argv, n))
@@ -117,9 +117,9 @@ Index: iproute2-4.3.0/ip/iplink_vxlan.c
 +		p = RTA_PAYLOAD(i);
 +		m = RTA_DATA(i);
 +		fprintf(f, "%s/%d:%s/%d ",
-+			rt_addr_n2a(AF_INET, p, &m->overlay, b1, INET_ADDRSTRLEN),
++			rt_addr_n2a_r(AF_INET, p, &m->overlay, b1, INET_ADDRSTRLEN),
 +			m->overlay_prefix,
-+			rt_addr_n2a(AF_INET, p, &m->underlay, b2, INET_ADDRSTRLEN),
++			rt_addr_n2a_r(AF_INET, p, &m->underlay, b2, INET_ADDRSTRLEN),
 +			m->underlay_prefix);
 +	}
 +}
diff --git a/pkgs/os-specific/linux/iproute/default.nix b/pkgs/os-specific/linux/iproute/default.nix
index 6813b5bcf1b..9d3d76eb1f4 100644
--- a/pkgs/os-specific/linux/iproute/default.nix
+++ b/pkgs/os-specific/linux/iproute/default.nix
@@ -3,11 +3,12 @@
 }:
 
 stdenv.mkDerivation rec {
-  name = "iproute2-4.5.0";
+  name = "iproute2-${version}";
+  version = "4.7.0";
 
   src = fetchurl {
     url = "mirror://kernel/linux/utils/net/iproute2/${name}.tar.xz";
-    sha256 = "0jj9phsi8m2sbnz7bbh9cf9vckm67hs62ab5srdwnrg4acpjj59z";
+    sha256 = "14kvpdlxq8204f5ayfdfb6mc0423mbf3px9q0spdly9sng7xnq4g";
   };
 
   patches = lib.optionals enableFan [
@@ -28,6 +29,7 @@ stdenv.mkDerivation rec {
     "LIBDIR=$(out)/lib"
     "SBINDIR=$(out)/sbin"
     "MANDIR=$(out)/share/man"
+    "BASH_COMPDIR=$(out)/share/bash-completion/completions/iproute2"
     "DOCDIR=$(TMPDIR)/share/doc/${name}" # Don't install docs
   ];