git: fe632f908719 - main - sysutils/alloy: Update to 1.2.1
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 01 Aug 2024 18:06:57 UTC
The branch main has been updated by arrowd:
URL: https://cgit.FreeBSD.org/ports/commit/?id=fe632f9087196663623ed5116ae6e7faa8536f2e
commit fe632f9087196663623ed5116ae6e7faa8536f2e
Author: Zach Leslie <zach.leslie@grafana.com>
AuthorDate: 2024-07-23 17:59:24 +0000
Commit: Gleb Popov <arrowd@FreeBSD.org>
CommitDate: 2024-08-01 18:06:27 +0000
sysutils/alloy: Update to 1.2.1
Pull Request: https://github.com/freebsd/freebsd-ports/pull/286
Co-authored-by: Gleb Popov <arrowd@FreeBSD.org>
---
sysutils/alloy/Makefile | 35 ++++++++++++++++++-----------------
sysutils/alloy/distinfo | 14 +++++++-------
sysutils/alloy/files/alloy.in | 11 +++++------
sysutils/alloy/pkg-descr | 3 ++-
4 files changed, 32 insertions(+), 31 deletions(-)
diff --git a/sysutils/alloy/Makefile b/sysutils/alloy/Makefile
index 270458c75001..6d1605701d11 100644
--- a/sysutils/alloy/Makefile
+++ b/sysutils/alloy/Makefile
@@ -1,5 +1,5 @@
PORTNAME= alloy
-PORTVERSION= 1.0.0
+PORTVERSION= 1.2.1
DISTVERSIONPREFIX=v
CATEGORIES= sysutils
@@ -12,10 +12,11 @@ LICENSE= MIT
BUILD_DEPENDS= git:devel/git
USES= go:1.22,modules
-USE_GITHUB= yes
+USE_GITHUB= yes
GH_ACCOUNT= grafana
GH_PROJECT= alloy
+
USE_RC_SUBR= alloy
GO_MODULE= github.com/${GH_ACCOUNT}/${GH_PROJECT}
@@ -23,26 +24,26 @@ GO_PKGNAME= github.com/${GH_ACCOUNT}/${GH_PROJECT}
GO_TARGET= github.com/${GH_ACCOUNT}/${GH_PROJECT}
GO_BUILDFLAGS= -ldflags='-X github.com/grafana/alloy/internal/build.Version=v${PORTVERSION}'
- # Copy the go.mod so we can get all the dist files during fetch.
-_USES_fetch+= 600:go-syntax-fetch
-go-syntax-fetch:
+post-fetch:
@${ECHO_MSG} "===> Fetching ${GO_MODNAME}/syntax dependency";
- (cd ${DISTDIR}/${DIST_SUBDIR}; [ -e syntax/go.mod ] || mkdir syntax/; \
- tar -xzf grafana-alloy-v${PORTVERSION}_GH0.tar.gz ${PORTNAME}-${PORTVERSION}/syntax/go.mod; \
- cp ${PORTNAME}-${PORTVERSION}/syntax/go.mod syntax/go.mod)
-
-# Copy over the syntax/ directory from the source extract to ensure the go mod
-# replace for ./syntax is handled with the correct files on disk.
-_USES_extract+= 600:go-post-extract-syntax
-go-post-extract-syntax:
- @cp -r ${WRKDIR}/${PORTNAME}-${PORTVERSION}/syntax ${GO_WRKSRC}/syntax;
+ (cd ${DISTDIR}/${DIST_SUBDIR}; [ -e syntax/go.mod ] || (\
+ ${MKDIR} syntax/; \
+ ${TAR} -xzf ${DISTNAME}${EXTRACT_SUFX} ${PORTNAME}-${PORTVERSION}/syntax/go.mod; \
+ ${CP} ${PORTNAME}-${PORTVERSION}/syntax/go.mod syntax/go.mod))
+ @${ECHO_MSG} "===> Fetching ${GO_MODNAME}/internal/etc/datadogreceiver dependency";
+ (cd ${DISTDIR}/${DIST_SUBDIR}; [ -e internal/etc/datadogreceiver/go.mod ] || (\
+ ${MKDIR} internal/etc/datadogreceiver/; \
+ ${TAR} -xzf ${DISTNAME}${EXTRACT_SUFX} ${PORTNAME}-${PORTVERSION}/internal/etc/datadogreceiver/go.mod; \
+ ${CP} ${PORTNAME}-${PORTVERSION}/internal/etc/datadogreceiver/go.mod internal/etc/datadogreceiver/go.mod))
+
+post-extract:
+ ${CP} -r ${WRKDIR}/${PORTNAME}-${PORTVERSION}/syntax ${GO_WRKSRC}/syntax;
+ ${MKDIR} ${GO_WRKSRC}/internal/etc
+ ${CP} -r ${WRKDIR}/${PORTNAME}-${PORTVERSION}/internal/etc/datadogreceiver ${GO_WRKSRC}/internal/etc/datadogreceiver;
do-install:
${INSTALL_PROGRAM} ${WRKDIR}/bin/alloy ${STAGEDIR}${PREFIX}/bin/alloy
${INSTALL_DATA} ${WRKSRC}/example-config.alloy ${STAGEDIR}${PREFIX}/etc/alloy.flow.sample
-
-post-install:
${MKDIR} ${STAGEDIR}/var/alloy
- chgrp nobody ${STAGEDIR}/var/alloy
.include <bsd.port.mk>
diff --git a/sysutils/alloy/distinfo b/sysutils/alloy/distinfo
index fbf52be850ce..6278acf695b6 100644
--- a/sysutils/alloy/distinfo
+++ b/sysutils/alloy/distinfo
@@ -1,7 +1,7 @@
-TIMESTAMP = 1713809924
-SHA256 (go/sysutils_alloy/grafana-alloy-v1.0.0_GH0/v1.0.0.mod) = 180077222c8e613cc9eabd746199013aeea08ba01e0066fdf7aaa9f2d9d85b6c
-SIZE (go/sysutils_alloy/grafana-alloy-v1.0.0_GH0/v1.0.0.mod) = 44822
-SHA256 (go/sysutils_alloy/grafana-alloy-v1.0.0_GH0/v1.0.0.zip) = 818226307afab490f566fcc78abc483eca2001b26a40c5e4fad22f544ae568b7
-SIZE (go/sysutils_alloy/grafana-alloy-v1.0.0_GH0/v1.0.0.zip) = 18132479
-SHA256 (go/sysutils_alloy/grafana-alloy-v1.0.0_GH0/grafana-alloy-v1.0.0_GH0.tar.gz) = 422aa6ab7b9e606ebec2edcde79d6f26b6e648da85955fd1d5d08d6e33e7c537
-SIZE (go/sysutils_alloy/grafana-alloy-v1.0.0_GH0/grafana-alloy-v1.0.0_GH0.tar.gz) = 16808552
+TIMESTAMP = 1721834479
+SHA256 (go/sysutils_alloy/grafana-alloy-v1.2.1_GH0/v1.2.1.mod) = 0e1ede277cf22a522f7db2f23b72ba3645352da4d6b2f94c5b4ab3ace9587f3a
+SIZE (go/sysutils_alloy/grafana-alloy-v1.2.1_GH0/v1.2.1.mod) = 46460
+SHA256 (go/sysutils_alloy/grafana-alloy-v1.2.1_GH0/v1.2.1.zip) = 7c2fdc6b313ea663ba20c172ad8031fd50386c90502e21e6044054a4730e9a2d
+SIZE (go/sysutils_alloy/grafana-alloy-v1.2.1_GH0/v1.2.1.zip) = 18397697
+SHA256 (go/sysutils_alloy/grafana-alloy-v1.2.1_GH0/grafana-alloy-v1.2.1_GH0.tar.gz) = c1b43eb74e6585ca40e13a52d455b514d36a66921bc9a0c4f44a39c6b8ecaf58
+SIZE (go/sysutils_alloy/grafana-alloy-v1.2.1_GH0/grafana-alloy-v1.2.1_GH0.tar.gz) = 17027662
diff --git a/sysutils/alloy/files/alloy.in b/sysutils/alloy/files/alloy.in
index 553cdb78d2ac..68ddee8322ca 100644
--- a/sysutils/alloy/files/alloy.in
+++ b/sysutils/alloy/files/alloy.in
@@ -38,16 +38,15 @@ pidfile=/var/run/alloy.pid
command="/usr/sbin/daemon"
procname="%%PREFIX%%/bin/alloy"
run="run /usr/local/etc/alloy.flow"
-command_args="-S -R 3 -T ${name} -P ${pidfile} /usr/bin/env ${procname} ${run} \
+command_args="-S -T ${name} -p ${pidfile} /usr/bin/env ${procname} ${run} \
--storage.path=${alloy_storage_path} --server.http.listen-addr=${alloy_listen_address} ${alloy_args}"
start_precmd=alloy_startprecmd
-alloy_startprecmd()
-{
- if [ ! -e ${pidfile} ]; then
- install -o ${alloy_user} -g ${alloy_group} /dev/null ${pidfile};
- fi
+alloy_startprecmd() {
+ if [ ! -e ${pidfile} ]; then
+ install -o ${alloy_user} -g ${alloy_group} /dev/null ${pidfile}
+ fi
}
load_rc_config $name
diff --git a/sysutils/alloy/pkg-descr b/sysutils/alloy/pkg-descr
index 0123b35713d8..b5d5b5d385b6 100644
--- a/sysutils/alloy/pkg-descr
+++ b/sysutils/alloy/pkg-descr
@@ -1 +1,2 @@
-OpenTelemetry Collector distribution with programmable pipelines
+Grafana Alloy is an open source OpenTelemetry collector with built-in
+Prometheus pipelines and support for metrics, logs, traces, and profiles.