CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
iputils: update to s20101006
authorVictor Martinez <pitillo@ono.com>
Tue, 15 Mar 2011 07:42:04 +0000 (07:42 +0000)
committerVictor Martinez <pitillo@ono.com>
Tue, 15 Mar 2011 07:42:04 +0000 (07:42 +0000)
iputils/.footprint
iputils/.md5sum
iputils/Pkgfile
iputils/iputils-s20101006-fixes-1.patch [new file with mode: 0644]

index 2108ff9167c26d042acb8e7f2c60156de2d01e81..9e9a1646de4a7890748b0cd315d05f359168320f 100644 (file)
@@ -10,12 +10,10 @@ drwxr-xr-x  root/root       usr/man/man8/
 -rw-r--r--     root/root       usr/man/man8/ping.8.gz
 -rw-r--r--     root/root       usr/man/man8/rarpd.8.gz
 -rw-r--r--     root/root       usr/man/man8/rdisc.8.gz
--rw-r--r--     root/root       usr/man/man8/tftpd.8.gz
 -rw-r--r--     root/root       usr/man/man8/tracepath.8.gz
 drwxr-xr-x     root/root       usr/sbin/
 -rwxr-xr-x     root/root       usr/sbin/clockdiff
 -rwxr-xr-x     root/root       usr/sbin/ipg
 -rwxr-xr-x     root/root       usr/sbin/rarpd
 -rwxr-xr-x     root/root       usr/sbin/rdisc
--rwxr-xr-x     root/root       usr/sbin/tftpd
 -rwxr-xr-x     root/root       usr/sbin/tracepath
index d0903d51386341e55d2e1a5f03f88578364e8958..576a790bfc524eb8adb94c9e76fcdb54c5127d05 100644 (file)
@@ -1,2 +1,3 @@
-9ae9fc1f32f1aa25f183860370e8ecf4  iputils-man-s20100214.tar.xz
-37596c8b3eed537294e77464b9804726  iputils-s20100214.tar.bz2
+5ec60e7637bac0a060766fe193c75bf7  iputils-man-s20101006.tar.xz
+ff0061ec890ec0bcaf84372484cc0b62  iputils-s20101006-fixes-1.patch
+a36c25e9ec17e48be514dc0485e7376c  iputils-s20101006.tar.bz2
index 017285c35d34ebc7c63c832f7c562a2f53289903..39323415002ef4015d92436e8f519d7dfa9314dd 100644 (file)
@@ -3,25 +3,27 @@
 # Maintainer: CRUX System Team, core-ports at crux dot nu
 # Packager: Juergen Daubert, juergen dot daubert at t-online dot de
 # Arch Maintainer: CRUX-ARM System Team, devel at crux-arm dot nu
-# Depends on:
+# Depends on: sysfsutils
 
 name=iputils
-version=s20100214
+version=s20101006
 release=1
-source=(http://www.skbuff.net/iputils/$name-$version.tar.bz2 \
-        http://crux.nu/files/distfiles/$name-man-$version.tar.xz)
+source=(http://www.skbuff.net/iputils/$name-$version.tar.bz2
+        http://crux.nu/files/distfiles/$name-man-$version.tar.xz
+        iputils-s20101006-fixes-1.patch)
 
 build() {
   cd $name-$version
-  sed -i "/^CCOPT=/s|-O2|$CFLAGS|;s| -g$||" Makefile
-  sed 's/IPV6_TARGETS=*/IPV6_TARGETS=/' -i Makefile
+  sed -e "s|arping.o -lsysfs|arping.o $CLFS/usr/lib/libsysfs.so|" \
+      -e 's/IPV6_TARGETS=*/IPV6_TARGETS=/' -i Makefile
 
-  make CC="$CC" CFLAGS="$CFLAGS"
+  patch -p1 -i $SRC/iputils-s20101006-fixes-1.patch
+  make CC="$CC" CFLAGS="$CFLAGS $CCOPT -I$CLFS/usr/include"
   
   install -d $PKG/{{s,}bin,usr/{man/man8,sbin}}
   install ping $PKG/bin
   install arping $PKG/sbin
-  install tracepath clockdiff rarpd rdisc ipg tftpd $PKG/usr/sbin
+  install tracepath clockdiff rarpd rdisc ipg $PKG/usr/sbin
   cp -d $SRC/$name-man-$version/* $PKG/usr/man/man8
 
   rm $PKG/usr/man/man8/*6.*
diff --git a/iputils/iputils-s20101006-fixes-1.patch b/iputils/iputils-s20101006-fixes-1.patch
new file mode 100644 (file)
index 0000000..122c425
--- /dev/null
@@ -0,0 +1,162 @@
+Submitted By: Joe Ciccone <jciccone@gmail.com>
+Date: 2011-01-08
+Initial Package Version: s20100418
+Upstream Status: Unknown
+Origin: Unknown
+Description: Contains Fixes for Various Issues
+
+diff -Naur iputils-s20101006.orig/Makefile iputils-s20101006/Makefile
+--- iputils-s20101006.orig/Makefile 2010-10-06 07:59:20.000000000 -0400
++++ iputils-s20101006/Makefile  2011-01-08 20:06:05.039019429 -0500
+@@ -16,7 +16,7 @@
+ CCOPT=-D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -g
+ CFLAGS=$(CCOPT) $(GLIBCFIX) $(DEFINES) 
+-IPV4_TARGETS=tracepath ping clockdiff rdisc arping tftpd rarpd
++IPV4_TARGETS=tracepath ping rdisc arping clockdiff rarpd
+ IPV6_TARGETS=tracepath6 traceroute6 ping6
+ TARGETS=$(IPV4_TARGETS) $(IPV6_TARGETS)
+
+diff -Naur iputils-s20101006.orig/arping.c iputils-s20101006/arping.c
+--- iputils-s20101006.orig/arping.c    2010-10-06 07:59:20.000000000 -0400
++++ iputils-s20101006/arping.c 2011-01-08 20:06:05.039019429 -0500
+@@ -182,12 +182,17 @@
+       if (start.tv_sec==0)
+               start = tv;
+-      if (count-- == 0 || (timeout && MS_TDIFF(tv,start) > timeout*1000 + 500))
++      if (timeout && MS_TDIFF(tv,start) > timeout*1000 + 500)
+               finish();
+-      if (last.tv_sec==0 || MS_TDIFF(tv,last) > 500) {
++      if ((!timeout) && (count == 0))
++              finish();
++
++      if ( count!=0  && (last.tv_sec==0 || MS_TDIFF(tv,last) > 500 ) ) {
+               send_pack(s, src, dst,
+                         (struct sockaddr_ll *)&me, (struct sockaddr_ll *)&he);
++              if (count >= 0)
++                  count--;
+               if (count == 0 && unsolicited)
+                       finish();
+       }
+diff -Naur iputils-s20101006.orig/doc/Makefile iputils-s20101006/doc/Makefile
+--- iputils-s20101006.orig/doc/Makefile        2010-10-06 07:59:20.000000000 -0400
++++ iputils-s20101006/doc/Makefile     2011-01-08 20:06:05.039019429 -0500
+@@ -6,7 +6,7 @@
+ html: $(HTMLFILES) iputils.html
+-man: $(MANFILES)
++man: $(MANFILES) fix_sgml2man
+ # docbook scripts are incredibly dirty in the sense that they leak
+ # lots of some strange temporary junk directories and files.
+@@ -33,6 +33,9 @@
+       @set -e; cd tmp.db2man; nsgmls ../$< | sgmlspl ../docbook2man-spec.pl ; mv $@ ..
+       @-rm -rf tmp.db2man
++fix_sgml2man:
++      @sed -i -e 's!\\fB\\fIdestination\\fB\\fR \[\\fB/\\fIport\\fB\\fR\]!\\fB\\fIdestination\\fB\\fR[\\fB/\\fIport\\fB\\fR]!g' tracepath.8
++
+ clean:
+       @rm -rf $(MANFILES) $(HTMLFILES) iputils.html tmp.db2html tmp.db2man
+diff -Naur iputils-s20101006.orig/doc/docbook2man-spec.pl iputils-s20101006/doc/docbook2man-spec.pl
+--- iputils-s20101006.orig/doc/docbook2man-spec.pl     2010-10-06 07:59:20.000000000 -0400
++++ iputils-s20101006/doc/docbook2man-spec.pl  2011-01-08 20:06:05.039019429 -0500
+@@ -428,7 +428,7 @@
+       output ' ';
+       if($_[0]->attribute('CHOICE')->value =~ /opt/i) {
+-              output '[ ';
++              output '[';
+       }
+       bold_on();
+ }
+@@ -441,7 +441,7 @@
+               font_off();
+       }
+       if($_[0]->attribute('CHOICE')->value =~ /opt/i) {
+-              output '] ';
++              output ']';
+       }
+ }
+diff -Naur iputils-s20101006.orig/ping.c iputils-s20101006/ping.c
+--- iputils-s20101006.orig/ping.c      2010-10-06 07:59:20.000000000 -0400
++++ iputils-s20101006/ping.c   2011-01-08 20:06:05.039019429 -0500
+@@ -250,7 +250,7 @@
+                       if (argc == 1)
+                               options |= F_NUMERIC;
+               } else {
+-                      hp = gethostbyname(target);
++                      hp = gethostbyname2(target, AF_INET);
+                       if (!hp) {
+                               fprintf(stderr, "ping: unknown host %s\n", target);
+                               exit(2);
+@@ -883,9 +883,36 @@
+               case ICMP_SR_FAILED:
+                       printf("Source Route Failed\n");
+                       break;
++              case ICMP_NET_UNKNOWN:
++                      printf("Destination Net Unknown\n");
++                      break;
++              case ICMP_HOST_UNKNOWN:
++                      printf("Destination Host Unknown\n");
++                      break;
++              case ICMP_HOST_ISOLATED:
++                      printf("Source Host Isolated\n");
++                      break;
++              case ICMP_NET_ANO:
++                      printf("Destination Net Prohibited\n");
++                      break;
++              case ICMP_HOST_ANO:
++                      printf("Destination Host Prohibited\n");
++                      break;
++              case ICMP_NET_UNR_TOS:
++                      printf("Destination Net Unreachable for Type of Service\n");
++                      break;
++              case ICMP_HOST_UNR_TOS:
++                      printf("Destination Host Unreachable for Type of Service\n");
++                      break;
+               case ICMP_PKT_FILTERED:
+                       printf("Packet filtered\n");
+                       break;
++              case ICMP_PREC_VIOLATION:
++                      printf("Precedence Violation\n");
++                      break;
++              case ICMP_PREC_CUTOFF:
++                      printf("Precedence Cutoff\n");
++                      break;
+               default:
+                       printf("Dest Unreachable, Bad Code: %d\n", code);
+                       break;
+diff -Naur iputils-s20101006.orig/ping_common.c iputils-s20101006/ping_common.c
+--- iputils-s20101006.orig/ping_common.c       2010-10-06 07:59:20.000000000 -0400
++++ iputils-s20101006/ping_common.c    2011-01-08 20:06:05.039019429 -0500
+@@ -872,7 +872,8 @@
+               printf("%spipe %d", comma, pipesize);
+               comma = ", ";
+       }
+-      if (ntransmitted > 1 && (!interval || (options&(F_FLOOD|F_ADAPTIVE)))) {
++      if (ntransmitted > 1 && nreceived &&
++              (!interval || (options&(F_FLOOD|F_ADAPTIVE)))) {
+               int ipg = (1000000*(long long)tv.tv_sec+tv.tv_usec)/(ntransmitted-1);
+               printf("%sipg/ewma %d.%03d/%d.%03d ms",
+                      comma, ipg/1000, ipg%1000, rtt/8000, (rtt/8)%1000);
+diff -Naur iputils-s20101006.orig/tracepath.c iputils-s20101006/tracepath.c
+--- iputils-s20101006.orig/tracepath.c 2010-10-06 07:59:20.000000000 -0400
++++ iputils-s20101006/tracepath.c      2011-01-08 20:06:05.039019429 -0500
+@@ -338,9 +338,9 @@
+               base_port = atoi(p+1);
+       } else
+               base_port = 44444;
+-      he = gethostbyname(argv[0]);
++      he = gethostbyname2(argv[0], AF_INET);
+       if (he == NULL) {
+-              herror("gethostbyname");
++              herror("gethostbyname2");
+               exit(1);
+       }
+       memcpy(&target.sin_addr, he->h_addr, 4);