git: a98b1edcc998 - main - security/globalprotect-openconnect: Update to 1.4.4

From: Jason W. Bacon <jwb_at_FreeBSD.org>
Date: Thu, 26 May 2022 12:56:17 UTC
The branch main has been updated by jwb:

URL: https://cgit.FreeBSD.org/ports/commit/?id=a98b1edcc9983826cb5630d80b9706ec2330069c

commit a98b1edcc9983826cb5630d80b9706ec2330069c
Author:     Jason W. Bacon <jwb@FreeBSD.org>
AuthorDate: 2022-05-26 12:53:26 +0000
Commit:     Jason W. Bacon <jwb@FreeBSD.org>
CommitDate: 2022-05-26 12:53:26 +0000

    security/globalprotect-openconnect: Update to 1.4.4
    
    New configuration interface
    A few bug and security fixes
    Add deinstall hook to terminate running processes that may be
    incompatible with the new version
    
    changes: https://github.com/yuezk/GlobalProtect-openconnect/releases
    
    Reported by:    portscout
---
 security/globalprotect-openconnect/Makefile      | 14 +++++++++++++-
 security/globalprotect-openconnect/distinfo      |  6 +++---
 security/globalprotect-openconnect/pkg-deinstall |  8 ++++++++
 security/globalprotect-openconnect/pkg-plist     |  2 +-
 4 files changed, 25 insertions(+), 5 deletions(-)

diff --git a/security/globalprotect-openconnect/Makefile b/security/globalprotect-openconnect/Makefile
index 9a07d1b3e6f6..f67d7129854a 100644
--- a/security/globalprotect-openconnect/Makefile
+++ b/security/globalprotect-openconnect/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	globalprotect-openconnect
 DISTVERSIONPREFIX=	v
-DISTVERSION=	1.4.1
+DISTVERSION=	1.4.4
 CATEGORIES=	security
 
 MAINTAINER=	jwb@FreeBSD.org
@@ -20,4 +20,16 @@ GH_PROJECT=	GlobalProtect-openconnect
 GH_TUPLE+=	itay-grudev:SingleApplication:v3.3.0:sa/3rdparty/SingleApplication
 GH_TUPLE+=	SergiusTheBest:plog:1.1.6:plog/3rdparty/plog
 
+ETCDIR=		${PREFIX}/etc/gpservice
+
+pre-configure:
+	${REINPLACE_CMD} -e 's|/etc/gpservice|${PREFIX}&|g' \
+		${WRKSRC}/GPClient/settingsdialog.ui \
+		${WRKSRC}/GPService/CMakeLists.txt \
+		${WRKSRC}/GPService/gpservice.cpp
+
+post-stage:
+	${MV} ${STAGEDIR}${ETCDIR}/gp.conf ${STAGEDIR}${ETCDIR}/gp.conf.sample
+	${RM} -r ${STAGEDIR}${PREFIX}/lib/systemd
+
 .include <bsd.port.mk>
diff --git a/security/globalprotect-openconnect/distinfo b/security/globalprotect-openconnect/distinfo
index 7299f4e6737e..34297942dca6 100644
--- a/security/globalprotect-openconnect/distinfo
+++ b/security/globalprotect-openconnect/distinfo
@@ -1,6 +1,6 @@
-TIMESTAMP = 1646656332
-SHA256 (yuezk-GlobalProtect-openconnect-v1.4.1_GH0.tar.gz) = d0ecc53d5671f46026b0f0749f929debe8c0d8c559b26d51e5f069f61a6ba5f0
-SIZE (yuezk-GlobalProtect-openconnect-v1.4.1_GH0.tar.gz) = 118400
+TIMESTAMP = 1653518517
+SHA256 (yuezk-GlobalProtect-openconnect-v1.4.4_GH0.tar.gz) = ab8e0ec23727f56d29f5c931dbb138d4bc4b063276681514d3d9fa80ffdc2762
+SIZE (yuezk-GlobalProtect-openconnect-v1.4.4_GH0.tar.gz) = 127070
 SHA256 (itay-grudev-SingleApplication-v3.3.0_GH0.tar.gz) = b5a789e7e4fda5239b09249a74a91c9ffea8581dcb59bc693e3db8af96d6f1bf
 SIZE (itay-grudev-SingleApplication-v3.3.0_GH0.tar.gz) = 21148
 SHA256 (SergiusTheBest-plog-1.1.6_GH0.tar.gz) = 99fbb43772f92664ff086166fdff75cc437e9e50e74efec2fba80765fa6b67ae
diff --git a/security/globalprotect-openconnect/pkg-deinstall b/security/globalprotect-openconnect/pkg-deinstall
new file mode 100644
index 000000000000..151d67d8d66b
--- /dev/null
+++ b/security/globalprotect-openconnect/pkg-deinstall
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+# gpclient will hang in some cases if the running gpservice is outdated
+if [ x"$2" = x"DEINSTALL" ]; then
+    pkill gpservice gpclient
+fi
+
+exit 0
diff --git a/security/globalprotect-openconnect/pkg-plist b/security/globalprotect-openconnect/pkg-plist
index dc1631ec6ae9..fd316461e921 100644
--- a/security/globalprotect-openconnect/pkg-plist
+++ b/security/globalprotect-openconnect/pkg-plist
@@ -1,6 +1,6 @@
 bin/gpclient
 bin/gpservice
-lib/systemd/system/gpservice.service
+@sample %%ETCDIR%%/gp.conf.sample
 share/applications/com.yuezk.qt.gpclient.desktop
 share/dbus-1/system-services/com.yuezk.qt.GPService.service
 share/dbus-1/system.d/com.yuezk.qt.GPService.conf