Date: Sun, 28 Feb 2021 19:09:18 +0000 (UTC) From: Guido Falsi <madpilot@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r566796 - in head/net-mgmt: . py-gstat_exporter py-gstat_exporter/files Message-ID: <202102281909.11SJ9Ivb032500@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: madpilot Date: Sun Feb 28 19:09:18 2021 New Revision: 566796 URL: https://svnweb.freebsd.org/changeset/ports/566796 Log: Prometheus exporter for FreeBSD gstat data WWW: https://github.com/tykling/gstat_exporter PR: 253688 Submitted by: lapo@lapo.it Added: head/net-mgmt/py-gstat_exporter/ head/net-mgmt/py-gstat_exporter/Makefile (contents, props changed) head/net-mgmt/py-gstat_exporter/distinfo (contents, props changed) head/net-mgmt/py-gstat_exporter/files/ head/net-mgmt/py-gstat_exporter/files/gstat_exporter.in (contents, props changed) head/net-mgmt/py-gstat_exporter/pkg-descr (contents, props changed) Modified: head/net-mgmt/Makefile Modified: head/net-mgmt/Makefile ============================================================================== --- head/net-mgmt/Makefile Sun Feb 28 19:05:12 2021 (r566795) +++ head/net-mgmt/Makefile Sun Feb 28 19:09:18 2021 (r566796) @@ -298,6 +298,7 @@ SUBDIR += py-arouteserver SUBDIR += py-ciscoconfparse SUBDIR += py-dnsdiag + SUBDIR += py-gstat_exporter SUBDIR += py-ipcalc SUBDIR += py-ipy SUBDIR += py-junos-eznc Added: head/net-mgmt/py-gstat_exporter/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-mgmt/py-gstat_exporter/Makefile Sun Feb 28 19:09:18 2021 (r566796) @@ -0,0 +1,37 @@ +# $FreeBSD$ + +PORTNAME= gstat_exporter +PORTVERSION= 20191119 +CATEGORIES= net-mgmt python +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= lapo@lapo.it +COMMENT= Prometheus exporter for gstat data + +LICENSE= BSD3CLAUSE +LICENSE_FILE= ${WRKSRC}/LICENSE + +IGNORE_FreeBSD_11= needs "gstat -C", available since FreeBSD 12.0 + +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}prometheus-client>=0.7.1:net-mgmt/py-prometheus-client@${PY_FLAVOR} + +USES= python:3.6+ + +USE_GITHUB= yes +GH_ACCOUNT= tykling +GH_PROJECT= gstat_exporter +GH_TAGNAME= 3c1858a52544b2eec56f5470e4042a7171e5448a + +NO_BUILD= yes +NO_ARCH= yes + +USE_RC_SUBR= gstat_exporter +SUB_LIST= PYTHON_CMD=${PYTHON_CMD} + +PLIST_FILES= bin/${PORTNAME}.py + +do-install: + ${INSTALL_SCRIPT} ${WRKSRC}/${PORTNAME}.py ${STAGEDIR}${PREFIX}/bin + ${REINPLACE_CMD} -i '' -e "1i\\${.newline}#!${PYTHON_CMD}" ${STAGEDIR}${PREFIX}/bin/${PORTNAME}.py + +.include <bsd.port.mk> Added: head/net-mgmt/py-gstat_exporter/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-mgmt/py-gstat_exporter/distinfo Sun Feb 28 19:09:18 2021 (r566796) @@ -0,0 +1,3 @@ +TIMESTAMP = 1613729051 +SHA256 (tykling-gstat_exporter-20191119-3c1858a52544b2eec56f5470e4042a7171e5448a_GH0.tar.gz) = 385dc23fb7ef95626c03d8a4b454f00ffa015424b2ec9bf94b656aa4c662153f +SIZE (tykling-gstat_exporter-20191119-3c1858a52544b2eec56f5470e4042a7171e5448a_GH0.tar.gz) = 4141 Added: head/net-mgmt/py-gstat_exporter/files/gstat_exporter.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-mgmt/py-gstat_exporter/files/gstat_exporter.in Sun Feb 28 19:09:18 2021 (r566796) @@ -0,0 +1,28 @@ +#!/bin/sh +# $FreeBSD$ +# +# PROVIDE: gstat_exporter +# REQUIRE: LOGIN NETWORKING +# KEYWORD: shutdown + +# Add the following lines to /etc/rc.conf to enable gstat_exporter: +# +# gstat_exporter_enable (bool): Set to "NO" by default. +# Set it to "YES" to enable gstat_exporter_enable. + +. /etc/rc.subr + +name=gstat_exporter +rcvar=gstat_exporter_enable +desc="gstat_exporter daemon" + +load_rc_config ${name} + +: ${gstat_exporter_enable:=NO} + +pidfile="/var/run/${name}.pid" +command_interpreter=%%PYTHON_CMD%% +command=%%PREFIX%%/bin/${name}.py +start_cmd="/usr/sbin/daemon -f -p ${pidfile} $command_interpreter $command" + +run_rc_command "$1" Added: head/net-mgmt/py-gstat_exporter/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-mgmt/py-gstat_exporter/pkg-descr Sun Feb 28 19:09:18 2021 (r566796) @@ -0,0 +1,3 @@ +Prometheus exporter for FreeBSD gstat data + +WWW: https://github.com/tykling/gstat_exporter
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202102281909.11SJ9Ivb032500>