From 972e67f34ba49d943b5fefd33b3016b4c7d5f344 Mon Sep 17 00:00:00 2001 From: T-X Date: Tue, 16 Apr 2019 00:00:14 +0200 Subject: [PATCH] batman-adv-legacy: remove batctl v2013.4 (#213) With the netlink functions backported batman-adv-legacy works fine with the upstream batctl. Therefore there is no more need to build and install the old batctl v2013.4 version. --- net/batman-adv-legacy/Makefile | 76 +------------------ ...batctl-Add-CFLAGS-to-the-linker-step.patch | 33 -------- ...l-Add-required-includes-to-all-files.patch | 57 -------------- ...-Fix-inconsistent-use-of-_GNU_SOURCE.patch | 71 ----------------- ...e-sys-types.h-for-caddr_t-definition.patch | 27 ------- ...-header-lines-number-for-local-trans.patch | 38 ---------- 6 files changed, 1 insertion(+), 301 deletions(-) delete mode 100644 net/batman-adv-legacy/patches/0001-batctl-Add-CFLAGS-to-the-linker-step.patch delete mode 100644 net/batman-adv-legacy/patches/0002-batctl-Add-required-includes-to-all-files.patch delete mode 100644 net/batman-adv-legacy/patches/0003-batctl-Fix-inconsistent-use-of-_GNU_SOURCE.patch delete mode 100644 net/batman-adv-legacy/patches/0004-batctl-Include-sys-types.h-for-caddr_t-definition.patch delete mode 100644 net/batman-adv-legacy/patches/0005-batctl-fix-wrong-header-lines-number-for-local-trans.patch diff --git a/net/batman-adv-legacy/Makefile b/net/batman-adv-legacy/Makefile index 3f27c51..73d56c5 100644 --- a/net/batman-adv-legacy/Makefile +++ b/net/batman-adv-legacy/Makefile @@ -13,22 +13,15 @@ PKG_NAME:=batman-adv-legacy PKG_VERSION:=2018-06-03 PKG_RELEASE:=1 -BATCTL_VERSION:=2013.4.0 -BATCTL_MD5SUM:=42e269cc710bbc9a8fd17628201d4258 - PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=git://github.com/freifunk-gluon/batman-adv-legacy.git PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE_VERSION:=7b775e93b7d2d3f10b137e76090c82a06af65272 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz -BATCTL_SOURCE_URL:=http://downloads.open-mesh.org/batman/releases/batman-adv-$(BATCTL_VERSION) - include $(INCLUDE_DIR)/kernel.mk include $(INCLUDE_DIR)/package.mk -PKG_BATCTL_BUILD_DIR:=$(PKG_BUILD_DIR)/batctl-$(BATCTL_VERSION) - define KernelPackage/batman-adv-legacy URL:=http://www.open-mesh.org/ MAINTAINER:=Marek Lindner @@ -48,7 +41,7 @@ define KernelPackage/batman-adv-legacy/config source "$(SOURCE)/Config.in" endef -MAKE_BATMAN_ADV_ARGS += \ +MAKE_FLAGS += \ CROSS_COMPILE="$(TARGET_CROSS)" \ KERNELPATH="$(LINUX_DIR)" \ ARCH="$(LINUX_KARCH)" \ @@ -62,79 +55,12 @@ MAKE_BATMAN_ADV_ARGS += \ CONFIG_BATMAN_ADV_NC=$(if $(CONFIG_KMOD_BATMAN_ADV_LEGACY_NC),y,n) \ REVISION="" all -# The linker can identify unused sections of a binary when each symbol is stored -# in a separate section. This mostly removes unused linker sections and reduces -# the size by ~3% on mipsel. - -TARGET_CFLAGS += -ffunction-sections -fdata-sections -TARGET_LDFLAGS += -Wl,--gc-sections - -# Link-time optimization allows to move parts of the optimization from the single -# source file to the global source view. This is done by emitting the GIMPLE -# representation in each object file and analyzing it again during the link step. - -TARGET_CFLAGS += -flto -TARGET_LDFLAGS += -fuse-linker-plugin - -MAKE_BATCTL_ENV += \ - CPPFLAGS="$(TARGET_CPPFLAGS)" \ - CFLAGS="$(TARGET_CFLAGS)" \ - LDFLAGS="$(TARGET_LDFLAGS)" - -MAKE_BATCTL_ARGS += \ - REVISION="" \ - CC="$(TARGET_CC)" \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - batctl install - -ifneq ($(DEVELOPER)$(CONFIG_KMOD_BATMAN_ADV_LEGACY_BATCTL),) -define Download/batctl-legacy - FILE:=batctl-$(BATCTL_VERSION).tar.gz - URL:=$(BATCTL_SOURCE_URL) - MD5SUM:=$(BATCTL_MD5SUM) -endef -$(eval $(call Download,batctl-legacy)) - -BATCTL_EXTRACT = tar xzf "$(DL_DIR)/batctl-$(BATCTL_VERSION).tar.gz" -C "$(PKG_BUILD_DIR)" -BATCTL_PATCH = $(call Build/DoPatch,"$(PKG_BATCTL_BUILD_DIR)","$(PATCH_DIR)",batctl) -BATCTL_BUILD = $(MAKE_BATCTL_ENV) $(MAKE) -C $(PKG_BATCTL_BUILD_DIR) $(MAKE_BATCTL_ARGS) -BATCTL_INSTALL = $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/local/sbin/batctl $(1)/usr/sbin/ -endif - -KPATCH ?= $(PATCH) -define Build/DoPatch - @if [ -d "$(2)" ]; then \ - if [ "$$$$(ls $(2) | grep -Ec ',*$(3).*')" -gt 0 ]; then \ - $(KPATCH) "$(1)" "$(2)" "*$(3)*"; \ - fi; \ - fi -endef - -define Build/Patch - $(call Build/DoPatch,"$(PKG_BUILD_DIR)","$(PATCH_DIR)",batman) - $(BATCTL_EXTRACT) - $(BATCTL_PATCH) -endef - -define Build/Prepare - $(call Build/Prepare/Default) - $(SED) '/#define _NET_BATMAN_ADV_MAIN_H_/a\#undef CONFIG_MODULE_STRIPPED' \ - $(PKG_BUILD_DIR)/main.h -endef - - -define Build/Compile - $(MAKE) -C "$(PKG_BUILD_DIR)" $(MAKE_BATMAN_ADV_ARGS) - $(BATCTL_BUILD) -endef - define KernelPackage/batman-adv-legacy/install $(INSTALL_DIR) $(1)/etc/config $(1)/etc/hotplug.d/net $(1)/etc/hotplug.d/iface $(1)/lib/batman-adv $(1)/usr/sbin $(1)/lib/netifd/proto $(INSTALL_DATA) ./files/etc/config/batman-adv $(1)/etc/config $(INSTALL_DATA) ./files/lib/batman-adv/config.sh $(1)/lib/batman-adv $(INSTALL_BIN) ./files/etc/hotplug.d/net/99-batman-adv $(1)/etc/hotplug.d/net $(INSTALL_BIN) ./files/lib/netifd/proto/batadv.sh $(1)/lib/netifd/proto - $(BATCTL_INSTALL) endef $(eval $(call KernelPackage,batman-adv-legacy)) diff --git a/net/batman-adv-legacy/patches/0001-batctl-Add-CFLAGS-to-the-linker-step.patch b/net/batman-adv-legacy/patches/0001-batctl-Add-CFLAGS-to-the-linker-step.patch deleted file mode 100644 index 492ae35..0000000 --- a/net/batman-adv-legacy/patches/0001-batctl-Add-CFLAGS-to-the-linker-step.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 2c7bfe1299efa97438814bf6826a8f7ab3bc0b16 Mon Sep 17 00:00:00 2001 -From: Sven Eckelmann -Date: Tue, 7 May 2013 14:51:02 +0200 -Subject: [PATCH] batctl: Add CFLAGS to the linker step - -The GCC manual states for different parameters that the options for compilation -must also be used when linking. The options for compilation are stored in -CFLAGS and added to LINK.o to fix the behavior. - -Option which need this are for example -fPIC/-fPIE or -flto. - -Signed-off-by: Sven Eckelmann -Signed-off-by: Marek Lindner ---- - Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Makefile b/Makefile -index 311e70e..233f453 100755 ---- a/Makefile -+++ b/Makefile -@@ -53,7 +53,7 @@ RM ?= rm -f - INSTALL ?= install - MKDIR ?= mkdir -p - COMPILE.c = $(Q_CC)$(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c --LINK.o = $(Q_LD)$(CC) $(LDFLAGS) $(TARGET_ARCH) -+LINK.o = $(Q_LD)$(CC) $(CFLAGS) $(LDFLAGS) $(TARGET_ARCH) - - # standard install paths - PREFIX = /usr/local --- -1.7.10.4 - diff --git a/net/batman-adv-legacy/patches/0002-batctl-Add-required-includes-to-all-files.patch b/net/batman-adv-legacy/patches/0002-batctl-Add-required-includes-to-all-files.patch deleted file mode 100644 index 02319b0..0000000 --- a/net/batman-adv-legacy/patches/0002-batctl-Add-required-includes-to-all-files.patch +++ /dev/null @@ -1,57 +0,0 @@ -From f9b50cd48c8cca1b9c7e8b8f6611265cc62674e1 Mon Sep 17 00:00:00 2001 -Message-Id: -In-Reply-To: <704e64165f8d37c42fd13652cf8b1c0f56f37cd6.1435782705.git.mschiffer@universe-factory.net> -References: <704e64165f8d37c42fd13652cf8b1c0f56f37cd6.1435782705.git.mschiffer@universe-factory.net> -From: Sven Eckelmann -Date: Fri, 17 Apr 2015 19:40:28 +0200 -Subject: [PATCH 2/2] batctl: Add required includes to all files - -The header files could not be build indepdent from each other. This is happened -because headers didn't include the files for things they've used. This was -problematic because the success of a build depended on the knowledge about the -right order of local includes. - -Also source files were not including everything they've used explicitly. -Instead they required that transitive includes are always stable. This is -problematic because some transitive includes are not obvious, depend on config -settings and may not be stable in the future. - -The order for include blocks are: - - * primary headers (main.h and the *.h file of a *.c file) - * global linux headers - * required local headers - * extra forward declarations for pointers in function/struct declarations - -The only exceptions are linux/bitops.h and linux/if_ether.h in packet.h. This -header file is shared with userspace applications like batctl and must -therefore build together with userspace applications. The header linux/bitops.h -is not part of the uapi headers and linux/if_ether.h conflicts with the musl -implementation of netinet/if_ether.h. The maintainers rejected the use of -__KERNEL__ preprocessor checks and thus these two headers are only in main.h. -All files using packet.h first have to include main.h to work correctly. - -Reported-by: Markus Pargmann -Signed-off-by: Sven Eckelmann -Signed-off-by: Marek Lindner ---- - packet.h | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/packet.h b/packet.h -index a51ccfc..3767a86 100644 ---- a/packet.h -+++ b/packet.h -@@ -20,6 +20,9 @@ - #ifndef _NET_BATMAN_ADV_PACKET_H_ - #define _NET_BATMAN_ADV_PACKET_H_ - -+#include -+#include -+ - enum batadv_packettype { - BATADV_IV_OGM = 0x01, - BATADV_ICMP = 0x02, --- -2.4.5 - diff --git a/net/batman-adv-legacy/patches/0003-batctl-Fix-inconsistent-use-of-_GNU_SOURCE.patch b/net/batman-adv-legacy/patches/0003-batctl-Fix-inconsistent-use-of-_GNU_SOURCE.patch deleted file mode 100644 index fb436f1..0000000 --- a/net/batman-adv-legacy/patches/0003-batctl-Fix-inconsistent-use-of-_GNU_SOURCE.patch +++ /dev/null @@ -1,71 +0,0 @@ -From e718de23e6cf05c75d3cd352de3ae50ff40adbef Mon Sep 17 00:00:00 2001 -Message-Id: -In-Reply-To: <704e64165f8d37c42fd13652cf8b1c0f56f37cd6.1435784617.git.mschiffer@universe-factory.net> -References: <704e64165f8d37c42fd13652cf8b1c0f56f37cd6.1435784617.git.mschiffer@universe-factory.net> -From: Sven Eckelmann -Date: Tue, 10 Sep 2013 23:11:53 +0200 -Subject: [PATCH 3/3] batctl: Fix inconsistent use of _GNU_SOURCE - -Either all or no source file should define _GNU_SOURCE to avoid incompatible -types or function declarations. - -Signed-off-by: Sven Eckelmann -Signed-off-by: Marek Lindner ---- - Makefile | 1 + - bat-hosts.c | 1 - - functions.c | 1 - - vis.c | 1 - - 4 files changed, 1 insertion(+), 3 deletions(-) - -diff --git a/Makefile b/Makefile -index 233f453..9e7c5be 100755 ---- a/Makefile -+++ b/Makefile -@@ -30,6 +30,7 @@ MANPAGE = man/batctl.8 - - # batctl flags and options - CFLAGS += -pedantic -Wall -W -std=gnu99 -fno-strict-aliasing -MD -+CPPFLAGS += -D_GNU_SOURCE - LDLIBS += -lm - - # disable verbose output -diff --git a/bat-hosts.c b/bat-hosts.c -index 04e7a9b..053c26f 100644 ---- a/bat-hosts.c -+++ b/bat-hosts.c -@@ -21,7 +21,6 @@ - - - --#define _GNU_SOURCE - #include - #include - #include -diff --git a/functions.c b/functions.c -index cc05a48..66f9a7d 100644 ---- a/functions.c -+++ b/functions.c -@@ -20,7 +20,6 @@ - */ - - --#define _GNU_SOURCE - #include - #include - #include -diff --git a/vis.c b/vis.c -index 33c7a7f..add93fd 100644 ---- a/vis.c -+++ b/vis.c -@@ -19,7 +19,6 @@ - * - */ - --#define _GNU_SOURCE - #include - #include - #include --- -2.4.5 - diff --git a/net/batman-adv-legacy/patches/0004-batctl-Include-sys-types.h-for-caddr_t-definition.patch b/net/batman-adv-legacy/patches/0004-batctl-Include-sys-types.h-for-caddr_t-definition.patch deleted file mode 100644 index 9849439..0000000 --- a/net/batman-adv-legacy/patches/0004-batctl-Include-sys-types.h-for-caddr_t-definition.patch +++ /dev/null @@ -1,27 +0,0 @@ -From b6d87da52915aec1f012e9f048dfedb3fc61a824 Mon Sep 17 00:00:00 2001 -Message-Id: -In-Reply-To: <704e64165f8d37c42fd13652cf8b1c0f56f37cd6.1435784837.git.mschiffer@universe-factory.net> -References: <704e64165f8d37c42fd13652cf8b1c0f56f37cd6.1435784837.git.mschiffer@universe-factory.net> -From: Matthias Schiffer -Date: Wed, 1 Jul 2015 23:06:48 +0200 -Subject: [PATCH 4/4] batctl: Include for caddr_t definition - ---- - ioctl.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/ioctl.c b/ioctl.c -index 26bb482..393521c 100644 ---- a/ioctl.c -+++ b/ioctl.c -@@ -25,6 +25,7 @@ - #include - #include - #include -+#include - #include - #include - #include --- -2.4.5 - diff --git a/net/batman-adv-legacy/patches/0005-batctl-fix-wrong-header-lines-number-for-local-trans.patch b/net/batman-adv-legacy/patches/0005-batctl-fix-wrong-header-lines-number-for-local-trans.patch deleted file mode 100644 index c44fd2a..0000000 --- a/net/batman-adv-legacy/patches/0005-batctl-fix-wrong-header-lines-number-for-local-trans.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 8a2bd557adb7d004e0fa46bfac9f331cb67c50ab Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Linus=20L=C3=BCssing?= -Date: Sun, 2 Mar 2014 23:18:00 +0100 -Subject: [PATCH 5/5] batctl: fix wrong header lines number for local - translation table -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -A commit in batman-adv has added a second header line to the local -translation table output. - -Introduced by 59cb0861498776c62bd17584c31f34477fa301a0 -("batman-adv: improve local translation table output") - -Signed-off-by: Linus Lüssing -Acked-by: Antonio Quartulli -Signed-off-by: Marek Lindner ---- - debug.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/debug.c b/debug.c -index c879603..39f80a6 100644 ---- a/debug.c -+++ b/debug.c -@@ -50,7 +50,7 @@ const struct debug_table_data batctl_debug_tables[BATCTL_TABLE_NUM] = { - .opt_long = "translocal", - .opt_short = "tl", - .debugfs_name = "transtable_local", -- .header_lines = 1, -+ .header_lines = 2, - }, - { - .opt_long = "transglobal", --- -2.11.0 -