mirror of
https://github.com/coolsnowwolf/packages.git
synced 2025-05-01 15:59:31 +08:00
zerotier: update to 1.2.12
This commit is contained in:
parent
0dc8f61d4a
commit
0b40782856
@ -6,14 +6,14 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=zerotier
|
PKG_NAME:=zerotier
|
||||||
PKG_VERSION:=1.2.8
|
PKG_VERSION:=1.2.12
|
||||||
PKG_RELEASE:=3
|
PKG_RELEASE:=2
|
||||||
|
|
||||||
PKG_LICENSE:=GPL-3.0
|
PKG_LICENSE:=GPL-3.0
|
||||||
|
|
||||||
PKG_SOURCE_URL:=https://codeload.github.com/zerotier/ZeroTierOne/tar.gz/$(PKG_VERSION)?
|
PKG_SOURCE_URL:=https://codeload.github.com/zerotier/ZeroTierOne/tar.gz/$(PKG_VERSION)?
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
PKG_HASH:=08e2df34550d6bb68e106eaac48babb481160046818b0944ec41f1e158548a47
|
PKG_HASH:=212799bfaeb5e7dff20f2cd83f15742c8e13b8e9535606cfb85abcfb5fb6fed4
|
||||||
PKG_BUILD_DIR:=$(BUILD_DIR)/ZeroTierOne-$(PKG_VERSION)
|
PKG_BUILD_DIR:=$(BUILD_DIR)/ZeroTierOne-$(PKG_VERSION)
|
||||||
|
|
||||||
|
|
||||||
@ -66,10 +66,7 @@ ifeq ($(CONFIG_ZEROTIER_ENABLE_SELFTEST),y)
|
|||||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/zerotier-selftest $(1)/usr/bin/
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/zerotier-selftest $(1)/usr/bin/
|
||||||
endif
|
endif
|
||||||
|
|
||||||
$(INSTALL_DIR) $(1)/etc/init.d/
|
$(CP) ./files/* $(1)/
|
||||||
$(INSTALL_BIN) files/zerotier.init $(1)/etc/init.d/zerotier
|
|
||||||
$(INSTALL_DIR) $(1)/etc/config
|
|
||||||
$(INSTALL_CONF) files/zerotier.config $(1)/etc/config/zerotier
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
$(eval $(call BuildPackage,zerotier))
|
$(eval $(call BuildPackage,zerotier))
|
||||||
|
@ -3,12 +3,13 @@ config zerotier sample_config
|
|||||||
option enabled 0
|
option enabled 0
|
||||||
|
|
||||||
# persistent configuration folder (for ZT controller mode)
|
# persistent configuration folder (for ZT controller mode)
|
||||||
option config_path '/etc/zerotier'
|
#option config_path '/etc/zerotier'
|
||||||
|
|
||||||
#option port '9993'
|
#option port '9993'
|
||||||
|
|
||||||
# Generate secret on first start
|
# Generate secret on first start
|
||||||
option secret 'generate'
|
option secret ''
|
||||||
|
|
||||||
# Join a public network called Earth
|
# Join a public network called Earth
|
||||||
list join '8056c2e21c000001'
|
list join '8056c2e21c000001'
|
||||||
|
#list join '<other_network>'
|
39
net/zerotier/files/zerotier.init → net/zerotier/files/etc/init.d/zerotier
Normal file → Executable file
39
net/zerotier/files/zerotier.init → net/zerotier/files/etc/init.d/zerotier
Normal file → Executable file
@ -9,13 +9,13 @@ CONFIG_PATH=/var/lib/zerotier-one
|
|||||||
|
|
||||||
section_enabled() {
|
section_enabled() {
|
||||||
config_get_bool enabled "$1" 'enabled' 0
|
config_get_bool enabled "$1" 'enabled' 0
|
||||||
[ $enabled -gt 0 ]
|
[ $enabled -ne 0 ]
|
||||||
}
|
}
|
||||||
|
|
||||||
start_instance() {
|
start_instance() {
|
||||||
local cfg="$1"
|
local cfg="$1"
|
||||||
local port secret config_path
|
local port secret config_path path
|
||||||
local ARGS=""
|
local args=""
|
||||||
|
|
||||||
if ! section_enabled "$cfg"; then
|
if ! section_enabled "$cfg"; then
|
||||||
echo "disabled in config"
|
echo "disabled in config"
|
||||||
@ -23,29 +23,35 @@ start_instance() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
config_get config_path $cfg 'config_path'
|
config_get config_path $cfg 'config_path'
|
||||||
config_get_bool port $cfg 'port'
|
config_get port $cfg 'port'
|
||||||
config_get secret $cfg 'secret'
|
config_get secret $cfg 'secret'
|
||||||
|
|
||||||
|
path=${CONFIG_PATH}_$cfg
|
||||||
|
|
||||||
# Remove existing link or folder
|
# Remove existing link or folder
|
||||||
rm -rf $CONFIG_PATH
|
rm -rf $path
|
||||||
|
|
||||||
# Create link from CONFIG_PATH to config_path
|
# Create link from CONFIG_PATH to config_path
|
||||||
if [ -n "$config_path" -a "$config_path" != $CONFIG_PATH ]; then
|
if [ -n "$config_path" -a "$config_path" != "$path" ]; then
|
||||||
if [ ! -d "$config_path" ]; then
|
if [ ! -d "$config_path" ]; then
|
||||||
echo "ZeroTier config_path does not exist: $config_path"
|
echo "ZeroTier config_path does not exist: $config_path" 1>&2
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ln -s $config_path $CONFIG_PATH
|
ln -s $config_path $path
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mkdir -p $CONFIG_PATH/networks.d
|
mkdir -p $path/networks.d
|
||||||
|
|
||||||
|
# link latest default config path to latest config path
|
||||||
|
rm -f $CONFIG_PATH
|
||||||
|
ln -s $path $CONFIG_PATH
|
||||||
|
|
||||||
if [ -n "$port" ]; then
|
if [ -n "$port" ]; then
|
||||||
ARGS="$ARGS -p$port"
|
args="$args -p${port}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$secret" = "generate" ]; then
|
if [ -z "$secret" ]; then
|
||||||
echo "Generate secret - please wait..."
|
echo "Generate secret - please wait..."
|
||||||
local sf="/tmp/zt.$cfg.secret"
|
local sf="/tmp/zt.$cfg.secret"
|
||||||
|
|
||||||
@ -60,20 +66,20 @@ start_instance() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "$secret" ]; then
|
if [ -n "$secret" ]; then
|
||||||
echo "$secret" > $CONFIG_PATH/identity.secret
|
echo "$secret" > $path/identity.secret
|
||||||
# make sure there is not previous identity.public
|
# make sure there is not previous identity.public
|
||||||
rm -f $CONFIG_PATH/identity.public
|
rm -f $path/identity.public
|
||||||
fi
|
fi
|
||||||
|
|
||||||
add_join() {
|
add_join() {
|
||||||
# an (empty) config file will cause ZT to join a network
|
# an (empty) config file will cause ZT to join a network
|
||||||
touch $CONFIG_PATH/networks.d/$1.conf
|
touch $path/networks.d/$1.conf
|
||||||
}
|
}
|
||||||
|
|
||||||
config_list_foreach $cfg 'join' add_join
|
config_list_foreach $cfg 'join' add_join
|
||||||
|
|
||||||
procd_open_instance
|
procd_open_instance
|
||||||
procd_set_param command $PROG $ARGS $CONFIG_PATH
|
procd_set_param command $PROG $args $path
|
||||||
procd_set_param stderr 1
|
procd_set_param stderr 1
|
||||||
procd_close_instance
|
procd_close_instance
|
||||||
}
|
}
|
||||||
@ -87,10 +93,11 @@ stop_instance() {
|
|||||||
local cfg="$1"
|
local cfg="$1"
|
||||||
|
|
||||||
# Remove existing link or folder
|
# Remove existing link or folder
|
||||||
rm -rf $CONFIG_PATH
|
rm -rf ${CONFIG_PATH}_${cfg}
|
||||||
}
|
}
|
||||||
|
|
||||||
stop_service() {
|
stop_service() {
|
||||||
config_load 'zerotier'
|
config_load 'zerotier'
|
||||||
config_foreach stop_instance 'zerotier'
|
config_foreach stop_instance 'zerotier'
|
||||||
|
rm -f ${CONFIG_PATH}
|
||||||
}
|
}
|
@ -1,33 +0,0 @@
|
|||||||
From bfb1a652dbf897dc065d2a1414296eb145a2224b Mon Sep 17 00:00:00 2001
|
|
||||||
From: Moritz Warning <moritzwarning@web.de>
|
|
||||||
Date: Mon, 23 Apr 2018 22:31:03 +0200
|
|
||||||
Subject: [PATCH 3/4] remove -march=armv5
|
|
||||||
|
|
||||||
---
|
|
||||||
make-linux.mk | 8 ++++----
|
|
||||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/make-linux.mk b/make-linux.mk
|
|
||||||
index add1d3ae..49e14f70 100644
|
|
||||||
--- a/make-linux.mk
|
|
||||||
+++ b/make-linux.mk
|
|
||||||
@@ -229,12 +229,12 @@ endif
|
|
||||||
# ARM32 hell -- use conservative CFLAGS
|
|
||||||
ifeq ($(ZT_ARCHITECTURE),3)
|
|
||||||
ifeq ($(shell if [ -e /usr/bin/dpkg ]; then dpkg --print-architecture; fi),armel)
|
|
||||||
- override CFLAGS+=-march=armv5 -mfloat-abi=soft -msoft-float -mno-unaligned-access -marm
|
|
||||||
- override CXXFLAGS+=-march=armv5 -mfloat-abi=soft -msoft-float -mno-unaligned-access -marm
|
|
||||||
+ override CFLAGS+=-mfloat-abi=soft -msoft-float -mno-unaligned-access -marm
|
|
||||||
+ override CXXFLAGS+=-mfloat-abi=soft -msoft-float -mno-unaligned-access -marm
|
|
||||||
ZT_USE_ARM32_NEON_ASM_CRYPTO=0
|
|
||||||
else
|
|
||||||
- override CFLAGS+=-march=armv5 -mno-unaligned-access -marm
|
|
||||||
- override CXXFLAGS+=-march=armv5 -mno-unaligned-access -marm
|
|
||||||
+ override CFLAGS+=-mno-unaligned-access -marm
|
|
||||||
+ override CXXFLAGS+=-mno-unaligned-access -marm
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
--
|
|
||||||
2.17.0
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user