Blame SOURCES/0017-arptables-legacy-renaming.patch

0890d3
From 0c80be6f74250dbc70d071a84bc3b7a7d15b80f2 Mon Sep 17 00:00:00 2001
0890d3
From: Arturo Borrero Gonzalez <arturo@netfilter.org>
0890d3
Date: Wed, 20 Jun 2018 15:43:39 +0200
0890d3
Subject: [PATCH] arptables: legacy renaming
0890d3
0890d3
The original arptables tool is now the legacy version, let's rename it.
0890d3
0890d3
A more uptodate client of the arptables tool is provided in the iptables
0890d3
tarball. The new tool was formerly known as arptables-compat.
0890d3
0890d3
The new -legacy binary should have no problem if called via a symlink.
0890d3
0890d3
Signed-off-by: Arturo Borrero Gonzalez <arturo@netfilter.org>
0890d3
Signed-off-by: Florian Westphal <fw@strlen.de>
0890d3
(cherry picked from commit 28b22d55615447c94c5058e0aacec612ebc27f2a)
0890d3
Signed-off-by: Phil Sutter <psutter@redhat.com>
0890d3
---
0890d3
 Makefile                          | 12 ++++++------
0890d3
 arptables.8 => arptables-legacy.8 | 16 ++++++++++++++--
0890d3
 arptables.c                       |  2 +-
0890d3
 3 files changed, 21 insertions(+), 9 deletions(-)
0890d3
 rename arptables.8 => arptables-legacy.8 (94%)
0890d3
0890d3
diff --git a/Makefile b/Makefile
0890d3
index 139c9cae9ff6c..5f3f81290165c 100644
0890d3
--- a/Makefile
0890d3
+++ b/Makefile
0890d3
@@ -10,7 +10,7 @@ man8dir=$(MANDIR)/man8
0890d3
 SYSCONFIGDIR:=/etc/sysconfig
0890d3
 DESTDIR:=
0890d3
 
0890d3
-MANS = arptables.8 arptables-save.8 arptables-restore.8
0890d3
+MANS = arptables-legacy.8 arptables-save.8 arptables-restore.8
0890d3
 
0890d3
 COPT_FLAGS:=-O2
0890d3
 CFLAGS:=$(COPT_FLAGS) -Wall -Wunused -I$(KERNEL_DIR)/include/ -Iinclude/ -DARPTABLES_VERSION=\"$(ARPTABLES_VERSION)\" #-g -DDEBUG #-pg # -DARPTC_DEBUG
0890d3
@@ -21,7 +21,7 @@ endif
0890d3
 
0890d3
 include extensions/Makefile
0890d3
 
0890d3
-all: arptables libarptc/libarptc.a
0890d3
+all: arptables-legacy libarptc/libarptc.a
0890d3
 
0890d3
 arptables.o: arptables.c
0890d3
 	$(CC) $(CFLAGS) -c -o $@ $<
0890d3
@@ -35,10 +35,10 @@ libarptc/libarptc.o: libarptc/libarptc.c libarptc/libarptc_incl.c
0890d3
 libarptc/libarptc.a: libarptc/libarptc.o
0890d3
 	$(AR) rcs $@ $<
0890d3
 
0890d3
-arptables: arptables-standalone.o arptables.o libarptc/libarptc.o $(EXT_OBJS)
0890d3
+arptables-legacy: arptables-standalone.o arptables.o libarptc/libarptc.o $(EXT_OBJS)
0890d3
 	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
0890d3
 
0890d3
-$(DESTDIR)$(BINDIR)/arptables: arptables
0890d3
+$(DESTDIR)$(BINDIR)/arptables-legacy: arptables-legacy
0890d3
 	mkdir -p $(DESTDIR)$(BINDIR)
0890d3
 	install -m 0755 $< $@
0890d3
 
0890d3
@@ -58,11 +58,11 @@ install-man: $(MANS)
0890d3
 	install -m 0644 $^ $(DESTDIR)$(man8dir)/
0890d3
 
0890d3
 .PHONY: install
0890d3
-install: install-man $(DESTDIR)$(BINDIR)/arptables scripts
0890d3
+install: install-man $(DESTDIR)$(BINDIR)/arptables-legacy scripts
0890d3
 
0890d3
 .PHONY: clean
0890d3
 clean:
0890d3
-	rm -f arptables
0890d3
+	rm -f arptables-legacy
0890d3
 	rm -f *.o *~
0890d3
 	rm -f extensions/*.o extensions/*~
0890d3
 	rm -f libarptc/*.o libarptc/*~ libarptc/*.a
0890d3
diff --git a/arptables.8 b/arptables-legacy.8
0890d3
similarity index 94%
0890d3
rename from arptables.8
0890d3
rename to arptables-legacy.8
0890d3
index 676b8840c60f2..3ce99e3757004 100644
0890d3
--- a/arptables.8
0890d3
+++ b/arptables-legacy.8
0890d3
@@ -1,4 +1,4 @@
0890d3
-.TH ARPTABLES 8  "November 2011"
0890d3
+.TH ARPTABLES 8  "June 2018"
0890d3
 .\"
0890d3
 .\" Man page originally written by Jochen Friedrich <jochen@scram.de>,
0890d3
 .\" maintained by Bart De Schuymer.
0890d3
@@ -22,7 +22,7 @@
0890d3
 .\"
0890d3
 .\"
0890d3
 .SH NAME
0890d3
-arptables \- ARP table administration
0890d3
+arptables \- ARP table administration (legacy)
0890d3
 .SH SYNOPSIS
0890d3
 .BR "arptables " [ "-t table" ] " -" [ AD ] " chain rule-specification " [ options ]
0890d3
 .br
0890d3
@@ -37,6 +37,18 @@ arptables \- ARP table administration
0890d3
 .BR "arptables " [ "-t table" ] " -E old-chain-name new-chain-name"
0890d3
 .br
0890d3
 .BR "arptables " [ "-t table" ] " -P chain target " [ options ]
0890d3
+
0890d3
+.SH LEGACY
0890d3
+This tool uses the old xtables/setsockopt framework, and is a legacy version
0890d3
+of arptables. That means that a new, more modern tool exists with the same
0890d3
+functionality using the nf_tables framework and you are encouraged to migrate now.
0890d3
+The new binaries (formerly known as -compat) uses the same syntax and
0890d3
+semantics than this legacy one.
0890d3
+
0890d3
+You can still use this legacy tool. You should probably get some specific
0890d3
+information from your Linux distribution or vendor.
0890d3
+More docs are available at https://wiki.nftables.org
0890d3
+
0890d3
 .SH DESCRIPTION
0890d3
 .B arptables
0890d3
 is a user space tool, it is used to set up and maintain the
0890d3
diff --git a/arptables.c b/arptables.c
0890d3
index 4e9af67f92042..09c9ca25217d0 100644
0890d3
--- a/arptables.c
0890d3
+++ b/arptables.c
0890d3
@@ -468,7 +468,7 @@ exit_printhelp(void)
0890d3
 	struct arptables_target *t = NULL;
0890d3
 	int i;
0890d3
 
0890d3
-	printf("%s v%s\n\n"
0890d3
+	printf("%s v%s (legacy)\n\n"
0890d3
 "Usage: %s -[AD] chain rule-specification [options]\n"
0890d3
 "       %s -[RI] chain rulenum rule-specification [options]\n"
0890d3
 "       %s -D chain rulenum [options]\n"
0890d3
-- 
0890d3
2.21.0
0890d3