* Updated iputils (though perhaps we should just use GNU inetutils).

svn path=/nixpkgs/trunk/; revision=25765
This commit is contained in:
Eelco Dolstra 2011-02-02 16:05:18 +00:00
parent b899921afe
commit 74c988959a
5 changed files with 31 additions and 68 deletions

View File

@ -1,18 +0,0 @@
source $stdenv/setup
makeFlags="KERNEL_INCLUDE=$kernelHeaders/include LIBC_INCLUDE=$glibc/include"
preConfigure="sed -e 's@check-kernel @@' -i Makefile"
installPhase="
mkdir -pv $out/bin $out/sbin
install -c arping $out/sbin/
install -c ping $out/bin/
install -c ping6 $out/sbin/
install -c rdisc $out/sbin/
install -c tracepath $out/sbin/
install -c tracepath6 $out/sbin/
install -c traceroute6 $out/sbin/
";
genericBuild

View File

@ -1,15 +1,29 @@
{stdenv, fetchurl, linuxHeaders, glibc}:
{ stdenv, fetchurl, libsysfs, openssl }:
assert stdenv.isLinux && stdenv.system != "powerpc-linux";
assert stdenv ? glibc;
stdenv.mkDerivation {
name = "iputils-20020927";
builder = ./builder.sh;
name = "iputils-20101006";
src = fetchurl {
url = ftp://ftp.nl.debian.org/debian/pool/main/i/iputils/iputils_20020927.orig.tar.gz;
md5 = "b5493f7a2997130a4f86c486c9993b86";
url = http://www.skbuff.net/iputils/iputils-s20101006.tar.bz2;
sha256 = "1rvfvdnmzlmgy9a6xv5v4n785zmn10v2l7yaq83rdfgbh1ng8fpx";
};
inherit linuxHeaders glibc;
patches = [ ./open-max.patch ];
buildInputs = [ libsysfs openssl ];
# Urgh, it uses Make's `-l' dependency "feature".
makeFlags = "VPATH=${libsysfs}/lib:${stdenv.glibc}/lib:${openssl}/lib";
installPhase =
''
mkdir -p $out/sbin
cp -p arping ping ping6 rdisc tracepath tracepath6 traceroute6 $out/sbin/
'';
meta = {
homepage = http://www.skbuff.net/iputils/;
description = "A set of small useful utilities for Linux networking";
platforms = stdenv.lib.platforms.linux;
};
}

View File

@ -1,30 +0,0 @@
--- iputils-s20070202/rdisc.c.open-max 2007-08-07 11:34:03.000000000 +0200
+++ iputils-s20070202/rdisc.c 2007-08-07 11:41:30.000000000 +0200
@@ -240,14 +240,25 @@
{
int t;
pid_t pid;
-
+ long open_max;
+
if (trace)
return;
+ if ((open_max = sysconf(_SC_OPEN_MAX)) == -1) {
+ if (errno == 0) {
+ (void) fprintf(stderr, "OPEN_MAX is not supported\n");
+ }
+ else {
+ (void) fprintf(stderr, "sysconf() error\n");
+ }
+ exit(1);
+ }
+
if ((pid=fork()) != 0)
exit(0);
- for (t = 0; t < OPEN_MAX; t++)
+ for (t = 0; t < open_max; t++)
if (t != s)
close(t);

View File

@ -1,4 +1,5 @@
{stdenv, fetchurl}:
{ stdenv, fetchurl }:
stdenv.mkDerivation rec {
name = "sysfsutils-2.1.0";
@ -9,11 +10,12 @@ stdenv.mkDerivation rec {
meta = {
homepage = http://linux-diag.sourceforge.net/Sysfsutils.html;
longDescription = "
These are a set of utilites built upon sysfs, a new virtual
filesystem in Linux kernel versions 2.5+ that exposes a system's
device tree.
";
longDescription =
''
These are a set of utilites built upon sysfs, a new virtual
filesystem in Linux kernel versions 2.5+ that exposes a system's
device tree.
'';
license = "GPL-v2 / LGPL-v2.1";
};
}

View File

@ -4738,12 +4738,7 @@ let
iproute = callPackage ../os-specific/linux/iproute { };
iputils = (
import ../os-specific/linux/iputils {
inherit fetchurl stdenv;
glibc = stdenv.gcc.libc;
linuxHeaders = stdenv.gcc.libc.kernelHeaders;
});
iputils = callPackage ../os-specific/linux/iputils { };
iptables = callPackage ../os-specific/linux/iptables { };