FreeBSD Bugzilla – Attachment 256354 Details for
Bug 283803
[NEW PORT] sysutils/tempo Grafana Tempo, distributed tracing backend
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Git diff patch
sysutils_tempo.diff (text/plain), 8.25 KB, created by
Daniel Morante
on 2025-01-02 21:09:37 UTC
(
hide
)
Description:
Git diff patch
Filename:
MIME Type:
Creator:
Daniel Morante
Created:
2025-01-02 21:09:37 UTC
Size:
8.25 KB
patch
obsolete
>From 4fe31131708ca476169ec06de88bd04649dde4e2 Mon Sep 17 00:00:00 2001 >From: Daniel Morante <daniel@morante.net> >Date: Thu, 2 Jan 2025 14:18:06 -0500 >Subject: [PATCH] Add new port sysutils/tempo (#3) > >Add Grafana Tempo > >Reviewed-on: https://git.morante.net/freebsd/ports/pulls/3 >--- > GIDs | 2 +- > UIDs | 2 +- > sysutils/tempo/Makefile | 53 ++++++++++++++ > sysutils/tempo/distinfo | 5 ++ > ...h-example_docker-compose_shared_tempo.yaml | 30 ++++++++ > sysutils/tempo/files/tempo.in | 71 +++++++++++++++++++ > sysutils/tempo/pkg-descr | 3 + > sysutils/tempo/pkg-plist | 12 ++++ > 8 files changed, 176 insertions(+), 2 deletions(-) > create mode 100644 sysutils/tempo/Makefile > create mode 100644 sysutils/tempo/distinfo > create mode 100644 sysutils/tempo/files/patch-example_docker-compose_shared_tempo.yaml > create mode 100644 sysutils/tempo/files/tempo.in > create mode 100644 sysutils/tempo/pkg-descr > create mode 100644 sysutils/tempo/pkg-plist > >diff --git a/GIDs b/GIDs >index 24e942422e5c..cbb23b1b6b86 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 4427531d9e5d..5d5b296a94a9 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/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 <bsd.port.mk> >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 >-- >2.47.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 283803
: 256354