forked from mirrors/nixpkgs
Merge pull request #22822 from Mic92/iputils
iputils: 20151218 -> 20161105
This commit is contained in:
commit
5b14e91717
nixos
doc/manual/release-notes
modules/tasks
tests
pkgs
|
@ -217,6 +217,18 @@ following incompatible changes:</para>
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Iputils no longer provide ping6 and traceroute6. The functionality of
|
||||||
|
these tools have been integrated into ping and traceroute respectively. To
|
||||||
|
enforce an address family the new flags <literal>-4</literal> and
|
||||||
|
<literal>-6</literal> have been added. One notable incompabtibility is that
|
||||||
|
specifying an interface (for link-local ipv6 for instance) is no longer done
|
||||||
|
with the <literal>-I</literal> flag, but by encoding the interface into the
|
||||||
|
address (<literal>ping fe80::1%eth0</literal>).
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -960,14 +960,8 @@ in
|
||||||
source = "${pkgs.iputils.out}/bin/ping";
|
source = "${pkgs.iputils.out}/bin/ping";
|
||||||
capabilities = "cap_net_raw+p";
|
capabilities = "cap_net_raw+p";
|
||||||
};
|
};
|
||||||
|
|
||||||
ping6 = {
|
|
||||||
source = "${pkgs.iputils.out}/bin/ping6";
|
|
||||||
capabilities = "cap_net_raw+p";
|
|
||||||
};
|
|
||||||
} else {
|
} else {
|
||||||
ping.source = "${pkgs.iputils.out}/bin/ping";
|
ping.source = "${pkgs.iputils.out}/bin/ping";
|
||||||
"ping6".source = "${pkgs.iputils.out}/bin/ping6";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# Set the host and domain names in the activation script. Don't
|
# Set the host and domain names in the activation script. Don't
|
||||||
|
|
|
@ -109,14 +109,14 @@ import ./make-test.nix ({ pkgs, ...} : {
|
||||||
|
|
||||||
# ping a few times each to let the routing table establish itself
|
# ping a few times each to let the routing table establish itself
|
||||||
|
|
||||||
$alice->succeed("ping6 -c 4 $carolIp6");
|
$alice->succeed("ping -c 4 $carolIp6");
|
||||||
$bob->succeed("ping6 -c 4 $carolIp6");
|
$bob->succeed("ping -c 4 $carolIp6");
|
||||||
|
|
||||||
$carol->succeed("ping6 -c 4 $aliceIp6");
|
$carol->succeed("ping -c 4 $aliceIp6");
|
||||||
$carol->succeed("ping6 -c 4 $bobIp6");
|
$carol->succeed("ping -c 4 $bobIp6");
|
||||||
|
|
||||||
$alice->succeed("ping6 -c 4 $bobIp6");
|
$alice->succeed("ping -c 4 $bobIp6");
|
||||||
$bob->succeed("ping6 -c 4 $aliceIp6");
|
$bob->succeed("ping -c 4 $aliceIp6");
|
||||||
|
|
||||||
$alice->waitForUnit("httpd.service");
|
$alice->waitForUnit("httpd.service");
|
||||||
|
|
||||||
|
|
|
@ -66,7 +66,7 @@ import ./make-test.nix ({ pkgs, ...} : {
|
||||||
"${containerIp6}" =~ /([^\/]+)\/([0-9+])/;
|
"${containerIp6}" =~ /([^\/]+)\/([0-9+])/;
|
||||||
my $ip6 = $1;
|
my $ip6 = $1;
|
||||||
chomp $ip6;
|
chomp $ip6;
|
||||||
$machine->succeed("ping6 -n -c 1 $ip6");
|
$machine->succeed("ping -n -c 1 $ip6");
|
||||||
$machine->succeed("curl --fail http://[$ip6]/ > /dev/null");
|
$machine->succeed("curl --fail http://[$ip6]/ > /dev/null");
|
||||||
|
|
||||||
# Stop the container.
|
# Stop the container.
|
||||||
|
|
|
@ -84,7 +84,7 @@ import ./make-test.nix ({ pkgs, ...} : {
|
||||||
|
|
||||||
# Ping on main veth
|
# Ping on main veth
|
||||||
$machine->succeed("ping -n -c 1 192.168.0.100");
|
$machine->succeed("ping -n -c 1 192.168.0.100");
|
||||||
$machine->succeed("ping6 -n -c 1 fc00::2");
|
$machine->succeed("ping -n -c 1 fc00::2");
|
||||||
|
|
||||||
# Ping on the first extra veth
|
# Ping on the first extra veth
|
||||||
$machine->succeed("ping -n -c 1 192.168.1.100 >&2");
|
$machine->succeed("ping -n -c 1 192.168.1.100 >&2");
|
||||||
|
|
|
@ -47,7 +47,7 @@ import ./make-test.nix ({ pkgs, ...} : {
|
||||||
# multi-user.target, we should now be able to access it.
|
# multi-user.target, we should now be able to access it.
|
||||||
my $ip = "${localIp}";
|
my $ip = "${localIp}";
|
||||||
chomp $ip;
|
chomp $ip;
|
||||||
$machine->succeed("ping6 -n -c 1 $ip");
|
$machine->succeed("ping -n -c 1 $ip");
|
||||||
$machine->succeed("curl --fail http://[$ip]/ > /dev/null");
|
$machine->succeed("curl --fail http://[$ip]/ > /dev/null");
|
||||||
|
|
||||||
# Stop the container.
|
# Stop the container.
|
||||||
|
|
|
@ -54,22 +54,22 @@ import ./make-test.nix ({ pkgs, ...} : {
|
||||||
}
|
}
|
||||||
|
|
||||||
subtest "loopback address", sub {
|
subtest "loopback address", sub {
|
||||||
$client->succeed("ping6 -c 1 ::1 >&2");
|
$client->succeed("ping -c 1 ::1 >&2");
|
||||||
$client->fail("ping6 -c 1 ::2 >&2");
|
$client->fail("ping -c 1 ::2 >&2");
|
||||||
};
|
};
|
||||||
|
|
||||||
subtest "local link addressing", sub {
|
subtest "local link addressing", sub {
|
||||||
my $clientIp = waitForAddress $client, "eth1", "link";
|
my $clientIp = waitForAddress $client, "eth1", "link";
|
||||||
my $serverIp = waitForAddress $server, "eth1", "link";
|
my $serverIp = waitForAddress $server, "eth1", "link";
|
||||||
$client->succeed("ping6 -c 1 -I eth1 $clientIp >&2");
|
$client->succeed("ping -c 1 $clientIp%eth1 >&2");
|
||||||
$client->succeed("ping6 -c 1 -I eth1 $serverIp >&2");
|
$client->succeed("ping -c 1 $serverIp%eth1 >&2");
|
||||||
};
|
};
|
||||||
|
|
||||||
subtest "global addressing", sub {
|
subtest "global addressing", sub {
|
||||||
my $clientIp = waitForAddress $client, "eth1", "global";
|
my $clientIp = waitForAddress $client, "eth1", "global";
|
||||||
my $serverIp = waitForAddress $server, "eth1", "global";
|
my $serverIp = waitForAddress $server, "eth1", "global";
|
||||||
$client->succeed("ping6 -c 1 $clientIp >&2");
|
$client->succeed("ping -c 1 $clientIp >&2");
|
||||||
$client->succeed("ping6 -c 1 $serverIp >&2");
|
$client->succeed("ping -c 1 $serverIp >&2");
|
||||||
$client->succeed("curl --fail -g http://[$serverIp]");
|
$client->succeed("curl --fail -g http://[$serverIp]");
|
||||||
$client->fail("curl --fail -g http://[$clientIp]");
|
$client->fail("curl --fail -g http://[$clientIp]");
|
||||||
};
|
};
|
||||||
|
|
|
@ -166,24 +166,24 @@ let
|
||||||
# Test vlan 1
|
# Test vlan 1
|
||||||
$client->waitUntilSucceeds("ping -c 1 192.168.1.1");
|
$client->waitUntilSucceeds("ping -c 1 192.168.1.1");
|
||||||
$client->waitUntilSucceeds("ping -c 1 192.168.1.2");
|
$client->waitUntilSucceeds("ping -c 1 192.168.1.2");
|
||||||
$client->waitUntilSucceeds("ping6 -c 1 fd00:1234:5678:1::1");
|
$client->waitUntilSucceeds("ping -c 1 fd00:1234:5678:1::1");
|
||||||
$client->waitUntilSucceeds("ping6 -c 1 fd00:1234:5678:1::2");
|
$client->waitUntilSucceeds("ping -c 1 fd00:1234:5678:1::2");
|
||||||
|
|
||||||
$router->waitUntilSucceeds("ping -c 1 192.168.1.1");
|
$router->waitUntilSucceeds("ping -c 1 192.168.1.1");
|
||||||
$router->waitUntilSucceeds("ping -c 1 192.168.1.2");
|
$router->waitUntilSucceeds("ping -c 1 192.168.1.2");
|
||||||
$router->waitUntilSucceeds("ping6 -c 1 fd00:1234:5678:1::1");
|
$router->waitUntilSucceeds("ping -c 1 fd00:1234:5678:1::1");
|
||||||
$router->waitUntilSucceeds("ping6 -c 1 fd00:1234:5678:1::2");
|
$router->waitUntilSucceeds("ping -c 1 fd00:1234:5678:1::2");
|
||||||
|
|
||||||
# Test vlan 2
|
# Test vlan 2
|
||||||
$client->waitUntilSucceeds("ping -c 1 192.168.2.1");
|
$client->waitUntilSucceeds("ping -c 1 192.168.2.1");
|
||||||
$client->waitUntilSucceeds("ping -c 1 192.168.2.2");
|
$client->waitUntilSucceeds("ping -c 1 192.168.2.2");
|
||||||
$client->waitUntilSucceeds("ping6 -c 1 fd00:1234:5678:2::1");
|
$client->waitUntilSucceeds("ping -c 1 fd00:1234:5678:2::1");
|
||||||
$client->waitUntilSucceeds("ping6 -c 1 fd00:1234:5678:2::2");
|
$client->waitUntilSucceeds("ping -c 1 fd00:1234:5678:2::2");
|
||||||
|
|
||||||
$router->waitUntilSucceeds("ping -c 1 192.168.2.1");
|
$router->waitUntilSucceeds("ping -c 1 192.168.2.1");
|
||||||
$router->waitUntilSucceeds("ping -c 1 192.168.2.2");
|
$router->waitUntilSucceeds("ping -c 1 192.168.2.2");
|
||||||
$router->waitUntilSucceeds("ping6 -c 1 fd00:1234:5678:2::1");
|
$router->waitUntilSucceeds("ping -c 1 fd00:1234:5678:2::1");
|
||||||
$router->waitUntilSucceeds("ping6 -c 1 fd00:1234:5678:2::2");
|
$router->waitUntilSucceeds("ping -c 1 fd00:1234:5678:2::2");
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
dhcpOneIf = {
|
dhcpOneIf = {
|
||||||
|
@ -390,11 +390,11 @@ let
|
||||||
$client2->succeed("ip addr >&2");
|
$client2->succeed("ip addr >&2");
|
||||||
|
|
||||||
# Test ipv6
|
# Test ipv6
|
||||||
$client1->waitUntilSucceeds("ping6 -c 1 fc00::1");
|
$client1->waitUntilSucceeds("ping -c 1 fc00::1");
|
||||||
$client1->waitUntilSucceeds("ping6 -c 1 fc00::2");
|
$client1->waitUntilSucceeds("ping -c 1 fc00::2");
|
||||||
|
|
||||||
$client2->waitUntilSucceeds("ping6 -c 1 fc00::1");
|
$client2->waitUntilSucceeds("ping -c 1 fc00::1");
|
||||||
$client2->waitUntilSucceeds("ping6 -c 1 fc00::2");
|
$client2->waitUntilSucceeds("ping -c 1 fc00::2");
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
vlan = let
|
vlan = let
|
||||||
|
|
|
@ -1,17 +1,20 @@
|
||||||
{ stdenv, fetchurl, libsysfs, gnutls, openssl, libcap, sp, docbook_sgml_dtd_31
|
{ stdenv, fetchurl
|
||||||
|
, libsysfs, gnutls, openssl
|
||||||
|
, libcap, sp, docbook_sgml_dtd_31
|
||||||
|
, libidn, nettle
|
||||||
, SGMLSpm, libgcrypt }:
|
, SGMLSpm, libgcrypt }:
|
||||||
|
|
||||||
assert stdenv ? glibc;
|
assert stdenv ? glibc;
|
||||||
|
|
||||||
let
|
let
|
||||||
time = "20151218";
|
time = "20161105";
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "iputils-${time}";
|
name = "iputils-${time}";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "http://www.skbuff.net/iputils/iputils-s${time}.tar.bz2";
|
url = "https://github.com/iputils/iputils/archive/s${time}.tar.gz";
|
||||||
sha256 = "189592jlkhxdgy8jc07m4bsl41ik9r6i6aaqb532prai37bmi7sl";
|
sha256 = "12mdmh4qbf5610csaw3rkzhpzf6djndi4jsl4gyr8wni0cphj4zq";
|
||||||
};
|
};
|
||||||
|
|
||||||
prePatch = ''
|
prePatch = ''
|
||||||
|
@ -21,27 +24,24 @@ stdenv.mkDerivation rec {
|
||||||
makeFlags = "USE_GNUTLS=no";
|
makeFlags = "USE_GNUTLS=no";
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
libsysfs openssl libcap sp docbook_sgml_dtd_31 SGMLSpm libgcrypt
|
libsysfs openssl libcap sp docbook_sgml_dtd_31 SGMLSpm libgcrypt libidn nettle
|
||||||
];
|
];
|
||||||
|
|
||||||
buildFlags = "man all ninfod";
|
buildFlags = "man all ninfod";
|
||||||
|
|
||||||
installPhase =
|
installPhase =
|
||||||
''
|
''
|
||||||
mkdir -p $out/sbin $out/bin
|
mkdir -p $out/bin
|
||||||
cp -p ping ping6 tracepath tracepath6 traceroute6 $out/bin/
|
cp -p ping tracepath clockdiff arping rdisc ninfod/ninfod $out/bin/
|
||||||
cp -p clockdiff arping rdisc ninfod/ninfod $out/sbin/
|
|
||||||
|
|
||||||
mkdir -p $out/share/man/man8
|
mkdir -p $out/share/man/man8
|
||||||
cp -p doc/clockdiff.8 doc/arping.8 doc/ping.8 doc/rdisc.8 \
|
cp -p \
|
||||||
doc/tracepath.8 doc/ninfod.8 doc/traceroute6.8 \
|
doc/clockdiff.8 doc/arping.8 doc/ping.8 doc/rdisc.8 doc/tracepath.8 doc/ninfod.8 \
|
||||||
$out/share/man/man8
|
$out/share/man/man8
|
||||||
ln -s $out/share/man/man8/{ping,ping6}.8
|
|
||||||
ln -s $out/share/man/man8/{tracepath,tracepath6}.8
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
homepage = http://www.skbuff.net/iputils/;
|
homepage = https://github.com/iputils/iputils;
|
||||||
description = "A set of small useful utilities for Linux networking";
|
description = "A set of small useful utilities for Linux networking";
|
||||||
platforms = stdenv.lib.platforms.linux;
|
platforms = stdenv.lib.platforms.linux;
|
||||||
};
|
};
|
||||||
|
|
|
@ -16,8 +16,8 @@ stdenv.mkDerivation rec {
|
||||||
# configured on the build machine).
|
# configured on the build machine).
|
||||||
preConfigure= "
|
preConfigure= "
|
||||||
configureFlagsArray=(
|
configureFlagsArray=(
|
||||||
--with-ping-command='/run/wrappers/bin/ping -n -U -w %d -c %d %s'
|
--with-ping-command='/run/wrappers/bin/ping -4 -n -U -w %d -c %d %s'
|
||||||
--with-ping6-command='/run/wrappers/bin/ping6 -n -U -w %d -c %d %s'
|
--with-ping6-command='/run/wrappers/bin/ping -6 -n -U -w %d -c %d %s'
|
||||||
)
|
)
|
||||||
";
|
";
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue