From nobody Sun Jan 5 06:55:29 2025 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YQp3k0PC9z5kSlp; Sun, 05 Jan 2025 06:55:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YQp3j6blYz4GKc; Sun, 5 Jan 2025 06:55:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1736060129; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kWoJNZvSmg/EzlReKVTpwTqfi40PMjSnri7/md8wSF4=; b=Tb6LCMYLPoMpWzlQTcJequQp4E4CMvtBxJ6w+8BxGxRCNl505Rcq52AtaS3EWaEd2bGNm8 vrpaqK4UEkw+it55JVCtlO34JmlKk28TDi9zyu4hkk8sl4iWPVYX3uL2fIjPLp8x2q797K e5/wQY5rlGME+YB5ZjeOiKBGU89x91qe0M7c+YHoy5Q+Pf6a9M6AB060aijhWGvojqkA8O DYDegXwFOXfUYssbApFY1BuQCQ9CNUOP3kf2ZQ/uM7mOxjL8cu0F44Oa9Rx5O6HhTsvQXV 79H9ZYKbt3mH2I0Xu+wCBTgv9DEOORXzFAweIWJZtFMyDyBe3AmPY2Z5JGtVIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1736060129; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kWoJNZvSmg/EzlReKVTpwTqfi40PMjSnri7/md8wSF4=; b=mOd0BGueEgUuXys7K6yFCeYTt44LlOtBaV3Uj5lepj/JWImyZ7j9UBn9R/HvPG5qEOWiqi HYjK8uWmnXmZxFZM9UqQc9ogMsmDc7tMKGKtngQdsKMSg/BiQuM70g+Gfo3EEZnailyTO7 8w5wnwJBE6fKc7cU4+yhsYmx2QFAYiAPe7SNRZ4/I4rjUqNfkYj7gnQRh5R0GFFtZNUN07 W6x6JUX8VRXpcT3or0R7AVxD0UfZ3Gdv9aCzKa4grMJ/x8mRf0VXzqJmvbS5NRn7u9whTc WPSJ4yvkjQX4121AAEOYofRHP2G8bCG65WL9pffYaIEsCAKuVcx3c1JEgS3Rlg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1736060129; a=rsa-sha256; cv=none; b=U3PXqAa/bQZtepp8RLHE69s/QX7D05DeEhHQqCyWdv4H7E2X8tR2Kk1K8JVl35f4h00lSJ lKEF4O7jafaRF0m2KTfYkBrf/+HMw42j2CYE8DWQMS4qXoRmQjb0Pzt8Pb9g5kBCv7LI6A j3pI5fg97h1XdhRG2GSnYh/J5/wv9Hg8fr9BVzcPME//UfnPJDcQqP5LsVhCDwjhRWovKx TcSEQ1mCB/1VVTt/dajO7PQNgCbcU12MDOFXW/tH0FcQdhr1nAIFCrRzF8gqMQ7xiKWJKz +IT2g2f1KqHg0GGVsnEAJ4Ge3tGZKR1JOt1UMaocvfwE1oa4sUTi9P9A8/biYQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YQp3j68HhzBnT; Sun, 05 Jan 2025 06:55:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5056tTTW060058; Sun, 5 Jan 2025 06:55:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5056tTJi060055; Sun, 5 Jan 2025 06:55:29 GMT (envelope-from git) Date: Sun, 5 Jan 2025 06:55:29 GMT Message-Id: <202501050655.5056tTJi060055@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: "Vanilla I. Shu" Subject: git: 6797c5bb6641 - main - sysutils/tempo: add new port. List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-all@freebsd.org Sender: owner-dev-commits-ports-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: vanilla X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6797c5bb6641a498e7245172189c307a4c7c543b Auto-Submitted: auto-generated The branch main has been updated by vanilla: URL: https://cgit.FreeBSD.org/ports/commit/?id=6797c5bb6641a498e7245172189c307a4c7c543b commit 6797c5bb6641a498e7245172189c307a4c7c543b Author: Vanilla I. Shu AuthorDate: 2025-01-05 06:54:19 +0000 Commit: Vanilla I. Shu CommitDate: 2025-01-05 06:55:03 +0000 sysutils/tempo: add new port. PR: 283803 Reported by: Daniel Morante --- GIDs | 2 +- UIDs | 2 +- sysutils/Makefile | 1 + sysutils/tempo/Makefile | 53 ++++++++++++++++ sysutils/tempo/distinfo | 5 ++ .../patch-example_docker-compose_shared_tempo.yaml | 30 +++++++++ sysutils/tempo/files/tempo.in | 71 ++++++++++++++++++++++ sysutils/tempo/pkg-descr | 3 + sysutils/tempo/pkg-plist | 12 ++++ 9 files changed, 177 insertions(+), 2 deletions(-) diff --git a/GIDs b/GIDs index 5256462db79e..81a5275cc3c2 100644 --- a/GIDs +++ b/GIDs @@ -289,7 +289,7 @@ _metronome:*:345: ngircd:*:346: eturnal:*:347: davfs2:*:348: -# free: 349 +tempo:*:349: _sabnzbd:*:350: sonarr:*:351: radarr:*:352: diff --git a/UIDs b/UIDs index 7b7b343fc60f..f79658aa4f96 100644 --- a/UIDs +++ b/UIDs @@ -295,7 +295,7 @@ _metronome:*:345:345::0:0:Metronome Daemon:/nonexistent:/usr/sbin/nologin ngircd:*:346:346::0:0:ngIRCd Daemon:/var/empty:/usr/sbin/nologin eturnal:*:347:347::0:0:eturnal User:/var/spool/eturnal:/bin/sh davfs2:*:348:348::0:0:Davfs2 Daemon:/nonexistent:/usr/sbin/nologin -# free: 349 +tempo:*:349:349::0:0:Tempo Daemon:/nonexistent:/usr/sbin/nologin _sabnzbd:*:350:350::0:0:sabnzb Daemon:/nonexistent:/usr/sbin/nologin sonarr:*:351:351::0:0:Sonarr PVR:/nonexistent:/usr/sbin/nologin radarr:*:352:352::0:0:Radarr Daemon:/nonexistent:/usr/sbin/nologin diff --git a/sysutils/Makefile b/sysutils/Makefile index b89b447a4946..305e8eb4e844 100644 --- a/sysutils/Makefile +++ b/sysutils/Makefile @@ -1363,6 +1363,7 @@ SUBDIR += tcplist SUBDIR += tdir SUBDIR += tealdeer + SUBDIR += tempo SUBDIR += tenshi SUBDIR += tere SUBDIR += terraform diff --git a/sysutils/tempo/Makefile b/sysutils/tempo/Makefile new file mode 100644 index 000000000000..1ff162aa61b0 --- /dev/null +++ b/sysutils/tempo/Makefile @@ -0,0 +1,53 @@ +PORTNAME= tempo +DISTVERSIONPREFIX= v +DISTVERSION= 2.6.1 +CATEGORIES= sysutils +MASTER_SITES+= https://raw.githubusercontent.com/${GH_ACCOUNT}/${PORTNAME}/${DISTVERSIONFULL}/ +PKGNAMEPREFIX= grafana- +DISTFILES= go.mod + +MAINTAINER= daniel@morante.net +COMMENT= High volume, minimal dependency distributed tracing backend +WWW= https://github.com/grafana/tempo + +LICENSE= AGPLv3 +LICENSE_FILE= ${WRKSRC}/LICENSE + +USES= go:modules +USE_GITHUB= yes +GH_ACCOUNT= grafana +GH_PROJECT= tempo + +USE_RC_SUBR= tempo + +GO_MODULE= github.com/${GH_ACCOUNT}/${GH_PROJECT} +GO_TARGET= ./cmd/tempo ./cmd/tempo-query ./cmd/tempo-cli ./cmd/tempo-vulture +GO_BUILDFLAGS= -v -ldflags "${LD_FLAG_STRING}" + +LD_FLAG_STRING= -s \ + ${LD_FLAG_X_PREFIX}.Version=${PORTVERSION} \ + ${LD_FLAG_X_PREFIX}.Revision=${PORTREVISION} \ + ${LD_FLAG_X_PREFIX}.Branch=HEAD \ + ${LD_FLAG_X_PREFIX}.BuildUser=${BUILD_USER} \ + ${LD_FLAG_X_PREFIX}.BuildDate=$$(date -u +"%Y-%m-%dT%H:%M:%SZ") +LD_FLAG_X_PREFIX= -X github.com/grafana/tempo/pkg/util/build +BUILD_USER?= ${USER} + +TEMPO_USER?= tempo +TEMPO_GROUP?= tempo +TEMPO_DATADIR?= /var/db/${PORTNAME} + +SUB_LIST= TEMPO_USER=${TEMPO_USER} \ + TEMPO_GROUP=${TEMPO_GROUP} \ + TEMPO_DATADIR=${TEMPO_DATADIR} \ + +USERS= ${TEMPO_USER} +GROUPS= ${TEMPO_GROUP} + +PLIST_SUB= ${SUB_LIST} + +post-install: + @${CP} ${WRKSRC}/example/docker-compose/shared/tempo.yaml ${STAGEDIR}${PREFIX}/etc/tempo.yaml.sample + @${MKDIR} ${STAGEDIR}${TEMPO_DATADIR} + +.include diff --git a/sysutils/tempo/distinfo b/sysutils/tempo/distinfo new file mode 100644 index 000000000000..51d3059d3285 --- /dev/null +++ b/sysutils/tempo/distinfo @@ -0,0 +1,5 @@ +TIMESTAMP = 1735843421 +SHA256 (go/sysutils_tempo/grafana-tempo-v2.6.1_GH0/go.mod) = 16764341886c2531d9cbba50cbbc30c80676a2010c494cfed439b1f80c89b61e +SIZE (go/sysutils_tempo/grafana-tempo-v2.6.1_GH0/go.mod) = 17886 +SHA256 (go/sysutils_tempo/grafana-tempo-v2.6.1_GH0/grafana-tempo-v2.6.1_GH0.tar.gz) = ff53e3eb7ed70e378b06a70295677d4f05d40554b33b8bd91d5c351c18d3b55f +SIZE (go/sysutils_tempo/grafana-tempo-v2.6.1_GH0/grafana-tempo-v2.6.1_GH0.tar.gz) = 36372210 diff --git a/sysutils/tempo/files/patch-example_docker-compose_shared_tempo.yaml b/sysutils/tempo/files/patch-example_docker-compose_shared_tempo.yaml new file mode 100644 index 000000000000..599c59d5f87a --- /dev/null +++ b/sysutils/tempo/files/patch-example_docker-compose_shared_tempo.yaml @@ -0,0 +1,30 @@ +--- example/docker-compose/shared/tempo.yaml.orig 2024-10-22 18:23:02 UTC ++++ example/docker-compose/shared/tempo.yaml +@@ -36,22 +36,22 @@ metrics_generator: + registry: + external_labels: + source: tempo +- cluster: docker-compose ++ cluster: freebsd + storage: +- path: /var/tempo/generator/wal ++ path: /var/db/tempo/generator/wal + remote_write: + - url: http://prometheus:9090/api/v1/write + send_exemplars: true + traces_storage: +- path: /var/tempo/generator/traces ++ path: /var/db/tempo/generator/traces + + storage: + trace: + backend: local # backend configuration to use + wal: +- path: /var/tempo/wal # where to store the wal locally ++ path: /var/db/tempo/wal # where to store the wal locally + local: +- path: /var/tempo/blocks ++ path: /var/db/tempo/blocks + + overrides: + defaults: diff --git a/sysutils/tempo/files/tempo.in b/sysutils/tempo/files/tempo.in new file mode 100644 index 000000000000..0182b8956280 --- /dev/null +++ b/sysutils/tempo/files/tempo.in @@ -0,0 +1,71 @@ +#!/bin/sh + +# PROVIDE: tempo +# REQUIRE: LOGIN +# KEYWORD: shutdown + +# Add the following lines to /etc/rc.conf to enable tempo +# tempo_enable="YES" +# +# tempo_enable (bool): +# Set it to YES to enable grafana +# Set to NO by default +# tempo_user (string): +# Set user that grafana will run under +# Default is "%%tempo_USER%%" +# tempo_group (string): +# Set group that own grafana files +# Default is "%%tempo_GROUP%%" +# tempo_config (string) +# Set full path to config file +# Default is "%%PREFIX%%/etc/tempo.yaml" +# tempo_logfile (string) +# Set full path to log file +# Default is "/var/log/tempo/tempo.log" +# tempo_loglevel (string) +# Set log level. Only log messages with the given severity or above. +# Valid levels: [debug, info, warn, error] +# Default is "warn" +# tempo_args (string) +# Set additional command line arguments +# Default is "" + +. /etc/rc.subr + +name=tempo +rcvar=tempo_enable + +load_rc_config $name + +: ${tempo_enable:="NO"} +: ${tempo_user:="%%TEMPO_USER%%"} +: ${tempo_group:="%%TEMPO_GROUP%%"} +: ${tempo_config:="%%PREFIX%%/etc/tempo.yaml"} +: ${tempo_logfile:="/var/log/tempo/tempo.log"} +: ${tempo_loglevel:="warn"} + +pidfile="/var/run/${name}/${name}.pid" +required_files="${tempo_config}" + +procname="%%PREFIX%%/bin/tempo" +command="/usr/sbin/daemon" +command_args="-p ${pidfile} -t ${name} -o ${tempo_logfile} \ + ${procname} \ + -config.file=${tempo_config} \ + -log.level=${tempo_loglevel} \ + ${tempo_args}" + +start_precmd="tempo_start_precmd" + +tempo_start_precmd() +{ + if [ ! -d "/var/run/${name}" ]; then + install -d -m 0750 -o ${tempo_user} -g ${tempo_group} "/var/run/${name}" + fi + + if [ ! -d "/var/log/tempo" ]; then + install -d -m 0750 -o ${tempo_user} -g ${tempo_group} "/var/log/tempo" + fi +} + +run_rc_command "$1" diff --git a/sysutils/tempo/pkg-descr b/sysutils/tempo/pkg-descr new file mode 100644 index 000000000000..f13b3fdd9b17 --- /dev/null +++ b/sysutils/tempo/pkg-descr @@ -0,0 +1,3 @@ +Grafana Tempo is an open source, easy-to-use and high-scale distributed tracing +backend. Tempo is cost-efficient, requiring only object storage to operate, and +is deeply integrated with Grafana, Prometheus, and Loki. diff --git a/sysutils/tempo/pkg-plist b/sysutils/tempo/pkg-plist new file mode 100644 index 000000000000..1894892a2746 --- /dev/null +++ b/sysutils/tempo/pkg-plist @@ -0,0 +1,12 @@ +bin/tempo +bin/tempo-query +bin/tempo-cli +bin/tempo-vulture +@sample etc/tempo.yaml.sample +@owner %%TEMPO_USER%% +@group %%TEMPO_GROUP%% +@mode 750 +@dir %%TEMPO_DATADIR%% +@mode +@group +@owner