pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/databases



Module Name:    pkgsrc
Committed By:   tm
Date:           Sun Mar 17 12:55:13 UTC 2019

Modified Files:
        pkgsrc/databases: Makefile
Added Files:
        pkgsrc/databases/prometheus: DESCR Makefile PLIST distinfo
        pkgsrc/databases/prometheus/patches: patch-cmd_prometheus_main.go

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.575 -r1.576 pkgsrc/databases/Makefile
cvs rdiff -u -r0 -r1.1 pkgsrc/databases/prometheus/DESCR \
    pkgsrc/databases/prometheus/Makefile pkgsrc/databases/prometheus/PLIST \
    pkgsrc/databases/prometheus/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/databases/prometheus/patches/patch-cmd_prometheus_main.go

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/databases/Makefile
diff -u pkgsrc/databases/Makefile:1.575 pkgsrc/databases/Makefile:1.576
--- pkgsrc/databases/Makefile:1.575     Tue Mar  5 15:55:13 2019
+++ pkgsrc/databases/Makefile   Sun Mar 17 12:55:13 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.575 2019/03/05 15:55:13 taca Exp $
+# $NetBSD: Makefile,v 1.576 2019/03/17 12:55:13 tm Exp $
 
 COMMENT=       Databases
 
@@ -332,6 +332,7 @@ SUBDIR+=    postgresql96-plperl
 SUBDIR+=       postgresql96-plpython
 SUBDIR+=       postgresql96-pltcl
 SUBDIR+=       postgresql96-server
+SUBDIR+=       prometheus
 SUBDIR+=       pxtools
 SUBDIR+=       py-PgSQL
 SUBDIR+=       py-alembic

Added files:

Index: pkgsrc/databases/prometheus/DESCR
diff -u /dev/null pkgsrc/databases/prometheus/DESCR:1.1
--- /dev/null   Sun Mar 17 12:55:13 2019
+++ pkgsrc/databases/prometheus/DESCR   Sun Mar 17 12:55:13 2019
@@ -0,0 +1,6 @@
+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.
Index: pkgsrc/databases/prometheus/Makefile
diff -u /dev/null pkgsrc/databases/prometheus/Makefile:1.1
--- /dev/null   Sun Mar 17 12:55:13 2019
+++ pkgsrc/databases/prometheus/Makefile        Sun Mar 17 12:55:13 2019
@@ -0,0 +1,54 @@
+# $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@localhost
+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"
Index: pkgsrc/databases/prometheus/PLIST
diff -u /dev/null pkgsrc/databases/prometheus/PLIST:1.1
--- /dev/null   Sun Mar 17 12:55:13 2019
+++ pkgsrc/databases/prometheus/PLIST   Sun Mar 17 12:55:13 2019
@@ -0,0 +1,16 @@
+@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
Index: pkgsrc/databases/prometheus/distinfo
diff -u /dev/null pkgsrc/databases/prometheus/distinfo:1.1
--- /dev/null   Sun Mar 17 12:55:13 2019
+++ pkgsrc/databases/prometheus/distinfo        Sun Mar 17 12:55:13 2019
@@ -0,0 +1,7 @@
+$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

Index: pkgsrc/databases/prometheus/patches/patch-cmd_prometheus_main.go
diff -u /dev/null pkgsrc/databases/prometheus/patches/patch-cmd_prometheus_main.go:1.1
--- /dev/null   Sun Mar 17 12:55:13 2019
+++ pkgsrc/databases/prometheus/patches/patch-cmd_prometheus_main.go    Sun Mar 17 12:55:13 2019
@@ -0,0 +1,35 @@
+$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)



Home | Main Index | Thread Index | Old Index