diff --git a/iputils/.md5sum b/iputils/.md5sum index 55e6b564..519095eb 100644 --- a/iputils/.md5sum +++ b/iputils/.md5sum @@ -1,2 +1,3 @@ 91ec714aed9abdb1c91eb7b75b59290f iputils-man-s20071127.tar.bz2 +df44228e87bb629c3d3aa562f7966ebf iputils-s20071127-open_max.patch 12245e9927d60ff5cf4a99d265bcb7d3 iputils-s20071127.tar.bz2 diff --git a/iputils/Pkgfile b/iputils/Pkgfile index 73941e4a..74578d0c 100644 --- a/iputils/Pkgfile +++ b/iputils/Pkgfile @@ -5,19 +5,21 @@ name=iputils version=s20071127 -release=1 -source=(http://www.skbuff.net/iputils/$name-$version.tar.bz2 \ - http://crux.nu/~jue/files/dist/$name-man-$version.tar.bz2) +release=2 +source=(http://www.skbuff.net/iputils/$name-$version.tar.bz2 + http://crux.nu/~jue/files/dist/$name-man-$version.tar.bz2 + $name-$version-open_max.patch) build() { - cd $name-$version - sed -i "/^CCOPT=/s|-O2|$CFLAGS|;s| -g$||" Makefile - make + cd $name-$version + patch -p1 -i $SRC/$name-$version-open_max.patch + sed -i "/^CCOPT=/s|-O2|$CFLAGS|;s| -g$||" Makefile + make - install -d $PKG/{{s,}bin,usr/{man/man8,sbin}} - install ping{,6} $PKG/bin/ - install arping $PKG/sbin/ - install tracepath{,6} traceroute6 clockdiff rarpd rdisc ipg tftpd $PKG/usr/sbin/ - cp -d $SRC/$name-man-$version/* $PKG/usr/man/man8 - chmod u+s $PKG/bin/ping{,6} $PKG/usr/sbin/traceroute6 + install -d $PKG/{{s,}bin,usr/{man/man8,sbin}} + install ping{,6} $PKG/bin/ + install arping $PKG/sbin/ + install tracepath{,6} traceroute6 clockdiff rarpd rdisc ipg tftpd $PKG/usr/sbin/ + cp -d $SRC/$name-man-$version/* $PKG/usr/man/man8 + chmod u+s $PKG/bin/ping{,6} $PKG/usr/sbin/traceroute6 } diff --git a/iputils/iputils-s20071127-open_max.patch b/iputils/iputils-s20071127-open_max.patch new file mode 100644 index 00000000..28e953db --- /dev/null +++ b/iputils/iputils-s20071127-open_max.patch @@ -0,0 +1,32 @@ +http://www.redhat.com/archives/fedora-extras-commits/2007-August/msg01642.html + +diff -Nru iputils-s20071127.orig/rdisc.c iputils-s20071127/rdisc.c +--- iputils-s20071127.orig/rdisc.c 2008-09-17 19:45:30.000000000 +0200 ++++ iputils-s20071127/rdisc.c 2008-09-17 19:52:03.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); +