[net-tools] patch shuffle
Jiří Popelka
jpopelka at fedoraproject.org
Wed Dec 7 16:47:03 UTC 2011
commit 0ffa13452eadc9fb85faef8e9a4e181aa4a356c8
Author: Jiri Popelka <jpopelka at redhat.com>
Date: Wed Dec 7 17:43:22 2011 +0100
patch shuffle
.gitignore | 1 +
net-tools-1.60-cycle.patch | 16 +++---
net-tools-1.60-interface.patch | 10 ++--
net-tools-1.60-isofix.patch | 33 +++++++++++
...tor.patch => net-tools-1.60-mii-registers.patch | 60 ++++++++++++-------
net-tools-1.60-trim_iface.patch | 10 ++--
net-tools-1.60-virtualname.patch | 35 -----------
net-tools.spec | 25 +++++---
sources | 2 +-
9 files changed, 106 insertions(+), 86 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index b0acb38..b270b03 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
net-tools-1.60.tar.bz2
/net-tools-1.60.20111206git.tar.gz
+/net-tools-1.60.20111207git.tar.xz
diff --git a/net-tools-1.60-cycle.patch b/net-tools-1.60-cycle.patch
index 9d65546..e29b339 100644
--- a/net-tools-1.60-cycle.patch
+++ b/net-tools-1.60-cycle.patch
@@ -1,6 +1,6 @@
diff -up net-tools-1.60/lib/interface.c.cycle net-tools-1.60/lib/interface.c
---- net-tools-1.60/lib/interface.c.cycle 2011-12-06 16:23:45.051552704 +0100
-+++ net-tools-1.60/lib/interface.c 2011-12-06 16:23:45.115551904 +0100
+--- net-tools-1.60/lib/interface.c.cycle 2011-11-21 02:31:57.000000000 +0100
++++ net-tools-1.60/lib/interface.c 2011-12-07 16:11:38.249768234 +0100
@@ -93,6 +93,7 @@ int if_list_all = 0; /* do we have reque
static struct interface *int_list, *int_last;
@@ -69,7 +69,7 @@ diff -up net-tools-1.60/lib/interface.c.cycle net-tools-1.60/lib/interface.c
{
diff -up net-tools-1.60/man/en_US/netstat.8.cycle net-tools-1.60/man/en_US/netstat.8
--- net-tools-1.60/man/en_US/netstat.8.cycle 2011-11-21 02:31:57.000000000 +0100
-+++ net-tools-1.60/man/en_US/netstat.8 2011-12-06 16:23:45.115551904 +0100
++++ net-tools-1.60/man/en_US/netstat.8 2011-12-07 16:11:38.249768234 +0100
@@ -33,6 +33,7 @@ netstat \- Print network connections, ro
.RB [ \-\-verbose | \-v ]
.RB [ \-\-continuous | \-c]
@@ -129,8 +129,8 @@ diff -up net-tools-1.60/man/en_US/netstat.8.cycle net-tools-1.60/man/en_US/netst
.SH OUTPUT
.P
diff -up net-tools-1.60/netstat.c.cycle net-tools-1.60/netstat.c
---- net-tools-1.60/netstat.c.cycle 2011-12-06 16:23:45.052552691 +0100
-+++ net-tools-1.60/netstat.c 2011-12-06 16:23:45.116551892 +0100
+--- net-tools-1.60/netstat.c.cycle 2011-11-21 02:31:57.000000000 +0100
++++ net-tools-1.60/netstat.c 2011-12-07 16:13:19.911497288 +0100
@@ -106,9 +106,9 @@
#endif
@@ -169,9 +169,9 @@ diff -up net-tools-1.60/netstat.c.cycle net-tools-1.60/netstat.c
}
if (flag_exp < 2) {
ife_short = 1;
-- printf(_("Iface MTU Met RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg\n"));
+- printf(_("Iface MTU Met RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg\n"));
+ if(!(count % 8))
-+ printf(_("Iface MTU Met RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg\n"));
++ printf(_("Iface MTU Met RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg\n"));
}
if (for_all_interfaces(do_if_print, &flag_all) < 0) {
@@ -293,7 +293,7 @@ diff -up net-tools-1.60/netstat.c.cycle net-tools-1.60/netstat.c
return (i);
diff -up net-tools-1.60/statistics.c.cycle net-tools-1.60/statistics.c
--- net-tools-1.60/statistics.c.cycle 2011-11-21 02:31:57.000000000 +0100
-+++ net-tools-1.60/statistics.c 2011-12-06 16:24:24.062065007 +0100
++++ net-tools-1.60/statistics.c 2011-12-07 16:11:38.352766947 +0100
@@ -502,7 +502,7 @@ void process6_fd(FILE *f)
}
diff --git a/net-tools-1.60-interface.patch b/net-tools-1.60-interface.patch
index 8df9d20..0fa568b 100644
--- a/net-tools-1.60-interface.patch
+++ b/net-tools-1.60-interface.patch
@@ -1,6 +1,6 @@
diff -up net-tools-1.60/man/en_US/netstat.8.interface net-tools-1.60/man/en_US/netstat.8
---- net-tools-1.60/man/en_US/netstat.8.interface 2011-12-06 12:30:47.028302044 +0100
-+++ net-tools-1.60/man/en_US/netstat.8 2011-12-06 12:30:47.035301954 +0100
+--- net-tools-1.60/man/en_US/netstat.8.interface 2011-12-07 16:13:46.800161134 +0100
++++ net-tools-1.60/man/en_US/netstat.8 2011-12-07 16:13:46.807161046 +0100
@@ -46,9 +46,9 @@ netstat \- Print network connections, ro
.RB [delay]
.P
@@ -25,8 +25,8 @@ diff -up net-tools-1.60/man/en_US/netstat.8.interface net-tools-1.60/man/en_US/n
Display a list of masqueraded connections.
.SS "\-\-statistics , \-s"
diff -up net-tools-1.60/netstat.c.interface net-tools-1.60/netstat.c
---- net-tools-1.60/netstat.c.interface 2011-12-06 12:30:46.877303930 +0100
-+++ net-tools-1.60/netstat.c 2011-12-06 12:32:32.845979140 +0100
+--- net-tools-1.60/netstat.c.interface 2011-12-07 16:13:46.787161296 +0100
++++ net-tools-1.60/netstat.c 2011-12-07 16:14:41.331479399 +0100
@@ -135,6 +135,7 @@ char *Release = RELEASE, *Version = "net
#define E_IOCTL -3
@@ -44,7 +44,7 @@ diff -up net-tools-1.60/netstat.c.interface net-tools-1.60/netstat.c
if (skfd < 0) {
if ((skfd = sockets_open(0)) < 0) {
@@ -1625,7 +1627,11 @@ static int iface_info(void)
- printf(_("Iface MTU Met RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg\n"));
+ printf(_("Iface MTU Met RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg\n"));
}
- if (for_all_interfaces(do_if_print, &flag_all) < 0) {
diff --git a/net-tools-1.60-isofix.patch b/net-tools-1.60-isofix.patch
new file mode 100644
index 0000000..4bbaff1
--- /dev/null
+++ b/net-tools-1.60-isofix.patch
@@ -0,0 +1,33 @@
+--- net-tools-1.60/po/de.po.isofix 2000-10-28 12:59:43.000000000 +0200
++++ net-tools-1.60/po/de.po 2005-01-10 11:29:29.407639208 +0100
+@@ -9,7 +9,7 @@
+ "Last-Translator: Ralf Bächle <ralf at gnu.org>\n"
+ "Language-Team:\n"
+ "MIME-Version: 1.0\n"
+-"Content-Type: text/plain; charset=iso8859-1\n"
++"Content-Type: text/plain; charset=iso-8859-1\n"
+ "Content-Transfer-Encoding: 8bit\n"
+
+ #: ../arp.c:110 ../arp.c:269
+--- net-tools-1.60/po/fr.po.isofix 2000-02-20 22:47:00.000000000 +0100
++++ net-tools-1.60/po/fr.po 2005-01-10 11:29:23.613520048 +0100
+@@ -9,7 +9,7 @@
+ "Last-Translator: J.M.Vansteene <vanstee at worldnet.fr>\n"
+ "Language-Team:\n"
+ "MIME-Version: 1.0\n"
+-"Content-Type: text/plain; charset=iso8859-1\n"
++"Content-Type: text/plain; charset=iso-8859-1\n"
+ "Content-Transfer-Encoding: 8bit\n"
+
+ #: ../arp.c:110 ../arp.c:269
+--- net-tools-1.60/po/pt_BR.po.isofix 2000-02-20 22:47:06.000000000 +0100
++++ net-tools-1.60/po/pt_BR.po 2005-01-10 11:29:16.294632688 +0100
+@@ -14,7 +14,7 @@
+ "PO-Revision-Date: 1999-03-01 02:38+0100\n"
+ "Last-Translator: Arnaldo Carvalho de Melo <acme at conectiva.com.br>\n"
+ "MIME-Version: 1.0\n"
+-"Content-Type: text/plain; charset=ISO8859-9\n"
++"Content-Type: text/plain; charset=iso-8859-9\n"
+ "Content-Transfer-Encoding: 8bit\n"
+
+ #: ../arp.c:110 ../arp.c:269
diff --git a/net-tools-1.60-mii-refactor.patch b/net-tools-1.60-mii-registers.patch
similarity index 86%
rename from net-tools-1.60-mii-refactor.patch
rename to net-tools-1.60-mii-registers.patch
index c9920e8..3045a40 100644
--- a/net-tools-1.60-mii-refactor.patch
+++ b/net-tools-1.60-mii-registers.patch
@@ -1,6 +1,6 @@
-diff -up net-tools-1.60/mii-tool.c.mii-refactor net-tools-1.60/mii-tool.c
---- net-tools-1.60/mii-tool.c.mii-refactor 2011-11-21 02:31:57.000000000 +0100
-+++ net-tools-1.60/mii-tool.c 2011-12-06 16:31:04.114063667 +0100
+diff -up net-tools-1.60/mii-tool.c.mii-registers net-tools-1.60/mii-tool.c
+--- net-tools-1.60/mii-tool.c.mii-registers 2011-11-21 02:31:57.000000000 +0100
++++ net-tools-1.60/mii-tool.c 2011-12-07 17:37:35.810289854 +0100
@@ -51,10 +51,12 @@ static char Version[] = "$Id: mii-tool.c
#include <linux/if_arp.h>
#include <linux/if_ether.h>
@@ -96,29 +96,45 @@ diff -up net-tools-1.60/mii-tool.c.mii-refactor net-tools-1.60/mii-tool.c
mask >>= 5;
for (i = 4; i >= 0; i--) {
if (mask & (1<<i)) {
-@@ -233,8 +236,19 @@ int show_basic_mii(int sock, int phy_id)
+@@ -233,8 +236,35 @@ int show_basic_mii(int sock, int phy_id)
/* Some bits in the BMSR are latched, but we can't rely on being
the only reader, so only the current values are meaningful */
mdio_read(sock, MII_BMSR);
- for (i = 0; i < ((verbose > 1) ? 32 : MII_BASIC_MAX); i++)
- mii_val[i] = mdio_read(sock, i);
-+ for (i = 0; i < ((verbose > 1) ? 32 : (MII_STAT1000+1)); i++) {
-+ if ((i == MII_BMCR) || (i == MII_BMSR) || (i == MII_PHYSID1) ||
-+ (i == MII_PHYSID2) || (i == MII_ADVERTISE) || (i == MII_LPA) ||
-+ (i == MII_EXPANSION) || (i == MII_CTRL1000) || (i == MII_STAT1000) ||
-+ (i == MII_ESTATUS) || (i == MII_DCOUNTER) || (i == MII_FCSCOUNTER) ||
-+ (i == MII_NWAYTEST) || (i == MII_RERRCOUNTER) ||
-+ (i == MII_SREVISION) || (i == MII_RESV1) || (i == MII_LBRERROR) ||
-+ (i == MII_PHYADDR) || (i == MII_RESV2) ||
-+ (i == MII_TPISTATUS) || (i == MII_NCONFIG))
-+ mii_val[i] = mdio_read(sock, i);
-+ else
-+ mii_val[i] = 0;
-+ }
++ for (i = 0; i < ((verbose > 1) ? 32 : (MII_STAT1000+1)); i++)
++ switch (i & 0x1F) {
++ case MII_BMCR:
++ case MII_BMSR:
++ case MII_PHYSID1:
++ case MII_PHYSID2:
++ case MII_ADVERTISE:
++ case MII_LPA:
++ case MII_EXPANSION:
++ case MII_CTRL1000:
++ case MII_STAT1000:
++ case MII_ESTATUS:
++ case MII_DCOUNTER:
++ case MII_FCSCOUNTER:
++ case MII_NWAYTEST:
++ case MII_RERRCOUNTER:
++ case MII_SREVISION:
++ case MII_RESV1:
++ case MII_LBRERROR:
++ case MII_PHYADDR:
++ case MII_RESV2:
++ case MII_TPISTATUS:
++ case MII_NCONFIG:
++ mii_val[i] = mdio_read(sock, i);
++ break;
++ default:
++ mii_val[i] = 0;
++ break;
++ }
if (mii_val[MII_BMCR] == 0xffff || mii_val[MII_BMSR] == 0x0000) {
fprintf(stderr, " No MII transceiver present!.\n");
-@@ -243,31 +257,31 @@ int show_basic_mii(int sock, int phy_id)
+@@ -243,31 +273,31 @@ int show_basic_mii(int sock, int phy_id)
/* Descriptive rename. */
bmcr = mii_val[MII_BMCR]; bmsr = mii_val[MII_BMSR];
@@ -159,7 +175,7 @@ diff -up net-tools-1.60/mii-tool.c.mii-refactor net-tools-1.60/mii-tool.c
if (opt_watch) {
if (opt_log) {
-@@ -303,32 +317,32 @@ int show_basic_mii(int sock, int phy_id)
+@@ -303,32 +333,32 @@ int show_basic_mii(int sock, int phy_id)
((mii_val[2]<<6)|(mii_val[3]>>10))&0xff,
(mii_val[3]>>4)&0x3f, mii_val[3]&0x0f);
printf(" basic mode: ");
@@ -204,7 +220,7 @@ diff -up net-tools-1.60/mii-tool.c.mii-refactor net-tools-1.60/mii-tool.c
printf("\n link partner:%s", media_list(lkpar, bmcr2, 0));
printf("\n");
}
-@@ -340,7 +354,7 @@ int show_basic_mii(int sock, int phy_id)
+@@ -340,7 +370,7 @@ int show_basic_mii(int sock, int phy_id)
static int do_one_xcvr(int skfd, char *ifname, int maybe)
{
@@ -213,7 +229,7 @@ diff -up net-tools-1.60/mii-tool.c.mii-refactor net-tools-1.60/mii-tool.c
/* Get the vitals from the interface. */
strncpy(ifr.ifr_name, ifname, IFNAMSIZ);
-@@ -358,23 +372,23 @@ static int do_one_xcvr(int skfd, char *i
+@@ -358,23 +388,23 @@ static int do_one_xcvr(int skfd, char *i
if (opt_reset) {
printf("resetting the transceiver...\n");
@@ -244,7 +260,7 @@ diff -up net-tools-1.60/mii-tool.c.mii-refactor net-tools-1.60/mii-tool.c
mdio_write(skfd, MII_BMCR, bmcr);
}
-@@ -388,7 +402,7 @@ static int do_one_xcvr(int skfd, char *i
+@@ -388,7 +418,7 @@ static int do_one_xcvr(int skfd, char *i
static void watch_one_xcvr(int skfd, char *ifname, int index)
{
diff --git a/net-tools-1.60-trim_iface.patch b/net-tools-1.60-trim_iface.patch
index ca3f6c7..77b0315 100644
--- a/net-tools-1.60-trim_iface.patch
+++ b/net-tools-1.60-trim_iface.patch
@@ -1,12 +1,12 @@
diff -up net-tools-1.60/lib/interface.c.trim-iface net-tools-1.60/lib/interface.c
---- net-tools-1.60/lib/interface.c.trim-iface 2011-12-02 18:00:09.000000000 +0100
-+++ net-tools-1.60/lib/interface.c 2011-12-02 18:02:50.143689438 +0100
+--- net-tools-1.60/lib/interface.c.trim-iface 2011-12-07 16:17:16.000000000 +0100
++++ net-tools-1.60/lib/interface.c 2011-12-07 16:17:37.137281523 +0100
@@ -638,7 +638,7 @@ int do_if_print(struct interface *ife, v
void ife_print_short(struct interface *ptr)
{
-- printf("%-9.9s ", ptr->name);
-+ printf("%-9s ", ptr->name);
- printf("%5d %3d ", ptr->mtu, ptr->metric);
+- printf("%-5.5s ", ptr->name);
++ printf("%-5s ", ptr->name);
+ printf("%5d %-2d ", ptr->mtu, ptr->metric);
/* If needed, display the interface statistics. */
if (ptr->statistics_valid) {
diff --git a/net-tools.spec b/net-tools.spec
index 5dc4e94..4a643f6 100644
--- a/net-tools.spec
+++ b/net-tools.spec
@@ -1,4 +1,4 @@
-%global checkout 20111206git
+%global checkout 20111207git
Summary: Basic networking tools
Name: net-tools
@@ -8,8 +8,8 @@ License: GPL+
Group: System Environment/Base
URL: http://net-tools.sourceforge.net
-# git archive --format=tar --remote=git://net-tools.git.sourceforge.net/gitroot/net-tools/net-tools master | gzip > net-tools-%%{version}.%%{checkout}.tar.gz
-Source0: net-tools-%{version}.%{checkout}.tar.gz
+# git archive --format=tar --remote=git://net-tools.git.sourceforge.net/gitroot/net-tools/net-tools master | xz > net-tools-%%{version}.%%{checkout}.tar.xz
+Source0: net-tools-%{version}.%{checkout}.tar.xz
Source1: net-tools-%{version}-config.h
Source2: net-tools-%{version}-config.make
Source3: ether-wake.c
@@ -20,8 +20,8 @@ Source7: iptunnel.8
Source8: ipmaddr.8
Source9: arp-ethers.service
-# Fixes formating of 'netstat -i'
-Patch1: net-tools-1.60-virtualname.patch
+# translation headers - content type format
+Patch1: net-tools-1.60-isofix.patch
# adds <delay> option that allows netstat to cycle printing through statistics every delay seconds.
Patch2: net-tools-1.60-cycle.patch
@@ -53,7 +53,7 @@ Patch10: net-tools-1.60-duplicate-tcp.patch
# don't report statistics for virtual devices (#143981)
Patch11: net-tools-1.60-statalias.patch
-# stop trimming interface names longer than 9 characters (#152457)
+# don't trim interface names to 5 characters in 'netstat -i' or 'ifconfig -s' (#152457)
Patch12: net-tools-1.60-trim_iface.patch
# buffer overflow in arp (#164695)
@@ -93,7 +93,7 @@ Patch23: net-tools-1.60-scanf-format.patch
Patch24: net-tools-1.60-ib-warning.patch
# use <linux/mii.h> instead of "mii.h" and fix Bug #491358
-Patch25: net-tools-1.60-mii-refactor.patch
+Patch25: net-tools-1.60-mii-registers.patch
# ifconfig interface:0 del <IP> will remove the Aliased IP on IA64 (#473211)
Patch26: net-tools-1.60-IA64.patch
@@ -130,7 +130,7 @@ Most of them are obsolete. For replacement check iproute package.
%prep
%setup -q -c
-%patch1 -p1 -b .virtualname
+%patch1 -p1 -b .isofix
%patch2 -p1 -b .cycle
%patch3 -p1 -b .ipx
%patch4 -p1 -b .inet6-lookup
@@ -154,7 +154,7 @@ Most of them are obsolete. For replacement check iproute package.
%patch22 -p1 -b .probe
%patch23 -p1 -b .scanf-format
%patch24 -p1 -b .ib-warning
-%patch25 -p1 -b .mii-refactor
+%patch25 -p1 -b .mii-registers
%patch26 -p1 -b .IA64
%patch27 -p1 -b .netstat-leak
%patch28 -p1 -b .arbitrary-device-names
@@ -263,7 +263,12 @@ fi
%attr(0644,root,root) %{_unitdir}/arp-ethers.service
%changelog
-* Wed Nov 23 2011 Jiri Popelka <jpopelka at redhat.com> - 1.60-129.20111206git
+* Wed Dec 07 2011 Jiri Popelka <jpopelka at redhat.com> - 1.60-130.20111207git
+- removed virtualname.patch
+- added back isofix.patch
+- improved mii-registers.patch
+
+* Tue Dec 06 2011 Jiri Popelka <jpopelka at redhat.com> - 1.60-129.20111206git
- upstream git snapshot
- reduced number of patches from 95 to 32
- netstat -T/--notrim option is now -W/--wide
diff --git a/sources b/sources
index b4f086a..635be2e 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-e91a357ae4fbd776b8da1d86ff01c9e4 net-tools-1.60.20111206git.tar.gz
+f1e09d6ce544f0a655da0566771e817d net-tools-1.60.20111207git.tar.xz
More information about the scm-commits
mailing list