git: 8b88f99cc8e4 - main - security/headscale: Update to 0.23.0

From: Santhosh Raju <fox_at_FreeBSD.org>
Date: Sat, 12 Oct 2024 06:06:44 UTC
The branch main has been updated by fox:

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

commit 8b88f99cc8e4b8e43453ac138d2a4c06e13e6a45
Author:     Santhosh Raju <fox@FreeBSD.org>
AuthorDate: 2024-10-12 05:53:11 +0000
Commit:     Santhosh Raju <fox@FreeBSD.org>
CommitDate: 2024-10-12 06:05:37 +0000

    security/headscale: Update to 0.23.0
    
    - Fix the service to pick up the configuration correctly
    
    Full change log: https://github.com/juanfont/headscale/compare/v0.16.4...v0.23.0
    
    PR:             281940
    Approved by:    Michael Muenz <m.muenz@gmail.com> (maintainer)
---
 security/headscale/Makefile           | 11 ++++-------
 security/headscale/distinfo           | 10 +++++-----
 security/headscale/files/headscale.in |  3 ++-
 3 files changed, 11 insertions(+), 13 deletions(-)

diff --git a/security/headscale/Makefile b/security/headscale/Makefile
index 87539f29b164..cea79ab57e21 100644
--- a/security/headscale/Makefile
+++ b/security/headscale/Makefile
@@ -1,7 +1,6 @@
 PORTNAME=	headscale
-PORTVERSION=	0.16.4
+PORTVERSION=	0.23.0
 DISTVERSIONPREFIX=	v
-PORTREVISION=	18
 CATEGORIES=	security net-vpn
 
 MAINTAINER=	m.muenz@gmail.com
@@ -31,13 +30,11 @@ PLIST_FILES=	"@sample ${ETCDIR}/config.yaml.sample" \
 
 post-patch:
 	@${REINPLACE_CMD} -e 's|/etc/headscale|${PREFIX}/etc/${PORTNAME}|g' \
-		${WRKSRC}/cmd/headscale/cli/utils.go
+		${WRKSRC}/cmd/headscale/cli/dump_config.go \
+		${WRKSRC}/cmd/headscale/cli/root.go \
+		${WRKSRC}/integration/hsic/hsic.go
 	@${REINPLACE_CMD} -e 's|/var/lib/headscale/db.sqlite|/var/db/${PORTNAME}/db.sqlite|g' \
 		${WRKSRC}/config-example.yaml
-	@${REINPLACE_CMD} -e 's|/var/lib/headscale/cache|/var/cache/${PORTNAME}|g' \
-		${WRKSRC}/config-example.yaml
-	@${REINPLACE_CMD} -e 's|/var/lib/headscale/private.key|${PREFIX}/etc/${PORTNAME}/private.key|g' \
-		${WRKSRC}/config-example.yaml
 
 post-install:
 	${MKDIR} ${STAGEDIR}${PREFIX}/etc/${PORTNAME}
diff --git a/security/headscale/distinfo b/security/headscale/distinfo
index 47cabd4a61fb..020ecc7e80c8 100644
--- a/security/headscale/distinfo
+++ b/security/headscale/distinfo
@@ -1,5 +1,5 @@
-TIMESTAMP = 1661076406
-SHA256 (go/security_headscale/headscale-v0.16.4/v0.16.4.mod) = 5a1e6a81c94588289a91ad0ed5afab20d2c472a7acaedbf5315bbfc267865bf9
-SIZE (go/security_headscale/headscale-v0.16.4/v0.16.4.mod) = 6809
-SHA256 (go/security_headscale/headscale-v0.16.4/v0.16.4.zip) = 14f0a916f5477479b73501da559c84874d5ef9bd05ad029ab16049a298aa9c63
-SIZE (go/security_headscale/headscale-v0.16.4/v0.16.4.zip) = 464386
+TIMESTAMP = 1728236395
+SHA256 (go/security_headscale/headscale-v0.23.0/v0.23.0.mod) = 0e0bbbf1abdde4221c3303d4d5e8b607fc38bf1ab4cea51a32a53a1c05775cc2
+SIZE (go/security_headscale/headscale-v0.23.0/v0.23.0.mod) = 10793
+SHA256 (go/security_headscale/headscale-v0.23.0/v0.23.0.zip) = 3751e62f64c327175bf995ac0b2c404c10adf8dd60c13e94199cb504db750c52
+SIZE (go/security_headscale/headscale-v0.23.0/v0.23.0.zip) = 727988
diff --git a/security/headscale/files/headscale.in b/security/headscale/files/headscale.in
index a3f4ada0b6f4..3d94c3bbf614 100644
--- a/security/headscale/files/headscale.in
+++ b/security/headscale/files/headscale.in
@@ -13,6 +13,7 @@ rcvar=headscale_enable
 load_rc_config $name
 
 : ${headscale_enable:="NO"}
+: ${headscale_config_file:="%%PREFIX%%/etc/${name}/config.yaml"}
 : ${headscale_syslog_output_enable:="NO"}
 : ${headscale_syslog_output_priority:="info"}
 : ${headscale_syslog_output_facility:="daemon"}
@@ -35,7 +36,7 @@ procname="%%PREFIX%%/bin/${name}"
 start_cmd="${name}_start"
 
 headscale_start() {
-	/usr/sbin/daemon -f ${headscale_syslog_output_flags} -p ${pidfile} ${procname} serve
+	/usr/sbin/daemon -f ${headscale_syslog_output_flags} -p ${pidfile} ${procname} -c ${headscale_config_file} serve
 }
 
 run_rc_command "$1"