From 682584890508079e9269aaa9ab57e75227675a76 Mon Sep 17 00:00:00 2001 From: Moritz Warning Date: Tue, 8 Mar 2022 15:55:58 +0100 Subject: [PATCH] zerotier: update to 1.8.6 * remove upstreamed gcc10 and cerrno patches * disable SSO and OIDC as it needs Rust/Cargo support Signed-off-by: Moritz Warning --- net/zerotier/Makefile | 6 +-- net/zerotier/patches/0001-fix-makefile.patch | 26 +++++-------- ...-compilation-for-arm_cortex-a7-neon.patch} | 6 +-- .../0003-do-not-use-zt-SSO-and-OIDC.patch | 38 +++++++++++++++++++ net/zerotier/patches/0006-gcc10.patch | 15 -------- ...0007-add-cerrno-header-for-str-errno.patch | 23 ----------- 6 files changed, 54 insertions(+), 60 deletions(-) rename net/zerotier/patches/{0008-fix-compilation-for-arm_cortex-a7-neon.patch => 0002-fix-compilation-for-arm_cortex-a7-neon.patch} (82%) create mode 100644 net/zerotier/patches/0003-do-not-use-zt-SSO-and-OIDC.patch delete mode 100644 net/zerotier/patches/0006-gcc10.patch delete mode 100644 net/zerotier/patches/0007-add-cerrno-header-for-str-errno.patch diff --git a/net/zerotier/Makefile b/net/zerotier/Makefile index ab0dbe4f27..f7ffd766eb 100644 --- a/net/zerotier/Makefile +++ b/net/zerotier/Makefile @@ -6,12 +6,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=zerotier -PKG_VERSION:=1.8.4 +PKG_VERSION:=1.8.6 PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/zerotier/ZeroTierOne/tar.gz/$(PKG_VERSION)? -PKG_HASH:=61b8c1ea5904cc87431939212033bb4d05d11f517860a01cac75f0090d94272b +PKG_HASH:=40dce71426f2649e5159854c37560f5a0b634c23d4774453dae0b7ef620af22a PKG_BUILD_DIR:=$(BUILD_DIR)/ZeroTierOne-$(PKG_VERSION) PKG_MAINTAINER:=Moritz Warning @@ -56,7 +56,7 @@ endif endef # Make binary smaller -TARGET_CFLAGS += -ffunction-sections -fdata-sections +TARGET_CFLAGS += -ffunction-sections -fdata-sections -fPIE TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed define Package/zerotier/conffiles diff --git a/net/zerotier/patches/0001-fix-makefile.patch b/net/zerotier/patches/0001-fix-makefile.patch index 0d0de6470d..c5fc53feaf 100644 --- a/net/zerotier/patches/0001-fix-makefile.patch +++ b/net/zerotier/patches/0001-fix-makefile.patch @@ -1,3 +1,12 @@ +From 4965b6d10b2f51f4b30a8c0a8f3a64cf48dea635 Mon Sep 17 00:00:00 2001 +From: Moritz Warning +Date: Tue, 8 Mar 2022 19:09:47 +0100 +Subject: [PATCH 1/3] fix makefile + +--- + make-linux.mk | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + --- a/make-linux.mk +++ b/make-linux.mk @@ -25,8 +25,8 @@ TIMESTAMP=$(shell date +"%Y%m%d%H%M") @@ -20,22 +29,7 @@ ONE_OBJS+=ext/libnatpmp/natpmp.o ext/libnatpmp/getgateway.o else LDLIBS+=-lnatpmp -@@ -68,11 +68,11 @@ ifeq ($(ZT_DEBUG),1) - # C25519 in particular is almost UNUSABLE in -O0 even on a 3ghz box! - node/Salsa20.o node/SHA512.o node/C25519.o node/Poly1305.o: CXXFLAGS=-Wall -O2 -g -pthread $(INCLUDES) $(DEFS) - else -- CFLAGS?=-O3 -fstack-protector -fPIE -+ CFLAGS?=-O3 -fstack-protector - override CFLAGS+=-Wall -Wno-deprecated -pthread $(INCLUDES) -DNDEBUG $(DEFS) -- CXXFLAGS?=-O3 -fstack-protector -fPIE -+ CXXFLAGS?=-O3 -fstack-protector - override CXXFLAGS+=-Wall -Wno-deprecated -std=c++11 -pthread $(INCLUDES) -DNDEBUG $(DEFS) -- LDFLAGS=-pie -Wl,-z,relro,-z,now -+ LDFLAGS+=-Wl,-z,relro,-z,now - endif - - ifeq ($(ZT_QNAP), 1) -@@ -280,7 +280,7 @@ ifeq ($(ZT_CONTROLLER),1) +@@ -300,7 +300,7 @@ ifeq ($(ZT_CONTROLLER),1) endif # ARM32 hell -- use conservative CFLAGS diff --git a/net/zerotier/patches/0008-fix-compilation-for-arm_cortex-a7-neon.patch b/net/zerotier/patches/0002-fix-compilation-for-arm_cortex-a7-neon.patch similarity index 82% rename from net/zerotier/patches/0008-fix-compilation-for-arm_cortex-a7-neon.patch rename to net/zerotier/patches/0002-fix-compilation-for-arm_cortex-a7-neon.patch index 88b640f704..150129ab7a 100644 --- a/net/zerotier/patches/0008-fix-compilation-for-arm_cortex-a7-neon.patch +++ b/net/zerotier/patches/0002-fix-compilation-for-arm_cortex-a7-neon.patch @@ -1,7 +1,7 @@ -From 7ac88ced6cdedf88ccebfc1de12d92b269d4a60a Mon Sep 17 00:00:00 2001 +From 8c24328d41a3a25db3b3d73baf86ed2c71160774 Mon Sep 17 00:00:00 2001 From: Moritz Warning Date: Mon, 30 Nov 2020 12:25:42 +0100 -Subject: [PATCH 8/8] fix compilation for arm_cortex-a7+neon +Subject: [PATCH 2/3] fix compilation for arm_cortex-a7+neon Fixes "error: 'vrbitq_u8' was not declared in this scope" @@ -12,7 +12,7 @@ Signed-off-by: Rosen Penev --- a/node/Constants.hpp +++ b/node/Constants.hpp -@@ -109,7 +109,7 @@ +@@ -118,7 +118,7 @@ #include #endif diff --git a/net/zerotier/patches/0003-do-not-use-zt-SSO-and-OIDC.patch b/net/zerotier/patches/0003-do-not-use-zt-SSO-and-OIDC.patch new file mode 100644 index 0000000000..297f4e7774 --- /dev/null +++ b/net/zerotier/patches/0003-do-not-use-zt-SSO-and-OIDC.patch @@ -0,0 +1,38 @@ +From 826718bdbbd42fcf56bdb45dd9e71af10299cfa3 Mon Sep 17 00:00:00 2001 +From: Oskari Rauta +Date: Sun, 13 Mar 2022 10:06:08 +0100 +Subject: [PATCH 3/3] do not use zt SSO and OIDC + +These features need Rust/Cargo support +in the build system. OpenWrt does not +have that yet. +--- + make-linux.mk | 4 ++++ + node/Constants.hpp | 3 +++ + 2 files changed, 7 insertions(+) + +--- a/make-linux.mk ++++ b/make-linux.mk +@@ -268,6 +268,10 @@ ifeq ($(ZT_IA32),1) + endif + + ifeq ($(ZT_SSO_SUPPORTED), 1) ++ ZT_SSO_SUPPORTED=0 ++endif ++ ++ifeq ($(ZT_SSO_SUPPORTED), 1) + ifeq ($(ZT_DEBUG),1) + LDLIBS+=zeroidc/target/debug/libzeroidc.a -ldl -lssl -lcrypto + else +--- a/node/Constants.hpp ++++ b/node/Constants.hpp +@@ -72,6 +72,9 @@ + #include + #endif + ++#undef OIDC_SUPPORTED ++#define OIDC_SUPPORTED 0 ++ + #if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) + #define OIDC_SUPPORTED 0 + #ifndef __UNIX_LIKE__ diff --git a/net/zerotier/patches/0006-gcc10.patch b/net/zerotier/patches/0006-gcc10.patch deleted file mode 100644 index 0df0318445..0000000000 --- a/net/zerotier/patches/0006-gcc10.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- a/osdep/Binder.hpp -+++ b/osdep/Binder.hpp -@@ -440,9 +440,9 @@ class Binder { - } - #endif // __LINUX__ - if (_bindingCount < ZT_BINDER_MAX_BINDINGS) { -- _bindings[_bindingCount].udpSock = udps; -- _bindings[_bindingCount].tcpListenSock = tcps; -- _bindings[_bindingCount].address = ii->first; -+ _bindings[(unsigned int)_bindingCount].udpSock = udps; -+ _bindings[(unsigned int)_bindingCount].tcpListenSock = tcps; -+ _bindings[(unsigned int)_bindingCount].address = ii->first; - phy.setIfName(udps, (char*)ii->second.c_str(), (int)ii->second.length()); - ++_bindingCount; - } diff --git a/net/zerotier/patches/0007-add-cerrno-header-for-str-errno.patch b/net/zerotier/patches/0007-add-cerrno-header-for-str-errno.patch deleted file mode 100644 index d2595f98b6..0000000000 --- a/net/zerotier/patches/0007-add-cerrno-header-for-str-errno.patch +++ /dev/null @@ -1,23 +0,0 @@ -From e06177a74f1e4314baf17c52f360dabcb78e69cd Mon Sep 17 00:00:00 2001 -From: Moritz Warning -Date: Sun, 29 Nov 2020 19:45:36 +0100 -Subject: [PATCH 7/8] add cerrno header for (str)errno - -Fixes compilation under libcxx. - -Signed-off-by: Rosen Penev ---- - osdep/LinuxNetLink.cpp | 2 ++ - 1 file changed, 2 insertions(+) - ---- a/osdep/LinuxNetLink.cpp -+++ b/osdep/LinuxNetLink.cpp -@@ -22,6 +22,8 @@ - #include - #include - -+#include -+ - #ifndef IFNAMSIZ - #define IFNAMSIZ 16 - #endif -- 2.30.2