diff --git a/net/zerotier/Makefile b/net/zerotier/Makefile index 2c5e6d3ec..1c471c16d 100644 --- a/net/zerotier/Makefile +++ b/net/zerotier/Makefile @@ -6,13 +6,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=zerotier -PKG_VERSION:=1.6.6 -PKG_RELEASE:=3 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://codeload.github.com/zerotier/ZeroTierOne/tar.gz/$(PKG_VERSION)? -PKG_HASH:=6c95ffca4a64bf948abbf3e550a0c4881b17cf45ff2f55e2a389d095f9be81a5 -PKG_BUILD_DIR:=$(BUILD_DIR)/ZeroTierOne-$(PKG_VERSION) +PKG_VERSION:=1.8.1 +PKG_RELEASE:=$(AUTORELEASE) + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://github.com/zerotier/ZeroTierOne.git +PKG_SOURCE_DATE:=2021-11-05 +PKG_SOURCE_VERSION:=7a626abf156a9dbac45a14061e5e1a182083a61c +PKG_MIRROR_HASH:=b98ca72e72ee4ad8f9fed2ddb14599c94a9e78fd5f44fd9920b4b0e5c6f9dcf7 PKG_MAINTAINER:=Moritz Warning PKG_LICENSE:=BSL 1.1 diff --git a/net/zerotier/patches/0001-find-miniupnpc.h-in-staging-directory.patch b/net/zerotier/patches/0001-find-miniupnpc.h-in-staging-directory.patch deleted file mode 100644 index e9724f01d..000000000 --- a/net/zerotier/patches/0001-find-miniupnpc.h-in-staging-directory.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 552cda1ebff6c5182eecdcb35961fd6b441dfa52 Mon Sep 17 00:00:00 2001 -From: Moritz Warning -Date: Mon, 23 Apr 2018 22:12:31 +0200 -Subject: [PATCH 1/8] find miniupnpc.h in staging directory - ---- - make-linux.mk | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - ---- a/make-linux.mk -+++ b/make-linux.mk -@@ -25,8 +25,8 @@ TIMESTAMP=$(shell date +"%Y%m%d%H%M") - # otherwise build into binary as done on Mac and Windows. - ONE_OBJS+=osdep/PortMapper.o - override DEFS+=-DZT_USE_MINIUPNPC --MINIUPNPC_IS_NEW_ENOUGH=$(shell grep -sqr '.*define.*MINIUPNPC_VERSION.*"2..*"' /usr/include/miniupnpc/miniupnpc.h && echo 1) --#MINIUPNPC_IS_NEW_ENOUGH=$(shell grep -sqr '.*define.*MINIUPNPC_VERSION.*"2.."' /usr/include/miniupnpc/miniupnpc.h && echo 1) -+MINIUPNPC_IS_NEW_ENOUGH=$(shell grep -sqr '.*define.*MINIUPNPC_VERSION.*"2..*"' $(STAGING_DIR)/usr/include/miniupnpc/miniupnpc.h && echo 1) -+#MINIUPNPC_IS_NEW_ENOUGH=$(shell grep -sqr '.*define.*MINIUPNPC_VERSION.*"2.."' $(STAGING_DIR)/usr/include/miniupnpc/miniupnpc.h && echo 1) - ifeq ($(MINIUPNPC_IS_NEW_ENOUGH),1) - override DEFS+=-DZT_USE_SYSTEM_MINIUPNPC - LDLIBS+=-lminiupnpc diff --git a/net/zerotier/patches/0001-fix-makefile.patch b/net/zerotier/patches/0001-fix-makefile.patch new file mode 100644 index 000000000..5db7713a3 --- /dev/null +++ b/net/zerotier/patches/0001-fix-makefile.patch @@ -0,0 +1,46 @@ +--- a/make-linux.mk ++++ b/make-linux.mk +@@ -25,8 +25,8 @@ TIMESTAMP=$(shell date +"%Y%m%d%H%M") + # otherwise build into binary as done on Mac and Windows. + ONE_OBJS+=osdep/PortMapper.o + override DEFS+=-DZT_USE_MINIUPNPC +-MINIUPNPC_IS_NEW_ENOUGH=$(shell grep -sqr '.*define.*MINIUPNPC_VERSION.*"2..*"' /usr/include/miniupnpc/miniupnpc.h && echo 1) +-#MINIUPNPC_IS_NEW_ENOUGH=$(shell grep -sqr '.*define.*MINIUPNPC_VERSION.*"2.."' /usr/include/miniupnpc/miniupnpc.h && echo 1) ++MINIUPNPC_IS_NEW_ENOUGH=$(shell grep -sqr '.*define.*MINIUPNPC_VERSION.*"2..*"' $(STAGING_DIR)/usr/include/miniupnpc/miniupnpc.h && echo 1) ++#MINIUPNPC_IS_NEW_ENOUGH=$(shell grep -sqr '.*define.*MINIUPNPC_VERSION.*"2.."' $(STAGING_DIR)/usr/include/miniupnpc/miniupnpc.h && echo 1) + ifeq ($(MINIUPNPC_IS_NEW_ENOUGH),1) + override DEFS+=-DZT_USE_SYSTEM_MINIUPNPC + LDLIBS+=-lminiupnpc +@@ -34,7 +34,7 @@ else + override DEFS+=-DMINIUPNP_STATICLIB -DMINIUPNPC_SET_SOCKET_TIMEOUT -DMINIUPNPC_GET_SRC_ADDR -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -DOS_STRING=\"Linux\" -DMINIUPNPC_VERSION_STRING=\"2.0\" -DUPNP_VERSION_STRING=\"UPnP/1.1\" -DENABLE_STRNATPMPERR + ONE_OBJS+=ext/miniupnpc/connecthostport.o ext/miniupnpc/igd_desc_parse.o ext/miniupnpc/minisoap.o ext/miniupnpc/minissdpc.o ext/miniupnpc/miniupnpc.o ext/miniupnpc/miniwget.o ext/miniupnpc/minixml.o ext/miniupnpc/portlistingparse.o ext/miniupnpc/receivedata.o ext/miniupnpc/upnpcommands.o ext/miniupnpc/upnpdev.o ext/miniupnpc/upnperrors.o ext/miniupnpc/upnpreplyparse.o + endif +-ifeq ($(wildcard /usr/include/natpmp.h),) ++ifeq ($(wildcard $(STAGING_DIR)/usr/include/natpmp.h),) + 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) +@@ -270,7 +270,7 @@ ifeq ($(ZT_CONTROLLER),1) + endif + + # ARM32 hell -- use conservative CFLAGS +-ifeq ($(ZT_ARCHITECTURE),3) ++ifeq (0,3) + ifeq ($(shell if [ -e /usr/bin/dpkg ]; then dpkg --print-architecture; fi),armel) + override CFLAGS+=-march=armv5t -mfloat-abi=soft -msoft-float -mno-unaligned-access -marm + override CXXFLAGS+=-march=armv5t -mfloat-abi=soft -msoft-float -mno-unaligned-access -marm diff --git a/net/zerotier/patches/0002-remove-pie.patch b/net/zerotier/patches/0002-remove-pie.patch deleted file mode 100644 index a5d0f8f4d..000000000 --- a/net/zerotier/patches/0002-remove-pie.patch +++ /dev/null @@ -1,28 +0,0 @@ -From ef1a75fd1bf271cc5c73d966a861dfcd26d62cd5 Mon Sep 17 00:00:00 2001 -From: Moritz Warning -Date: Mon, 30 Apr 2018 16:14:30 +0200 -Subject: [PATCH 2/8] remove -pie - -fixes relocation "against `a local symbol' can not be used -when making a shared object; recompile with -fPIC" error ---- - make-linux.mk | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - ---- a/make-linux.mk -+++ b/make-linux.mk -@@ -69,11 +69,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 - STRIP?=strip - STRIP+=--strip-all - endif diff --git a/net/zerotier/patches/0003-remove-arm32-conservative-CFLAGS.patch b/net/zerotier/patches/0003-remove-arm32-conservative-CFLAGS.patch deleted file mode 100644 index 9d13a786a..000000000 --- a/net/zerotier/patches/0003-remove-arm32-conservative-CFLAGS.patch +++ /dev/null @@ -1,20 +0,0 @@ -From 093ec88ff213a5713ad5d3c26ddf5ecdea3c6377 Mon Sep 17 00:00:00 2001 -From: Moritz Warning -Date: Sun, 4 Aug 2019 03:56:37 +0200 -Subject: [PATCH 3/8] remove arm32 conservative CFLAGS - ---- - make-linux.mk | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/make-linux.mk -+++ b/make-linux.mk -@@ -272,7 +272,7 @@ ifeq ($(ZT_CONTROLLER),1) - endif - - # ARM32 hell -- use conservative CFLAGS --ifeq ($(ZT_ARCHITECTURE),3) -+ifeq (0,3) - ifeq ($(shell if [ -e /usr/bin/dpkg ]; then dpkg --print-architecture; fi),armel) - override CFLAGS+=-march=armv5t -mfloat-abi=soft -msoft-float -mno-unaligned-access -marm - override CXXFLAGS+=-march=armv5t -mfloat-abi=soft -msoft-float -mno-unaligned-access -marm diff --git a/net/zerotier/patches/0004-accept-external-linker-flags.patch b/net/zerotier/patches/0004-accept-external-linker-flags.patch deleted file mode 100644 index 2900a7edb..000000000 --- a/net/zerotier/patches/0004-accept-external-linker-flags.patch +++ /dev/null @@ -1,20 +0,0 @@ -From 1a4ffe62c729f9c4f63cdfd26151e3724bc23f86 Mon Sep 17 00:00:00 2001 -From: Moritz Warning -Date: Wed, 2 May 2018 16:06:46 +0200 -Subject: [PATCH 4/8] accept external linker flags - ---- - make-linux.mk | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/make-linux.mk -+++ b/make-linux.mk -@@ -73,7 +73,7 @@ else - override CFLAGS+=-Wall -Wno-deprecated -pthread $(INCLUDES) -DNDEBUG $(DEFS) - CXXFLAGS?=-O3 -fstack-protector - override CXXFLAGS+=-Wall -Wno-deprecated -std=c++11 -pthread $(INCLUDES) -DNDEBUG $(DEFS) -- LDFLAGS=-Wl,-z,relro,-z,now -+ LDFLAGS+=-Wl,-z,relro,-z,now - STRIP?=strip - STRIP+=--strip-all - endif diff --git a/net/zerotier/patches/0005-link-natpmp.patch b/net/zerotier/patches/0005-link-natpmp.patch deleted file mode 100644 index 893c10a05..000000000 --- a/net/zerotier/patches/0005-link-natpmp.patch +++ /dev/null @@ -1,20 +0,0 @@ -From de625c51dba36b390c93a1db00b19b6112178764 Mon Sep 17 00:00:00 2001 -From: Moritz Warning -Date: Sat, 21 Nov 2020 17:53:28 +0100 -Subject: [PATCH 5/8] link natpmp - ---- - make-linux.mk | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/make-linux.mk -+++ b/make-linux.mk -@@ -34,7 +34,7 @@ else - override DEFS+=-DMINIUPNP_STATICLIB -DMINIUPNPC_SET_SOCKET_TIMEOUT -DMINIUPNPC_GET_SRC_ADDR -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -DOS_STRING=\"Linux\" -DMINIUPNPC_VERSION_STRING=\"2.0\" -DUPNP_VERSION_STRING=\"UPnP/1.1\" -DENABLE_STRNATPMPERR - ONE_OBJS+=ext/miniupnpc/connecthostport.o ext/miniupnpc/igd_desc_parse.o ext/miniupnpc/minisoap.o ext/miniupnpc/minissdpc.o ext/miniupnpc/miniupnpc.o ext/miniupnpc/miniwget.o ext/miniupnpc/minixml.o ext/miniupnpc/portlistingparse.o ext/miniupnpc/receivedata.o ext/miniupnpc/upnpcommands.o ext/miniupnpc/upnpdev.o ext/miniupnpc/upnperrors.o ext/miniupnpc/upnpreplyparse.o - endif --ifeq ($(wildcard /usr/include/natpmp.h),) -+ifeq ($(wildcard $(STAGING_DIR)/usr/include/natpmp.h),) - ONE_OBJS+=ext/libnatpmp/natpmp.o ext/libnatpmp/getgateway.o - else - LDLIBS+=-lnatpmp diff --git a/net/zerotier/patches/0006-gcc10.patch b/net/zerotier/patches/0006-gcc10.patch index 9550dfdde..0df031844 100644 --- a/net/zerotier/patches/0006-gcc10.patch +++ b/net/zerotier/patches/0006-gcc10.patch @@ -1,17 +1,8 @@ -From e0c76c5ccf049d22bc47d723567926346e4d3639 Mon Sep 17 00:00:00 2001 -From: Moritz Warning -Date: Sat, 21 Nov 2020 18:19:21 +0100 -Subject: [PATCH 6/8] gcc10 - ---- - osdep/Binder.hpp | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - --- a/osdep/Binder.hpp +++ b/osdep/Binder.hpp -@@ -396,9 +396,9 @@ public: +@@ -440,9 +440,9 @@ class Binder { } - #endif // __LINUX__ + #endif // __LINUX__ if (_bindingCount < ZT_BINDER_MAX_BINDINGS) { - _bindings[_bindingCount].udpSock = udps; - _bindings[_bindingCount].tcpListenSock = tcps; @@ -19,6 +10,6 @@ Subject: [PATCH 6/8] gcc10 + _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()); + phy.setIfName(udps, (char*)ii->second.c_str(), (int)ii->second.length()); ++_bindingCount; } diff --git a/net/zerotier/patches/010-auxv.patch b/net/zerotier/patches/0010-auxv.patch similarity index 76% rename from net/zerotier/patches/010-auxv.patch rename to net/zerotier/patches/0010-auxv.patch index 34991688e..3165fe3f7 100644 --- a/net/zerotier/patches/010-auxv.patch +++ b/net/zerotier/patches/0010-auxv.patch @@ -1,9 +1,9 @@ --- a/node/Utils.cpp +++ b/node/Utils.cpp -@@ -28,7 +28,7 @@ - #include +@@ -29,7 +29,7 @@ #include #include + #ifdef ZT_ARCH_ARM_HAS_NEON -#ifdef __LINUX__ +#if 0 #include