Index: head/security/softether5/Makefile =================================================================== --- head/security/softether5/Makefile (revision 512197) +++ head/security/softether5/Makefile (revision 512198) @@ -1,117 +1,83 @@ # $FreeBSD$ 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) 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 OPTIONS_DEFINE= DOCS UNLOCK # Use of some functions in Japan and China is restricted. # This option Unlocks regional lockout following functions: # - RADIUS / NT Domain user authentication function # - RSA certificate user authentication function # - Deep-inspect packet logging function # - 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 # devel/cpu_features not available on these archs, see devel/cpu_features/Makefile .if (${ARCH} == aarch64 || ${ARCH} == armv6 || ${ARCH} == armv7 || ${ARCH} == mips || ${ARCH} == mips64) # skip cpu_features when devel/cpu_features is not available CFLAGS+= -DSKIP_CPU_FEATURES .else BUILD_DEPENDS+= ${LOCALBASE}/include/cpu_features_macros.h:devel/cpu_features .endif pre-configure: # not a GNU configure @cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ./configure 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} .for doc in ${PORTDOCS} ${FIND} ${WRKSRC} -name ${doc} -exec ${INSTALL_DATA} {} ${STAGEDIR}${DOCSDIR} \; .endfor .include Index: head/security/softether5/distinfo =================================================================== --- head/security/softether5/distinfo (revision 512197) +++ head/security/softether5/distinfo (revision 512198) @@ -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 Index: head/security/softether5/files/patch-piddir =================================================================== --- head/security/softether5/files/patch-piddir (revision 512197) +++ head/security/softether5/files/patch-piddir (nonexistent) @@ -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 Property changes on: head/security/softether5/files/patch-piddir ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/security/softether5/files/patch-use-system-cpu_features =================================================================== --- head/security/softether5/files/patch-use-system-cpu_features (revision 512197) +++ head/security/softether5/files/patch-use-system-cpu_features (nonexistent) @@ -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) Property changes on: head/security/softether5/files/patch-use-system-cpu_features ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/security/softether5/files/extra-patch-unrestrict-enterprise-functions =================================================================== --- head/security/softether5/files/extra-patch-unrestrict-enterprise-functions (revision 512197) +++ head/security/softether5/files/extra-patch-unrestrict-enterprise-functions (nonexistent) @@ -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 Property changes on: head/security/softether5/files/extra-patch-unrestrict-enterprise-functions ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/security/softether5/files/patch-chain-certs-dir =================================================================== --- head/security/softether5/files/patch-chain-certs-dir (revision 512197) +++ head/security/softether5/files/patch-chain-certs-dir (nonexistent) @@ -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); - Property changes on: head/security/softether5/files/patch-chain-certs-dir ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/security/softether5/files/pkg-message.in =================================================================== --- head/security/softether5/files/pkg-message.in (revision 512197) +++ head/security/softether5/files/pkg-message.in (revision 512198) @@ -1,25 +1,26 @@ [ { type: install message: <