aboutsummaryrefslogtreecommitdiff
path: root/security/softether5
diff options
context:
space:
mode:
authorKoichiro Iwao <meta@FreeBSD.org>2019-09-17 08:02:40 +0000
committerKoichiro Iwao <meta@FreeBSD.org>2019-09-17 08:02:40 +0000
commit7aa2e3cf3f95400706c27ab486005fb5167c82ce (patch)
treeb8f85deec1eb1c3b87623fc75798bba5af100e17 /security/softether5
parentf1984225c84d8d4bcc9aee2307759e2c9a8faa97 (diff)
downloadports-7aa2e3cf3f95400706c27ab486005fb5167c82ce.tar.gz
ports-7aa2e3cf3f95400706c27ab486005fb5167c82ce.zip
security/softether5: make LogFileList command [1] work properly
Notes
Notes: svn path=/head/; revision=512198
Diffstat (limited to 'security/softether5')
-rw-r--r--security/softether5/Makefile64
-rw-r--r--security/softether5/distinfo16
-rw-r--r--security/softether5/files/extra-patch-unrestrict-enterprise-functions27
-rw-r--r--security/softether5/files/patch-chain-certs-dir31
-rw-r--r--security/softether5/files/patch-piddir29
-rw-r--r--security/softether5/files/patch-use-system-cpu_features18
-rw-r--r--security/softether5/files/pkg-message.in1
-rw-r--r--security/softether5/pkg-plist1
8 files changed, 30 insertions, 157 deletions
diff --git a/security/softether5/Makefile b/security/softether5/Makefile
index b12967fd81f6..ede5347afa49 100644
--- a/security/softether5/Makefile
+++ b/security/softether5/Makefile
@@ -2,9 +2,14 @@
PORTNAME= softether
DISTVERSION= 5.01.9671
-#PORTREVISION= 0
+PORTREVISION= 1
CATEGORIES= security net-vpn
PKGNAMESUFFIX= 5
+DIST_SUBDIR= ${PORTNAME}
+
+# Some patches are managed in my GitHub fork
+PATCH_SITES= https://github.com/metalefty/${GH_ACCOUNT}/commit/
+PATCHFILES= dc2f94f1.patch:-p1 b2e3b1f5.patch:-p1 572a3531.patch:-p1 9929817.patch:-p1
MAINTAINER= meta@FreeBSD.org
COMMENT= SoftEther VPN 5 (Developer Edition)
@@ -12,14 +17,12 @@ COMMENT= SoftEther VPN 5 (Developer Edition)
LICENSE= APACHE20
LICENSE_FILE= ${WRKSRC}/LICENSE
-USES+= cmake:noninja compiler:c11 dos2unix iconv:wchar_t \
+USES+= cmake:noninja compiler:c11 iconv:wchar_t \
localbase:ldflags ncurses readline ssl
USE_RC_SUBR= softether_bridge softether_client softether_server
USE_LDCONFIG= yes
USE_GITHUB= yes
-DOS2UNIX_GLOB= *.h *.c
-
GH_ACCOUNT= SoftEtherVPN
GH_PROJECT= SoftEtherVPN
@@ -33,15 +36,16 @@ OPTIONS_DEFINE= DOCS UNLOCK
# - Source IP address control list function
# - syslog transfer function
UNLOCK_DESC= Unlock regional lockout (JP and CN)
-UNLOCK_EXTRA_PATCHES= ${FILESDIR}/extra-patch-unrestrict-enterprise-functions
+UNLOCK_PATCHFILES= d1456861.patch:-p1
PORTDOCS= DISCLAIMER.md WARNING.TXT
CONFLICTS_INSTALL= softether-4.[0-9]* softether-devel-4.[0-9]*
SE_DBDIR?= /var/db/${PORTNAME}
SE_LOGDIR?= /var/log/${PORTNAME}
-PLIST_SUB= SE_DBDIR="${SE_DBDIR}" SE_LOGDIR="${SE_LOGDIR}"
-SUB_LIST= SE_DBDIR="${SE_DBDIR}" SE_LOGDIR="${SE_LOGDIR}"
+SE_PIDDIR?= /var/run/${PORTNAME}
+PLIST_SUB= SE_DBDIR="${SE_DBDIR}" SE_LOGDIR="${SE_LOGDIR}" SE_PIDDIR="${SE_PIDDIR}"
+SUB_LIST= SE_DBDIR="${SE_DBDIR}" SE_LOGDIR="${SE_LOGDIR}" SE_PIDDIR="${SE_PIDDIR}"
SUB_FILES= pkg-message
.include <bsd.port.pre.mk>
@@ -62,51 +66,13 @@ post-patch:
# SoftEther scatters logs, config files and PID files in PREFIX/libexec
# directory. To write them in the right place, replace it.
${REINPLACE_CMD} \
- -e "s|@vpn_server_template|${SE_DBDIR}/vpn_server_template|" \
- -e "s|@vpn_server|${SE_DBDIR}/vpn_server|" \
- -e "s|@vpn_bridge|${SE_DBDIR}/vpn_bridge|" \
- -e "s|@vpn_gate_svc|${SE_DBDIR}/vpn_gate_svc|" \
- -e "s|@vpn_gate_relay|${SE_DBDIR}/vpn_gate_relay|" \
- ${WRKSRC}/src/Cedar/Server.c
-
- ${REINPLACE_CMD} \
- -e "s|@adminip|${SE_DBDIR}/adminip|" \
- -e "s|@etherlogger|${SE_DBDIR}/etherlogger|" \
- -e "s|@vpn_client|${SE_DBDIR}/vpn_client|" \
- -e "s|@vpn_router|${SE_DBDIR}/vpn_router|" \
- -e "s|@custom|${SE_DBDIR}/custom|" \
- -e "s|@backup|${SE_DBDIR}/backup|" \
- -e "s|@save_binary|${SE_DBDIR}/save_binary|" \
- -e "s|@lang|${SE_DBDIR}/lang|" \
- -e "s|@azureserver|${SE_DBDIR}/azureserver|" \
- -e "s|@server_log|${SE_LOGDIR}/server|" \
- -e "s|@security_log|${SE_LOGDIR}/security|" \
- -e "s|@packet_log|${SE_LOGDIR}/packet|" \
- -e "s|@secure_nat_log|${SE_LOGDIR}/secure_nat|" \
- -e "s|@client_log|${SE_LOGDIR}/client|" \
- -e "s|@tiny_log|${SE_LOGDIR}/tiny|" \
- -e "s|@carrier_log|${SE_LOGDIR}/carrier|" \
- -e "s|@etherlogger_log|${SE_LOGDIR}/etherlogger|" \
- ${WRKSRC}/src/Cedar/Cedar.h \
- ${WRKSRC}/src/Cedar/Client.h \
- ${WRKSRC}/src/Cedar/Nat.h \
- ${WRKSRC}/src/Cedar/Server.c \
- ${WRKSRC}/src/Mayaqua/Cfg.c \
- ${WRKSRC}/src/Mayaqua/Cfg.h \
- ${WRKSRC}/src/Mayaqua/Table.h
-
- ${REINPLACE_CMD} \
- -e "s|abort_error_log\.txt|${SE_LOGDIR}/abort_error_log.txt|" \
- ${WRKSRC}/src/Mayaqua/Kernel.c
-
- ${REINPLACE_CMD} \
-e "s|%%SE_DBDIR%%|${SE_DBDIR}|g" \
- ${WRKSRC}/src/Cedar/Protocol.c \
- ${WRKSRC}/src/Mayaqua/Unix.c \
- ${WRKSRC}/src/Mayaqua/Network.c
+ -e "s|%%SE_LOGDIR%%|${SE_LOGDIR}|g" \
+ -e "s|%%SE_PIDDIR%%|${SE_PIDDIR}|g" \
+ ${WRKSRC}/src/Mayaqua/FileIO.c
post-install:
- @${MKDIR} ${STAGEDIR}${SE_LOGDIR} ${STAGEDIR}${SE_DBDIR}
+ @${MKDIR} ${STAGEDIR}${SE_LOGDIR} ${STAGEDIR}${SE_DBDIR} ${STAGEDIR}${SE_PIDDIR}
post-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
diff --git a/security/softether5/distinfo b/security/softether5/distinfo
index 8b62fcadf42d..05cffc0663c4 100644
--- a/security/softether5/distinfo
+++ b/security/softether5/distinfo
@@ -1,3 +1,13 @@
-TIMESTAMP = 1562804347
-SHA256 (SoftEtherVPN-SoftEtherVPN-5.01.9671_GH0.tar.gz) = 867f63327e1007a1c448e072d7597d25bb06e9333199bf57bd2e442ef79bbce8
-SIZE (SoftEtherVPN-SoftEtherVPN-5.01.9671_GH0.tar.gz) = 66960472
+TIMESTAMP = 1568706136
+SHA256 (softether/SoftEtherVPN-SoftEtherVPN-5.01.9671_GH0.tar.gz) = 867f63327e1007a1c448e072d7597d25bb06e9333199bf57bd2e442ef79bbce8
+SIZE (softether/SoftEtherVPN-SoftEtherVPN-5.01.9671_GH0.tar.gz) = 66960472
+SHA256 (softether/dc2f94f1.patch) = 2e74f3fba4d62b2d06d8ec07a79d177883ff331d36240ec6fb3ee8f5dfe82f83
+SIZE (softether/dc2f94f1.patch) = 1079
+SHA256 (softether/b2e3b1f5.patch) = 61604f1bcaf7127581df781694c7731d8975d9412b78284f3683f6418eb7798c
+SIZE (softether/b2e3b1f5.patch) = 12536
+SHA256 (softether/572a3531.patch) = 41a94a9718b64dfc6a872be86ce72e4a2054881fe49f998c8350e2e8b1b660a0
+SIZE (softether/572a3531.patch) = 4896
+SHA256 (softether/9929817.patch) = 28931acee597200976db431a9f2650308a1e50158b9c9301042addc9a623ceae
+SIZE (softether/9929817.patch) = 2044
+SHA256 (softether/d1456861.patch) = 020dc96da0a7f8f65045fe76f7ea70d3bce8b61d1d0477b2f113e9bff97b6c3d
+SIZE (softether/d1456861.patch) = 928
diff --git a/security/softether5/files/extra-patch-unrestrict-enterprise-functions b/security/softether5/files/extra-patch-unrestrict-enterprise-functions
deleted file mode 100644
index 780bbe10f8bd..000000000000
--- a/security/softether5/files/extra-patch-unrestrict-enterprise-functions
+++ /dev/null
@@ -1,27 +0,0 @@
---- src/Cedar/Server.c.orig 2019-02-04 04:43:50.000000000 +0900
-+++ src/Cedar/Server.c 2019-02-15 17:50:18.825945000 +0900
-@@ -10566,23 +10566,7 @@
- //
- bool SiIsEnterpriseFunctionsRestrictedOnOpenSource(CEDAR *c)
- {
-- char region[128];
-- bool ret = false;
-- // Validate arguments
-- if (c == NULL)
-- {
-- return false;
-- }
--
--
-- SiGetCurrentRegion(c, region, sizeof(region));
--
-- if (StrCmpi(region, "JP") == 0 || StrCmpi(region, "CN") == 0)
-- {
-- ret = true;
-- }
--
-- return ret;
-+ return false;
- }
-
- // Update the current region
diff --git a/security/softether5/files/patch-chain-certs-dir b/security/softether5/files/patch-chain-certs-dir
deleted file mode 100644
index 7a962c115e04..000000000000
--- a/security/softether5/files/patch-chain-certs-dir
+++ /dev/null
@@ -1,31 +0,0 @@
---- src/Cedar/Protocol.c.orig 2019-02-03 19:43:50 UTC
-+++ src/Cedar/Protocol.c
-@@ -58,7 +58,7 @@ bool TryGetRootCertChain(LIST *o, X *x, bool auto_save
- wchar_t exedir[MAX_SIZE];
-
- GetExeDirW(exedir, sizeof(exedir));
-- CombinePathW(dirname, sizeof(dirname), exedir, L"chain_certs");
-+ CombinePathW(dirname, sizeof(dirname), L"%%SE_DBDIR%%", L"chain_certs");
- MakeDirExW(dirname);
-
- if (auto_save)
-@@ -365,7 +365,7 @@ void AddAllChainCertsToCertList(LIST *o)
-
- GetExeDirW(exedir, sizeof(exedir));
-
-- CombinePathW(dirname, sizeof(dirname), exedir, L"chain_certs");
-+ CombinePathW(dirname, sizeof(dirname), L"%%SE_DBDIR%%", L"chain_certs");
-
- MakeDirExW(dirname);
-
---- src/Mayaqua/Network.c.orig 2019-02-03 19:43:50 UTC
-+++ src/Mayaqua/Network.c
-@@ -11520,7 +11520,7 @@ void AddChainSslCertOnDirectory(struct ssl_ctx_st *ctx
-
- GetExeDirW(exedir, sizeof(exedir));
-
-- CombinePathW(dirname, sizeof(dirname), exedir, L"chain_certs");
-+ CombinePathW(dirname, sizeof(dirname), L"%%SE_DBDIR%%", L"chain_certs");
-
- MakeDirExW(dirname);
-
diff --git a/security/softether5/files/patch-piddir b/security/softether5/files/patch-piddir
deleted file mode 100644
index c8375df27fcc..000000000000
--- a/security/softether5/files/patch-piddir
+++ /dev/null
@@ -1,29 +0,0 @@
---- src/Mayaqua/Unix.c.orig 2019-02-03 19:43:50 UTC
-+++ src/Mayaqua/Unix.c
-@@ -774,7 +774,7 @@ void *UnixNewSingleInstance(char *instance_name)
- GetExeDir(dir, sizeof(dir));
-
- // File name generation
-- Format(name, sizeof(name), "%s/.%s", dir, tmp);
-+ Format(name, sizeof(name), "%%SE_DBDIR%%/.%s", tmp);
-
- fd = open(name, O_WRONLY);
- if (fd == -1)
-@@ -2194,7 +2194,7 @@ void UnixGenPidFileName(char *name, UINT size)
- Md5(hash, exe_name, StrLen(exe_name));
- BinToStr(tmp1, sizeof(tmp1), hash, sizeof(hash));
-
-- Format(name, size, "%s/.pid_%s", dir, tmp1);
-+ Format(name, size, "%%SE_DBDIR%%/.pid_%s", tmp1);
- }
-
- // Delete the PID file
-@@ -2239,7 +2239,7 @@ void UnixGenCtlFileName(char *name, UINT size)
- Md5(hash, exe_name, StrLen(exe_name));
- BinToStr(tmp1, sizeof(tmp1), hash, sizeof(hash));
-
-- Format(name, size, "%s/.ctl_%s", dir, tmp1);
-+ Format(name, size, "%%SE_DBDIR%%/.ctl_%s", tmp1);
- }
-
- // Write the CTL file
diff --git a/security/softether5/files/patch-use-system-cpu_features b/security/softether5/files/patch-use-system-cpu_features
deleted file mode 100644
index 7f03d39f89c3..000000000000
--- a/security/softether5/files/patch-use-system-cpu_features
+++ /dev/null
@@ -1,18 +0,0 @@
---- src/Mayaqua/CMakeLists.txt.orig 2019-02-03 19:43:50 UTC
-+++ src/Mayaqua/CMakeLists.txt
-@@ -63,14 +63,10 @@ if(UNIX)
-
- find_library(LIB_RT rt)
-
-- target_link_libraries(mayaqua PRIVATE OpenSSL::SSL OpenSSL::Crypto Threads::Threads ZLIB::ZLIB)
-+ target_link_libraries(mayaqua PRIVATE OpenSSL::SSL OpenSSL::Crypto Threads::Threads ZLIB::ZLIB cpu_features)
-
- if (CMAKE_SYSTEM_PROCESSOR MATCHES "^(armv7l|aarch64|s390x)$" OR NOT HAVE_SYS_AUXV)
- add_definitions(-DSKIP_CPU_FEATURES)
-- else()
-- add_subdirectory(3rdparty/cpu_features)
-- set_property(TARGET cpu_features PROPERTY POSITION_INDEPENDENT_CODE ON)
-- target_link_libraries(mayaqua PRIVATE cpu_features)
- endif()
-
- if(LIB_RT)
diff --git a/security/softether5/files/pkg-message.in b/security/softether5/files/pkg-message.in
index 2daccabd9f27..69fc521a2999 100644
--- a/security/softether5/files/pkg-message.in
+++ b/security/softether5/files/pkg-message.in
@@ -20,6 +20,7 @@ When removing SoftEther VPN without the desire to reinstall, please
ensure to remove the following dirctories as well:
- %%SE_DBDIR%%
- %%SE_LOGDIR%%
+- %%SE_PIDDIR%%
EOM
}
]
diff --git a/security/softether5/pkg-plist b/security/softether5/pkg-plist
index 36b48fa5a1c2..fbe70911253e 100644
--- a/security/softether5/pkg-plist
+++ b/security/softether5/pkg-plist
@@ -18,3 +18,4 @@ libexec/softether/vpnserver/vpnserver
@dir libexec/softether/vpnserver
@dir %%SE_DBDIR%%
@dir %%SE_LOGDIR%%
+@dir %%SE_PIDDIR%%