Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 4 Oct 2025 12:01:43 GMT
From:      Muhammad Moinur Rahman <bofh@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: d22a95905eb0 - main - devel/athens: Refactor
Message-ID:  <202510041201.594C1hbk029079@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by bofh:

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

commit d22a95905eb0ebf11522e0f49fb400528972399c
Author:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
AuthorDate: 2025-10-04 10:54:57 +0000
Commit:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
CommitDate: 2025-10-04 11:59:22 +0000

    devel/athens: Refactor
    
    - Add UIS/GID for daemon process [1]
    - Add pidfile for daemon process [2]
    
    PR:             285274 [1] , 289865 [2]
    Reported by:    einar@isnic.is [1] , bob@vesterman.com [2]
---
 GIDs                         |  2 +-
 UIDs                         |  2 +-
 devel/athens/Makefile        | 11 +++++++++--
 devel/athens/files/athens.in | 19 +++++++++++++++----
 4 files changed, 26 insertions(+), 8 deletions(-)

diff --git a/GIDs b/GIDs
index baf5d560773a..8bec794866b6 100644
--- a/GIDs
+++ b/GIDs
@@ -316,7 +316,7 @@ beam:*:372:
 mautrix-whatsapp:*:373:
 traccar:*:374:
 unpackerr:*:375:
-# free: 376
+athens:*:376:
 hostd:*:377:
 walletd:*:378:
 renterd:*:379:
diff --git a/UIDs b/UIDs
index db734a200d8a..3ee9e352ce4f 100644
--- a/UIDs
+++ b/UIDs
@@ -322,7 +322,7 @@ beam:*:372:372::0:0:Erlang BEAM VM user:/nonexistent:/usr/sbin/nologin
 mautrix-whatsapp:*:373:373::0:0:Mautrix-Whatsapp Daemon:/nonexistent:/usr/sbin/nologin
 traccar:*:374:374::0:0:Traccar GPS Tracking Platform:/nonexistent:/usr/sbin/nologin
 unpackerr:*:375:375::0:0:Unpackerr Daemon:/nonexistent:/usr/sbin/nologin
-# free: 376
+athens:*:376:376::0:0:Athens Go module registry:/nonexistent:/sbin/nologin
 hostd:*:377:377::0:0:hostd Daemon:/nonexistent:/usr/sbin/nologin
 walletd:*:378:378::0:0:walletd Daemon:/nonexistent:/usr/sbin/nologin
 renterd:*:379:379::0:0:renterd Daemon:/nonexistent:/usr/sbin/nologin
diff --git a/devel/athens/Makefile b/devel/athens/Makefile
index fdedcce7ab90..15669abb7384 100644
--- a/devel/athens/Makefile
+++ b/devel/athens/Makefile
@@ -1,6 +1,7 @@
 PORTNAME=	athens
 DISTVERSIONPREFIX=	v
 DISTVERSION=	0.16.1
+PORTREVISION=	1
 CATEGORIES=	devel
 
 MAINTAINER=	bofh@FreeBSD.org
@@ -13,14 +14,20 @@ LICENSE_FILE=	${WRKSRC}/LICENSE
 USES=		go:1.23,modules
 USE_RC_SUBR=	${PORTNAME}
 
-BUILD_DATE=	2025-09-13-00:00:00-UTC
-
 GO_MODULE=	github.com/gomods/${PORTNAME}
 GO_TARGET=	./cmd/proxy
 GO_BUILDFLAGS=	-ldflags " \
 		-X github.com/gomods/${PORTNAME}/pkg/build.version=${DISTVERSION} \
 		-X github.com/gomods/${PORTNAME}/pkg/build.buildDate=${BUILD_DATE}"
 
+SUB_LIST=	ATHENS_USER=${USERS} \
+		ATHENS_GROUP=${GROUPS}
+
+USERS=		${PORTNAME}
+GROUPS=		${PORTNAME}
+
+BUILD_DATE=	2025-09-13-00:00:00-UTC
+
 do-install:
 	${INSTALL_PROGRAM} ${WRKDIR}/bin/proxy ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
 
diff --git a/devel/athens/files/athens.in b/devel/athens/files/athens.in
index 2c59b63c0f91..f9857d8fd2ef 100644
--- a/devel/athens/files/athens.in
+++ b/devel/athens/files/athens.in
@@ -1,7 +1,7 @@
 #!/bin/sh
 #
 # PROVIDE: athens
-# REQUIRE: networking
+# REQUIRE: LOGIN networking
 # KEYWORD: shutdown
 #
 # athens_enable (bool):
@@ -12,17 +12,28 @@
 #   Default value %%ETCDIR%%/athens.toml
 #   Path to the athens configuration file
 #
+# athens_user (string)
+#   This is the user that athens runs as
+#   Set to %%ATHENS_USER%% by default
+#
+# athens_group (string)
+#   This is the group that athens runs as
+#   Set to %%ATHENS_GROUP%% by default
 
 . /etc/rc.subr
 
+name=athens
+rcvar=athens_enable
+
 : ${athens_enable:="NO"}
 : ${athens_config:="%%ETCDIR%%/athens.toml"}
+: ${athens_user:=%%ATHENS_USER%%}
+: ${athens_group:=%%ATHENS_GROUP%%}
+: ${athens_pidfile:="/var/run/athens.pid"}
 
-name=athens
-rcvar=athens_enable
 athens_command="%%PREFIX%%/bin/athens -config_file ${athens_config}"
 command="/usr/sbin/daemon"
-command_args="-S ${athens_command}"
+command_args="-p ${athens_pidfile} -u ${athens_user} -S ${athens_command}"
 
 PATH="${PATH}:%%PREFIX%%/bin"
 


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202510041201.594C1hbk029079>