net-tools: update to 2.10.0

This commit is contained in:
Leonid Pliushch 2021-01-07 15:55:35 +02:00
parent ab1666ca01
commit bd7e64bc29
No known key found for this signature in database
GPG Key ID: 45F2964132545795
4 changed files with 37 additions and 46 deletions

View File

@ -1,16 +1,16 @@
diff -uNr net-tools/arp.c net-tools.mod/arp.c
--- net-tools/arp.c 2017-02-21 20:24:32.000000000 +0200
+++ net-tools.mod/arp.c 2019-03-01 19:05:20.555355036 +0200
@@ -644,7 +644,7 @@
fprintf(stderr, _(" -i, --device specify network interface (e.g. eth0)\n"));
fprintf(stderr, _(" -D, --use-device read <hwaddr> from given device\n"));
fprintf(stderr, _(" -A, -p, --protocol specify protocol family\n"));
- fprintf(stderr, _(" -f, --file read new entries from file or from /etc/ethers\n\n"));
+ fprintf(stderr, _(" -f, --file read new entries from file or from $PREFIX/etc/ethers\n\n"));
diff -uNr net-tools-2.10/arp.c net-tools-2.10.mod/arp.c
--- net-tools-2.10/arp.c 2021-01-07 01:22:35.000000000 +0200
+++ net-tools-2.10.mod/arp.c 2021-01-07 15:51:51.966445312 +0200
@@ -645,7 +645,7 @@
fprintf(fp, _(" -i, --device specify network interface (e.g. eth0)\n"));
fprintf(fp, _(" -D, --use-device read <hwaddr> from given device\n"));
fprintf(fp, _(" -A, -p, --protocol specify protocol family\n"));
- fprintf(fp, _(" -f, --file read new entries from file or from /etc/ethers\n\n"));
+ fprintf(fp, _(" -f, --file read new entries from file or from @TERMUX_PREFIX@/etc/ethers\n\n"));
fprintf(stderr, _(" <HW>=Use '-H <hw>' to specify hardware address type. Default: %s\n"), DFLT_HW);
fprintf(stderr, _(" List of possible hardware types (which support ARP):\n"));
@@ -791,7 +791,7 @@
fprintf(fp, _(" <HW>=Use '-H <hw>' to specify hardware address type. Default: %s\n"), DFLT_HW);
fprintf(fp, _(" List of possible hardware types (which support ARP):\n"));
@@ -793,7 +793,7 @@
break;
case 2: /* process an EtherFile */

View File

@ -2,14 +2,9 @@ TERMUX_PKG_HOMEPAGE=http://net-tools.sourceforge.net/
TERMUX_PKG_DESCRIPTION="Configuration tools for Linux networking"
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=1.60.2017.02.21
TERMUX_PKG_REVISION=3
commit=479bb4a7e11a4084e2935c0a576388f92469225b
# We use a mirror to avoid using
# https://sourceforge.net/code-snapshots/git/n/ne/net-tools/code.git/net-tools-code-$commit.zip
# which does not work all the time (sourceforge caching system):
TERMUX_PKG_SRCURL=https://dl.bintray.com/termux/upstream/net-tools-code-${commit}.zip
TERMUX_PKG_SHA256=7e9f8e8dcbabed0c8eeb976100496567abae7ac9d92c72cebd1a9d965473e943
TERMUX_PKG_VERSION=2.10.0
TERMUX_PKG_SRCURL=https://sourceforge.net/projects/net-tools/files/net-tools-2.10.tar.xz
TERMUX_PKG_SHA256=b262435a5241e89bfa51c3cabd5133753952f7a7b7b93f32e08cb9d96f580d69
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_EXTRA_MAKE_ARGS="BINDIR=$TERMUX_PREFIX/bin SBINDIR=$TERMUX_PREFIX/bin HAVE_HOSTNAME_TOOLS=0"
@ -18,7 +13,3 @@ termux_step_configure() {
sed -i "s#/usr#$TERMUX_PREFIX#" $TERMUX_PKG_SRCDIR/man/Makefile
yes "" | make config || true
}
termux_step_make_install() {
make $TERMUX_PKG_EXTRA_MAKE_ARGS update
}

View File

@ -1,6 +1,6 @@
diff -uNr net-tools/nameif.c net-tools.mod/nameif.c
--- net-tools/nameif.c 2017-02-21 20:24:32.000000000 +0200
+++ net-tools.mod/nameif.c 2019-03-01 19:02:26.447822359 +0200
diff -uNr net-tools-2.10/nameif.c net-tools-2.10.mod/nameif.c
--- net-tools-2.10/nameif.c 2021-01-07 01:22:35.000000000 +0200
+++ net-tools-2.10.mod/nameif.c 2021-01-07 15:52:58.378961050 +0200
@@ -10,7 +10,7 @@
#endif
#include <stdio.h>
@ -10,12 +10,12 @@ diff -uNr net-tools/nameif.c net-tools.mod/nameif.c
#include <errno.h>
#include <stdlib.h>
#include <ctype.h>
@@ -25,7 +25,7 @@
#include "net-support.h"
#include "util.h"
@@ -28,7 +28,7 @@
/* Current limitation of Linux network device ioctl(2) interface */
#define MAC_ADDRESS_MAX_LENGTH (sizeof(((struct ifreq *)0)->ifr_hwaddr.sa_data))
-const char default_conf[] = "/etc/mactab";
+const char default_conf[] = "@TERMUX_PREFIX@/etc/mactab";
const char *fname = default_conf;
int use_syslog;
int ctl_sk = -1;
-static const char default_conf[] = "/etc/mactab";
+static const char default_conf[] = "@TERMUX_PREFIX@/etc/mactab";
static const char *fname = default_conf;
static int use_syslog;
static int ctl_sk = -1;

View File

@ -1,12 +1,12 @@
diff -uNr net-tools/rarp.c net-tools.mod/rarp.c
--- net-tools/rarp.c 2017-02-21 20:24:32.000000000 +0200
+++ net-tools.mod/rarp.c 2019-03-01 19:06:09.028923071 +0200
@@ -178,7 +178,7 @@
fprintf(stderr, _("Usage: rarp -a list entries in cache.\n"));
fprintf(stderr, _(" rarp -d <hostname> delete entry from cache.\n"));
fprintf(stderr, _(" rarp [<HW>] -s <hostname> <hwaddr> add entry to cache.\n"));
- fprintf(stderr, _(" rarp -f add entries from /etc/ethers.\n"));
+ fprintf(stderr, _(" rarp -f add entries from $PREFIX/etc/ethers.\n"));
fprintf(stderr, _(" rarp -V display program version.\n\n"));
diff -uNr net-tools-2.10/rarp.c net-tools-2.10.mod/rarp.c
--- net-tools-2.10/rarp.c 2021-01-07 01:22:35.000000000 +0200
+++ net-tools-2.10.mod/rarp.c 2021-01-07 15:53:56.531418504 +0200
@@ -179,7 +179,7 @@
fprintf(fp, _("Usage: rarp -a list entries in cache.\n"));
fprintf(fp, _(" rarp -d <hostname> delete entry from cache.\n"));
fprintf(fp, _(" rarp [<HW>] -s <hostname> <hwaddr> add entry to cache.\n"));
- fprintf(fp, _(" rarp -f add entries from /etc/ethers.\n"));
+ fprintf(fp, _(" rarp -f add entries from @TERMUX_PREFIX@/etc/ethers.\n"));
fprintf(fp, _(" rarp -V display program version.\n\n"));
fprintf(stderr, _(" <HW>=Use '-H <hw>' to specify hardware address type. Default: %s\n"), DFLT_HW);
fprintf(fp, _(" <HW>=Use '-H <hw>' to specify hardware address type. Default: %s\n"), DFLT_HW);