softethervpn5: update to 5.02.5180 16090/head
authorAndy Walsh <andy.walsh44+github@gmail.com>
Sat, 10 Jul 2021 19:07:47 +0000 (21:07 +0200)
committerAndy Walsh <andy.walsh44+github@gmail.com>
Sat, 10 Jul 2021 19:07:47 +0000 (21:07 +0200)
* update to 5.02.5180
* add dep: libsodium

Signed-off-by: Andy Walsh <andy.walsh44+github@gmail.com>
net/softethervpn5/Makefile
net/softethervpn5/patches/001-iconv-cmake-fix.patch [new file with mode: 0644]
net/softethervpn5/patches/001-iconv-defines-fix.patch [deleted file]
net/softethervpn5/patches/002-iconv-cmake-fix.patch [deleted file]
net/softethervpn5/patches/002-pthread-include-fix.patch [new file with mode: 0644]
net/softethervpn5/patches/100-increase-cfg-save-intervall.patch
net/softethervpn5/patches/101-add-config-write-syslog.patch

index 1c08ab6bdf4da6cdaa9d2060a9702727181b80ab..566d7beb10f9c351b89b78f99427defe3edc0d0c 100644 (file)
@@ -3,16 +3,16 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=softethervpn5
-PKG_VERSION:=5.01.9674
-PKG_RELEASE:=1
+PKG_VERSION:=5.02.5180
+PKG_RELEASE:=$(AUTORELEASE)
 
 PKG_MAINTAINER:=Andy Walsh <andy.walsh44+github@gmail.com>
 PKG_LICENSE:=GPL-2.0
 PKG_LICENSE_FILES:=COPYING
 
 PKG_SOURCE_URL:=https://github.com/SoftEtherVPN/SoftEtherVPN/releases/download/$(PKG_VERSION)/
-PKG_SOURCE:=softether-vpn-src-$(PKG_VERSION).tar.gz
-PKG_HASH:=c4dc53f4912605a25c18357b0a0bf6dc059286ca901cb981abdf1a22d1649ddc
+PKG_SOURCE:=SoftEtherVPN-$(PKG_VERSION).tar.xz
+PKG_HASH:=b5649a8ea3cc6477325e09e2248ef708d434ee3b2251eb8764bcfc15fb1de456
 
 HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/SoftEtherVPN-$(PKG_VERSION)
 PKG_BUILD_DIR:=$(BUILD_DIR)/SoftEtherVPN-$(PKG_VERSION)
@@ -42,7 +42,7 @@ endef
 
 define Package/softethervpn5-libs
   $(call Package/softethervpn5/Default)
-  DEPENDS:=+libpthread +librt +libreadline +libopenssl +libncurses +kmod-tun +zlib $(ICONV_DEPENDS)
+  DEPENDS:=+libsodium +libpthread +librt +libreadline +libopenssl +libncurses +kmod-tun +zlib $(ICONV_DEPENDS)
   TITLE+= libs
   HIDDEN:=1
 endef
@@ -84,7 +84,7 @@ export USE_MUSL=YES
 # BUG: outdated host/include/elf.h
 HOST_CFLAGS += $(FPIC) -DAT_HWCAP2=26
 TARGET_CFLAGS += $(FPIC)
-CMAKE_OPTIONS = -DICONV_LIB_PATH="$(ICONV_PREFIX)/lib"
+CMAKE_OPTIONS += -DICONV_LIB_PATH="$(ICONV_PREFIX)/lib"
 
 # static build for host (hamcorebuilder), avoid -fpic on ncurses/host and shared libs can't be found on host
 define Host/Prepare
@@ -92,6 +92,7 @@ define Host/Prepare
        $(SED) 's,SHARED,STATIC,g' $(HOST_BUILD_DIR)/src/Mayaqua/CMakeLists.txt
        $(SED) 's,SHARED,STATIC,g' $(HOST_BUILD_DIR)/src/Cedar/CMakeLists.txt
        $(SED) 's,readline,libreadline.a,g' $(HOST_BUILD_DIR)/src/Cedar/CMakeLists.txt
+       $(SED) 's,libsodium REQUIRED,libsodium,g' $(HOST_BUILD_DIR)/src/Cedar/CMakeLists.txt
 endef
 
 define Host/Compile
@@ -100,23 +101,29 @@ endef
 
 define Host/Install
        $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/bin/
-       $(INSTALL_BIN) $(HOST_BUILD_DIR)/tmp/hamcorebuilder $(STAGING_DIR_HOSTPKG)/bin/
+       $(INSTALL_BIN) $(HOST_BUILD_DIR)/src/hamcorebuilder/hamcorebuilder $(STAGING_DIR_HOSTPKG)/bin/
 endef
 
-define Build/Compile
-       $(call Build/Compile/Default,vpnserver vpnbridge vpnclient vpncmd hamcore-archive-build)
+# disable SSE detection, disables BLAKE2 lib
+define Build/Prepare
+       $(call Build/Prepare/Default)
+       $(SED) 's,cmake_host_system_information,#cmake_host_system_information,g' $(PKG_BUILD_DIR)/src/Cedar/CMakeLists.txt
 endef
 
-define Build/Install
+define Build/Compile
+       $(call Build/Compile/Default,vpnserver vpnbridge vpnclient vpncmd hamcore-archive-build)
 endef
 
 define Package/softethervpn5-libs/install
        $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_BUILD_DIR)/build/libcedar.so $(1)/usr/lib/
-       $(CP) $(PKG_BUILD_DIR)/build/libmayaqua.so $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcedar.so $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmayaqua.so $(1)/usr/lib/
        $(INSTALL_DIR) $(1)/usr/libexec/softethervpn
-       $(CP) $(PKG_BUILD_DIR)/build/hamcore.se2 $(1)/usr/libexec/softethervpn/
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/build/vpncmd $(1)/usr/libexec/softethervpn/
+       $(CP) $(PKG_INSTALL_DIR)/usr/libexec/softether/vpncmd/hamcore.se2 $(1)/usr/libexec/softethervpn/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/libexec/softether/vpncmd/vpncmd $(1)/usr/libexec/softethervpn/
+       $(INSTALL_DIR) $(1)/usr/bin
+       if [ -f $(PKG_INSTALL_DIR)/usr/bin/list_cpu_features ]; then \
+               $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/list_cpu_features $(1)/usr/bin/ ; fi 
        $(INSTALL_BIN) files/launcher.sh $(1)/usr/libexec/softethervpn/
        $(INSTALL_DATA) files/dummy $(1)/usr/libexec/softethervpn/lang.config
        $(INSTALL_DIR) $(1)/usr/bin
@@ -125,7 +132,7 @@ endef
 
 define Package/softethervpn5-server/install
        $(INSTALL_DIR) $(1)/usr/libexec/softethervpn
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/build/vpnserver $(1)/usr/libexec/softethervpn/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/libexec/softether/vpnserver/vpnserver $(1)/usr/libexec/softethervpn/
        $(INSTALL_DATA) files/dummy $(1)/usr/libexec/softethervpn/vpn_server.config
        $(INSTALL_DIR) $(1)/etc/init.d
        $(INSTALL_BIN) files/vpnserver.init $(1)/etc/init.d/softethervpnserver
@@ -133,7 +140,7 @@ endef
 
 define Package/softethervpn5-bridge/install
        $(INSTALL_DIR) $(1)/usr/libexec/softethervpn
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/build/vpnbridge $(1)/usr/libexec/softethervpn/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/libexec/softether/vpnbridge/vpnbridge $(1)/usr/libexec/softethervpn/
        $(INSTALL_DATA) files/dummy $(1)/usr/libexec/softethervpn/vpn_bridge.config
        $(INSTALL_DIR) $(1)/etc/init.d
        $(INSTALL_BIN) files/vpnbridge.init $(1)/etc/init.d/softethervpnbridge
@@ -141,7 +148,7 @@ endef
 
 define Package/softethervpn5-client/install
        $(INSTALL_DIR) $(1)/usr/libexec/softethervpn
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/build/vpnclient $(1)/usr/libexec/softethervpn/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/libexec/softether/vpnclient/vpnclient $(1)/usr/libexec/softethervpn/
        $(INSTALL_DATA) files/dummy $(1)/usr/libexec/softethervpn/vpn_client.config
        $(INSTALL_DIR) $(1)/etc/init.d
        $(INSTALL_BIN) files/vpnclient.init $(1)/etc/init.d/softethervpnclient
diff --git a/net/softethervpn5/patches/001-iconv-cmake-fix.patch b/net/softethervpn5/patches/001-iconv-cmake-fix.patch
new file mode 100644 (file)
index 0000000..1f15a44
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/src/Mayaqua/CMakeLists.txt
++++ b/src/Mayaqua/CMakeLists.txt
+@@ -55,7 +55,7 @@ if(UNIX)
+   find_package(Threads REQUIRED)
+   # In some cases libiconv is not included in libc
+-  find_library(LIB_ICONV iconv)
++  find_library(LIB_ICONV iconv HINTS "${ICONV_LIB_PATH}")
+   find_library(LIB_RT rt)
diff --git a/net/softethervpn5/patches/001-iconv-defines-fix.patch b/net/softethervpn5/patches/001-iconv-defines-fix.patch
deleted file mode 100644 (file)
index 88c8dc3..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/src/Mayaqua/Mayaqua.h
-+++ b/src/Mayaqua/Mayaqua.h
-@@ -184,7 +184,7 @@ int PASCAL WinMain(HINSTANCE hInst, HINS
- #include <ifaddrs.h>\r
- #endif        // MAYAQUA_SUPPORTS_GETIFADDRS\r
\r
--#ifdef        UNIX_LINUX\r
-+#if 0\r
- typedef void *iconv_t;\r
- iconv_t iconv_open (__const char *__tocode, __const char *__fromcode);\r
- size_t iconv (iconv_t __cd, char **__restrict __inbuf,\r
diff --git a/net/softethervpn5/patches/002-iconv-cmake-fix.patch b/net/softethervpn5/patches/002-iconv-cmake-fix.patch
deleted file mode 100644 (file)
index 3683627..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/src/Mayaqua/CMakeLists.txt
-+++ b/src/Mayaqua/CMakeLists.txt
-@@ -59,7 +59,7 @@ if(UNIX)
-   find_package(ZLIB REQUIRED)
-   # In some cases libiconv is not included in libc
--  find_library(LIB_ICONV iconv)
-+  find_library(LIB_ICONV iconv HINTS "${ICONV_LIB_PATH}")
-   find_library(LIB_RT rt)
diff --git a/net/softethervpn5/patches/002-pthread-include-fix.patch b/net/softethervpn5/patches/002-pthread-include-fix.patch
new file mode 100644 (file)
index 0000000..5c80d56
--- /dev/null
@@ -0,0 +1,13 @@
+--- a/src/Mayaqua/Encrypt.h
++++ b/src/Mayaqua/Encrypt.h
+@@ -9,7 +9,9 @@
+ #define       ENCRYPT_H\r
\r
+ #include "MayaType.h"\r
+-\r
++#ifdef linux\r
++      #include <pthread.h>\r
++#endif\r
+ #include <openssl/opensslv.h>\r
\r
+ // Constant\r
index 9ceacb1b47483a321e3409b63eeb81de18c22bab..0677a8feda0dea439f58ddf5816f731906b197aa 100644 (file)
@@ -1,6 +1,6 @@
 --- a/src/Cedar/Server.h
 +++ b/src/Cedar/Server.h
-@@ -32,10 +32,10 @@ extern char *SERVER_CONFIG_FILE_NAME;
+@@ -35,10 +35,10 @@ extern char *SERVER_CONFIG_FILE_NAME;
  #define       SERVER_CONTROL_TCP_TIMEOUT              (60 * 1000)\r
  #define       SERVER_FARM_CONTROL_INTERVAL    (10 * 1000)\r
  \r
index 86b1ad20561fbf1c19150c5fb723b73b6c94bf06..e23644ec2c57d4c6c499228c718bbc1511c4446b 100644 (file)
@@ -1,15 +1,14 @@
 --- a/src/Cedar/Server.c
 +++ b/src/Cedar/Server.c
-@@ -4,7 +4,7 @@
\r
+@@ -5,6 +5,7 @@
  // Server.c\r
  // VPN Server module\r
--\r
\r
 +#include <syslog.h>\r
- #include "CedarPch.h"\r
+ #include "Server.h"\r
  \r
- static SERVER *server = NULL;\r
-@@ -6492,6 +6492,10 @@ UINT SiWriteConfigurationFile(SERVER *s)
+ #include "Admin.h"\r
+@@ -6561,6 +6562,10 @@ UINT SiWriteConfigurationFile(SERVER *s)
        {\r
                return 0;\r
        }\r