Browse Source

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 <moritzwarning@web.de>
lilik-openwrt-22.03
Moritz Warning 2 years ago
committed by Rosen Penev
parent
commit
2f488873eb
6 changed files with 54 additions and 60 deletions
  1. +3
    -3
      net/zerotier/Makefile
  2. +10
    -16
      net/zerotier/patches/0001-fix-makefile.patch
  3. +3
    -3
      net/zerotier/patches/0002-fix-compilation-for-arm_cortex-a7-neon.patch
  4. +38
    -0
      net/zerotier/patches/0003-do-not-use-zt-SSO-and-OIDC.patch
  5. +0
    -15
      net/zerotier/patches/0006-gcc10.patch
  6. +0
    -23
      net/zerotier/patches/0007-add-cerrno-header-for-str-errno.patch

+ 3
- 3
net/zerotier/Makefile View File

@ -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 <moritzwarning@web.de>
@ -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


+ 10
- 16
net/zerotier/patches/0001-fix-makefile.patch View File

@ -1,3 +1,12 @@
From 4965b6d10b2f51f4b30a8c0a8f3a64cf48dea635 Mon Sep 17 00:00:00 2001
From: Moritz Warning <moritzwarning@web.de>
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


net/zerotier/patches/0008-fix-compilation-for-arm_cortex-a7-neon.patch → net/zerotier/patches/0002-fix-compilation-for-arm_cortex-a7-neon.patch View File


+ 38
- 0
net/zerotier/patches/0003-do-not-use-zt-SSO-and-OIDC.patch View File

@ -0,0 +1,38 @@
From 826718bdbbd42fcf56bdb45dd9e71af10299cfa3 Mon Sep 17 00:00:00 2001
From: Oskari Rauta <oskari.rauta@gmail.com>
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 <machine/endian.h>
#endif
+#undef OIDC_SUPPORTED
+#define OIDC_SUPPORTED 0
+
#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
#define OIDC_SUPPORTED 0
#ifndef __UNIX_LIKE__

+ 0
- 15
net/zerotier/patches/0006-gcc10.patch View File

@ -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;
}

+ 0
- 23
net/zerotier/patches/0007-add-cerrno-header-for-str-errno.patch View File

@ -1,23 +0,0 @@
From e06177a74f1e4314baf17c52f360dabcb78e69cd Mon Sep 17 00:00:00 2001
From: Moritz Warning <moritzwarning@web.de>
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 <rosenp@gmail.com>
---
osdep/LinuxNetLink.cpp | 2 ++
1 file changed, 2 insertions(+)
--- a/osdep/LinuxNetLink.cpp
+++ b/osdep/LinuxNetLink.cpp
@@ -22,6 +22,8 @@
#include <unistd.h>
#include <linux/if_tun.h>
+#include <cerrno>
+
#ifndef IFNAMSIZ
#define IFNAMSIZ 16
#endif

Loading…
Cancel
Save