diff --git a/ether-wake-interfaces.patch b/backport-ether-wake-interfaces.patch similarity index 98% rename from ether-wake-interfaces.patch rename to backport-ether-wake-interfaces.patch index 391ee8b..d73b211 100644 --- a/ether-wake-interfaces.patch +++ b/backport-ether-wake-interfaces.patch @@ -156,10 +156,10 @@ diff -up net-tools-2.0/Makefile.interfaces net-tools-2.0/Makefile +++ net-tools-2.0/Makefile 2015-09-15 18:04:06.273668275 +0200 @@ -193,6 +193,9 @@ ipmaddr: $(NET_LIB) ipmaddr.o mii-tool: $(NET_LIB) mii-tool.o - $(CC) $(CFLAGS) $(LDFLAGS) -o $@ mii-tool.o $(NLIB) + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ mii-tool.o $(NLIB) $(LDLIBS) +ether-wake: $(NET_LIB) ether-wake.o -+ $(CC) $(CFLAGS) $(LDFLAGS) -o ether-wake ether-wake.o $(NLIB) ++ $(CC) $(CFLAGS) $(LDFLAGS) -o ether-wake ether-wake.o $(NLIB) $(LDLIBS) + installbin: @echo diff --git a/net-tools-cycle.patch b/backport-net-tools-cycle.patch similarity index 89% rename from net-tools-cycle.patch rename to backport-net-tools-cycle.patch index f7fe4af..4631a5c 100644 --- a/net-tools-cycle.patch +++ b/backport-net-tools-cycle.patch @@ -1,6 +1,6 @@ -diff -up net-tools-2.0/lib/interface.c.cycle net-tools-2.0/lib/interface.c ---- net-tools-2.0/lib/interface.c.cycle 2016-02-15 16:54:18.000000000 +0100 -+++ net-tools-2.0/lib/interface.c 2016-03-30 09:58:18.247891588 +0200 +diff -up net-tools-2.10/lib/interface.c.cycle net-tools-2.10/lib/interface.c +--- net-tools-2.10/lib/interface.c.cycle 2016-02-15 16:54:18.000000000 +0100 ++++ net-tools-2.10/lib/interface.c 2016-03-30 09:58:18.247891588 +0200 @@ -93,6 +93,7 @@ int if_list_all = 0; /* do we have reque static struct interface *int_list, *int_last; @@ -161,9 +161,9 @@ diff -up net-tools-2.0/lib/interface.c.cycle net-tools-2.0/lib/interface.c fclose(fh); return err; } -diff -up net-tools-2.0/man/en_US/netstat.8.cycle net-tools-2.0/man/en_US/netstat.8 ---- net-tools-2.0/man/en_US/netstat.8.cycle 2016-02-15 16:54:18.000000000 +0100 -+++ net-tools-2.0/man/en_US/netstat.8 2016-03-30 09:58:18.241891637 +0200 +diff -up net-tools-2.10/man/en_US/netstat.8.cycle net-tools-2.10/man/en_US/netstat.8 +--- net-tools-2.10/man/en_US/netstat.8.cycle 2016-02-15 16:54:18.000000000 +0100 ++++ net-tools-2.10/man/en_US/netstat.8 2016-03-30 09:58:18.241891637 +0200 @@ -36,6 +36,7 @@ netstat \- Print network connections, ro .RB [ \-\-verbose | \-v ] .RB [ \-\-continuous | \-c] @@ -247,9 +247,9 @@ diff -up net-tools-2.0/man/en_US/netstat.8.cycle net-tools-2.0/man/en_US/netstat .P .SH OUTPUT .P -diff -up net-tools-2.0/netstat.c.cycle net-tools-2.0/netstat.c ---- net-tools-2.0/netstat.c.cycle 2016-02-15 16:54:18.000000000 +0100 -+++ net-tools-2.0/netstat.c 2016-03-30 10:04:07.617171984 +0200 +diff -up net-tools-2.10/netstat.c.cycle net-tools-2.10/netstat.c +--- net-tools-2.10/netstat.c.cycle 2016-02-15 16:54:18.000000000 +0100 ++++ net-tools-2.10/netstat.c 2016-03-30 10:04:07.617171984 +0200 @@ -115,8 +115,8 @@ #endif @@ -431,9 +431,9 @@ diff -up net-tools-2.0/netstat.c.cycle net-tools-2.0/netstat.c } if (flag_exp < 2) { ife_short = 1; -- printf(_("Iface MTU RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg\n")); +- printf(_("Iface MTU RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg\n")); + if(!(count % 8)) -+ printf(_("Iface MTU RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg\n")); ++ printf(_("Iface MTU 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) { @@ -458,17 +458,17 @@ diff -up net-tools-2.0/netstat.c.cycle net-tools-2.0/netstat.c } @@ -1915,9 +2045,10 @@ static void usage(int rc) - { - fprintf(stderr, _("usage: netstat [-vWeenNcCF] [] -r netstat {-V|--version|-h|--help}\n")); - fprintf(stderr, _(" netstat [-vWnNcaeol] [ ...]\n")); -- fprintf(stderr, _(" netstat { [-vWeenNac] -i | [-cnNe] -M | -s [-6tuw] }\n\n")); -+ fprintf(stderr, _(" netstat { [-vWeenNac] -I[] | [-veenNac] -i | [-cnNe] -M | -s [-6tuw] } [delay]\n\n")); + FILE *fp = rc ? stderr : stdout; + fprintf(fp, _("usage: netstat [-vWeenNcCF] [] -r netstat {-V|--version|-h|--help}\n")); + fprintf(fp, _(" netstat [-vWnNcaeol] [ ...]\n")); +- fprintf(fp, _(" netstat { [-vWeenNac] -i | [-cnNe] -M | -s [-6tuw] }\n\n")); ++ fprintf(fp, _(" netstat { [-vWeenNac] -I[] | [-veenNac] -i | [-cnNe] -M | -s [-6tuw] } [delay]\n\n")); - fprintf(stderr, _(" -r, --route display routing table\n")); -+ fprintf(stderr, _(" -I, --interfaces= display interface table for \n")); - fprintf(stderr, _(" -i, --interfaces display interface table\n")); - fprintf(stderr, _(" -g, --groups display multicast group memberships\n")); - fprintf(stderr, _(" -s, --statistics display networking statistics (like SNMP)\n")); + fprintf(fp, _(" -r, --route display routing table\n")); ++ fprintf(fp, _(" -I, --interfaces= display interface table for \n")); + fprintf(fp, _(" -i, --interfaces display interface table\n")); + fprintf(fp, _(" -g, --groups display multicast group memberships\n")); + fprintf(fp, _(" -s, --statistics display networking statistics (like SNMP)\n")); @@ -1957,11 +2088,12 @@ int main (int argc, char *argv[]) { int i; @@ -528,7 +528,7 @@ diff -up net-tools-2.0/netstat.c.cycle net-tools-2.0/netstat.c } #else ENOSUPP("netstat", "FW_MASQUERADE"); -@@ -2182,15 +2327,16 @@ int main +@@ -2182,16 +2327,17 @@ int main if (!afname[0]) safe_strncpy(afname, DFLT_AF, sizeof(afname)); @@ -539,6 +539,7 @@ diff -up net-tools-2.0/netstat.c.cycle net-tools-2.0/netstat.c + i = parsesnmp(flag_raw, flag_tcp, flag_udp, flag_sctp); #else ENOSUPP("netstat", "AF INET"); + exit(1); #endif } else if(!strcmp(afname, "inet6")) { #if HAVE_AFINET6 @@ -546,7 +547,7 @@ diff -up net-tools-2.0/netstat.c.cycle net-tools-2.0/netstat.c + i = parsesnmp6(flag_raw, flag_tcp, flag_udp); #else ENOSUPP("netstat", "AF INET6"); - #endif + exit(1); @@ -2198,7 +2344,11 @@ int main printf(_("netstat: No statistics support for specified address family: %s\n"), afname); exit(1); @@ -589,9 +590,9 @@ diff -up net-tools-2.0/netstat.c.cycle net-tools-2.0/netstat.c } return (i); } -diff -up net-tools-2.0/statistics.c.cycle net-tools-2.0/statistics.c ---- net-tools-2.0/statistics.c.cycle 2016-02-15 16:54:18.000000000 +0100 -+++ net-tools-2.0/statistics.c 2016-03-30 09:58:18.238891661 +0200 +diff -up net-tools-2.10/statistics.c.cycle net-tools-2.10/statistics.c +--- net-tools-2.10/statistics.c.cycle 2016-02-15 16:54:18.000000000 +0100 ++++ net-tools-2.10/statistics.c 2016-03-30 09:58:18.238891661 +0200 @@ -527,7 +527,7 @@ static void process_fd2(FILE *f, const c } } diff --git a/net-tools-man.patch b/backport-net-tools-man.patch similarity index 86% rename from net-tools-man.patch rename to backport-net-tools-man.patch index 8671ff5..9e60d4b 100644 --- a/net-tools-man.patch +++ b/backport-net-tools-man.patch @@ -12,24 +12,27 @@ diff -up net-tools-2.0/man/en_US/arp.8.man net-tools-2.0/man/en_US/arp.8 .SH DESCRIPTION .B Arp manipulates or displays the kernel's IPv4 network neighbour cache. It can add -@@ -219,6 +223,6 @@ published proxy ARP entries and permanen - .br +@@ -219,9 +223,6 @@ published proxy ARP entries and permanen .I /etc/ethers .SH SEE ALSO --rarp(8), route(8), ifconfig(8), netstat(8) -+.BR ip(8) + .BR ethers (5), +-.BR rarp (8), +-.BR route (8), +-.BR ifconfig (8), +-.BR netstat (8) ++.BR ip (8) .SH AUTHORS Fred N. van Kempen , Bernd Eckenfels . diff -up net-tools-2.0/man/en_US/ethers.5.man net-tools-2.0/man/en_US/ethers.5 --- net-tools-2.0/man/en_US/ethers.5.man 2014-04-26 02:45:16.000000000 +0200 +++ net-tools-2.0/man/en_US/ethers.5 2014-07-07 14:51:31.378459439 +0200 @@ -26,6 +26,3 @@ can be resolved by DNS or a dot separate - .SH FILES \"{{{ + 08:00:20:00:61:CA pal + .SH FILES /etc/ethers - .\"}}} --.SH "SEE ALSO" \"{{{ --rarp(8) --.\"}}} +-.SH "SEE ALSO" +-.BR arp (8), +-.BR rarp (8) diff -up net-tools-2.0/man/en_US/ifconfig.8.man net-tools-2.0/man/en_US/ifconfig.8 --- net-tools-2.0/man/en_US/ifconfig.8.man 2014-04-26 02:45:16.000000000 +0200 +++ net-tools-2.0/man/en_US/ifconfig.8 2014-07-07 14:51:31.379459422 +0200 @@ -47,13 +50,19 @@ diff -up net-tools-2.0/man/en_US/ifconfig.8.man net-tools-2.0/man/en_US/ifconfig .SH DESCRIPTION .B Ifconfig is used to configure the kernel-resident network interfaces. It is -@@ -222,7 +229,8 @@ package to display link layer informatio +@@ -222,13 +229,8 @@ package to display link layer informatio While appletalk DDP and IPX addresses will be displayed they cannot be altered by this command. .SH SEE ALSO --route(8), netstat(8), arp(8), rarp(8), iptables(8), ifup(8), interfaces(5). -+.BR ip(8), -+.BR iptables(8) +-.BR route (8), +-.BR netstat (8), +-.BR arp (8), +-.BR rarp (8), +-.BR iptables (8), +-.BR ifup (8), +-.BR interfaces (5) ++.BR ip (8), ++.BR iptables (8) .br http://physics.nist.gov/cuu/Units/binary.html - Prefixes for binary multiples .SH AUTHORS @@ -123,14 +132,16 @@ diff -up net-tools-2.0/man/en_US/route.8.man net-tools-2.0/man/en_US/route.8 .SH DESCRIPTION .B Route manipulates the kernel's IP routing tables. Its primary use is to set -@@ -330,10 +335,6 @@ Whether or not the hardware address for - .I /proc/net/rt_cache +@@ -330,11 +335,6 @@ Whether or not the hardware address for .LP .SH "SEE ALSO" --.IR ifconfig (8), --.IR netstat (8), --.IR arp (8), --.IR rarp (8), - .IR ip (8) + .BR ethers (5), +-.BR arp (8), +-.BR rarp (8), +-.BR route (8), +-.BR ifconfig (8), +-.BR netstat (8) .LP .SH HISTORY + .B Route + diff --git a/net-tools-115f1af2494ded1fcd21c8419d5e289bc4df380f.tar.xz b/net-tools-115f1af2494ded1fcd21c8419d5e289bc4df380f.tar.xz deleted file mode 100644 index 240b100..0000000 Binary files a/net-tools-115f1af2494ded1fcd21c8419d5e289bc4df380f.tar.xz and /dev/null differ diff --git a/net-tools-2.10.tar.xz b/net-tools-2.10.tar.xz new file mode 100644 index 0000000..663e278 Binary files /dev/null and b/net-tools-2.10.tar.xz differ diff --git a/net-tools-ifconfig-EiB.patch b/net-tools-ifconfig-EiB.patch deleted file mode 100644 index 31afb53..0000000 --- a/net-tools-ifconfig-EiB.patch +++ /dev/null @@ -1,34 +0,0 @@ -diff --git a/lib/interface.c.old b/lib/interface.c -index c734c83..9c49a03 100644 ---- a/lib/interface.c.old -+++ b/lib/interface.c -@@ -928,10 +928,10 @@ void ife_print_long(struct interface *ptr) - */ - rx = ptr->stats.rx_bytes; - short_rx = rx * 10; -- if (rx > 1125899906842624ull) { -- if (rx > (9223372036854775807ull / 10)) -- short_rx = rx / 112589990684262ull; -- else -+ if (rx > 1152921504606846976ull) { -+ short_rx = rx / 115292150460684697ull; -+ Rext = "EiB"; -+ } else if (rx > 1125899906842624ull) { - short_rx /= 1125899906842624ull; - Rext = "PiB"; - } else if (rx > 1099511627776ull) { -@@ -949,10 +949,10 @@ void ife_print_long(struct interface *ptr) - } - tx = ptr->stats.tx_bytes; - short_tx = tx * 10; -- if (tx > 1125899906842624ull) { -- if (tx > (9223372036854775807ull / 10)) -- short_tx = tx / 112589990684262ull; -- else -+ if (tx > 1152921504606846976ull) { -+ short_tx = tx / 115292150460684697ull; -+ Text = "EiB"; -+ } else if (tx > 1125899906842624ull) { - short_tx /= 1125899906842624ull; - Text = "PiB"; - } else if (tx > 1099511627776ull) { diff --git a/net-tools-interface-name-len.patch b/net-tools-interface-name-len.patch deleted file mode 100644 index aa1d39a..0000000 --- a/net-tools-interface-name-len.patch +++ /dev/null @@ -1,59 +0,0 @@ -diff --git a/netstat.c b/netstat.c -index c084dfb..cfcfb78 100644 ---- a/netstat.c -+++ b/netstat.c -@@ -743,6 +743,7 @@ static void igmp_do_one(int lnr, const char *line,const char *prot) - static int igmp6_flag = 0; - static char device[16]; - int num, idx, refcnt; -+ char* offset; - - if (lnr == 0) { - /* IPV6 ONLY */ -@@ -794,17 +795,21 @@ static void igmp_do_one(int lnr, const char *line,const char *prot) - #if HAVE_AFINET - if (line[0] != '\t') { - if (idx_flag) { -- if ((num = sscanf( line, "%d\t%10c", &idx, device)) < 2) { -+ if ((num = sscanf( line, "%d\t%15c", &idx, device)) < 2) { - fprintf(stderr, _("warning, got bogus igmp line %d.\n"), lnr); - return; - } - } else { -- if ( (num = sscanf( line, "%10c", device )) < 1 ) { -+ if ( (num = sscanf( line, "%15c", device )) < 1 ) { - fprintf(stderr, _("warning, got bogus igmp line %d.\n"), lnr); - return; - } - } -- device[10] = '\0'; -+ -+ offset = strrchr(device, ':'); -+ if(offset) -+ *offset = 0; -+ - return; - } else if ( line[0] == '\t' ) { - if ( (num = sscanf(line, "\t%8[0-9A-Fa-f] %d", mcast_addr, &refcnt)) < 2 ) { -@@ -2037,7 +2037,7 @@ static int iface_info(void) - if (flag_exp < 2) { - ife_short = 1; - if(!(count % 8)) -- printf(_("Iface MTU RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg\n")); -+ printf(_("Iface MTU RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg\n")); - } - - if (flag_int_name) { -diff --git a/lib/interface.c b/lib/interface.c -index 3bd999f..97f3db5 100644 ---- a/lib/interface.c -+++ b/lib/interface.c -@@ -655,7 +655,7 @@ int do_if_print(struct interface *ife, void *cookie) - - void ife_print_short(struct interface *ptr) - { -- printf("%-8.8s ", ptr->name); -+ printf("%-15.15s ", ptr->name); - printf("%5d ", ptr->mtu); - /* If needed, display the interface statistics. */ - if (ptr->statistics_valid) { diff --git a/net-tools-linux48.patch b/net-tools-linux48.patch deleted file mode 100644 index aaa6d0e..0000000 --- a/net-tools-linux48.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up net-tools-2.0/iptunnel.c.linux48 net-tools-2.0/iptunnel.c ---- net-tools-2.0/iptunnel.c.linux48 2016-02-15 16:54:18.000000000 +0100 -+++ net-tools-2.0/iptunnel.c 2016-10-12 09:16:57.429279406 +0200 -@@ -26,7 +26,7 @@ - #include - #include - #include --#include -+#include - #include - #include - #include diff --git a/net-tools-timer-man.patch b/net-tools-timer-man.patch deleted file mode 100644 index c50e475..0000000 --- a/net-tools-timer-man.patch +++ /dev/null @@ -1,43 +0,0 @@ -diff --git a/man/en_US/netstat.8.old b/man/en_US/netstat.8 -index f22c2c5..d78a54a 100644 ---- a/man/en_US/netstat.8.old -+++ b/man/en_US/netstat.8 -@@ -311,7 +311,37 @@ causes this column to be included. You will also need - privileges to see this information on sockets you don't own. This - identification information is not yet available for IPX sockets. - .SS "Timer" --(this needs to be written) -+TCP timer associated with this socket. The format is timer(a/b/c). The timer is one of the following values: -+.TP -+.I -+off -+There is no timer set for this socket. -+.TP -+.I -+on -+The retransmission timer is active for the socket. -+.TP -+.I -+keepalive -+The keepalive timer is active for the socket. -+.TP -+.I -+timewait -+The connection is closing and the timewait timer is active for the socket. -+.P -+The values in the brackets: -+.TP -+.I -+a -+Timer value. -+.TP -+.I -+b -+Number of retransmissions sent. -+.TP -+.I -+c -+Number of keepalives sent. - .P - .SS Active UNIX domain Sockets - .SS "Proto" diff --git a/net-tools.spec b/net-tools.spec index cd98c09..0d16679 100644 --- a/net-tools.spec +++ b/net-tools.spec @@ -1,10 +1,10 @@ Name: net-tools -Version: 2.0 -Release: 0.55 +Version: 2.10 +Release: 1 Summary: Important Programs for Networking License: GPLv2+ URL: https://sourceforge.net/projects/net-tools/ -Source0: net-tools-115f1af2494ded1fcd21c8419d5e289bc4df380f.tar.xz +source0: https://sourceforge.net/projects/net-tools/files/%{name}-%{version}.tar.xz Source1: net-tools-config.h Source2: net-tools-config.make Source3: ether-wake.c @@ -15,13 +15,9 @@ Source7: iptunnel.8 Source8: ipmaddr.8 Source9: arp-ethers.service -Patch1: net-tools-cycle.patch -Patch2: net-tools-man.patch -Patch3: net-tools-linux48.patch -Patch20: ether-wake-interfaces.patch -Patch21: net-tools-ifconfig-EiB.patch -Patch22: net-tools-timer-man.patch -Patch23: net-tools-interface-name-len.patch +Patch1: backport-net-tools-cycle.patch +Patch2: backport-net-tools-man.patch +Patch3: backport-ether-wake-interfaces.patch BuildRequires: bluez-libs-devel gettext, libselinux libselinux-devel systemd gcc %{?systemd_requires} @@ -35,7 +31,7 @@ and have been moved to net-tools-deprecated. %package_help %prep -%setup -q -c +%setup -q cp %SOURCE1 ./config.h cp %SOURCE2 ./config.make cp %SOURCE3 . @@ -46,11 +42,7 @@ cp %SOURCE7 ./man/en_US cp %SOURCE8 ./man/en_US %patch1 -p1 -b .cycle %patch2 -p1 -b .man -%patch3 -p1 -b .linux48 -%patch20 -p1 -b .interfaces -%patch21 -p1 -b .ifconfig-EiB -%patch22 -p1 -b .timer-man -%patch23 -p1 -b .interface-name-len +%patch3 -p1 -b .interfaces touch ./config.h %build @@ -111,7 +103,13 @@ touch %{buildroot}%{_unitdir}/arp-ethers.service %exclude %{_mandir}/pt/man5 %changelog -*Wed Sep 2 2020 zengwefeng - 2.0-0.55 +* Tue Dec 07 2021 gaihuiying - 2.10-1 +- Type:requirement +- ID:NA +- SUG:NA +- DESC:update net-tools to 2.10 + +* Wed Sep 2 2020 zengwefeng - 2.0-0.55 - Type:NA - ID:NA - SUG:NA