Message ID | 20210207180036.1915371-1-adolf.belka@ipfire.org |
---|---|
State | Accepted |
Commit | b8cd517a8dec85a0e334f87a53b52ed07497c3a8 |
Headers |
Return-Path: <development-bounces@lists.ipfire.org> Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4DYcQM1kM9z3xCL for <patchwork@web04.haj.ipfire.org>; Sun, 7 Feb 2021 18:00:43 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4DYcQK5rc1zYb; Sun, 7 Feb 2021 18:00:41 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4DYcQK3zNyz2y4G; Sun, 7 Feb 2021 18:00:41 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4DYcQH2qnhz2xfh for <development@lists.ipfire.org>; Sun, 7 Feb 2021 18:00:39 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4DYcQG2w40zDm; Sun, 7 Feb 2021 18:00:38 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1612720838; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=Naggqt/Qu5fwyTqDc0Al2DkE8yilFiSMj2VsECRnOTc=; b=0B7VDwQQ4GvspnW7DjXiiHSgeC83zucAu9ODrs8KESgKIW/BYgACWyRHI+5xJE6kBTpP9I gfAhkMZy1bcG5mCA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1612720838; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=Naggqt/Qu5fwyTqDc0Al2DkE8yilFiSMj2VsECRnOTc=; b=vpwLiM9DsyRplJIjGwgcusLk0e7SWE8ZqOgG8yCEz8qWcpaTJE28UKfKfGcq9DkPx1d2jt ksvIesavViIPIwGACTOlxukg0yoWZ6Im6P64vtRce3Uqv4aG3GbZVvWk/Zo5Dygm88HA+2 1LecfP3BepK8GXCbUapbB9pXhqq6kaWd6Yet8uxHd2eiEjdaUNrbPtpzhmpDh7yLdNT1oy Hy3BwH65bVzV4EKHqCms+3azXG7LOD6IxAMkrUVqxMiFgL8ASQc4wW/ucfZbYrI1JtAA9X JfyjNkysmd1EsRUg+HmQrS1Ev3rcpsqG0dLupKRS06igMSIb8XkZKcotxQRQLQ== From: Adolf Belka <adolf.belka@ipfire.org> To: development@lists.ipfire.org Subject: [PATCH] net-tools: Update to 2.10 Date: Sun, 7 Feb 2021 19:00:36 +0100 Message-Id: <20210207180036.1915371-1-adolf.belka@ipfire.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk <development.lists.ipfire.org> List-Unsubscribe: <https://lists.ipfire.org/mailman/options/development>, <mailto:development-request@lists.ipfire.org?subject=unsubscribe> List-Archive: <http://lists.ipfire.org/pipermail/development/> List-Post: <mailto:development@lists.ipfire.org> List-Help: <mailto:development-request@lists.ipfire.org?subject=help> List-Subscribe: <https://lists.ipfire.org/mailman/listinfo/development>, <mailto:development-request@lists.ipfire.org?subject=subscribe> Errors-To: development-bounces@lists.ipfire.org Sender: "Development" <development-bounces@lists.ipfire.org> |
Series |
net-tools: Update to 2.10
|
|
Commit Message
Adolf Belka
Feb. 7, 2021, 6 p.m. UTC
- Update net-tools from 1.60 to 2.10
- Based on guidance from Michael Tremer
- new no-hostname patch created to remove all hostname references
from makefile
- all other patch files removed from lfs as no longer needed
- version 2.10 places ifconfig and route tools in bin instead of sbin
those tools moved to sbin to keep in line with previous approach
- make update replaced by make install as there is no longer a make
rule for make update
- Updated rootfiles
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
---
config/rootfiles/common/net-tools | 10 ++-
lfs/net-tools | 22 ++---
src/patches/net-tools-1.60-gcc34-3.patch | 86 -------------------
src/patches/net-tools-1.60-iphdr-redef.patch | 12 ---
.../net-tools-1.60-kernel_headers-3.patch | 55 ------------
src/patches/net-tools-1.60-mii_ioctl-1.patch | 27 ------
src/patches/net-tools-1.60-no-hostname.patch | 52 -----------
src/patches/net-tools-2.10-no-hostname.patch | 41 +++++++++
8 files changed, 61 insertions(+), 244 deletions(-)
delete mode 100644 src/patches/net-tools-1.60-gcc34-3.patch
delete mode 100644 src/patches/net-tools-1.60-iphdr-redef.patch
delete mode 100644 src/patches/net-tools-1.60-kernel_headers-3.patch
delete mode 100644 src/patches/net-tools-1.60-mii_ioctl-1.patch
delete mode 100644 src/patches/net-tools-1.60-no-hostname.patch
create mode 100644 src/patches/net-tools-2.10-no-hostname.patch
Comments
Hey Adolf, This is a rather dangerous upgrade in case any of the command line parameters have changed. Did you test this and check if loads of scripts that use these tools and potentially parse output of any of the commands do not introduce any recessions? Best, -Michael > On 7 Feb 2021, at 18:00, Adolf Belka <adolf.belka@ipfire.org> wrote: > > - Update net-tools from 1.60 to 2.10 > - Based on guidance from Michael Tremer > - new no-hostname patch created to remove all hostname references > from makefile > - all other patch files removed from lfs as no longer needed > - version 2.10 places ifconfig and route tools in bin instead of sbin > those tools moved to sbin to keep in line with previous approach > - make update replaced by make install as there is no longer a make > rule for make update > - Updated rootfiles > > Signed-off-by: Adolf Belka <adolf.belka@ipfire.org> > --- > config/rootfiles/common/net-tools | 10 ++- > lfs/net-tools | 22 ++--- > src/patches/net-tools-1.60-gcc34-3.patch | 86 ------------------- > src/patches/net-tools-1.60-iphdr-redef.patch | 12 --- > .../net-tools-1.60-kernel_headers-3.patch | 55 ------------ > src/patches/net-tools-1.60-mii_ioctl-1.patch | 27 ------ > src/patches/net-tools-1.60-no-hostname.patch | 52 ----------- > src/patches/net-tools-2.10-no-hostname.patch | 41 +++++++++ > 8 files changed, 61 insertions(+), 244 deletions(-) > delete mode 100644 src/patches/net-tools-1.60-gcc34-3.patch > delete mode 100644 src/patches/net-tools-1.60-iphdr-redef.patch > delete mode 100644 src/patches/net-tools-1.60-kernel_headers-3.patch > delete mode 100644 src/patches/net-tools-1.60-mii_ioctl-1.patch > delete mode 100644 src/patches/net-tools-1.60-no-hostname.patch > create mode 100644 src/patches/net-tools-2.10-no-hostname.patch > > diff --git a/config/rootfiles/common/net-tools b/config/rootfiles/common/net-tools > index 4860b2f0a..0578c1bc0 100644 > --- a/config/rootfiles/common/net-tools > +++ b/config/rootfiles/common/net-tools > @@ -1,17 +1,23 @@ > +sbin/ifconfig > bin/netstat > +sbin/route > sbin/arp > -sbin/ifconfig > #sbin/ipmaddr > #sbin/iptunnel > sbin/mii-tool > sbin/nameif > #sbin/plipconfig > sbin/rarp > -sbin/route > sbin/slattach > +#usr/share/man/man1/dnsdomainname.1 > +#usr/share/man/man1/domainname.1 > +#usr/share/man/man1/nisdomainname.1 > +#usr/share/man/man1/ypdomainname.1 > #usr/share/man/man5/ethers.5 > #usr/share/man/man8/arp.8 > #usr/share/man/man8/ifconfig.8 > +#usr/share/man/man8/ipmaddr.8 > +#usr/share/man/man8/iptunnel.8 > #usr/share/man/man8/mii-tool.8 > #usr/share/man/man8/nameif.8 > #usr/share/man/man8/netstat.8 This is no in alphanumerical order any more?! > diff --git a/lfs/net-tools b/lfs/net-tools > index 3fde55e2d..7a568a260 100644 > --- a/lfs/net-tools > +++ b/lfs/net-tools > @@ -24,10 +24,10 @@ > > include Config > > -VER = 1.60 > +VER = 2.10 > > THISAPP = net-tools-$(VER) > -DL_FILE = $(THISAPP).tar.bz2 > +DL_FILE = $(THISAPP).tar.xz > DL_FROM = $(URL_IPFIRE) > DIR_APP = $(DIR_SRC)/$(THISAPP) > TARGET = $(DIR_INFO)/$(THISAPP) > @@ -39,7 +39,7 @@ objects = $(DL_FILE) > > $(DL_FILE) = $(DL_FROM)/$(DL_FILE) > > -$(DL_FILE)_MD5 = 888774accab40217dde927e21979c165 > +$(DL_FILE)_MD5 = 78aae762c95e2d731faf88d482e4cde5 > > install : $(TARGET) > > @@ -68,12 +68,8 @@ $(subst %,%_MD5,$(objects)) : > > $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) > @$(PREBUILD) > - @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE) > - cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/net-tools-1.60-no-hostname.patch > - cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/$(THISAPP)-gcc34-3.patch > - cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/$(THISAPP)-kernel_headers-3.patch > - cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/$(THISAPP)-iphdr-redef.patch > - cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/$(THISAPP)-mii_ioctl-1.patch > + @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE) > + cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/net-tools-2.10-no-hostname.patch > cd $(DIR_APP) && yes "" | make config > cd $(DIR_APP) && sed -i -e 's|HAVE_IP_TOOLS 0|HAVE_IP_TOOLS 1|g' \ > -e 's|HAVE_HWSTRIP 1|HAVE_HWSTRIP 0|g' \ > @@ -82,6 +78,12 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) > -e 's|HAVE_HWSTRIP 1|HAVE_HWSTRIP 0|g' \ > -e 's|# HAVE_MII=0|HAVE_MII=1|g' config.make > cd $(DIR_APP) && make > - cd $(DIR_APP) && make update > + cd $(DIR_APP) && make install > + > + # Version 2.10 has moved ifconfig and route from sbin to bin > + # Move these tools back to sbin to align with previous status in case anyone has > + # scripts using these tools with the full pathname defined. > + mv -v /bin/{ifconfig,route} /sbin > + > @rm -rf $(DIR_APP) > @$(POSTBUILD) > diff --git a/src/patches/net-tools-1.60-gcc34-3.patch b/src/patches/net-tools-1.60-gcc34-3.patch > deleted file mode 100644 > index e6ec25329..000000000 > --- a/src/patches/net-tools-1.60-gcc34-3.patch > +++ /dev/null > @@ -1,86 +0,0 @@ > -Originaly By: Zack Winkles <winkie AT linuxfromscratch DOT org> > -Submitted By: Jim Gifford <jim AT linuxfromscratch DOT org> > -Date: 2004-06-23 > -Initial Package Version: 1.60 > -Origin: N/A > -Upstream Status: N/A > -Description: Fix some occurrences of syntax that GCC 3.4 doesn't like. > - > -diff -Naur net-tools-1.60.orig/hostname.c net-tools-1.60/hostname.c > ---- net-tools-1.60.orig/hostname.c 2001-04-08 17:04:23.000000000 +0000 > -+++ net-tools-1.60/hostname.c 2004-06-24 06:22:16.913258663 +0000 > -@@ -78,6 +78,7 @@ > - fprintf(stderr, _("%s: name too long\n"), program_name); > - break; > - default: > -+ ((void)0); > - } > - exit(1); > - } > -@@ -98,6 +99,7 @@ > - fprintf(stderr, _("%s: name too long\n"), program_name); > - break; > - default: > -+ ((void)0); > - } > - exit(1); > - }; > -@@ -117,6 +119,7 @@ > - fprintf(stderr, _("%s: name too long\n"), program_name); > - break; > - default: > -+ ((void)0); > - } > - exit(1); > - }; > -@@ -174,6 +177,7 @@ > - printf("%s\n", hp->h_name); > - break; > - default: > -+ ((void)0); > - } > - } > - > -diff -Naur net-tools-1.60.orig/lib/inet_sr.c net-tools-1.60/lib/inet_sr.c > ---- net-tools-1.60.orig/lib/inet_sr.c 2000-02-20 21:46:45.000000000 +0000 > -+++ net-tools-1.60/lib/inet_sr.c 2004-06-24 06:22:01.967840446 +0000 > -@@ -105,6 +105,7 @@ > - case 2: > - isnet = 0; break; > - default: > -+ ((void)0); > - } > - > - /* Fill in the other fields. */ > -diff -Naur net-tools-1.60.orig/mii-tool.c net-tools-1.60/mii-tool.c > ---- net-tools-1.60.orig/mii-tool.c 2000-05-21 14:31:17.000000000 +0000 > -+++ net-tools-1.60/mii-tool.c 2004-06-24 06:22:01.971839755 +0000 > -@@ -379,17 +379,17 @@ > - /*--------------------------------------------------------------------*/ > - > - const char *usage = > --"usage: %s [-VvRrwl] [-A media,... | -F media] [interface ...] > -- -V, --version display version information > -- -v, --verbose more verbose output > -- -R, --reset reset MII to poweron state > -- -r, --restart restart autonegotiation > -- -w, --watch monitor for link status changes > -- -l, --log with -w, write events to syslog > -- -A, --advertise=media,... advertise only specified media > -- -F, --force=media force specified media technology > --media: 100baseT4, 100baseTx-FD, 100baseTx-HD, 10baseT-FD, 10baseT-HD, > -- (to advertise both HD and FD) 100baseTx, 10baseT\n"; > -+"usage: %s [-VvRrwl] [-A media,... | -F media] [interface ...]\n" > -+" -V, --version display version information\n" > -+" -v, --verbose more verbose output\n" > -+" -R, --reset reset MII to poweron state\n" > -+" -r, --restart restart autonegotiation\n" > -+" -w, --watch monitor for link status changes\n" > -+" -l, --log with -w, write events to syslog\n" > -+" -A, --advertise=media,... advertise only specified media\n" > -+" -F, --force=media force specified media technology\n" > -+"media: 100baseT4, 100baseTx-FD, 100baseTx-HD, 10baseT-FD, 10baseT-HD,\n" > -+" (to advertise both HD and FD) 100baseTx, 10baseT\n"; > - > - int main(int argc, char **argv) > - { > diff --git a/src/patches/net-tools-1.60-iphdr-redef.patch b/src/patches/net-tools-1.60-iphdr-redef.patch > deleted file mode 100644 > index 23b6dfe01..000000000 > --- a/src/patches/net-tools-1.60-iphdr-redef.patch > +++ /dev/null > @@ -1,12 +0,0 @@ > -diff -Naur net-tools-1.60.org/iptunnel.c net-tools-1.60/iptunnel.c > ---- net-tools-1.60.org/iptunnel.c 2001-04-08 19:04:23.000000000 +0200 > -+++ net-tools-1.60/iptunnel.c 2017-02-07 17:37:17.956405434 +0100 > -@@ -26,7 +26,7 @@ > - #include <sys/socket.h> > - #include <sys/ioctl.h> > - #include <netinet/in.h> > --#include <netinet/ip.h> > -+#include <linux/ip.h> > - #include <arpa/inet.h> > - #if defined(__GLIBC__) && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1)) > - #include <net/if.h> > diff --git a/src/patches/net-tools-1.60-kernel_headers-3.patch b/src/patches/net-tools-1.60-kernel_headers-3.patch > deleted file mode 100644 > index 89988f0e7..000000000 > --- a/src/patches/net-tools-1.60-kernel_headers-3.patch > +++ /dev/null > @@ -1,55 +0,0 @@ > -diff -Naur net-tools-1.60.org/hostname.c net-tools-1.60/hostname.c > ---- net-tools-1.60.org/hostname.c 2001-04-08 19:04:23.000000000 +0200 > -+++ net-tools-1.60/hostname.c 2013-08-26 11:56:50.131844273 +0200 > -@@ -42,10 +42,16 @@ > - #include "config.h" > - #include "version.h" > - #include "../intl.h" > -+#include <linux/version.h> > - > - #if HAVE_AFDECnet > -+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0) > - #include <netdnet/dn.h> > - #endif > -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0) > -+#include <linux/dn.h> > -+#endif > -+#endif > - > - char *Release = RELEASE, *Version = "hostname 1.100 (2001-04-14)"; > - > -diff -Naur net-tools-1.60.org/lib/tr.c net-tools-1.60/lib/tr.c > ---- net-tools-1.60.org/lib/tr.c 2000-02-20 22:46:45.000000000 +0100 > -+++ net-tools-1.60/lib/tr.c 2013-08-26 11:57:33.675175033 +0200 > -@@ -20,7 +20,7 @@ > - #include <sys/types.h> > - #include <sys/socket.h> > - #include <net/if_arp.h> > --#include <linux/if_tr.h> > -+#include <netinet/if_tr.h> > - #include <stdlib.h> > - #include <stdio.h> > - #include <errno.h> > -diff -Naur net-tools-1.60.org/lib/x25_sr.c net-tools-1.60/lib/x25_sr.c > ---- net-tools-1.60.org/lib/x25_sr.c 2000-05-20 15:38:10.000000000 +0200 > -+++ net-tools-1.60/lib/x25_sr.c 2013-08-26 11:56:50.131844273 +0200 > -@@ -22,6 +22,7 @@ > - #include <sys/socket.h> > - #include <sys/ioctl.h> > - #include <linux/x25.h> > -+#include <linux/version.h> > - #include <ctype.h> > - #include <errno.h> > - #include <netdb.h> > -@@ -77,7 +78,11 @@ > - rt.sigdigits=sigdigits; > - > - /* x25_route_struct.address isn't type struct sockaddr_x25, Why? */ > -+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0) > - memcpy(&rt.address, &sx25.sx25_addr, sizeof(x25_address)); > -+#else > -+ memcpy(&rt.address, &sx25.sx25_addr, sizeof(struct x25_address)); > -+#endif > - > - while (*args) { > - if (!strcmp(*args,"device") || !strcmp(*args,"dev")) { > diff --git a/src/patches/net-tools-1.60-mii_ioctl-1.patch b/src/patches/net-tools-1.60-mii_ioctl-1.patch > deleted file mode 100644 > index ca8582d51..000000000 > --- a/src/patches/net-tools-1.60-mii_ioctl-1.patch > +++ /dev/null > @@ -1,27 +0,0 @@ > -Submitted By: Randy McMurchy <randy_at_linuxfromscratch_dot_org> > -Date: 2004-08-27 > -Initial Package Version: 1.60 > -Upstream Status: N/A (package is unmaintained) > -Origin: From Fedora Core (submitted to LFS-Hackers by Kevin White) > -Description: Fixes mii-tool when compiled using Linux-2.6.x > - > -$LastChangedBy: randy $ > -$Date: 2004-08-27 21:04:05 -0600 (Fri, 27 Aug 2004) $ > - > ---- net-tools-1.60/include/mii.h.bar Tue Jul 31 11:49:39 2001 > -+++ net-tools-1.60/include/mii.h Tue Jul 31 11:49:33 2001 > -@@ -11,11 +11,9 @@ > - > - /* network interface ioctl's for MII commands */ > - #ifndef SIOCGMIIPHY > --#define SIOCGMIIPHY (SIOCDEVPRIVATE) /* Read from current PHY */ > --#define SIOCGMIIREG (SIOCDEVPRIVATE+1) /* Read any PHY register */ > --#define SIOCSMIIREG (SIOCDEVPRIVATE+2) /* Write any PHY register */ > --#define SIOCGPARAMS (SIOCDEVPRIVATE+3) /* Read operational parameters */ > --#define SIOCSPARAMS (SIOCDEVPRIVATE+4) /* Set operational parameters */ > -+#define SIOCGMIIPHY 0x8947 /* Read from current PHY */ > -+#define SIOCGMIIREG 0x8948 /* Read any PHY register */ > -+#define SIOCSMIIREG 0x8949 /* Write any PHY register */ > - #endif > - > - #include <linux/types.h> > diff --git a/src/patches/net-tools-1.60-no-hostname.patch b/src/patches/net-tools-1.60-no-hostname.patch > deleted file mode 100644 > index e2e34a173..000000000 > --- a/src/patches/net-tools-1.60-no-hostname.patch > +++ /dev/null > @@ -1,52 +0,0 @@ > ---- a/Makefile.bak 2014-06-03 19:01:39.758845492 +0000 > -+++ b/Makefile 2014-06-03 19:02:34.119171419 +0000 > -@@ -76,7 +76,7 @@ > - NET_LIB_PATH = lib > - NET_LIB_NAME = net-tools > - > --PROGS := ifconfig hostname arp netstat route rarp slattach plipconfig nameif > -+PROGS := ifconfig arp netstat route rarp slattach plipconfig nameif > - > - -include config.make > - ifeq ($(HAVE_IP_TOOLS),1) > -@@ -190,9 +190,6 @@ > - nameif: nameif.o > - $(CC) $(LDFLAGS) -o nameif nameif.o > - > --hostname: hostname.o > -- $(CC) $(LDFLAGS) -o hostname hostname.o $(DNLIB) > -- > - route: $(NET_LIB) route.o > - $(CC) $(LDFLAGS) -o route route.o $(NLIB) $(RESLIB) > - > -@@ -224,7 +221,6 @@ > - install -m 0755 -d ${BASEDIR}/sbin > - install -m 0755 -d ${BASEDIR}/bin > - install -m 0755 arp ${BASEDIR}/sbin > -- install -m 0755 hostname ${BASEDIR}/bin > - install -m 0755 ifconfig ${BASEDIR}/sbin > - install -m 0755 nameif ${BASEDIR}/sbin > - install -m 0755 netstat ${BASEDIR}/bin > -@@ -239,21 +235,11 @@ > - ifeq ($(HAVE_MII),1) > - install -m 0755 mii-tool $(BASEDIR)/sbin > - endif > -- ln -fs hostname $(BASEDIR)/bin/dnsdomainname > -- ln -fs hostname $(BASEDIR)/bin/ypdomainname > -- ln -fs hostname $(BASEDIR)/bin/nisdomainname > -- ln -fs hostname $(BASEDIR)/bin/domainname > --ifeq ($(HAVE_AFDECnet),1) > -- ln -fs hostname $(BASEDIR)/bin/nodename > --endif > - > - savebin: > - @for i in ${BASEDIR}/sbin/arp ${BASEDIR}/sbin/ifconfig \ > - ${BASEDIR}/bin/netstat \ > -- ${BASEDIR}/sbin/rarp ${BASEDIR}/sbin/route \ > -- ${BASEDIR}/bin/hostname ${BASEDIR}/bin/ypdomainname \ > -- ${BASEDIR}/bin/dnsdomainname ${BASEDIR}/bin/nisdomainname \ > -- ${BASEDIR}/bin/domainname ; do \ > -+ ${BASEDIR}/sbin/rarp ${BASEDIR}/sbin/route; do \ > - [ -f $$i ] && cp -f $$i $$i.old ; done ; echo Saved. > - > - installdata: > diff --git a/src/patches/net-tools-2.10-no-hostname.patch b/src/patches/net-tools-2.10-no-hostname.patch > new file mode 100644 > index 000000000..c96c798ac > --- /dev/null > +++ b/src/patches/net-tools-2.10-no-hostname.patch > @@ -0,0 +1,41 @@ > +--- net-tools-2.10/Makefile.orig 2021-01-07 00:22:35.000000000 +0100 > ++++ net-tools-2.10/Makefile 2021-02-06 19:30:07.104393812 +0100 > +@@ -39,9 +39,6 @@ > + ifeq ($(HAVE_ARP_TOOLS),1) > + PROGS += arp rarp > + endif > +-ifeq ($(HAVE_HOSTNAME_TOOLS),1) > +-PROGS += hostname > +-endif > + ifeq ($(HAVE_IP_TOOLS),1) > + PROGS += iptunnel ipmaddr > + endif > +@@ -173,9 +170,6 @@ > + nameif: $(NET_LIB) nameif.o > + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ nameif.o $(NLIB) $(LDLIBS) > + > +-hostname: hostname.o > +- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ hostname.o $(DNLIB) $(LDLIBS) > +- > + route: $(NET_LIB) route.o > + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ route.o $(NLIB) $(LDLIBS) > + > +@@ -219,18 +213,6 @@ > + install -m 0755 arp ${BASEDIR}${SBINDIR} > + install -m 0755 rarp ${BASEDIR}${SBINDIR} > + endif > +-ifeq ($(HAVE_HOSTNAME_TOOLS),1) > +- install -m 0755 hostname ${BASEDIR}${BINDIR} > +- ln -fs hostname $(BASEDIR)${BINDIR}/dnsdomainname > +-ifeq ($(HAVE_HOSTNAME_SYMLINKS),1) > +- ln -fs hostname $(BASEDIR)${BINDIR}/ypdomainname > +- ln -fs hostname $(BASEDIR)${BINDIR}/nisdomainname > +- ln -fs hostname $(BASEDIR)${BINDIR}/domainname > +-endif > +-ifeq ($(HAVE_AFDECnet),1) > +- ln -fs hostname $(BASEDIR)${BINDIR}/nodename > +-endif > +-endif > + ifeq ($(HAVE_IP_TOOLS),1) > + install -m 0755 ipmaddr $(BASEDIR)${SBINDIR} > + install -m 0755 iptunnel $(BASEDIR)${SBINDIR} > -- > 2.30.0 >
Hi Michael, On 08/02/2021 14:15, Michael Tremer wrote: > Hey Adolf, > > This is a rather dangerous upgrade in case any of the command line parameters have changed. > > Did you test this and check if loads of scripts that use these tools and potentially parse output of any of the commands do not introduce any recessions? No I didn't. The only thing I can do is install the built version into my VM testbed and see if all the standard pages work. I don't have any major scripts that use those commands to test that out. Also my testbed (and production system which it is modelled after) are very basic setup's. They use dhcp, hosts, a few firewall rules and that is about it. I will test it on my vm testbed and report back but it is unlikely to be a high coverage test. So I don't think I can test it very much, unless there are any test scripts that I can use. Is there anyone else that could test it more deeply? Regards, Adolf. > > Best, > -Michael > >> On 7 Feb 2021, at 18:00, Adolf Belka <adolf.belka@ipfire.org> wrote: >> >> - Update net-tools from 1.60 to 2.10 >> - Based on guidance from Michael Tremer >> - new no-hostname patch created to remove all hostname references >> from makefile >> - all other patch files removed from lfs as no longer needed >> - version 2.10 places ifconfig and route tools in bin instead of sbin >> those tools moved to sbin to keep in line with previous approach >> - make update replaced by make install as there is no longer a make >> rule for make update >> - Updated rootfiles >> >> Signed-off-by: Adolf Belka <adolf.belka@ipfire.org> >> --- >> config/rootfiles/common/net-tools | 10 ++- >> lfs/net-tools | 22 ++--- >> src/patches/net-tools-1.60-gcc34-3.patch | 86 ------------------- >> src/patches/net-tools-1.60-iphdr-redef.patch | 12 --- >> .../net-tools-1.60-kernel_headers-3.patch | 55 ------------ >> src/patches/net-tools-1.60-mii_ioctl-1.patch | 27 ------ >> src/patches/net-tools-1.60-no-hostname.patch | 52 ----------- >> src/patches/net-tools-2.10-no-hostname.patch | 41 +++++++++ >> 8 files changed, 61 insertions(+), 244 deletions(-) >> delete mode 100644 src/patches/net-tools-1.60-gcc34-3.patch >> delete mode 100644 src/patches/net-tools-1.60-iphdr-redef.patch >> delete mode 100644 src/patches/net-tools-1.60-kernel_headers-3.patch >> delete mode 100644 src/patches/net-tools-1.60-mii_ioctl-1.patch >> delete mode 100644 src/patches/net-tools-1.60-no-hostname.patch >> create mode 100644 src/patches/net-tools-2.10-no-hostname.patch >> >> diff --git a/config/rootfiles/common/net-tools b/config/rootfiles/common/net-tools >> index 4860b2f0a..0578c1bc0 100644 >> --- a/config/rootfiles/common/net-tools >> +++ b/config/rootfiles/common/net-tools >> @@ -1,17 +1,23 @@ >> +sbin/ifconfig >> bin/netstat >> +sbin/route >> sbin/arp >> -sbin/ifconfig >> #sbin/ipmaddr >> #sbin/iptunnel >> sbin/mii-tool >> sbin/nameif >> #sbin/plipconfig >> sbin/rarp >> -sbin/route >> sbin/slattach >> +#usr/share/man/man1/dnsdomainname.1 >> +#usr/share/man/man1/domainname.1 >> +#usr/share/man/man1/nisdomainname.1 >> +#usr/share/man/man1/ypdomainname.1 >> #usr/share/man/man5/ethers.5 >> #usr/share/man/man8/arp.8 >> #usr/share/man/man8/ifconfig.8 >> +#usr/share/man/man8/ipmaddr.8 >> +#usr/share/man/man8/iptunnel.8 >> #usr/share/man/man8/mii-tool.8 >> #usr/share/man/man8/nameif.8 >> #usr/share/man/man8/netstat.8 > > This is no in alphanumerical order any more?! > >> diff --git a/lfs/net-tools b/lfs/net-tools >> index 3fde55e2d..7a568a260 100644 >> --- a/lfs/net-tools >> +++ b/lfs/net-tools >> @@ -24,10 +24,10 @@ >> >> include Config >> >> -VER = 1.60 >> +VER = 2.10 >> >> THISAPP = net-tools-$(VER) >> -DL_FILE = $(THISAPP).tar.bz2 >> +DL_FILE = $(THISAPP).tar.xz >> DL_FROM = $(URL_IPFIRE) >> DIR_APP = $(DIR_SRC)/$(THISAPP) >> TARGET = $(DIR_INFO)/$(THISAPP) >> @@ -39,7 +39,7 @@ objects = $(DL_FILE) >> >> $(DL_FILE) = $(DL_FROM)/$(DL_FILE) >> >> -$(DL_FILE)_MD5 = 888774accab40217dde927e21979c165 >> +$(DL_FILE)_MD5 = 78aae762c95e2d731faf88d482e4cde5 >> >> install : $(TARGET) >> >> @@ -68,12 +68,8 @@ $(subst %,%_MD5,$(objects)) : >> >> $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) >> @$(PREBUILD) >> - @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE) >> - cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/net-tools-1.60-no-hostname.patch >> - cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/$(THISAPP)-gcc34-3.patch >> - cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/$(THISAPP)-kernel_headers-3.patch >> - cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/$(THISAPP)-iphdr-redef.patch >> - cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/$(THISAPP)-mii_ioctl-1.patch >> + @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE) >> + cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/net-tools-2.10-no-hostname.patch >> cd $(DIR_APP) && yes "" | make config >> cd $(DIR_APP) && sed -i -e 's|HAVE_IP_TOOLS 0|HAVE_IP_TOOLS 1|g' \ >> -e 's|HAVE_HWSTRIP 1|HAVE_HWSTRIP 0|g' \ >> @@ -82,6 +78,12 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) >> -e 's|HAVE_HWSTRIP 1|HAVE_HWSTRIP 0|g' \ >> -e 's|# HAVE_MII=0|HAVE_MII=1|g' config.make >> cd $(DIR_APP) && make >> - cd $(DIR_APP) && make update >> + cd $(DIR_APP) && make install >> + >> + # Version 2.10 has moved ifconfig and route from sbin to bin >> + # Move these tools back to sbin to align with previous status in case anyone has >> + # scripts using these tools with the full pathname defined. >> + mv -v /bin/{ifconfig,route} /sbin >> + >> @rm -rf $(DIR_APP) >> @$(POSTBUILD) >> diff --git a/src/patches/net-tools-1.60-gcc34-3.patch b/src/patches/net-tools-1.60-gcc34-3.patch >> deleted file mode 100644 >> index e6ec25329..000000000 >> --- a/src/patches/net-tools-1.60-gcc34-3.patch >> +++ /dev/null >> @@ -1,86 +0,0 @@ >> -Originaly By: Zack Winkles <winkie AT linuxfromscratch DOT org> >> -Submitted By: Jim Gifford <jim AT linuxfromscratch DOT org> >> -Date: 2004-06-23 >> -Initial Package Version: 1.60 >> -Origin: N/A >> -Upstream Status: N/A >> -Description: Fix some occurrences of syntax that GCC 3.4 doesn't like. >> - >> -diff -Naur net-tools-1.60.orig/hostname.c net-tools-1.60/hostname.c >> ---- net-tools-1.60.orig/hostname.c 2001-04-08 17:04:23.000000000 +0000 >> -+++ net-tools-1.60/hostname.c 2004-06-24 06:22:16.913258663 +0000 >> -@@ -78,6 +78,7 @@ >> - fprintf(stderr, _("%s: name too long\n"), program_name); >> - break; >> - default: >> -+ ((void)0); >> - } >> - exit(1); >> - } >> -@@ -98,6 +99,7 @@ >> - fprintf(stderr, _("%s: name too long\n"), program_name); >> - break; >> - default: >> -+ ((void)0); >> - } >> - exit(1); >> - }; >> -@@ -117,6 +119,7 @@ >> - fprintf(stderr, _("%s: name too long\n"), program_name); >> - break; >> - default: >> -+ ((void)0); >> - } >> - exit(1); >> - }; >> -@@ -174,6 +177,7 @@ >> - printf("%s\n", hp->h_name); >> - break; >> - default: >> -+ ((void)0); >> - } >> - } >> - >> -diff -Naur net-tools-1.60.orig/lib/inet_sr.c net-tools-1.60/lib/inet_sr.c >> ---- net-tools-1.60.orig/lib/inet_sr.c 2000-02-20 21:46:45.000000000 +0000 >> -+++ net-tools-1.60/lib/inet_sr.c 2004-06-24 06:22:01.967840446 +0000 >> -@@ -105,6 +105,7 @@ >> - case 2: >> - isnet = 0; break; >> - default: >> -+ ((void)0); >> - } >> - >> - /* Fill in the other fields. */ >> -diff -Naur net-tools-1.60.orig/mii-tool.c net-tools-1.60/mii-tool.c >> ---- net-tools-1.60.orig/mii-tool.c 2000-05-21 14:31:17.000000000 +0000 >> -+++ net-tools-1.60/mii-tool.c 2004-06-24 06:22:01.971839755 +0000 >> -@@ -379,17 +379,17 @@ >> - /*--------------------------------------------------------------------*/ >> - >> - const char *usage = >> --"usage: %s [-VvRrwl] [-A media,... | -F media] [interface ...] >> -- -V, --version display version information >> -- -v, --verbose more verbose output >> -- -R, --reset reset MII to poweron state >> -- -r, --restart restart autonegotiation >> -- -w, --watch monitor for link status changes >> -- -l, --log with -w, write events to syslog >> -- -A, --advertise=media,... advertise only specified media >> -- -F, --force=media force specified media technology >> --media: 100baseT4, 100baseTx-FD, 100baseTx-HD, 10baseT-FD, 10baseT-HD, >> -- (to advertise both HD and FD) 100baseTx, 10baseT\n"; >> -+"usage: %s [-VvRrwl] [-A media,... | -F media] [interface ...]\n" >> -+" -V, --version display version information\n" >> -+" -v, --verbose more verbose output\n" >> -+" -R, --reset reset MII to poweron state\n" >> -+" -r, --restart restart autonegotiation\n" >> -+" -w, --watch monitor for link status changes\n" >> -+" -l, --log with -w, write events to syslog\n" >> -+" -A, --advertise=media,... advertise only specified media\n" >> -+" -F, --force=media force specified media technology\n" >> -+"media: 100baseT4, 100baseTx-FD, 100baseTx-HD, 10baseT-FD, 10baseT-HD,\n" >> -+" (to advertise both HD and FD) 100baseTx, 10baseT\n"; >> - >> - int main(int argc, char **argv) >> - { >> diff --git a/src/patches/net-tools-1.60-iphdr-redef.patch b/src/patches/net-tools-1.60-iphdr-redef.patch >> deleted file mode 100644 >> index 23b6dfe01..000000000 >> --- a/src/patches/net-tools-1.60-iphdr-redef.patch >> +++ /dev/null >> @@ -1,12 +0,0 @@ >> -diff -Naur net-tools-1.60.org/iptunnel.c net-tools-1.60/iptunnel.c >> ---- net-tools-1.60.org/iptunnel.c 2001-04-08 19:04:23.000000000 +0200 >> -+++ net-tools-1.60/iptunnel.c 2017-02-07 17:37:17.956405434 +0100 >> -@@ -26,7 +26,7 @@ >> - #include <sys/socket.h> >> - #include <sys/ioctl.h> >> - #include <netinet/in.h> >> --#include <netinet/ip.h> >> -+#include <linux/ip.h> >> - #include <arpa/inet.h> >> - #if defined(__GLIBC__) && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1)) >> - #include <net/if.h> >> diff --git a/src/patches/net-tools-1.60-kernel_headers-3.patch b/src/patches/net-tools-1.60-kernel_headers-3.patch >> deleted file mode 100644 >> index 89988f0e7..000000000 >> --- a/src/patches/net-tools-1.60-kernel_headers-3.patch >> +++ /dev/null >> @@ -1,55 +0,0 @@ >> -diff -Naur net-tools-1.60.org/hostname.c net-tools-1.60/hostname.c >> ---- net-tools-1.60.org/hostname.c 2001-04-08 19:04:23.000000000 +0200 >> -+++ net-tools-1.60/hostname.c 2013-08-26 11:56:50.131844273 +0200 >> -@@ -42,10 +42,16 @@ >> - #include "config.h" >> - #include "version.h" >> - #include "../intl.h" >> -+#include <linux/version.h> >> - >> - #if HAVE_AFDECnet >> -+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0) >> - #include <netdnet/dn.h> >> - #endif >> -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0) >> -+#include <linux/dn.h> >> -+#endif >> -+#endif >> - >> - char *Release = RELEASE, *Version = "hostname 1.100 (2001-04-14)"; >> - >> -diff -Naur net-tools-1.60.org/lib/tr.c net-tools-1.60/lib/tr.c >> ---- net-tools-1.60.org/lib/tr.c 2000-02-20 22:46:45.000000000 +0100 >> -+++ net-tools-1.60/lib/tr.c 2013-08-26 11:57:33.675175033 +0200 >> -@@ -20,7 +20,7 @@ >> - #include <sys/types.h> >> - #include <sys/socket.h> >> - #include <net/if_arp.h> >> --#include <linux/if_tr.h> >> -+#include <netinet/if_tr.h> >> - #include <stdlib.h> >> - #include <stdio.h> >> - #include <errno.h> >> -diff -Naur net-tools-1.60.org/lib/x25_sr.c net-tools-1.60/lib/x25_sr.c >> ---- net-tools-1.60.org/lib/x25_sr.c 2000-05-20 15:38:10.000000000 +0200 >> -+++ net-tools-1.60/lib/x25_sr.c 2013-08-26 11:56:50.131844273 +0200 >> -@@ -22,6 +22,7 @@ >> - #include <sys/socket.h> >> - #include <sys/ioctl.h> >> - #include <linux/x25.h> >> -+#include <linux/version.h> >> - #include <ctype.h> >> - #include <errno.h> >> - #include <netdb.h> >> -@@ -77,7 +78,11 @@ >> - rt.sigdigits=sigdigits; >> - >> - /* x25_route_struct.address isn't type struct sockaddr_x25, Why? */ >> -+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0) >> - memcpy(&rt.address, &sx25.sx25_addr, sizeof(x25_address)); >> -+#else >> -+ memcpy(&rt.address, &sx25.sx25_addr, sizeof(struct x25_address)); >> -+#endif >> - >> - while (*args) { >> - if (!strcmp(*args,"device") || !strcmp(*args,"dev")) { >> diff --git a/src/patches/net-tools-1.60-mii_ioctl-1.patch b/src/patches/net-tools-1.60-mii_ioctl-1.patch >> deleted file mode 100644 >> index ca8582d51..000000000 >> --- a/src/patches/net-tools-1.60-mii_ioctl-1.patch >> +++ /dev/null >> @@ -1,27 +0,0 @@ >> -Submitted By: Randy McMurchy <randy_at_linuxfromscratch_dot_org> >> -Date: 2004-08-27 >> -Initial Package Version: 1.60 >> -Upstream Status: N/A (package is unmaintained) >> -Origin: From Fedora Core (submitted to LFS-Hackers by Kevin White) >> -Description: Fixes mii-tool when compiled using Linux-2.6.x >> - >> -$LastChangedBy: randy $ >> -$Date: 2004-08-27 21:04:05 -0600 (Fri, 27 Aug 2004) $ >> - >> ---- net-tools-1.60/include/mii.h.bar Tue Jul 31 11:49:39 2001 >> -+++ net-tools-1.60/include/mii.h Tue Jul 31 11:49:33 2001 >> -@@ -11,11 +11,9 @@ >> - >> - /* network interface ioctl's for MII commands */ >> - #ifndef SIOCGMIIPHY >> --#define SIOCGMIIPHY (SIOCDEVPRIVATE) /* Read from current PHY */ >> --#define SIOCGMIIREG (SIOCDEVPRIVATE+1) /* Read any PHY register */ >> --#define SIOCSMIIREG (SIOCDEVPRIVATE+2) /* Write any PHY register */ >> --#define SIOCGPARAMS (SIOCDEVPRIVATE+3) /* Read operational parameters */ >> --#define SIOCSPARAMS (SIOCDEVPRIVATE+4) /* Set operational parameters */ >> -+#define SIOCGMIIPHY 0x8947 /* Read from current PHY */ >> -+#define SIOCGMIIREG 0x8948 /* Read any PHY register */ >> -+#define SIOCSMIIREG 0x8949 /* Write any PHY register */ >> - #endif >> - >> - #include <linux/types.h> >> diff --git a/src/patches/net-tools-1.60-no-hostname.patch b/src/patches/net-tools-1.60-no-hostname.patch >> deleted file mode 100644 >> index e2e34a173..000000000 >> --- a/src/patches/net-tools-1.60-no-hostname.patch >> +++ /dev/null >> @@ -1,52 +0,0 @@ >> ---- a/Makefile.bak 2014-06-03 19:01:39.758845492 +0000 >> -+++ b/Makefile 2014-06-03 19:02:34.119171419 +0000 >> -@@ -76,7 +76,7 @@ >> - NET_LIB_PATH = lib >> - NET_LIB_NAME = net-tools >> - >> --PROGS := ifconfig hostname arp netstat route rarp slattach plipconfig nameif >> -+PROGS := ifconfig arp netstat route rarp slattach plipconfig nameif >> - >> - -include config.make >> - ifeq ($(HAVE_IP_TOOLS),1) >> -@@ -190,9 +190,6 @@ >> - nameif: nameif.o >> - $(CC) $(LDFLAGS) -o nameif nameif.o >> - >> --hostname: hostname.o >> -- $(CC) $(LDFLAGS) -o hostname hostname.o $(DNLIB) >> -- >> - route: $(NET_LIB) route.o >> - $(CC) $(LDFLAGS) -o route route.o $(NLIB) $(RESLIB) >> - >> -@@ -224,7 +221,6 @@ >> - install -m 0755 -d ${BASEDIR}/sbin >> - install -m 0755 -d ${BASEDIR}/bin >> - install -m 0755 arp ${BASEDIR}/sbin >> -- install -m 0755 hostname ${BASEDIR}/bin >> - install -m 0755 ifconfig ${BASEDIR}/sbin >> - install -m 0755 nameif ${BASEDIR}/sbin >> - install -m 0755 netstat ${BASEDIR}/bin >> -@@ -239,21 +235,11 @@ >> - ifeq ($(HAVE_MII),1) >> - install -m 0755 mii-tool $(BASEDIR)/sbin >> - endif >> -- ln -fs hostname $(BASEDIR)/bin/dnsdomainname >> -- ln -fs hostname $(BASEDIR)/bin/ypdomainname >> -- ln -fs hostname $(BASEDIR)/bin/nisdomainname >> -- ln -fs hostname $(BASEDIR)/bin/domainname >> --ifeq ($(HAVE_AFDECnet),1) >> -- ln -fs hostname $(BASEDIR)/bin/nodename >> --endif >> - >> - savebin: >> - @for i in ${BASEDIR}/sbin/arp ${BASEDIR}/sbin/ifconfig \ >> - ${BASEDIR}/bin/netstat \ >> -- ${BASEDIR}/sbin/rarp ${BASEDIR}/sbin/route \ >> -- ${BASEDIR}/bin/hostname ${BASEDIR}/bin/ypdomainname \ >> -- ${BASEDIR}/bin/dnsdomainname ${BASEDIR}/bin/nisdomainname \ >> -- ${BASEDIR}/bin/domainname ; do \ >> -+ ${BASEDIR}/sbin/rarp ${BASEDIR}/sbin/route; do \ >> - [ -f $$i ] && cp -f $$i $$i.old ; done ; echo Saved. >> - >> - installdata: >> diff --git a/src/patches/net-tools-2.10-no-hostname.patch b/src/patches/net-tools-2.10-no-hostname.patch >> new file mode 100644 >> index 000000000..c96c798ac >> --- /dev/null >> +++ b/src/patches/net-tools-2.10-no-hostname.patch >> @@ -0,0 +1,41 @@ >> +--- net-tools-2.10/Makefile.orig 2021-01-07 00:22:35.000000000 +0100 >> ++++ net-tools-2.10/Makefile 2021-02-06 19:30:07.104393812 +0100 >> +@@ -39,9 +39,6 @@ >> + ifeq ($(HAVE_ARP_TOOLS),1) >> + PROGS += arp rarp >> + endif >> +-ifeq ($(HAVE_HOSTNAME_TOOLS),1) >> +-PROGS += hostname >> +-endif >> + ifeq ($(HAVE_IP_TOOLS),1) >> + PROGS += iptunnel ipmaddr >> + endif >> +@@ -173,9 +170,6 @@ >> + nameif: $(NET_LIB) nameif.o >> + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ nameif.o $(NLIB) $(LDLIBS) >> + >> +-hostname: hostname.o >> +- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ hostname.o $(DNLIB) $(LDLIBS) >> +- >> + route: $(NET_LIB) route.o >> + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ route.o $(NLIB) $(LDLIBS) >> + >> +@@ -219,18 +213,6 @@ >> + install -m 0755 arp ${BASEDIR}${SBINDIR} >> + install -m 0755 rarp ${BASEDIR}${SBINDIR} >> + endif >> +-ifeq ($(HAVE_HOSTNAME_TOOLS),1) >> +- install -m 0755 hostname ${BASEDIR}${BINDIR} >> +- ln -fs hostname $(BASEDIR)${BINDIR}/dnsdomainname >> +-ifeq ($(HAVE_HOSTNAME_SYMLINKS),1) >> +- ln -fs hostname $(BASEDIR)${BINDIR}/ypdomainname >> +- ln -fs hostname $(BASEDIR)${BINDIR}/nisdomainname >> +- ln -fs hostname $(BASEDIR)${BINDIR}/domainname >> +-endif >> +-ifeq ($(HAVE_AFDECnet),1) >> +- ln -fs hostname $(BASEDIR)${BINDIR}/nodename >> +-endif >> +-endif >> + ifeq ($(HAVE_IP_TOOLS),1) >> + install -m 0755 ipmaddr $(BASEDIR)${SBINDIR} >> + install -m 0755 iptunnel $(BASEDIR)${SBINDIR} >> -- >> 2.30.0 >> >
Hi, > On 8 Feb 2021, at 13:49, Adolf Belka (ipfire-dev) <adolf.belka@ipfire.org> wrote: > > Hi Michael, > > On 08/02/2021 14:15, Michael Tremer wrote: >> Hey Adolf, >> This is a rather dangerous upgrade in case any of the command line parameters have changed. >> Did you test this and check if loads of scripts that use these tools and potentially parse output of any of the commands do not introduce any recessions? > No I didn't. The only thing I can do is install the built version into my VM testbed and see if all the standard pages work. I don't have any major scripts that use those commands to test that out. Also my testbed (and production system which it is modelled after) are very basic setup's. They use dhcp, hosts, a few firewall rules and that is about it. I will test it on my vm testbed and report back but it is unlikely to be a high coverage test. > > So I don't think I can test it very much, unless there are any test scripts that I can use. > > Is there anyone else that could test it more deeply? I could throw this into next and see what happens, but that is a more brutal way of testing things :) -Michael > Regards, > Adolf. >> Best, >> -Michael >>> On 7 Feb 2021, at 18:00, Adolf Belka <adolf.belka@ipfire.org> wrote: >>> >>> - Update net-tools from 1.60 to 2.10 >>> - Based on guidance from Michael Tremer >>> - new no-hostname patch created to remove all hostname references >>> from makefile >>> - all other patch files removed from lfs as no longer needed >>> - version 2.10 places ifconfig and route tools in bin instead of sbin >>> those tools moved to sbin to keep in line with previous approach >>> - make update replaced by make install as there is no longer a make >>> rule for make update >>> - Updated rootfiles >>> >>> Signed-off-by: Adolf Belka <adolf.belka@ipfire.org> >>> --- >>> config/rootfiles/common/net-tools | 10 ++- >>> lfs/net-tools | 22 ++--- >>> src/patches/net-tools-1.60-gcc34-3.patch | 86 ------------------- >>> src/patches/net-tools-1.60-iphdr-redef.patch | 12 --- >>> .../net-tools-1.60-kernel_headers-3.patch | 55 ------------ >>> src/patches/net-tools-1.60-mii_ioctl-1.patch | 27 ------ >>> src/patches/net-tools-1.60-no-hostname.patch | 52 ----------- >>> src/patches/net-tools-2.10-no-hostname.patch | 41 +++++++++ >>> 8 files changed, 61 insertions(+), 244 deletions(-) >>> delete mode 100644 src/patches/net-tools-1.60-gcc34-3.patch >>> delete mode 100644 src/patches/net-tools-1.60-iphdr-redef.patch >>> delete mode 100644 src/patches/net-tools-1.60-kernel_headers-3.patch >>> delete mode 100644 src/patches/net-tools-1.60-mii_ioctl-1.patch >>> delete mode 100644 src/patches/net-tools-1.60-no-hostname.patch >>> create mode 100644 src/patches/net-tools-2.10-no-hostname.patch >>> >>> diff --git a/config/rootfiles/common/net-tools b/config/rootfiles/common/net-tools >>> index 4860b2f0a..0578c1bc0 100644 >>> --- a/config/rootfiles/common/net-tools >>> +++ b/config/rootfiles/common/net-tools >>> @@ -1,17 +1,23 @@ >>> +sbin/ifconfig >>> bin/netstat >>> +sbin/route >>> sbin/arp >>> -sbin/ifconfig >>> #sbin/ipmaddr >>> #sbin/iptunnel >>> sbin/mii-tool >>> sbin/nameif >>> #sbin/plipconfig >>> sbin/rarp >>> -sbin/route >>> sbin/slattach >>> +#usr/share/man/man1/dnsdomainname.1 >>> +#usr/share/man/man1/domainname.1 >>> +#usr/share/man/man1/nisdomainname.1 >>> +#usr/share/man/man1/ypdomainname.1 >>> #usr/share/man/man5/ethers.5 >>> #usr/share/man/man8/arp.8 >>> #usr/share/man/man8/ifconfig.8 >>> +#usr/share/man/man8/ipmaddr.8 >>> +#usr/share/man/man8/iptunnel.8 >>> #usr/share/man/man8/mii-tool.8 >>> #usr/share/man/man8/nameif.8 >>> #usr/share/man/man8/netstat.8 >> This is no in alphanumerical order any more?! >>> diff --git a/lfs/net-tools b/lfs/net-tools >>> index 3fde55e2d..7a568a260 100644 >>> --- a/lfs/net-tools >>> +++ b/lfs/net-tools >>> @@ -24,10 +24,10 @@ >>> >>> include Config >>> >>> -VER = 1.60 >>> +VER = 2.10 >>> >>> THISAPP = net-tools-$(VER) >>> -DL_FILE = $(THISAPP).tar.bz2 >>> +DL_FILE = $(THISAPP).tar.xz >>> DL_FROM = $(URL_IPFIRE) >>> DIR_APP = $(DIR_SRC)/$(THISAPP) >>> TARGET = $(DIR_INFO)/$(THISAPP) >>> @@ -39,7 +39,7 @@ objects = $(DL_FILE) >>> >>> $(DL_FILE) = $(DL_FROM)/$(DL_FILE) >>> >>> -$(DL_FILE)_MD5 = 888774accab40217dde927e21979c165 >>> +$(DL_FILE)_MD5 = 78aae762c95e2d731faf88d482e4cde5 >>> >>> install : $(TARGET) >>> >>> @@ -68,12 +68,8 @@ $(subst %,%_MD5,$(objects)) : >>> >>> $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) >>> @$(PREBUILD) >>> - @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE) >>> - cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/net-tools-1.60-no-hostname.patch >>> - cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/$(THISAPP)-gcc34-3.patch >>> - cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/$(THISAPP)-kernel_headers-3.patch >>> - cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/$(THISAPP)-iphdr-redef.patch >>> - cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/$(THISAPP)-mii_ioctl-1.patch >>> + @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE) >>> + cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/net-tools-2.10-no-hostname.patch >>> cd $(DIR_APP) && yes "" | make config >>> cd $(DIR_APP) && sed -i -e 's|HAVE_IP_TOOLS 0|HAVE_IP_TOOLS 1|g' \ >>> -e 's|HAVE_HWSTRIP 1|HAVE_HWSTRIP 0|g' \ >>> @@ -82,6 +78,12 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) >>> -e 's|HAVE_HWSTRIP 1|HAVE_HWSTRIP 0|g' \ >>> -e 's|# HAVE_MII=0|HAVE_MII=1|g' config.make >>> cd $(DIR_APP) && make >>> - cd $(DIR_APP) && make update >>> + cd $(DIR_APP) && make install >>> + >>> + # Version 2.10 has moved ifconfig and route from sbin to bin >>> + # Move these tools back to sbin to align with previous status in case anyone has >>> + # scripts using these tools with the full pathname defined. >>> + mv -v /bin/{ifconfig,route} /sbin >>> + >>> @rm -rf $(DIR_APP) >>> @$(POSTBUILD) >>> diff --git a/src/patches/net-tools-1.60-gcc34-3.patch b/src/patches/net-tools-1.60-gcc34-3.patch >>> deleted file mode 100644 >>> index e6ec25329..000000000 >>> --- a/src/patches/net-tools-1.60-gcc34-3.patch >>> +++ /dev/null >>> @@ -1,86 +0,0 @@ >>> -Originaly By: Zack Winkles <winkie AT linuxfromscratch DOT org> >>> -Submitted By: Jim Gifford <jim AT linuxfromscratch DOT org> >>> -Date: 2004-06-23 >>> -Initial Package Version: 1.60 >>> -Origin: N/A >>> -Upstream Status: N/A >>> -Description: Fix some occurrences of syntax that GCC 3.4 doesn't like. >>> - >>> -diff -Naur net-tools-1.60.orig/hostname.c net-tools-1.60/hostname.c >>> ---- net-tools-1.60.orig/hostname.c 2001-04-08 17:04:23.000000000 +0000 >>> -+++ net-tools-1.60/hostname.c 2004-06-24 06:22:16.913258663 +0000 >>> -@@ -78,6 +78,7 @@ >>> - fprintf(stderr, _("%s: name too long\n"), program_name); >>> - break; >>> - default: >>> -+ ((void)0); >>> - } >>> - exit(1); >>> - } >>> -@@ -98,6 +99,7 @@ >>> - fprintf(stderr, _("%s: name too long\n"), program_name); >>> - break; >>> - default: >>> -+ ((void)0); >>> - } >>> - exit(1); >>> - }; >>> -@@ -117,6 +119,7 @@ >>> - fprintf(stderr, _("%s: name too long\n"), program_name); >>> - break; >>> - default: >>> -+ ((void)0); >>> - } >>> - exit(1); >>> - }; >>> -@@ -174,6 +177,7 @@ >>> - printf("%s\n", hp->h_name); >>> - break; >>> - default: >>> -+ ((void)0); >>> - } >>> - } >>> - >>> -diff -Naur net-tools-1.60.orig/lib/inet_sr.c net-tools-1.60/lib/inet_sr.c >>> ---- net-tools-1.60.orig/lib/inet_sr.c 2000-02-20 21:46:45.000000000 +0000 >>> -+++ net-tools-1.60/lib/inet_sr.c 2004-06-24 06:22:01.967840446 +0000 >>> -@@ -105,6 +105,7 @@ >>> - case 2: >>> - isnet = 0; break; >>> - default: >>> -+ ((void)0); >>> - } >>> - >>> - /* Fill in the other fields. */ >>> -diff -Naur net-tools-1.60.orig/mii-tool.c net-tools-1.60/mii-tool.c >>> ---- net-tools-1.60.orig/mii-tool.c 2000-05-21 14:31:17.000000000 +0000 >>> -+++ net-tools-1.60/mii-tool.c 2004-06-24 06:22:01.971839755 +0000 >>> -@@ -379,17 +379,17 @@ >>> - /*--------------------------------------------------------------------*/ >>> - >>> - const char *usage = >>> --"usage: %s [-VvRrwl] [-A media,... | -F media] [interface ...] >>> -- -V, --version display version information >>> -- -v, --verbose more verbose output >>> -- -R, --reset reset MII to poweron state >>> -- -r, --restart restart autonegotiation >>> -- -w, --watch monitor for link status changes >>> -- -l, --log with -w, write events to syslog >>> -- -A, --advertise=media,... advertise only specified media >>> -- -F, --force=media force specified media technology >>> --media: 100baseT4, 100baseTx-FD, 100baseTx-HD, 10baseT-FD, 10baseT-HD, >>> -- (to advertise both HD and FD) 100baseTx, 10baseT\n"; >>> -+"usage: %s [-VvRrwl] [-A media,... | -F media] [interface ...]\n" >>> -+" -V, --version display version information\n" >>> -+" -v, --verbose more verbose output\n" >>> -+" -R, --reset reset MII to poweron state\n" >>> -+" -r, --restart restart autonegotiation\n" >>> -+" -w, --watch monitor for link status changes\n" >>> -+" -l, --log with -w, write events to syslog\n" >>> -+" -A, --advertise=media,... advertise only specified media\n" >>> -+" -F, --force=media force specified media technology\n" >>> -+"media: 100baseT4, 100baseTx-FD, 100baseTx-HD, 10baseT-FD, 10baseT-HD,\n" >>> -+" (to advertise both HD and FD) 100baseTx, 10baseT\n"; >>> - >>> - int main(int argc, char **argv) >>> - { >>> diff --git a/src/patches/net-tools-1.60-iphdr-redef.patch b/src/patches/net-tools-1.60-iphdr-redef.patch >>> deleted file mode 100644 >>> index 23b6dfe01..000000000 >>> --- a/src/patches/net-tools-1.60-iphdr-redef.patch >>> +++ /dev/null >>> @@ -1,12 +0,0 @@ >>> -diff -Naur net-tools-1.60.org/iptunnel.c net-tools-1.60/iptunnel.c >>> ---- net-tools-1.60.org/iptunnel.c 2001-04-08 19:04:23.000000000 +0200 >>> -+++ net-tools-1.60/iptunnel.c 2017-02-07 17:37:17.956405434 +0100 >>> -@@ -26,7 +26,7 @@ >>> - #include <sys/socket.h> >>> - #include <sys/ioctl.h> >>> - #include <netinet/in.h> >>> --#include <netinet/ip.h> >>> -+#include <linux/ip.h> >>> - #include <arpa/inet.h> >>> - #if defined(__GLIBC__) && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1)) >>> - #include <net/if.h> >>> diff --git a/src/patches/net-tools-1.60-kernel_headers-3.patch b/src/patches/net-tools-1.60-kernel_headers-3.patch >>> deleted file mode 100644 >>> index 89988f0e7..000000000 >>> --- a/src/patches/net-tools-1.60-kernel_headers-3.patch >>> +++ /dev/null >>> @@ -1,55 +0,0 @@ >>> -diff -Naur net-tools-1.60.org/hostname.c net-tools-1.60/hostname.c >>> ---- net-tools-1.60.org/hostname.c 2001-04-08 19:04:23.000000000 +0200 >>> -+++ net-tools-1.60/hostname.c 2013-08-26 11:56:50.131844273 +0200 >>> -@@ -42,10 +42,16 @@ >>> - #include "config.h" >>> - #include "version.h" >>> - #include "../intl.h" >>> -+#include <linux/version.h> >>> - >>> - #if HAVE_AFDECnet >>> -+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0) >>> - #include <netdnet/dn.h> >>> - #endif >>> -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0) >>> -+#include <linux/dn.h> >>> -+#endif >>> -+#endif >>> - >>> - char *Release = RELEASE, *Version = "hostname 1.100 (2001-04-14)"; >>> - >>> -diff -Naur net-tools-1.60.org/lib/tr.c net-tools-1.60/lib/tr.c >>> ---- net-tools-1.60.org/lib/tr.c 2000-02-20 22:46:45.000000000 +0100 >>> -+++ net-tools-1.60/lib/tr.c 2013-08-26 11:57:33.675175033 +0200 >>> -@@ -20,7 +20,7 @@ >>> - #include <sys/types.h> >>> - #include <sys/socket.h> >>> - #include <net/if_arp.h> >>> --#include <linux/if_tr.h> >>> -+#include <netinet/if_tr.h> >>> - #include <stdlib.h> >>> - #include <stdio.h> >>> - #include <errno.h> >>> -diff -Naur net-tools-1.60.org/lib/x25_sr.c net-tools-1.60/lib/x25_sr.c >>> ---- net-tools-1.60.org/lib/x25_sr.c 2000-05-20 15:38:10.000000000 +0200 >>> -+++ net-tools-1.60/lib/x25_sr.c 2013-08-26 11:56:50.131844273 +0200 >>> -@@ -22,6 +22,7 @@ >>> - #include <sys/socket.h> >>> - #include <sys/ioctl.h> >>> - #include <linux/x25.h> >>> -+#include <linux/version.h> >>> - #include <ctype.h> >>> - #include <errno.h> >>> - #include <netdb.h> >>> -@@ -77,7 +78,11 @@ >>> - rt.sigdigits=sigdigits; >>> - >>> - /* x25_route_struct.address isn't type struct sockaddr_x25, Why? */ >>> -+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0) >>> - memcpy(&rt.address, &sx25.sx25_addr, sizeof(x25_address)); >>> -+#else >>> -+ memcpy(&rt.address, &sx25.sx25_addr, sizeof(struct x25_address)); >>> -+#endif >>> - >>> - while (*args) { >>> - if (!strcmp(*args,"device") || !strcmp(*args,"dev")) { >>> diff --git a/src/patches/net-tools-1.60-mii_ioctl-1.patch b/src/patches/net-tools-1.60-mii_ioctl-1.patch >>> deleted file mode 100644 >>> index ca8582d51..000000000 >>> --- a/src/patches/net-tools-1.60-mii_ioctl-1.patch >>> +++ /dev/null >>> @@ -1,27 +0,0 @@ >>> -Submitted By: Randy McMurchy <randy_at_linuxfromscratch_dot_org> >>> -Date: 2004-08-27 >>> -Initial Package Version: 1.60 >>> -Upstream Status: N/A (package is unmaintained) >>> -Origin: From Fedora Core (submitted to LFS-Hackers by Kevin White) >>> -Description: Fixes mii-tool when compiled using Linux-2.6.x >>> - >>> -$LastChangedBy: randy $ >>> -$Date: 2004-08-27 21:04:05 -0600 (Fri, 27 Aug 2004) $ >>> - >>> ---- net-tools-1.60/include/mii.h.bar Tue Jul 31 11:49:39 2001 >>> -+++ net-tools-1.60/include/mii.h Tue Jul 31 11:49:33 2001 >>> -@@ -11,11 +11,9 @@ >>> - >>> - /* network interface ioctl's for MII commands */ >>> - #ifndef SIOCGMIIPHY >>> --#define SIOCGMIIPHY (SIOCDEVPRIVATE) /* Read from current PHY */ >>> --#define SIOCGMIIREG (SIOCDEVPRIVATE+1) /* Read any PHY register */ >>> --#define SIOCSMIIREG (SIOCDEVPRIVATE+2) /* Write any PHY register */ >>> --#define SIOCGPARAMS (SIOCDEVPRIVATE+3) /* Read operational parameters */ >>> --#define SIOCSPARAMS (SIOCDEVPRIVATE+4) /* Set operational parameters */ >>> -+#define SIOCGMIIPHY 0x8947 /* Read from current PHY */ >>> -+#define SIOCGMIIREG 0x8948 /* Read any PHY register */ >>> -+#define SIOCSMIIREG 0x8949 /* Write any PHY register */ >>> - #endif >>> - >>> - #include <linux/types.h> >>> diff --git a/src/patches/net-tools-1.60-no-hostname.patch b/src/patches/net-tools-1.60-no-hostname.patch >>> deleted file mode 100644 >>> index e2e34a173..000000000 >>> --- a/src/patches/net-tools-1.60-no-hostname.patch >>> +++ /dev/null >>> @@ -1,52 +0,0 @@ >>> ---- a/Makefile.bak 2014-06-03 19:01:39.758845492 +0000 >>> -+++ b/Makefile 2014-06-03 19:02:34.119171419 +0000 >>> -@@ -76,7 +76,7 @@ >>> - NET_LIB_PATH = lib >>> - NET_LIB_NAME = net-tools >>> - >>> --PROGS := ifconfig hostname arp netstat route rarp slattach plipconfig nameif >>> -+PROGS := ifconfig arp netstat route rarp slattach plipconfig nameif >>> - >>> - -include config.make >>> - ifeq ($(HAVE_IP_TOOLS),1) >>> -@@ -190,9 +190,6 @@ >>> - nameif: nameif.o >>> - $(CC) $(LDFLAGS) -o nameif nameif.o >>> - >>> --hostname: hostname.o >>> -- $(CC) $(LDFLAGS) -o hostname hostname.o $(DNLIB) >>> -- >>> - route: $(NET_LIB) route.o >>> - $(CC) $(LDFLAGS) -o route route.o $(NLIB) $(RESLIB) >>> - >>> -@@ -224,7 +221,6 @@ >>> - install -m 0755 -d ${BASEDIR}/sbin >>> - install -m 0755 -d ${BASEDIR}/bin >>> - install -m 0755 arp ${BASEDIR}/sbin >>> -- install -m 0755 hostname ${BASEDIR}/bin >>> - install -m 0755 ifconfig ${BASEDIR}/sbin >>> - install -m 0755 nameif ${BASEDIR}/sbin >>> - install -m 0755 netstat ${BASEDIR}/bin >>> -@@ -239,21 +235,11 @@ >>> - ifeq ($(HAVE_MII),1) >>> - install -m 0755 mii-tool $(BASEDIR)/sbin >>> - endif >>> -- ln -fs hostname $(BASEDIR)/bin/dnsdomainname >>> -- ln -fs hostname $(BASEDIR)/bin/ypdomainname >>> -- ln -fs hostname $(BASEDIR)/bin/nisdomainname >>> -- ln -fs hostname $(BASEDIR)/bin/domainname >>> --ifeq ($(HAVE_AFDECnet),1) >>> -- ln -fs hostname $(BASEDIR)/bin/nodename >>> --endif >>> - >>> - savebin: >>> - @for i in ${BASEDIR}/sbin/arp ${BASEDIR}/sbin/ifconfig \ >>> - ${BASEDIR}/bin/netstat \ >>> -- ${BASEDIR}/sbin/rarp ${BASEDIR}/sbin/route \ >>> -- ${BASEDIR}/bin/hostname ${BASEDIR}/bin/ypdomainname \ >>> -- ${BASEDIR}/bin/dnsdomainname ${BASEDIR}/bin/nisdomainname \ >>> -- ${BASEDIR}/bin/domainname ; do \ >>> -+ ${BASEDIR}/sbin/rarp ${BASEDIR}/sbin/route; do \ >>> - [ -f $$i ] && cp -f $$i $$i.old ; done ; echo Saved. >>> - >>> - installdata: >>> diff --git a/src/patches/net-tools-2.10-no-hostname.patch b/src/patches/net-tools-2.10-no-hostname.patch >>> new file mode 100644 >>> index 000000000..c96c798ac >>> --- /dev/null >>> +++ b/src/patches/net-tools-2.10-no-hostname.patch >>> @@ -0,0 +1,41 @@ >>> +--- net-tools-2.10/Makefile.orig 2021-01-07 00:22:35.000000000 +0100 >>> ++++ net-tools-2.10/Makefile 2021-02-06 19:30:07.104393812 +0100 >>> +@@ -39,9 +39,6 @@ >>> + ifeq ($(HAVE_ARP_TOOLS),1) >>> + PROGS += arp rarp >>> + endif >>> +-ifeq ($(HAVE_HOSTNAME_TOOLS),1) >>> +-PROGS += hostname >>> +-endif >>> + ifeq ($(HAVE_IP_TOOLS),1) >>> + PROGS += iptunnel ipmaddr >>> + endif >>> +@@ -173,9 +170,6 @@ >>> + nameif: $(NET_LIB) nameif.o >>> + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ nameif.o $(NLIB) $(LDLIBS) >>> + >>> +-hostname: hostname.o >>> +- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ hostname.o $(DNLIB) $(LDLIBS) >>> +- >>> + route: $(NET_LIB) route.o >>> + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ route.o $(NLIB) $(LDLIBS) >>> + >>> +@@ -219,18 +213,6 @@ >>> + install -m 0755 arp ${BASEDIR}${SBINDIR} >>> + install -m 0755 rarp ${BASEDIR}${SBINDIR} >>> + endif >>> +-ifeq ($(HAVE_HOSTNAME_TOOLS),1) >>> +- install -m 0755 hostname ${BASEDIR}${BINDIR} >>> +- ln -fs hostname $(BASEDIR)${BINDIR}/dnsdomainname >>> +-ifeq ($(HAVE_HOSTNAME_SYMLINKS),1) >>> +- ln -fs hostname $(BASEDIR)${BINDIR}/ypdomainname >>> +- ln -fs hostname $(BASEDIR)${BINDIR}/nisdomainname >>> +- ln -fs hostname $(BASEDIR)${BINDIR}/domainname >>> +-endif >>> +-ifeq ($(HAVE_AFDECnet),1) >>> +- ln -fs hostname $(BASEDIR)${BINDIR}/nodename >>> +-endif >>> +-endif >>> + ifeq ($(HAVE_IP_TOOLS),1) >>> + install -m 0755 ipmaddr $(BASEDIR)${SBINDIR} >>> + install -m 0755 iptunnel $(BASEDIR)${SBINDIR} >>> -- >>> 2.30.0 >>> > > -- > Sent from my laptop
Hi all, Sent from my desktop On 08/02/2021 14:51, Michael Tremer wrote: > Hi, > >> On 8 Feb 2021, at 13:49, Adolf Belka (ipfire-dev) <adolf.belka@ipfire.org> wrote: >> >> Hi Michael, >> >> On 08/02/2021 14:15, Michael Tremer wrote: >>> Hey Adolf, >>> This is a rather dangerous upgrade in case any of the command line parameters have changed. >>> Did you test this and check if loads of scripts that use these tools and potentially parse output of any of the commands do not introduce any recessions? >> No I didn't. The only thing I can do is install the built version into my VM testbed and see if all the standard pages work. I don't have any major scripts that use those commands to test that out. Also my testbed (and production system which it is modelled after) are very basic setup's. They use dhcp, hosts, a few firewall rules and that is about it. I will test it on my vm testbed and report back but it is unlikely to be a high coverage test. >> >> So I don't think I can test it very much, unless there are any test scripts that I can use. >> >> Is there anyone else that could test it more deeply? > > I could throw this into next and see what happens, but that is a more brutal way of testing things :) So I ran each of the commands that I was able to and compared the results between versions 1.60 and 2.10 in my VM testbed. I wasn't able to do any tests with nameif and slattach. I have never used them before and wasn't sure how to use them. mii-tool gives the same output in both versions except that the newer version now can show if an interface is capable and/or running at 1000baseT whereas the older version only showed up to 100baseT. rarp can be removed from the list of tools next time this package is updated. From version 2.3 the Linux kernel no longer contains rarp support, which is what is written when the command is run with either version. netstat, route & arp give the same output in both versions so no problem for any scripts being run. The only tool with a difference is ifconfig. The output from this tool is significantly different in both versions. Any script could well no longer find what it was looking for. This is the old output for the red0 interface:- red0 Link encap:Ethernet HWaddr 08:00:27:F6:6F:1E inet addr:192.168.26.200 Bcast:192.168.26.255 Mask:255.255.255.0 UP BROADCAST RUNNING MTU:1500 Metric:1 RX packets:177 errors:0 dropped:0 overruns:0 frame:0 TX packets:173 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:69075 (67.4 Kb) TX bytes:28409 (27.7 Kb) This is the output for the same interface from the new version:- red0: flags=67<UP,BROADCAST,RUNNING> mtu 1500 inet 192.168.26.200 netmask 255.255.255.0 broadcast 192.168.26.255 ether 08:00:27:f6:6f:1e txqueuelen 1000 (Ethernet) RX packets 4288 bytes 4591343 (4.3 MiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 922 bytes 101964 (99.5 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 Not sure how that will affect the decision to update or not. For information version 1.60 is from Oct 2011 and 2.10 from Jan 2021. There are no other versions inbetween. Regards, Adolf > > -Michael > >> Regards, >> Adolf. >>> Best, >>> -Michael >>>> On 7 Feb 2021, at 18:00, Adolf Belka <adolf.belka@ipfire.org> wrote: >>>> >>>> - Update net-tools from 1.60 to 2.10 >>>> - Based on guidance from Michael Tremer >>>> - new no-hostname patch created to remove all hostname references >>>> from makefile >>>> - all other patch files removed from lfs as no longer needed >>>> - version 2.10 places ifconfig and route tools in bin instead of sbin >>>> those tools moved to sbin to keep in line with previous approach >>>> - make update replaced by make install as there is no longer a make >>>> rule for make update >>>> - Updated rootfiles >>>> >>>> Signed-off-by: Adolf Belka <adolf.belka@ipfire.org> >>>> --- >>>> config/rootfiles/common/net-tools | 10 ++- >>>> lfs/net-tools | 22 ++--- >>>> src/patches/net-tools-1.60-gcc34-3.patch | 86 ------------------- >>>> src/patches/net-tools-1.60-iphdr-redef.patch | 12 --- >>>> .../net-tools-1.60-kernel_headers-3.patch | 55 ------------ >>>> src/patches/net-tools-1.60-mii_ioctl-1.patch | 27 ------ >>>> src/patches/net-tools-1.60-no-hostname.patch | 52 ----------- >>>> src/patches/net-tools-2.10-no-hostname.patch | 41 +++++++++ >>>> 8 files changed, 61 insertions(+), 244 deletions(-) >>>> delete mode 100644 src/patches/net-tools-1.60-gcc34-3.patch >>>> delete mode 100644 src/patches/net-tools-1.60-iphdr-redef.patch >>>> delete mode 100644 src/patches/net-tools-1.60-kernel_headers-3.patch >>>> delete mode 100644 src/patches/net-tools-1.60-mii_ioctl-1.patch >>>> delete mode 100644 src/patches/net-tools-1.60-no-hostname.patch >>>> create mode 100644 src/patches/net-tools-2.10-no-hostname.patch >>>> >>>> diff --git a/config/rootfiles/common/net-tools b/config/rootfiles/common/net-tools >>>> index 4860b2f0a..0578c1bc0 100644 >>>> --- a/config/rootfiles/common/net-tools >>>> +++ b/config/rootfiles/common/net-tools >>>> @@ -1,17 +1,23 @@ >>>> +sbin/ifconfig >>>> bin/netstat >>>> +sbin/route >>>> sbin/arp >>>> -sbin/ifconfig >>>> #sbin/ipmaddr >>>> #sbin/iptunnel >>>> sbin/mii-tool >>>> sbin/nameif >>>> #sbin/plipconfig >>>> sbin/rarp >>>> -sbin/route >>>> sbin/slattach >>>> +#usr/share/man/man1/dnsdomainname.1 >>>> +#usr/share/man/man1/domainname.1 >>>> +#usr/share/man/man1/nisdomainname.1 >>>> +#usr/share/man/man1/ypdomainname.1 >>>> #usr/share/man/man5/ethers.5 >>>> #usr/share/man/man8/arp.8 >>>> #usr/share/man/man8/ifconfig.8 >>>> +#usr/share/man/man8/ipmaddr.8 >>>> +#usr/share/man/man8/iptunnel.8 >>>> #usr/share/man/man8/mii-tool.8 >>>> #usr/share/man/man8/nameif.8 >>>> #usr/share/man/man8/netstat.8 >>> This is no in alphanumerical order any more?! >>>> diff --git a/lfs/net-tools b/lfs/net-tools >>>> index 3fde55e2d..7a568a260 100644 >>>> --- a/lfs/net-tools >>>> +++ b/lfs/net-tools >>>> @@ -24,10 +24,10 @@ >>>> >>>> include Config >>>> >>>> -VER = 1.60 >>>> +VER = 2.10 >>>> >>>> THISAPP = net-tools-$(VER) >>>> -DL_FILE = $(THISAPP).tar.bz2 >>>> +DL_FILE = $(THISAPP).tar.xz >>>> DL_FROM = $(URL_IPFIRE) >>>> DIR_APP = $(DIR_SRC)/$(THISAPP) >>>> TARGET = $(DIR_INFO)/$(THISAPP) >>>> @@ -39,7 +39,7 @@ objects = $(DL_FILE) >>>> >>>> $(DL_FILE) = $(DL_FROM)/$(DL_FILE) >>>> >>>> -$(DL_FILE)_MD5 = 888774accab40217dde927e21979c165 >>>> +$(DL_FILE)_MD5 = 78aae762c95e2d731faf88d482e4cde5 >>>> >>>> install : $(TARGET) >>>> >>>> @@ -68,12 +68,8 @@ $(subst %,%_MD5,$(objects)) : >>>> >>>> $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) >>>> @$(PREBUILD) >>>> - @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE) >>>> - cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/net-tools-1.60-no-hostname.patch >>>> - cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/$(THISAPP)-gcc34-3.patch >>>> - cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/$(THISAPP)-kernel_headers-3.patch >>>> - cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/$(THISAPP)-iphdr-redef.patch >>>> - cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/$(THISAPP)-mii_ioctl-1.patch >>>> + @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE) >>>> + cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/net-tools-2.10-no-hostname.patch >>>> cd $(DIR_APP) && yes "" | make config >>>> cd $(DIR_APP) && sed -i -e 's|HAVE_IP_TOOLS 0|HAVE_IP_TOOLS 1|g' \ >>>> -e 's|HAVE_HWSTRIP 1|HAVE_HWSTRIP 0|g' \ >>>> @@ -82,6 +78,12 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) >>>> -e 's|HAVE_HWSTRIP 1|HAVE_HWSTRIP 0|g' \ >>>> -e 's|# HAVE_MII=0|HAVE_MII=1|g' config.make >>>> cd $(DIR_APP) && make >>>> - cd $(DIR_APP) && make update >>>> + cd $(DIR_APP) && make install >>>> + >>>> + # Version 2.10 has moved ifconfig and route from sbin to bin >>>> + # Move these tools back to sbin to align with previous status in case anyone has >>>> + # scripts using these tools with the full pathname defined. >>>> + mv -v /bin/{ifconfig,route} /sbin >>>> + >>>> @rm -rf $(DIR_APP) >>>> @$(POSTBUILD) >>>> diff --git a/src/patches/net-tools-1.60-gcc34-3.patch b/src/patches/net-tools-1.60-gcc34-3.patch >>>> deleted file mode 100644 >>>> index e6ec25329..000000000 >>>> --- a/src/patches/net-tools-1.60-gcc34-3.patch >>>> +++ /dev/null >>>> @@ -1,86 +0,0 @@ >>>> -Originaly By: Zack Winkles <winkie AT linuxfromscratch DOT org> >>>> -Submitted By: Jim Gifford <jim AT linuxfromscratch DOT org> >>>> -Date: 2004-06-23 >>>> -Initial Package Version: 1.60 >>>> -Origin: N/A >>>> -Upstream Status: N/A >>>> -Description: Fix some occurrences of syntax that GCC 3.4 doesn't like. >>>> - >>>> -diff -Naur net-tools-1.60.orig/hostname.c net-tools-1.60/hostname.c >>>> ---- net-tools-1.60.orig/hostname.c 2001-04-08 17:04:23.000000000 +0000 >>>> -+++ net-tools-1.60/hostname.c 2004-06-24 06:22:16.913258663 +0000 >>>> -@@ -78,6 +78,7 @@ >>>> - fprintf(stderr, _("%s: name too long\n"), program_name); >>>> - break; >>>> - default: >>>> -+ ((void)0); >>>> - } >>>> - exit(1); >>>> - } >>>> -@@ -98,6 +99,7 @@ >>>> - fprintf(stderr, _("%s: name too long\n"), program_name); >>>> - break; >>>> - default: >>>> -+ ((void)0); >>>> - } >>>> - exit(1); >>>> - }; >>>> -@@ -117,6 +119,7 @@ >>>> - fprintf(stderr, _("%s: name too long\n"), program_name); >>>> - break; >>>> - default: >>>> -+ ((void)0); >>>> - } >>>> - exit(1); >>>> - }; >>>> -@@ -174,6 +177,7 @@ >>>> - printf("%s\n", hp->h_name); >>>> - break; >>>> - default: >>>> -+ ((void)0); >>>> - } >>>> - } >>>> - >>>> -diff -Naur net-tools-1.60.orig/lib/inet_sr.c net-tools-1.60/lib/inet_sr.c >>>> ---- net-tools-1.60.orig/lib/inet_sr.c 2000-02-20 21:46:45.000000000 +0000 >>>> -+++ net-tools-1.60/lib/inet_sr.c 2004-06-24 06:22:01.967840446 +0000 >>>> -@@ -105,6 +105,7 @@ >>>> - case 2: >>>> - isnet = 0; break; >>>> - default: >>>> -+ ((void)0); >>>> - } >>>> - >>>> - /* Fill in the other fields. */ >>>> -diff -Naur net-tools-1.60.orig/mii-tool.c net-tools-1.60/mii-tool.c >>>> ---- net-tools-1.60.orig/mii-tool.c 2000-05-21 14:31:17.000000000 +0000 >>>> -+++ net-tools-1.60/mii-tool.c 2004-06-24 06:22:01.971839755 +0000 >>>> -@@ -379,17 +379,17 @@ >>>> - /*--------------------------------------------------------------------*/ >>>> - >>>> - const char *usage = >>>> --"usage: %s [-VvRrwl] [-A media,... | -F media] [interface ...] >>>> -- -V, --version display version information >>>> -- -v, --verbose more verbose output >>>> -- -R, --reset reset MII to poweron state >>>> -- -r, --restart restart autonegotiation >>>> -- -w, --watch monitor for link status changes >>>> -- -l, --log with -w, write events to syslog >>>> -- -A, --advertise=media,... advertise only specified media >>>> -- -F, --force=media force specified media technology >>>> --media: 100baseT4, 100baseTx-FD, 100baseTx-HD, 10baseT-FD, 10baseT-HD, >>>> -- (to advertise both HD and FD) 100baseTx, 10baseT\n"; >>>> -+"usage: %s [-VvRrwl] [-A media,... | -F media] [interface ...]\n" >>>> -+" -V, --version display version information\n" >>>> -+" -v, --verbose more verbose output\n" >>>> -+" -R, --reset reset MII to poweron state\n" >>>> -+" -r, --restart restart autonegotiation\n" >>>> -+" -w, --watch monitor for link status changes\n" >>>> -+" -l, --log with -w, write events to syslog\n" >>>> -+" -A, --advertise=media,... advertise only specified media\n" >>>> -+" -F, --force=media force specified media technology\n" >>>> -+"media: 100baseT4, 100baseTx-FD, 100baseTx-HD, 10baseT-FD, 10baseT-HD,\n" >>>> -+" (to advertise both HD and FD) 100baseTx, 10baseT\n"; >>>> - >>>> - int main(int argc, char **argv) >>>> - { >>>> diff --git a/src/patches/net-tools-1.60-iphdr-redef.patch b/src/patches/net-tools-1.60-iphdr-redef.patch >>>> deleted file mode 100644 >>>> index 23b6dfe01..000000000 >>>> --- a/src/patches/net-tools-1.60-iphdr-redef.patch >>>> +++ /dev/null >>>> @@ -1,12 +0,0 @@ >>>> -diff -Naur net-tools-1.60.org/iptunnel.c net-tools-1.60/iptunnel.c >>>> ---- net-tools-1.60.org/iptunnel.c 2001-04-08 19:04:23.000000000 +0200 >>>> -+++ net-tools-1.60/iptunnel.c 2017-02-07 17:37:17.956405434 +0100 >>>> -@@ -26,7 +26,7 @@ >>>> - #include <sys/socket.h> >>>> - #include <sys/ioctl.h> >>>> - #include <netinet/in.h> >>>> --#include <netinet/ip.h> >>>> -+#include <linux/ip.h> >>>> - #include <arpa/inet.h> >>>> - #if defined(__GLIBC__) && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1)) >>>> - #include <net/if.h> >>>> diff --git a/src/patches/net-tools-1.60-kernel_headers-3.patch b/src/patches/net-tools-1.60-kernel_headers-3.patch >>>> deleted file mode 100644 >>>> index 89988f0e7..000000000 >>>> --- a/src/patches/net-tools-1.60-kernel_headers-3.patch >>>> +++ /dev/null >>>> @@ -1,55 +0,0 @@ >>>> -diff -Naur net-tools-1.60.org/hostname.c net-tools-1.60/hostname.c >>>> ---- net-tools-1.60.org/hostname.c 2001-04-08 19:04:23.000000000 +0200 >>>> -+++ net-tools-1.60/hostname.c 2013-08-26 11:56:50.131844273 +0200 >>>> -@@ -42,10 +42,16 @@ >>>> - #include "config.h" >>>> - #include "version.h" >>>> - #include "../intl.h" >>>> -+#include <linux/version.h> >>>> - >>>> - #if HAVE_AFDECnet >>>> -+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0) >>>> - #include <netdnet/dn.h> >>>> - #endif >>>> -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0) >>>> -+#include <linux/dn.h> >>>> -+#endif >>>> -+#endif >>>> - >>>> - char *Release = RELEASE, *Version = "hostname 1.100 (2001-04-14)"; >>>> - >>>> -diff -Naur net-tools-1.60.org/lib/tr.c net-tools-1.60/lib/tr.c >>>> ---- net-tools-1.60.org/lib/tr.c 2000-02-20 22:46:45.000000000 +0100 >>>> -+++ net-tools-1.60/lib/tr.c 2013-08-26 11:57:33.675175033 +0200 >>>> -@@ -20,7 +20,7 @@ >>>> - #include <sys/types.h> >>>> - #include <sys/socket.h> >>>> - #include <net/if_arp.h> >>>> --#include <linux/if_tr.h> >>>> -+#include <netinet/if_tr.h> >>>> - #include <stdlib.h> >>>> - #include <stdio.h> >>>> - #include <errno.h> >>>> -diff -Naur net-tools-1.60.org/lib/x25_sr.c net-tools-1.60/lib/x25_sr.c >>>> ---- net-tools-1.60.org/lib/x25_sr.c 2000-05-20 15:38:10.000000000 +0200 >>>> -+++ net-tools-1.60/lib/x25_sr.c 2013-08-26 11:56:50.131844273 +0200 >>>> -@@ -22,6 +22,7 @@ >>>> - #include <sys/socket.h> >>>> - #include <sys/ioctl.h> >>>> - #include <linux/x25.h> >>>> -+#include <linux/version.h> >>>> - #include <ctype.h> >>>> - #include <errno.h> >>>> - #include <netdb.h> >>>> -@@ -77,7 +78,11 @@ >>>> - rt.sigdigits=sigdigits; >>>> - >>>> - /* x25_route_struct.address isn't type struct sockaddr_x25, Why? */ >>>> -+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0) >>>> - memcpy(&rt.address, &sx25.sx25_addr, sizeof(x25_address)); >>>> -+#else >>>> -+ memcpy(&rt.address, &sx25.sx25_addr, sizeof(struct x25_address)); >>>> -+#endif >>>> - >>>> - while (*args) { >>>> - if (!strcmp(*args,"device") || !strcmp(*args,"dev")) { >>>> diff --git a/src/patches/net-tools-1.60-mii_ioctl-1.patch b/src/patches/net-tools-1.60-mii_ioctl-1.patch >>>> deleted file mode 100644 >>>> index ca8582d51..000000000 >>>> --- a/src/patches/net-tools-1.60-mii_ioctl-1.patch >>>> +++ /dev/null >>>> @@ -1,27 +0,0 @@ >>>> -Submitted By: Randy McMurchy <randy_at_linuxfromscratch_dot_org> >>>> -Date: 2004-08-27 >>>> -Initial Package Version: 1.60 >>>> -Upstream Status: N/A (package is unmaintained) >>>> -Origin: From Fedora Core (submitted to LFS-Hackers by Kevin White) >>>> -Description: Fixes mii-tool when compiled using Linux-2.6.x >>>> - >>>> -$LastChangedBy: randy $ >>>> -$Date: 2004-08-27 21:04:05 -0600 (Fri, 27 Aug 2004) $ >>>> - >>>> ---- net-tools-1.60/include/mii.h.bar Tue Jul 31 11:49:39 2001 >>>> -+++ net-tools-1.60/include/mii.h Tue Jul 31 11:49:33 2001 >>>> -@@ -11,11 +11,9 @@ >>>> - >>>> - /* network interface ioctl's for MII commands */ >>>> - #ifndef SIOCGMIIPHY >>>> --#define SIOCGMIIPHY (SIOCDEVPRIVATE) /* Read from current PHY */ >>>> --#define SIOCGMIIREG (SIOCDEVPRIVATE+1) /* Read any PHY register */ >>>> --#define SIOCSMIIREG (SIOCDEVPRIVATE+2) /* Write any PHY register */ >>>> --#define SIOCGPARAMS (SIOCDEVPRIVATE+3) /* Read operational parameters */ >>>> --#define SIOCSPARAMS (SIOCDEVPRIVATE+4) /* Set operational parameters */ >>>> -+#define SIOCGMIIPHY 0x8947 /* Read from current PHY */ >>>> -+#define SIOCGMIIREG 0x8948 /* Read any PHY register */ >>>> -+#define SIOCSMIIREG 0x8949 /* Write any PHY register */ >>>> - #endif >>>> - >>>> - #include <linux/types.h> >>>> diff --git a/src/patches/net-tools-1.60-no-hostname.patch b/src/patches/net-tools-1.60-no-hostname.patch >>>> deleted file mode 100644 >>>> index e2e34a173..000000000 >>>> --- a/src/patches/net-tools-1.60-no-hostname.patch >>>> +++ /dev/null >>>> @@ -1,52 +0,0 @@ >>>> ---- a/Makefile.bak 2014-06-03 19:01:39.758845492 +0000 >>>> -+++ b/Makefile 2014-06-03 19:02:34.119171419 +0000 >>>> -@@ -76,7 +76,7 @@ >>>> - NET_LIB_PATH = lib >>>> - NET_LIB_NAME = net-tools >>>> - >>>> --PROGS := ifconfig hostname arp netstat route rarp slattach plipconfig nameif >>>> -+PROGS := ifconfig arp netstat route rarp slattach plipconfig nameif >>>> - >>>> - -include config.make >>>> - ifeq ($(HAVE_IP_TOOLS),1) >>>> -@@ -190,9 +190,6 @@ >>>> - nameif: nameif.o >>>> - $(CC) $(LDFLAGS) -o nameif nameif.o >>>> - >>>> --hostname: hostname.o >>>> -- $(CC) $(LDFLAGS) -o hostname hostname.o $(DNLIB) >>>> -- >>>> - route: $(NET_LIB) route.o >>>> - $(CC) $(LDFLAGS) -o route route.o $(NLIB) $(RESLIB) >>>> - >>>> -@@ -224,7 +221,6 @@ >>>> - install -m 0755 -d ${BASEDIR}/sbin >>>> - install -m 0755 -d ${BASEDIR}/bin >>>> - install -m 0755 arp ${BASEDIR}/sbin >>>> -- install -m 0755 hostname ${BASEDIR}/bin >>>> - install -m 0755 ifconfig ${BASEDIR}/sbin >>>> - install -m 0755 nameif ${BASEDIR}/sbin >>>> - install -m 0755 netstat ${BASEDIR}/bin >>>> -@@ -239,21 +235,11 @@ >>>> - ifeq ($(HAVE_MII),1) >>>> - install -m 0755 mii-tool $(BASEDIR)/sbin >>>> - endif >>>> -- ln -fs hostname $(BASEDIR)/bin/dnsdomainname >>>> -- ln -fs hostname $(BASEDIR)/bin/ypdomainname >>>> -- ln -fs hostname $(BASEDIR)/bin/nisdomainname >>>> -- ln -fs hostname $(BASEDIR)/bin/domainname >>>> --ifeq ($(HAVE_AFDECnet),1) >>>> -- ln -fs hostname $(BASEDIR)/bin/nodename >>>> --endif >>>> - >>>> - savebin: >>>> - @for i in ${BASEDIR}/sbin/arp ${BASEDIR}/sbin/ifconfig \ >>>> - ${BASEDIR}/bin/netstat \ >>>> -- ${BASEDIR}/sbin/rarp ${BASEDIR}/sbin/route \ >>>> -- ${BASEDIR}/bin/hostname ${BASEDIR}/bin/ypdomainname \ >>>> -- ${BASEDIR}/bin/dnsdomainname ${BASEDIR}/bin/nisdomainname \ >>>> -- ${BASEDIR}/bin/domainname ; do \ >>>> -+ ${BASEDIR}/sbin/rarp ${BASEDIR}/sbin/route; do \ >>>> - [ -f $$i ] && cp -f $$i $$i.old ; done ; echo Saved. >>>> - >>>> - installdata: >>>> diff --git a/src/patches/net-tools-2.10-no-hostname.patch b/src/patches/net-tools-2.10-no-hostname.patch >>>> new file mode 100644 >>>> index 000000000..c96c798ac >>>> --- /dev/null >>>> +++ b/src/patches/net-tools-2.10-no-hostname.patch >>>> @@ -0,0 +1,41 @@ >>>> +--- net-tools-2.10/Makefile.orig 2021-01-07 00:22:35.000000000 +0100 >>>> ++++ net-tools-2.10/Makefile 2021-02-06 19:30:07.104393812 +0100 >>>> +@@ -39,9 +39,6 @@ >>>> + ifeq ($(HAVE_ARP_TOOLS),1) >>>> + PROGS += arp rarp >>>> + endif >>>> +-ifeq ($(HAVE_HOSTNAME_TOOLS),1) >>>> +-PROGS += hostname >>>> +-endif >>>> + ifeq ($(HAVE_IP_TOOLS),1) >>>> + PROGS += iptunnel ipmaddr >>>> + endif >>>> +@@ -173,9 +170,6 @@ >>>> + nameif: $(NET_LIB) nameif.o >>>> + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ nameif.o $(NLIB) $(LDLIBS) >>>> + >>>> +-hostname: hostname.o >>>> +- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ hostname.o $(DNLIB) $(LDLIBS) >>>> +- >>>> + route: $(NET_LIB) route.o >>>> + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ route.o $(NLIB) $(LDLIBS) >>>> + >>>> +@@ -219,18 +213,6 @@ >>>> + install -m 0755 arp ${BASEDIR}${SBINDIR} >>>> + install -m 0755 rarp ${BASEDIR}${SBINDIR} >>>> + endif >>>> +-ifeq ($(HAVE_HOSTNAME_TOOLS),1) >>>> +- install -m 0755 hostname ${BASEDIR}${BINDIR} >>>> +- ln -fs hostname $(BASEDIR)${BINDIR}/dnsdomainname >>>> +-ifeq ($(HAVE_HOSTNAME_SYMLINKS),1) >>>> +- ln -fs hostname $(BASEDIR)${BINDIR}/ypdomainname >>>> +- ln -fs hostname $(BASEDIR)${BINDIR}/nisdomainname >>>> +- ln -fs hostname $(BASEDIR)${BINDIR}/domainname >>>> +-endif >>>> +-ifeq ($(HAVE_AFDECnet),1) >>>> +- ln -fs hostname $(BASEDIR)${BINDIR}/nodename >>>> +-endif >>>> +-endif >>>> + ifeq ($(HAVE_IP_TOOLS),1) >>>> + install -m 0755 ipmaddr $(BASEDIR)${SBINDIR} >>>> + install -m 0755 iptunnel $(BASEDIR)${SBINDIR} >>>> -- >>>> 2.30.0 >>>> >> >> -- >> Sent from my laptop >
Hi, I am running this on my machine in my office - because I installed this by accident :) So far, I didn’t notice any problems, but there are a few: > On 11 Feb 2021, at 21:30, Adolf Belka (ipfire-dev) <adolf.belka@ipfire.org> wrote: > > Hi all, > > Sent from my desktop > > On 08/02/2021 14:51, Michael Tremer wrote: >> Hi, >>> On 8 Feb 2021, at 13:49, Adolf Belka (ipfire-dev) <adolf.belka@ipfire.org> wrote: >>> >>> Hi Michael, >>> >>> On 08/02/2021 14:15, Michael Tremer wrote: >>>> Hey Adolf, >>>> This is a rather dangerous upgrade in case any of the command line parameters have changed. >>>> Did you test this and check if loads of scripts that use these tools and potentially parse output of any of the commands do not introduce any recessions? >>> No I didn't. The only thing I can do is install the built version into my VM testbed and see if all the standard pages work. I don't have any major scripts that use those commands to test that out. Also my testbed (and production system which it is modelled after) are very basic setup's. They use dhcp, hosts, a few firewall rules and that is about it. I will test it on my vm testbed and report back but it is unlikely to be a high coverage test. >>> >>> So I don't think I can test it very much, unless there are any test scripts that I can use. >>> >>> Is there anyone else that could test it more deeply? >> I could throw this into next and see what happens, but that is a more brutal way of testing things :) > > So I ran each of the commands that I was able to and compared the results between versions 1.60 and 2.10 in my VM testbed. > > I wasn't able to do any tests with nameif and slattach. I have never used them before and wasn't sure how to use them. > > mii-tool gives the same output in both versions except that the newer version now can show if an interface is capable and/or running at 1000baseT whereas the older version only showed up to 100baseT. > > rarp can be removed from the list of tools next time this package is updated. From version 2.3 the Linux kernel no longer contains rarp support, which is what is written when the command is run with either version. > > netstat, route & arp give the same output in both versions so no problem for any scripts being run. Thank you for checking this. This is good news. > The only tool with a difference is ifconfig. The output from this tool is significantly different in both versions. Any script could well no longer find what it was looking for. > > This is the old output for the red0 interface:- > > red0 Link encap:Ethernet HWaddr 08:00:27:F6:6F:1E > inet addr:192.168.26.200 Bcast:192.168.26.255 Mask:255.255.255.0 > UP BROADCAST RUNNING MTU:1500 Metric:1 > RX packets:177 errors:0 dropped:0 overruns:0 frame:0 > TX packets:173 errors:0 dropped:0 overruns:0 carrier:0 > collisions:0 txqueuelen:1000 > RX bytes:69075 (67.4 Kb) TX bytes:28409 (27.7 Kb) > > > This is the output for the same interface from the new version:- > > red0: flags=67<UP,BROADCAST,RUNNING> mtu 1500 > inet 192.168.26.200 netmask 255.255.255.0 broadcast 192.168.26.255 > ether 08:00:27:f6:6f:1e txqueuelen 1000 (Ethernet) > RX packets 4288 bytes 4591343 (4.3 MiB) > RX errors 0 dropped 0 overruns 0 frame 0 > TX packets 922 bytes 101964 (99.5 KiB) > TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 > > Not sure how that will affect the decision to update or not. For information version 1.60 is from Oct 2011 and 2.10 from Jan 2021. There are no other versions inbetween. Yes, we should update. That isn’t really the question here. It is when we are safe to do so. I searched through our code to find any places where we invoke “ifconfig”: https://git.ipfire.org/?p=ipfire-2.x.git&a=search&h=HEAD&st=grep&s=ifconfig Luckily it happens hardly anywhere: ovpnmain.cgi is a false alarm. They are all configuration options with the same name. wlapap.cgi just checks if an interface exists. Not pretty, but it works. wio.pl is a problem though because it parses the output. I will copy Stephan to have a look and potentially send patches. So I would say, I will leave it in the next branch and schedule it for release. None of these are big blockers. Good job! I feel more confident about this now. -Michael > > Regards, > Adolf > >> -Michael >>> Regards, >>> Adolf. >>>> Best, >>>> -Michael >>>>> On 7 Feb 2021, at 18:00, Adolf Belka <adolf.belka@ipfire.org> wrote: >>>>> >>>>> - Update net-tools from 1.60 to 2.10 >>>>> - Based on guidance from Michael Tremer >>>>> - new no-hostname patch created to remove all hostname references >>>>> from makefile >>>>> - all other patch files removed from lfs as no longer needed >>>>> - version 2.10 places ifconfig and route tools in bin instead of sbin >>>>> those tools moved to sbin to keep in line with previous approach >>>>> - make update replaced by make install as there is no longer a make >>>>> rule for make update >>>>> - Updated rootfiles >>>>> >>>>> Signed-off-by: Adolf Belka <adolf.belka@ipfire.org> >>>>> --- >>>>> config/rootfiles/common/net-tools | 10 ++- >>>>> lfs/net-tools | 22 ++--- >>>>> src/patches/net-tools-1.60-gcc34-3.patch | 86 ------------------- >>>>> src/patches/net-tools-1.60-iphdr-redef.patch | 12 --- >>>>> .../net-tools-1.60-kernel_headers-3.patch | 55 ------------ >>>>> src/patches/net-tools-1.60-mii_ioctl-1.patch | 27 ------ >>>>> src/patches/net-tools-1.60-no-hostname.patch | 52 ----------- >>>>> src/patches/net-tools-2.10-no-hostname.patch | 41 +++++++++ >>>>> 8 files changed, 61 insertions(+), 244 deletions(-) >>>>> delete mode 100644 src/patches/net-tools-1.60-gcc34-3.patch >>>>> delete mode 100644 src/patches/net-tools-1.60-iphdr-redef.patch >>>>> delete mode 100644 src/patches/net-tools-1.60-kernel_headers-3.patch >>>>> delete mode 100644 src/patches/net-tools-1.60-mii_ioctl-1.patch >>>>> delete mode 100644 src/patches/net-tools-1.60-no-hostname.patch >>>>> create mode 100644 src/patches/net-tools-2.10-no-hostname.patch >>>>> >>>>> diff --git a/config/rootfiles/common/net-tools b/config/rootfiles/common/net-tools >>>>> index 4860b2f0a..0578c1bc0 100644 >>>>> --- a/config/rootfiles/common/net-tools >>>>> +++ b/config/rootfiles/common/net-tools >>>>> @@ -1,17 +1,23 @@ >>>>> +sbin/ifconfig >>>>> bin/netstat >>>>> +sbin/route >>>>> sbin/arp >>>>> -sbin/ifconfig >>>>> #sbin/ipmaddr >>>>> #sbin/iptunnel >>>>> sbin/mii-tool >>>>> sbin/nameif >>>>> #sbin/plipconfig >>>>> sbin/rarp >>>>> -sbin/route >>>>> sbin/slattach >>>>> +#usr/share/man/man1/dnsdomainname.1 >>>>> +#usr/share/man/man1/domainname.1 >>>>> +#usr/share/man/man1/nisdomainname.1 >>>>> +#usr/share/man/man1/ypdomainname.1 >>>>> #usr/share/man/man5/ethers.5 >>>>> #usr/share/man/man8/arp.8 >>>>> #usr/share/man/man8/ifconfig.8 >>>>> +#usr/share/man/man8/ipmaddr.8 >>>>> +#usr/share/man/man8/iptunnel.8 >>>>> #usr/share/man/man8/mii-tool.8 >>>>> #usr/share/man/man8/nameif.8 >>>>> #usr/share/man/man8/netstat.8 >>>> This is no in alphanumerical order any more?! >>>>> diff --git a/lfs/net-tools b/lfs/net-tools >>>>> index 3fde55e2d..7a568a260 100644 >>>>> --- a/lfs/net-tools >>>>> +++ b/lfs/net-tools >>>>> @@ -24,10 +24,10 @@ >>>>> >>>>> include Config >>>>> >>>>> -VER = 1.60 >>>>> +VER = 2.10 >>>>> >>>>> THISAPP = net-tools-$(VER) >>>>> -DL_FILE = $(THISAPP).tar.bz2 >>>>> +DL_FILE = $(THISAPP).tar.xz >>>>> DL_FROM = $(URL_IPFIRE) >>>>> DIR_APP = $(DIR_SRC)/$(THISAPP) >>>>> TARGET = $(DIR_INFO)/$(THISAPP) >>>>> @@ -39,7 +39,7 @@ objects = $(DL_FILE) >>>>> >>>>> $(DL_FILE) = $(DL_FROM)/$(DL_FILE) >>>>> >>>>> -$(DL_FILE)_MD5 = 888774accab40217dde927e21979c165 >>>>> +$(DL_FILE)_MD5 = 78aae762c95e2d731faf88d482e4cde5 >>>>> >>>>> install : $(TARGET) >>>>> >>>>> @@ -68,12 +68,8 @@ $(subst %,%_MD5,$(objects)) : >>>>> >>>>> $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) >>>>> @$(PREBUILD) >>>>> - @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE) >>>>> - cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/net-tools-1.60-no-hostname.patch >>>>> - cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/$(THISAPP)-gcc34-3.patch >>>>> - cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/$(THISAPP)-kernel_headers-3.patch >>>>> - cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/$(THISAPP)-iphdr-redef.patch >>>>> - cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/$(THISAPP)-mii_ioctl-1.patch >>>>> + @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE) >>>>> + cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/net-tools-2.10-no-hostname.patch >>>>> cd $(DIR_APP) && yes "" | make config >>>>> cd $(DIR_APP) && sed -i -e 's|HAVE_IP_TOOLS 0|HAVE_IP_TOOLS 1|g' \ >>>>> -e 's|HAVE_HWSTRIP 1|HAVE_HWSTRIP 0|g' \ >>>>> @@ -82,6 +78,12 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) >>>>> -e 's|HAVE_HWSTRIP 1|HAVE_HWSTRIP 0|g' \ >>>>> -e 's|# HAVE_MII=0|HAVE_MII=1|g' config.make >>>>> cd $(DIR_APP) && make >>>>> - cd $(DIR_APP) && make update >>>>> + cd $(DIR_APP) && make install >>>>> + >>>>> + # Version 2.10 has moved ifconfig and route from sbin to bin >>>>> + # Move these tools back to sbin to align with previous status in case anyone has >>>>> + # scripts using these tools with the full pathname defined. >>>>> + mv -v /bin/{ifconfig,route} /sbin >>>>> + >>>>> @rm -rf $(DIR_APP) >>>>> @$(POSTBUILD) >>>>> diff --git a/src/patches/net-tools-1.60-gcc34-3.patch b/src/patches/net-tools-1.60-gcc34-3.patch >>>>> deleted file mode 100644 >>>>> index e6ec25329..000000000 >>>>> --- a/src/patches/net-tools-1.60-gcc34-3.patch >>>>> +++ /dev/null >>>>> @@ -1,86 +0,0 @@ >>>>> -Originaly By: Zack Winkles <winkie AT linuxfromscratch DOT org> >>>>> -Submitted By: Jim Gifford <jim AT linuxfromscratch DOT org> >>>>> -Date: 2004-06-23 >>>>> -Initial Package Version: 1.60 >>>>> -Origin: N/A >>>>> -Upstream Status: N/A >>>>> -Description: Fix some occurrences of syntax that GCC 3.4 doesn't like. >>>>> - >>>>> -diff -Naur net-tools-1.60.orig/hostname.c net-tools-1.60/hostname.c >>>>> ---- net-tools-1.60.orig/hostname.c 2001-04-08 17:04:23.000000000 +0000 >>>>> -+++ net-tools-1.60/hostname.c 2004-06-24 06:22:16.913258663 +0000 >>>>> -@@ -78,6 +78,7 @@ >>>>> - fprintf(stderr, _("%s: name too long\n"), program_name); >>>>> - break; >>>>> - default: >>>>> -+ ((void)0); >>>>> - } >>>>> - exit(1); >>>>> - } >>>>> -@@ -98,6 +99,7 @@ >>>>> - fprintf(stderr, _("%s: name too long\n"), program_name); >>>>> - break; >>>>> - default: >>>>> -+ ((void)0); >>>>> - } >>>>> - exit(1); >>>>> - }; >>>>> -@@ -117,6 +119,7 @@ >>>>> - fprintf(stderr, _("%s: name too long\n"), program_name); >>>>> - break; >>>>> - default: >>>>> -+ ((void)0); >>>>> - } >>>>> - exit(1); >>>>> - }; >>>>> -@@ -174,6 +177,7 @@ >>>>> - printf("%s\n", hp->h_name); >>>>> - break; >>>>> - default: >>>>> -+ ((void)0); >>>>> - } >>>>> - } >>>>> - >>>>> -diff -Naur net-tools-1.60.orig/lib/inet_sr.c net-tools-1.60/lib/inet_sr.c >>>>> ---- net-tools-1.60.orig/lib/inet_sr.c 2000-02-20 21:46:45.000000000 +0000 >>>>> -+++ net-tools-1.60/lib/inet_sr.c 2004-06-24 06:22:01.967840446 +0000 >>>>> -@@ -105,6 +105,7 @@ >>>>> - case 2: >>>>> - isnet = 0; break; >>>>> - default: >>>>> -+ ((void)0); >>>>> - } >>>>> - >>>>> - /* Fill in the other fields. */ >>>>> -diff -Naur net-tools-1.60.orig/mii-tool.c net-tools-1.60/mii-tool.c >>>>> ---- net-tools-1.60.orig/mii-tool.c 2000-05-21 14:31:17.000000000 +0000 >>>>> -+++ net-tools-1.60/mii-tool.c 2004-06-24 06:22:01.971839755 +0000 >>>>> -@@ -379,17 +379,17 @@ >>>>> - /*--------------------------------------------------------------------*/ >>>>> - >>>>> - const char *usage = >>>>> --"usage: %s [-VvRrwl] [-A media,... | -F media] [interface ...] >>>>> -- -V, --version display version information >>>>> -- -v, --verbose more verbose output >>>>> -- -R, --reset reset MII to poweron state >>>>> -- -r, --restart restart autonegotiation >>>>> -- -w, --watch monitor for link status changes >>>>> -- -l, --log with -w, write events to syslog >>>>> -- -A, --advertise=media,... advertise only specified media >>>>> -- -F, --force=media force specified media technology >>>>> --media: 100baseT4, 100baseTx-FD, 100baseTx-HD, 10baseT-FD, 10baseT-HD, >>>>> -- (to advertise both HD and FD) 100baseTx, 10baseT\n"; >>>>> -+"usage: %s [-VvRrwl] [-A media,... | -F media] [interface ...]\n" >>>>> -+" -V, --version display version information\n" >>>>> -+" -v, --verbose more verbose output\n" >>>>> -+" -R, --reset reset MII to poweron state\n" >>>>> -+" -r, --restart restart autonegotiation\n" >>>>> -+" -w, --watch monitor for link status changes\n" >>>>> -+" -l, --log with -w, write events to syslog\n" >>>>> -+" -A, --advertise=media,... advertise only specified media\n" >>>>> -+" -F, --force=media force specified media technology\n" >>>>> -+"media: 100baseT4, 100baseTx-FD, 100baseTx-HD, 10baseT-FD, 10baseT-HD,\n" >>>>> -+" (to advertise both HD and FD) 100baseTx, 10baseT\n"; >>>>> - >>>>> - int main(int argc, char **argv) >>>>> - { >>>>> diff --git a/src/patches/net-tools-1.60-iphdr-redef.patch b/src/patches/net-tools-1.60-iphdr-redef.patch >>>>> deleted file mode 100644 >>>>> index 23b6dfe01..000000000 >>>>> --- a/src/patches/net-tools-1.60-iphdr-redef.patch >>>>> +++ /dev/null >>>>> @@ -1,12 +0,0 @@ >>>>> -diff -Naur net-tools-1.60.org/iptunnel.c net-tools-1.60/iptunnel.c >>>>> ---- net-tools-1.60.org/iptunnel.c 2001-04-08 19:04:23.000000000 +0200 >>>>> -+++ net-tools-1.60/iptunnel.c 2017-02-07 17:37:17.956405434 +0100 >>>>> -@@ -26,7 +26,7 @@ >>>>> - #include <sys/socket.h> >>>>> - #include <sys/ioctl.h> >>>>> - #include <netinet/in.h> >>>>> --#include <netinet/ip.h> >>>>> -+#include <linux/ip.h> >>>>> - #include <arpa/inet.h> >>>>> - #if defined(__GLIBC__) && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1)) >>>>> - #include <net/if.h> >>>>> diff --git a/src/patches/net-tools-1.60-kernel_headers-3.patch b/src/patches/net-tools-1.60-kernel_headers-3.patch >>>>> deleted file mode 100644 >>>>> index 89988f0e7..000000000 >>>>> --- a/src/patches/net-tools-1.60-kernel_headers-3.patch >>>>> +++ /dev/null >>>>> @@ -1,55 +0,0 @@ >>>>> -diff -Naur net-tools-1.60.org/hostname.c net-tools-1.60/hostname.c >>>>> ---- net-tools-1.60.org/hostname.c 2001-04-08 19:04:23.000000000 +0200 >>>>> -+++ net-tools-1.60/hostname.c 2013-08-26 11:56:50.131844273 +0200 >>>>> -@@ -42,10 +42,16 @@ >>>>> - #include "config.h" >>>>> - #include "version.h" >>>>> - #include "../intl.h" >>>>> -+#include <linux/version.h> >>>>> - >>>>> - #if HAVE_AFDECnet >>>>> -+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0) >>>>> - #include <netdnet/dn.h> >>>>> - #endif >>>>> -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0) >>>>> -+#include <linux/dn.h> >>>>> -+#endif >>>>> -+#endif >>>>> - >>>>> - char *Release = RELEASE, *Version = "hostname 1.100 (2001-04-14)"; >>>>> - >>>>> -diff -Naur net-tools-1.60.org/lib/tr.c net-tools-1.60/lib/tr.c >>>>> ---- net-tools-1.60.org/lib/tr.c 2000-02-20 22:46:45.000000000 +0100 >>>>> -+++ net-tools-1.60/lib/tr.c 2013-08-26 11:57:33.675175033 +0200 >>>>> -@@ -20,7 +20,7 @@ >>>>> - #include <sys/types.h> >>>>> - #include <sys/socket.h> >>>>> - #include <net/if_arp.h> >>>>> --#include <linux/if_tr.h> >>>>> -+#include <netinet/if_tr.h> >>>>> - #include <stdlib.h> >>>>> - #include <stdio.h> >>>>> - #include <errno.h> >>>>> -diff -Naur net-tools-1.60.org/lib/x25_sr.c net-tools-1.60/lib/x25_sr.c >>>>> ---- net-tools-1.60.org/lib/x25_sr.c 2000-05-20 15:38:10.000000000 +0200 >>>>> -+++ net-tools-1.60/lib/x25_sr.c 2013-08-26 11:56:50.131844273 +0200 >>>>> -@@ -22,6 +22,7 @@ >>>>> - #include <sys/socket.h> >>>>> - #include <sys/ioctl.h> >>>>> - #include <linux/x25.h> >>>>> -+#include <linux/version.h> >>>>> - #include <ctype.h> >>>>> - #include <errno.h> >>>>> - #include <netdb.h> >>>>> -@@ -77,7 +78,11 @@ >>>>> - rt.sigdigits=sigdigits; >>>>> - >>>>> - /* x25_route_struct.address isn't type struct sockaddr_x25, Why? */ >>>>> -+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0) >>>>> - memcpy(&rt.address, &sx25.sx25_addr, sizeof(x25_address)); >>>>> -+#else >>>>> -+ memcpy(&rt.address, &sx25.sx25_addr, sizeof(struct x25_address)); >>>>> -+#endif >>>>> - >>>>> - while (*args) { >>>>> - if (!strcmp(*args,"device") || !strcmp(*args,"dev")) { >>>>> diff --git a/src/patches/net-tools-1.60-mii_ioctl-1.patch b/src/patches/net-tools-1.60-mii_ioctl-1.patch >>>>> deleted file mode 100644 >>>>> index ca8582d51..000000000 >>>>> --- a/src/patches/net-tools-1.60-mii_ioctl-1.patch >>>>> +++ /dev/null >>>>> @@ -1,27 +0,0 @@ >>>>> -Submitted By: Randy McMurchy <randy_at_linuxfromscratch_dot_org> >>>>> -Date: 2004-08-27 >>>>> -Initial Package Version: 1.60 >>>>> -Upstream Status: N/A (package is unmaintained) >>>>> -Origin: From Fedora Core (submitted to LFS-Hackers by Kevin White) >>>>> -Description: Fixes mii-tool when compiled using Linux-2.6.x >>>>> - >>>>> -$LastChangedBy: randy $ >>>>> -$Date: 2004-08-27 21:04:05 -0600 (Fri, 27 Aug 2004) $ >>>>> - >>>>> ---- net-tools-1.60/include/mii.h.bar Tue Jul 31 11:49:39 2001 >>>>> -+++ net-tools-1.60/include/mii.h Tue Jul 31 11:49:33 2001 >>>>> -@@ -11,11 +11,9 @@ >>>>> - >>>>> - /* network interface ioctl's for MII commands */ >>>>> - #ifndef SIOCGMIIPHY >>>>> --#define SIOCGMIIPHY (SIOCDEVPRIVATE) /* Read from current PHY */ >>>>> --#define SIOCGMIIREG (SIOCDEVPRIVATE+1) /* Read any PHY register */ >>>>> --#define SIOCSMIIREG (SIOCDEVPRIVATE+2) /* Write any PHY register */ >>>>> --#define SIOCGPARAMS (SIOCDEVPRIVATE+3) /* Read operational parameters */ >>>>> --#define SIOCSPARAMS (SIOCDEVPRIVATE+4) /* Set operational parameters */ >>>>> -+#define SIOCGMIIPHY 0x8947 /* Read from current PHY */ >>>>> -+#define SIOCGMIIREG 0x8948 /* Read any PHY register */ >>>>> -+#define SIOCSMIIREG 0x8949 /* Write any PHY register */ >>>>> - #endif >>>>> - >>>>> - #include <linux/types.h> >>>>> diff --git a/src/patches/net-tools-1.60-no-hostname.patch b/src/patches/net-tools-1.60-no-hostname.patch >>>>> deleted file mode 100644 >>>>> index e2e34a173..000000000 >>>>> --- a/src/patches/net-tools-1.60-no-hostname.patch >>>>> +++ /dev/null >>>>> @@ -1,52 +0,0 @@ >>>>> ---- a/Makefile.bak 2014-06-03 19:01:39.758845492 +0000 >>>>> -+++ b/Makefile 2014-06-03 19:02:34.119171419 +0000 >>>>> -@@ -76,7 +76,7 @@ >>>>> - NET_LIB_PATH = lib >>>>> - NET_LIB_NAME = net-tools >>>>> - >>>>> --PROGS := ifconfig hostname arp netstat route rarp slattach plipconfig nameif >>>>> -+PROGS := ifconfig arp netstat route rarp slattach plipconfig nameif >>>>> - >>>>> - -include config.make >>>>> - ifeq ($(HAVE_IP_TOOLS),1) >>>>> -@@ -190,9 +190,6 @@ >>>>> - nameif: nameif.o >>>>> - $(CC) $(LDFLAGS) -o nameif nameif.o >>>>> - >>>>> --hostname: hostname.o >>>>> -- $(CC) $(LDFLAGS) -o hostname hostname.o $(DNLIB) >>>>> -- >>>>> - route: $(NET_LIB) route.o >>>>> - $(CC) $(LDFLAGS) -o route route.o $(NLIB) $(RESLIB) >>>>> - >>>>> -@@ -224,7 +221,6 @@ >>>>> - install -m 0755 -d ${BASEDIR}/sbin >>>>> - install -m 0755 -d ${BASEDIR}/bin >>>>> - install -m 0755 arp ${BASEDIR}/sbin >>>>> -- install -m 0755 hostname ${BASEDIR}/bin >>>>> - install -m 0755 ifconfig ${BASEDIR}/sbin >>>>> - install -m 0755 nameif ${BASEDIR}/sbin >>>>> - install -m 0755 netstat ${BASEDIR}/bin >>>>> -@@ -239,21 +235,11 @@ >>>>> - ifeq ($(HAVE_MII),1) >>>>> - install -m 0755 mii-tool $(BASEDIR)/sbin >>>>> - endif >>>>> -- ln -fs hostname $(BASEDIR)/bin/dnsdomainname >>>>> -- ln -fs hostname $(BASEDIR)/bin/ypdomainname >>>>> -- ln -fs hostname $(BASEDIR)/bin/nisdomainname >>>>> -- ln -fs hostname $(BASEDIR)/bin/domainname >>>>> --ifeq ($(HAVE_AFDECnet),1) >>>>> -- ln -fs hostname $(BASEDIR)/bin/nodename >>>>> --endif >>>>> - >>>>> - savebin: >>>>> - @for i in ${BASEDIR}/sbin/arp ${BASEDIR}/sbin/ifconfig \ >>>>> - ${BASEDIR}/bin/netstat \ >>>>> -- ${BASEDIR}/sbin/rarp ${BASEDIR}/sbin/route \ >>>>> -- ${BASEDIR}/bin/hostname ${BASEDIR}/bin/ypdomainname \ >>>>> -- ${BASEDIR}/bin/dnsdomainname ${BASEDIR}/bin/nisdomainname \ >>>>> -- ${BASEDIR}/bin/domainname ; do \ >>>>> -+ ${BASEDIR}/sbin/rarp ${BASEDIR}/sbin/route; do \ >>>>> - [ -f $$i ] && cp -f $$i $$i.old ; done ; echo Saved. >>>>> - >>>>> - installdata: >>>>> diff --git a/src/patches/net-tools-2.10-no-hostname.patch b/src/patches/net-tools-2.10-no-hostname.patch >>>>> new file mode 100644 >>>>> index 000000000..c96c798ac >>>>> --- /dev/null >>>>> +++ b/src/patches/net-tools-2.10-no-hostname.patch >>>>> @@ -0,0 +1,41 @@ >>>>> +--- net-tools-2.10/Makefile.orig 2021-01-07 00:22:35.000000000 +0100 >>>>> ++++ net-tools-2.10/Makefile 2021-02-06 19:30:07.104393812 +0100 >>>>> +@@ -39,9 +39,6 @@ >>>>> + ifeq ($(HAVE_ARP_TOOLS),1) >>>>> + PROGS += arp rarp >>>>> + endif >>>>> +-ifeq ($(HAVE_HOSTNAME_TOOLS),1) >>>>> +-PROGS += hostname >>>>> +-endif >>>>> + ifeq ($(HAVE_IP_TOOLS),1) >>>>> + PROGS += iptunnel ipmaddr >>>>> + endif >>>>> +@@ -173,9 +170,6 @@ >>>>> + nameif: $(NET_LIB) nameif.o >>>>> + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ nameif.o $(NLIB) $(LDLIBS) >>>>> + >>>>> +-hostname: hostname.o >>>>> +- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ hostname.o $(DNLIB) $(LDLIBS) >>>>> +- >>>>> + route: $(NET_LIB) route.o >>>>> + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ route.o $(NLIB) $(LDLIBS) >>>>> + >>>>> +@@ -219,18 +213,6 @@ >>>>> + install -m 0755 arp ${BASEDIR}${SBINDIR} >>>>> + install -m 0755 rarp ${BASEDIR}${SBINDIR} >>>>> + endif >>>>> +-ifeq ($(HAVE_HOSTNAME_TOOLS),1) >>>>> +- install -m 0755 hostname ${BASEDIR}${BINDIR} >>>>> +- ln -fs hostname $(BASEDIR)${BINDIR}/dnsdomainname >>>>> +-ifeq ($(HAVE_HOSTNAME_SYMLINKS),1) >>>>> +- ln -fs hostname $(BASEDIR)${BINDIR}/ypdomainname >>>>> +- ln -fs hostname $(BASEDIR)${BINDIR}/nisdomainname >>>>> +- ln -fs hostname $(BASEDIR)${BINDIR}/domainname >>>>> +-endif >>>>> +-ifeq ($(HAVE_AFDECnet),1) >>>>> +- ln -fs hostname $(BASEDIR)${BINDIR}/nodename >>>>> +-endif >>>>> +-endif >>>>> + ifeq ($(HAVE_IP_TOOLS),1) >>>>> + install -m 0755 ipmaddr $(BASEDIR)${SBINDIR} >>>>> + install -m 0755 iptunnel $(BASEDIR)${SBINDIR} >>>>> -- >>>>> 2.30.0 >>>>> >>> >>> -- >>> Sent from my laptop
diff --git a/config/rootfiles/common/net-tools b/config/rootfiles/common/net-tools index 4860b2f0a..0578c1bc0 100644 --- a/config/rootfiles/common/net-tools +++ b/config/rootfiles/common/net-tools @@ -1,17 +1,23 @@ +sbin/ifconfig bin/netstat +sbin/route sbin/arp -sbin/ifconfig #sbin/ipmaddr #sbin/iptunnel sbin/mii-tool sbin/nameif #sbin/plipconfig sbin/rarp -sbin/route sbin/slattach +#usr/share/man/man1/dnsdomainname.1 +#usr/share/man/man1/domainname.1 +#usr/share/man/man1/nisdomainname.1 +#usr/share/man/man1/ypdomainname.1 #usr/share/man/man5/ethers.5 #usr/share/man/man8/arp.8 #usr/share/man/man8/ifconfig.8 +#usr/share/man/man8/ipmaddr.8 +#usr/share/man/man8/iptunnel.8 #usr/share/man/man8/mii-tool.8 #usr/share/man/man8/nameif.8 #usr/share/man/man8/netstat.8 diff --git a/lfs/net-tools b/lfs/net-tools index 3fde55e2d..7a568a260 100644 --- a/lfs/net-tools +++ b/lfs/net-tools @@ -24,10 +24,10 @@ include Config -VER = 1.60 +VER = 2.10 THISAPP = net-tools-$(VER) -DL_FILE = $(THISAPP).tar.bz2 +DL_FILE = $(THISAPP).tar.xz DL_FROM = $(URL_IPFIRE) DIR_APP = $(DIR_SRC)/$(THISAPP) TARGET = $(DIR_INFO)/$(THISAPP) @@ -39,7 +39,7 @@ objects = $(DL_FILE) $(DL_FILE) = $(DL_FROM)/$(DL_FILE) -$(DL_FILE)_MD5 = 888774accab40217dde927e21979c165 +$(DL_FILE)_MD5 = 78aae762c95e2d731faf88d482e4cde5 install : $(TARGET) @@ -68,12 +68,8 @@ $(subst %,%_MD5,$(objects)) : $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) @$(PREBUILD) - @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE) - cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/net-tools-1.60-no-hostname.patch - cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/$(THISAPP)-gcc34-3.patch - cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/$(THISAPP)-kernel_headers-3.patch - cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/$(THISAPP)-iphdr-redef.patch - cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/$(THISAPP)-mii_ioctl-1.patch + @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE) + cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/net-tools-2.10-no-hostname.patch cd $(DIR_APP) && yes "" | make config cd $(DIR_APP) && sed -i -e 's|HAVE_IP_TOOLS 0|HAVE_IP_TOOLS 1|g' \ -e 's|HAVE_HWSTRIP 1|HAVE_HWSTRIP 0|g' \ @@ -82,6 +78,12 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) -e 's|HAVE_HWSTRIP 1|HAVE_HWSTRIP 0|g' \ -e 's|# HAVE_MII=0|HAVE_MII=1|g' config.make cd $(DIR_APP) && make - cd $(DIR_APP) && make update + cd $(DIR_APP) && make install + + # Version 2.10 has moved ifconfig and route from sbin to bin + # Move these tools back to sbin to align with previous status in case anyone has + # scripts using these tools with the full pathname defined. + mv -v /bin/{ifconfig,route} /sbin + @rm -rf $(DIR_APP) @$(POSTBUILD) diff --git a/src/patches/net-tools-1.60-gcc34-3.patch b/src/patches/net-tools-1.60-gcc34-3.patch deleted file mode 100644 index e6ec25329..000000000 --- a/src/patches/net-tools-1.60-gcc34-3.patch +++ /dev/null @@ -1,86 +0,0 @@ -Originaly By: Zack Winkles <winkie AT linuxfromscratch DOT org> -Submitted By: Jim Gifford <jim AT linuxfromscratch DOT org> -Date: 2004-06-23 -Initial Package Version: 1.60 -Origin: N/A -Upstream Status: N/A -Description: Fix some occurrences of syntax that GCC 3.4 doesn't like. - -diff -Naur net-tools-1.60.orig/hostname.c net-tools-1.60/hostname.c ---- net-tools-1.60.orig/hostname.c 2001-04-08 17:04:23.000000000 +0000 -+++ net-tools-1.60/hostname.c 2004-06-24 06:22:16.913258663 +0000 -@@ -78,6 +78,7 @@ - fprintf(stderr, _("%s: name too long\n"), program_name); - break; - default: -+ ((void)0); - } - exit(1); - } -@@ -98,6 +99,7 @@ - fprintf(stderr, _("%s: name too long\n"), program_name); - break; - default: -+ ((void)0); - } - exit(1); - }; -@@ -117,6 +119,7 @@ - fprintf(stderr, _("%s: name too long\n"), program_name); - break; - default: -+ ((void)0); - } - exit(1); - }; -@@ -174,6 +177,7 @@ - printf("%s\n", hp->h_name); - break; - default: -+ ((void)0); - } - } - -diff -Naur net-tools-1.60.orig/lib/inet_sr.c net-tools-1.60/lib/inet_sr.c ---- net-tools-1.60.orig/lib/inet_sr.c 2000-02-20 21:46:45.000000000 +0000 -+++ net-tools-1.60/lib/inet_sr.c 2004-06-24 06:22:01.967840446 +0000 -@@ -105,6 +105,7 @@ - case 2: - isnet = 0; break; - default: -+ ((void)0); - } - - /* Fill in the other fields. */ -diff -Naur net-tools-1.60.orig/mii-tool.c net-tools-1.60/mii-tool.c ---- net-tools-1.60.orig/mii-tool.c 2000-05-21 14:31:17.000000000 +0000 -+++ net-tools-1.60/mii-tool.c 2004-06-24 06:22:01.971839755 +0000 -@@ -379,17 +379,17 @@ - /*--------------------------------------------------------------------*/ - - const char *usage = --"usage: %s [-VvRrwl] [-A media,... | -F media] [interface ...] -- -V, --version display version information -- -v, --verbose more verbose output -- -R, --reset reset MII to poweron state -- -r, --restart restart autonegotiation -- -w, --watch monitor for link status changes -- -l, --log with -w, write events to syslog -- -A, --advertise=media,... advertise only specified media -- -F, --force=media force specified media technology --media: 100baseT4, 100baseTx-FD, 100baseTx-HD, 10baseT-FD, 10baseT-HD, -- (to advertise both HD and FD) 100baseTx, 10baseT\n"; -+"usage: %s [-VvRrwl] [-A media,... | -F media] [interface ...]\n" -+" -V, --version display version information\n" -+" -v, --verbose more verbose output\n" -+" -R, --reset reset MII to poweron state\n" -+" -r, --restart restart autonegotiation\n" -+" -w, --watch monitor for link status changes\n" -+" -l, --log with -w, write events to syslog\n" -+" -A, --advertise=media,... advertise only specified media\n" -+" -F, --force=media force specified media technology\n" -+"media: 100baseT4, 100baseTx-FD, 100baseTx-HD, 10baseT-FD, 10baseT-HD,\n" -+" (to advertise both HD and FD) 100baseTx, 10baseT\n"; - - int main(int argc, char **argv) - { diff --git a/src/patches/net-tools-1.60-iphdr-redef.patch b/src/patches/net-tools-1.60-iphdr-redef.patch deleted file mode 100644 index 23b6dfe01..000000000 --- a/src/patches/net-tools-1.60-iphdr-redef.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Naur net-tools-1.60.org/iptunnel.c net-tools-1.60/iptunnel.c ---- net-tools-1.60.org/iptunnel.c 2001-04-08 19:04:23.000000000 +0200 -+++ net-tools-1.60/iptunnel.c 2017-02-07 17:37:17.956405434 +0100 -@@ -26,7 +26,7 @@ - #include <sys/socket.h> - #include <sys/ioctl.h> - #include <netinet/in.h> --#include <netinet/ip.h> -+#include <linux/ip.h> - #include <arpa/inet.h> - #if defined(__GLIBC__) && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1)) - #include <net/if.h> diff --git a/src/patches/net-tools-1.60-kernel_headers-3.patch b/src/patches/net-tools-1.60-kernel_headers-3.patch deleted file mode 100644 index 89988f0e7..000000000 --- a/src/patches/net-tools-1.60-kernel_headers-3.patch +++ /dev/null @@ -1,55 +0,0 @@ -diff -Naur net-tools-1.60.org/hostname.c net-tools-1.60/hostname.c ---- net-tools-1.60.org/hostname.c 2001-04-08 19:04:23.000000000 +0200 -+++ net-tools-1.60/hostname.c 2013-08-26 11:56:50.131844273 +0200 -@@ -42,10 +42,16 @@ - #include "config.h" - #include "version.h" - #include "../intl.h" -+#include <linux/version.h> - - #if HAVE_AFDECnet -+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0) - #include <netdnet/dn.h> - #endif -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0) -+#include <linux/dn.h> -+#endif -+#endif - - char *Release = RELEASE, *Version = "hostname 1.100 (2001-04-14)"; - -diff -Naur net-tools-1.60.org/lib/tr.c net-tools-1.60/lib/tr.c ---- net-tools-1.60.org/lib/tr.c 2000-02-20 22:46:45.000000000 +0100 -+++ net-tools-1.60/lib/tr.c 2013-08-26 11:57:33.675175033 +0200 -@@ -20,7 +20,7 @@ - #include <sys/types.h> - #include <sys/socket.h> - #include <net/if_arp.h> --#include <linux/if_tr.h> -+#include <netinet/if_tr.h> - #include <stdlib.h> - #include <stdio.h> - #include <errno.h> -diff -Naur net-tools-1.60.org/lib/x25_sr.c net-tools-1.60/lib/x25_sr.c ---- net-tools-1.60.org/lib/x25_sr.c 2000-05-20 15:38:10.000000000 +0200 -+++ net-tools-1.60/lib/x25_sr.c 2013-08-26 11:56:50.131844273 +0200 -@@ -22,6 +22,7 @@ - #include <sys/socket.h> - #include <sys/ioctl.h> - #include <linux/x25.h> -+#include <linux/version.h> - #include <ctype.h> - #include <errno.h> - #include <netdb.h> -@@ -77,7 +78,11 @@ - rt.sigdigits=sigdigits; - - /* x25_route_struct.address isn't type struct sockaddr_x25, Why? */ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0) - memcpy(&rt.address, &sx25.sx25_addr, sizeof(x25_address)); -+#else -+ memcpy(&rt.address, &sx25.sx25_addr, sizeof(struct x25_address)); -+#endif - - while (*args) { - if (!strcmp(*args,"device") || !strcmp(*args,"dev")) { diff --git a/src/patches/net-tools-1.60-mii_ioctl-1.patch b/src/patches/net-tools-1.60-mii_ioctl-1.patch deleted file mode 100644 index ca8582d51..000000000 --- a/src/patches/net-tools-1.60-mii_ioctl-1.patch +++ /dev/null @@ -1,27 +0,0 @@ -Submitted By: Randy McMurchy <randy_at_linuxfromscratch_dot_org> -Date: 2004-08-27 -Initial Package Version: 1.60 -Upstream Status: N/A (package is unmaintained) -Origin: From Fedora Core (submitted to LFS-Hackers by Kevin White) -Description: Fixes mii-tool when compiled using Linux-2.6.x - -$LastChangedBy: randy $ -$Date: 2004-08-27 21:04:05 -0600 (Fri, 27 Aug 2004) $ - ---- net-tools-1.60/include/mii.h.bar Tue Jul 31 11:49:39 2001 -+++ net-tools-1.60/include/mii.h Tue Jul 31 11:49:33 2001 -@@ -11,11 +11,9 @@ - - /* network interface ioctl's for MII commands */ - #ifndef SIOCGMIIPHY --#define SIOCGMIIPHY (SIOCDEVPRIVATE) /* Read from current PHY */ --#define SIOCGMIIREG (SIOCDEVPRIVATE+1) /* Read any PHY register */ --#define SIOCSMIIREG (SIOCDEVPRIVATE+2) /* Write any PHY register */ --#define SIOCGPARAMS (SIOCDEVPRIVATE+3) /* Read operational parameters */ --#define SIOCSPARAMS (SIOCDEVPRIVATE+4) /* Set operational parameters */ -+#define SIOCGMIIPHY 0x8947 /* Read from current PHY */ -+#define SIOCGMIIREG 0x8948 /* Read any PHY register */ -+#define SIOCSMIIREG 0x8949 /* Write any PHY register */ - #endif - - #include <linux/types.h> diff --git a/src/patches/net-tools-1.60-no-hostname.patch b/src/patches/net-tools-1.60-no-hostname.patch deleted file mode 100644 index e2e34a173..000000000 --- a/src/patches/net-tools-1.60-no-hostname.patch +++ /dev/null @@ -1,52 +0,0 @@ ---- a/Makefile.bak 2014-06-03 19:01:39.758845492 +0000 -+++ b/Makefile 2014-06-03 19:02:34.119171419 +0000 -@@ -76,7 +76,7 @@ - NET_LIB_PATH = lib - NET_LIB_NAME = net-tools - --PROGS := ifconfig hostname arp netstat route rarp slattach plipconfig nameif -+PROGS := ifconfig arp netstat route rarp slattach plipconfig nameif - - -include config.make - ifeq ($(HAVE_IP_TOOLS),1) -@@ -190,9 +190,6 @@ - nameif: nameif.o - $(CC) $(LDFLAGS) -o nameif nameif.o - --hostname: hostname.o -- $(CC) $(LDFLAGS) -o hostname hostname.o $(DNLIB) -- - route: $(NET_LIB) route.o - $(CC) $(LDFLAGS) -o route route.o $(NLIB) $(RESLIB) - -@@ -224,7 +221,6 @@ - install -m 0755 -d ${BASEDIR}/sbin - install -m 0755 -d ${BASEDIR}/bin - install -m 0755 arp ${BASEDIR}/sbin -- install -m 0755 hostname ${BASEDIR}/bin - install -m 0755 ifconfig ${BASEDIR}/sbin - install -m 0755 nameif ${BASEDIR}/sbin - install -m 0755 netstat ${BASEDIR}/bin -@@ -239,21 +235,11 @@ - ifeq ($(HAVE_MII),1) - install -m 0755 mii-tool $(BASEDIR)/sbin - endif -- ln -fs hostname $(BASEDIR)/bin/dnsdomainname -- ln -fs hostname $(BASEDIR)/bin/ypdomainname -- ln -fs hostname $(BASEDIR)/bin/nisdomainname -- ln -fs hostname $(BASEDIR)/bin/domainname --ifeq ($(HAVE_AFDECnet),1) -- ln -fs hostname $(BASEDIR)/bin/nodename --endif - - savebin: - @for i in ${BASEDIR}/sbin/arp ${BASEDIR}/sbin/ifconfig \ - ${BASEDIR}/bin/netstat \ -- ${BASEDIR}/sbin/rarp ${BASEDIR}/sbin/route \ -- ${BASEDIR}/bin/hostname ${BASEDIR}/bin/ypdomainname \ -- ${BASEDIR}/bin/dnsdomainname ${BASEDIR}/bin/nisdomainname \ -- ${BASEDIR}/bin/domainname ; do \ -+ ${BASEDIR}/sbin/rarp ${BASEDIR}/sbin/route; do \ - [ -f $$i ] && cp -f $$i $$i.old ; done ; echo Saved. - - installdata: diff --git a/src/patches/net-tools-2.10-no-hostname.patch b/src/patches/net-tools-2.10-no-hostname.patch new file mode 100644 index 000000000..c96c798ac --- /dev/null +++ b/src/patches/net-tools-2.10-no-hostname.patch @@ -0,0 +1,41 @@ +--- net-tools-2.10/Makefile.orig 2021-01-07 00:22:35.000000000 +0100 ++++ net-tools-2.10/Makefile 2021-02-06 19:30:07.104393812 +0100 +@@ -39,9 +39,6 @@ + ifeq ($(HAVE_ARP_TOOLS),1) + PROGS += arp rarp + endif +-ifeq ($(HAVE_HOSTNAME_TOOLS),1) +-PROGS += hostname +-endif + ifeq ($(HAVE_IP_TOOLS),1) + PROGS += iptunnel ipmaddr + endif +@@ -173,9 +170,6 @@ + nameif: $(NET_LIB) nameif.o + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ nameif.o $(NLIB) $(LDLIBS) + +-hostname: hostname.o +- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ hostname.o $(DNLIB) $(LDLIBS) +- + route: $(NET_LIB) route.o + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ route.o $(NLIB) $(LDLIBS) + +@@ -219,18 +213,6 @@ + install -m 0755 arp ${BASEDIR}${SBINDIR} + install -m 0755 rarp ${BASEDIR}${SBINDIR} + endif +-ifeq ($(HAVE_HOSTNAME_TOOLS),1) +- install -m 0755 hostname ${BASEDIR}${BINDIR} +- ln -fs hostname $(BASEDIR)${BINDIR}/dnsdomainname +-ifeq ($(HAVE_HOSTNAME_SYMLINKS),1) +- ln -fs hostname $(BASEDIR)${BINDIR}/ypdomainname +- ln -fs hostname $(BASEDIR)${BINDIR}/nisdomainname +- ln -fs hostname $(BASEDIR)${BINDIR}/domainname +-endif +-ifeq ($(HAVE_AFDECnet),1) +- ln -fs hostname $(BASEDIR)${BINDIR}/nodename +-endif +-endif + ifeq ($(HAVE_IP_TOOLS),1) + install -m 0755 ipmaddr $(BASEDIR)${SBINDIR} + install -m 0755 iptunnel $(BASEDIR)${SBINDIR}