Sun Mar 17 12:55:13 2019 UTC ()
prometheus: import version 2.8.0

The Prometheus monitoring system and time series database.

Prometheus, a Cloud Native Computing Foundation project, is a systems and
service monitoring system. It collects metrics from configured targets at
given intervals, evaluates rule expressions, displays the results, and
can trigger alerts if some condition is observed to be true.


(tm)
diff -r1.575 -r1.576 pkgsrc/databases/Makefile
diff -r0 -r1.1 pkgsrc/databases/prometheus/DESCR
diff -r0 -r1.1 pkgsrc/databases/prometheus/Makefile
diff -r0 -r1.1 pkgsrc/databases/prometheus/PLIST
diff -r0 -r1.1 pkgsrc/databases/prometheus/distinfo
diff -r0 -r1.1 pkgsrc/databases/prometheus/patches/patch-cmd_prometheus_main.go

cvs diff -r1.575 -r1.576 pkgsrc/databases/Makefile (expand / switch to unified diff)

--- pkgsrc/databases/Makefile 2019/03/05 15:55:13 1.575
+++ pkgsrc/databases/Makefile 2019/03/17 12:55:13 1.576
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: Makefile,v 1.575 2019/03/05 15:55:13 taca Exp $ 1# $NetBSD: Makefile,v 1.576 2019/03/17 12:55:13 tm Exp $
2 2
3COMMENT= Databases 3COMMENT= Databases
4 4
5SUBDIR+= R-RSQLite 5SUBDIR+= R-RSQLite
6SUBDIR+= R-sqldf 6SUBDIR+= R-sqldf
7SUBDIR+= SQLiteCpp 7SUBDIR+= SQLiteCpp
8SUBDIR+= abook 8SUBDIR+= abook
9SUBDIR+= adodb 9SUBDIR+= adodb
10SUBDIR+= apache-cassandra 10SUBDIR+= apache-cassandra
11SUBDIR+= apache-cassandra2 11SUBDIR+= apache-cassandra2
12SUBDIR+= cdb 12SUBDIR+= cdb
13SUBDIR+= clisp-bdb 13SUBDIR+= clisp-bdb
14SUBDIR+= clisp-gdbm 14SUBDIR+= clisp-gdbm
@@ -322,26 +322,27 @@ SUBDIR+= postgresql95-contrib @@ -322,26 +322,27 @@ SUBDIR+= postgresql95-contrib
322SUBDIR+= postgresql95-docs 322SUBDIR+= postgresql95-docs
323SUBDIR+= postgresql95-plperl 323SUBDIR+= postgresql95-plperl
324SUBDIR+= postgresql95-plpython 324SUBDIR+= postgresql95-plpython
325SUBDIR+= postgresql95-pltcl 325SUBDIR+= postgresql95-pltcl
326SUBDIR+= postgresql95-server 326SUBDIR+= postgresql95-server
327SUBDIR+= postgresql96 327SUBDIR+= postgresql96
328SUBDIR+= postgresql96-client 328SUBDIR+= postgresql96-client
329SUBDIR+= postgresql96-contrib 329SUBDIR+= postgresql96-contrib
330SUBDIR+= postgresql96-docs 330SUBDIR+= postgresql96-docs
331SUBDIR+= postgresql96-plperl 331SUBDIR+= postgresql96-plperl
332SUBDIR+= postgresql96-plpython 332SUBDIR+= postgresql96-plpython
333SUBDIR+= postgresql96-pltcl 333SUBDIR+= postgresql96-pltcl
334SUBDIR+= postgresql96-server 334SUBDIR+= postgresql96-server
 335SUBDIR+= prometheus
335SUBDIR+= pxtools 336SUBDIR+= pxtools
336SUBDIR+= py-PgSQL 337SUBDIR+= py-PgSQL
337SUBDIR+= py-alembic 338SUBDIR+= py-alembic
338SUBDIR+= py-apsw 339SUBDIR+= py-apsw
339SUBDIR+= py-asyncpg 340SUBDIR+= py-asyncpg
340SUBDIR+= py-barman 341SUBDIR+= py-barman
341SUBDIR+= py-bsddb3 342SUBDIR+= py-bsddb3
342SUBDIR+= py-carbon 343SUBDIR+= py-carbon
343SUBDIR+= py-cassa 344SUBDIR+= py-cassa
344SUBDIR+= py-cassandra-driver 345SUBDIR+= py-cassandra-driver
345SUBDIR+= py-cdb 346SUBDIR+= py-cdb
346SUBDIR+= py-ckanclient 347SUBDIR+= py-ckanclient
347SUBDIR+= py-couchdb 348SUBDIR+= py-couchdb

File Added: pkgsrc/databases/prometheus/DESCR
The Prometheus monitoring system and time series database.

Prometheus, a Cloud Native Computing Foundation project, is a systems and
service monitoring system. It collects metrics from configured targets at
given intervals, evaluates rule expressions, displays the results, and
can trigger alerts if some condition is observed to be true.

File Added: pkgsrc/databases/prometheus/Makefile
# $NetBSD: Makefile,v 1.1 2019/03/17 12:55:13 tm Exp $

DISTNAME=	prometheus-2.8.0
MASTER_SITES=	${MASTER_SITE_GITHUB:=prometheus/}
CATEGORIES=	databases
GITHUB_TAG=	v${PKGVERSION_NOREV}

MAINTAINER=	pkgsrc-users@NetBSD.org
HOMEPAGE=	https://github.com/prometheus/prometheus
COMMENT=	The Prometheus monitoring system and time series database
LICENSE=	apache-2.0

GO_DIST_BASE=	${DISTNAME}
GO_SRCPATH=	github.com/prometheus/prometheus

PKG_SYSCONFSUBDIR=	prometheus

USE_TOOLS+=	pax
BUILD_DEFS+=	VARBASE PKG_SYSCONFDIR

SUBST_CLASSES+=		paths
SUBST_FILES.paths+=	cmd/prometheus/main.go
SUBST_SED.paths+=	-e "s|@VARBASE@|${VARBASE}|g"
SUBST_SED.paths+=	-e "s|@PKG_SYSCONFDIR@|${PKG_SYSCONFDIR}|g"
SUBST_STAGE.paths=	post-configure

MAKE_DIRS+=		${PKG_SYSCONFDIR}/consoles ${PKG_SYSCONFDIR}/console_libraries
EXAMPLE_DIR=		share/examples/prometheus
EXAMPLE_FILES=		prometheus.yml
EXAMPLE_FILES+=		consoles/index.html.example consoles/node-cpu.html \
			consoles/node-disk.html consoles/node-overview.html \
			consoles/node.html consoles/prometheus-overview.html \
			consoles/prometheus.html
EXAMPLE_FILES+=		console_libraries/menu.lib console_libraries/prom.lib
INSTALLATION_DIRS+=	${PREFIX}/${EXAMPLE_DIR}

.for f in ${EXAMPLE_FILES}
CONF_FILES+=	${EXAMPLE_DIR}/${f} ${PKG_SYSCONFDIR}/${f}
.endfor

do-install:
	${INSTALL_DATA} ${WRKSRC}/documentation/examples/prometheus.yml ${DESTDIR}${PREFIX}/${EXAMPLE_DIR}
	${RUN} cd ${WRKDIR} && ${PAX} -rw bin ${DESTDIR}${PREFIX}
	${RUN} cd ${WRKSRC} && \
		${PAX} -rw consoles ${DESTDIR}${PREFIX}/${EXAMPLE_DIR} && \
		${PAX} -rw console_libraries ${DESTDIR}${PREFIX}/${EXAMPLE_DIR}

post-install:
.for f in ${EXAMPLE_FILES}
	${CHMOD} ${NONBINMODE} ${DESTDIR}${PREFIX}/${EXAMPLE_DIR}/${f}
.endfor

.include "../../lang/go/go-package.mk"
.include "../../mk/bsd.pkg.mk"

File Added: pkgsrc/databases/prometheus/PLIST
@comment $NetBSD: PLIST,v 1.1 2019/03/17 12:55:13 tm Exp $
bin/adapter-usage
bin/example_write_adapter
bin/prometheus
bin/promtool
bin/remote_storage_adapter
share/examples/prometheus/console_libraries/menu.lib
share/examples/prometheus/console_libraries/prom.lib
share/examples/prometheus/consoles/index.html.example
share/examples/prometheus/consoles/node-cpu.html
share/examples/prometheus/consoles/node-disk.html
share/examples/prometheus/consoles/node-overview.html
share/examples/prometheus/consoles/node.html
share/examples/prometheus/consoles/prometheus-overview.html
share/examples/prometheus/consoles/prometheus.html
share/examples/prometheus/prometheus.yml

File Added: pkgsrc/databases/prometheus/distinfo
$NetBSD: distinfo,v 1.1 2019/03/17 12:55:13 tm Exp $

SHA1 (prometheus-2.8.0.tar.gz) = 3a4ce194b0db6670c33110d390cb3770c53b51e4
RMD160 (prometheus-2.8.0.tar.gz) = 36cf8d13bde68c1f295ad96a8abc825a44c49d0c
SHA512 (prometheus-2.8.0.tar.gz) = 9b0b0679768a9426547b232a87a3109008c28a59ef74b9376f192209c4005c7f18d622601ebef14516786378c5f014f6734a4e1a7929ffc0b9b7c369d28030eb
Size (prometheus-2.8.0.tar.gz) = 11097030 bytes
SHA1 (patch-cmd_prometheus_main.go) = 51f608ee8bb399f1145b0e8fcdc586ef1b3ba9c9

File Added: pkgsrc/databases/prometheus/patches/patch-cmd_prometheus_main.go
$NetBSD: patch-cmd_prometheus_main.go,v 1.1 2019/03/17 12:55:13 tm Exp $

Add prefix for SYSCONFDIR and VARBASE to store configuration file and metrics data at the correct location.

--- cmd/prometheus/main.go.orig	2019-03-12 04:09:20.000000000 +0000
+++ cmd/prometheus/main.go
@@ -133,7 +133,7 @@ func main() {
 	a.HelpFlag.Short('h')
 
 	a.Flag("config.file", "Prometheus configuration file path.").
-		Default("prometheus.yml").StringVar(&cfg.configFile)
+		Default("@PKG_SYSCONFDIR@/prometheus.yml").StringVar(&cfg.configFile)
 
 	a.Flag("web.listen-address", "Address to listen on for UI, API, and telemetry.").
 		Default("0.0.0.0:9090").StringVar(&cfg.web.ListenAddress)
@@ -163,16 +163,16 @@ func main() {
 		Default("false").BoolVar(&cfg.web.EnableAdminAPI)
 
 	a.Flag("web.console.templates", "Path to the console template directory, available at /consoles.").
-		Default("consoles").StringVar(&cfg.web.ConsoleTemplatesPath)
+		Default("@PKG_SYSCONFDIR@/consoles").StringVar(&cfg.web.ConsoleTemplatesPath)
 
 	a.Flag("web.console.libraries", "Path to the console library directory.").
-		Default("console_libraries").StringVar(&cfg.web.ConsoleLibrariesPath)
+		Default("@PKG_SYSCONFDIR@/console_libraries").StringVar(&cfg.web.ConsoleLibrariesPath)
 
 	a.Flag("web.page-title", "Document title of Prometheus instance.").
 		Default("Prometheus Time Series Collection and Processing Server").StringVar(&cfg.web.PageTitle)
 
 	a.Flag("storage.tsdb.path", "Base path for metrics storage.").
-		Default("data/").StringVar(&cfg.localStoragePath)
+		Default("@VARBASE@/lib/prometheus/data/").StringVar(&cfg.localStoragePath)
 
 	a.Flag("storage.tsdb.min-block-duration", "Minimum duration of a data block before being persisted. For use in testing.").
 		Hidden().Default("2h").SetValue(&cfg.tsdb.MinBlockDuration)