aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesús Daniel Colmenares Oviedo <dtxdf@FreeBSD.org>2025-11-14 23:56:44 +0000
committerJesús Daniel Colmenares Oviedo <dtxdf@FreeBSD.org>2025-11-15 00:00:11 +0000
commit4bb2e36e912efcd926a6b0812bec87f0fb74020d (patch)
treebf43a1d613d6590c713128dfb413320a368f7f2c
parent72bee06d802fceb9aa39899606e653b2eb7bbe3a (diff)
sysutils/gol: New port: All-in-one log viewer in browser
gol is a fast and lightweight log viewer that allows you to view logs in real time from different sources (files, Docker logs, remote via SSH, piped inputs, etc.) from a web browser.
-rw-r--r--sysutils/Makefile1
-rw-r--r--sysutils/gol/Makefile32
-rw-r--r--sysutils/gol/distinfo5
-rw-r--r--sysutils/gol/files/gol.in51
-rw-r--r--sysutils/gol/pkg-descr3
5 files changed, 92 insertions, 0 deletions
diff --git a/sysutils/Makefile b/sysutils/Makefile
index de14cdf16475..2bbe763eaefe 100644
--- a/sysutils/Makefile
+++ b/sysutils/Makefile
@@ -476,6 +476,7 @@
SUBDIR += goaccess
SUBDIR += goawk
SUBDIR += gobi_loader
+ SUBDIR += gol
SUBDIR += gomi
SUBDIR += gomplate
SUBDIR += gonzo
diff --git a/sysutils/gol/Makefile b/sysutils/gol/Makefile
new file mode 100644
index 000000000000..21ff7660a558
--- /dev/null
+++ b/sysutils/gol/Makefile
@@ -0,0 +1,32 @@
+PORTNAME= gol
+DISTVERSIONPREFIX= v
+DISTVERSION= 1.0.35
+CATEGORIES= sysutils
+MASTER_SITES= LOCAL/dtxdf/${PORTNAME}/
+DISTFILES= ${PORTNAME}-${DISTVERSIONPREFIX}${DISTVERSION}.vendor${EXTRACT_SUFX}
+
+MAINTAINER= dtxdf@FreeBSD.org
+COMMENT= All-in-one log viewer in browser
+WWW= https://github.com/kevincobain2000/${PORTNAME}
+
+LICENSE= MIT
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+USES= go:modules
+USE_GITHUB= yes
+GH_ACCOUNT= kevincobain2000
+USE_RC_SUBR= ${PORTNAME}
+
+GO_TARGET= ./frontend/main.go:${PORTNAME}
+
+SUB_LIST= USER=${GOL_USER}
+
+PLIST_FILES= bin/${PORTNAME}
+
+GOL_USER= www
+
+post-extract:
+ @${MKDIR} ${WRKSRC}/vendor
+ @cd ${WRKDIR}/${PORTNAME}-vendor && ${COPYTREE_SHARE} . ${WRKSRC}/vendor
+
+.include <bsd.port.mk>
diff --git a/sysutils/gol/distinfo b/sysutils/gol/distinfo
new file mode 100644
index 000000000000..c3249c29968d
--- /dev/null
+++ b/sysutils/gol/distinfo
@@ -0,0 +1,5 @@
+TIMESTAMP = 1763156565
+SHA256 (gol-v1.0.35.vendor.tar.gz) = a72e691485c92e1775297ecbb47c29337b275c4a3d7a5b204608c9a28dd4982b
+SIZE (gol-v1.0.35.vendor.tar.gz) = 4082558
+SHA256 (kevincobain2000-gol-v1.0.35_GH0.tar.gz) = 7290bb10db4526274dd8d6fe43a9ae88eda26dff6feaf7148c5dc82935bdedca
+SIZE (kevincobain2000-gol-v1.0.35_GH0.tar.gz) = 157006
diff --git a/sysutils/gol/files/gol.in b/sysutils/gol/files/gol.in
new file mode 100644
index 000000000000..645fc83775d8
--- /dev/null
+++ b/sysutils/gol/files/gol.in
@@ -0,0 +1,51 @@
+#!/bin/sh
+
+# PROVIDE: gol
+# REQUIRE: LOGIN
+# KEYWORD: shutdown
+#
+# Configuration settings for gol in /etc/rc.conf
+#
+# gol_enable (bool): Enable gol. (default=NO)
+# gol_runas (str): User to run gol as. (default=%%USER%%)
+# gol_host (str): Host to serve. (default=127.0.0.1)
+# gol_port (int): Port to serve. (default=3003)
+# gol_every (int): Check for file paths every n seconds. (default=10)
+# gol_log (str): Log output. (default=/var/log/gol.log)
+# gol_extra_args (str): Additional parameters. (default=-f=${gol_log})
+# gol_args (str): Main parameters. (default=-every=${gol_every} -host=${gol_host} -port=${gol_port} ${gol_extra_args})
+#
+
+. /etc/rc.subr
+
+name="gol"
+desc="All-in-one log viewer in browser"
+rcvar="${name}_enable"
+
+load_rc_config $name
+
+: ${gol_enable:="NO"}
+: ${gol_runas:="%%USER%%"}
+: ${gol_log="/var/log/gol.log"}
+: ${gol_extra_args="-f=${gol_log}"}
+: ${gol_every:="10"}
+: ${gol_host:="127.0.0.1"}
+: ${gol_port:="3003"}
+: ${gol_args="-every=${gol_every} -host=${gol_host} -port=${gol_port} ${gol_extra_args}"}
+
+command="/usr/sbin/daemon"
+pidfile="/var/run/${name}.pid"
+procname="/usr/local/bin/${name}"
+command_args="-c -u ${gol_runas} -o ${gol_log} -p ${pidfile} -t \"${desc}\" ${procname} -open=false ${gol_args}"
+start_precmd="${name}_prestart"
+
+gol_prestart()
+{
+ if [ ! -f "${gol_log}" ]; then
+ install -m 644 /dev/null "${gol_log}"
+ fi
+
+ chmod 644 "${gol_log}"
+}
+
+run_rc_command "$1"
diff --git a/sysutils/gol/pkg-descr b/sysutils/gol/pkg-descr
new file mode 100644
index 000000000000..858638fb0c5a
--- /dev/null
+++ b/sysutils/gol/pkg-descr
@@ -0,0 +1,3 @@
+gol is a fast and lightweight log viewer that allows you to view
+logs in real time from different sources (files, Docker logs, remote
+via SSH, piped inputs, etc.) from a web browser.