Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 18 Mar 2017 02:42:09 +0000 (UTC)
From:      Jason Unovitch <junovitch@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r436378 - in head/www/py-graphite-api: . files
Message-ID:  <201703180242.v2I2g9b9080149@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: junovitch
Date: Sat Mar 18 02:42:09 2017
New Revision: 436378
URL: https://svnweb.freebsd.org/changeset/ports/436378

Log:
  www/py-graphite-api: update 1.1.2 -> 1.1.3 and add rc.d script
  
  - Fix RUN_DEPENDS indentation (no changes)
  - Add NO_ARCH (.py* files)
  - Drop autoplist, add SUB_LIST/SUB_FILES/PLIST_SUB for rc.d script vars
    and explaining how to set up in pkg-message
  - Tweak pkg-descr
  
  PR:		217650
  Submitted by:	Dave Cottlehuber <dch@skunkwerks.at> (maintainer)

Added:
  head/www/py-graphite-api/files/
  head/www/py-graphite-api/files/graphiteapi.in   (contents, props changed)
  head/www/py-graphite-api/files/graphiteapi.yaml.sample   (contents, props changed)
  head/www/py-graphite-api/files/pkg-message.in   (contents, props changed)
  head/www/py-graphite-api/pkg-plist   (contents, props changed)
Modified:
  head/www/py-graphite-api/Makefile
  head/www/py-graphite-api/distinfo
  head/www/py-graphite-api/pkg-descr

Modified: head/www/py-graphite-api/Makefile
==============================================================================
--- head/www/py-graphite-api/Makefile	Sat Mar 18 02:24:56 2017	(r436377)
+++ head/www/py-graphite-api/Makefile	Sat Mar 18 02:42:09 2017	(r436378)
@@ -2,7 +2,7 @@
 # $FreeBSD$
 
 PORTNAME=	graphite-api
-PORTVERSION=	1.1.2
+PORTVERSION=	1.1.3
 CATEGORIES=	www python
 MASTER_SITES=	CHEESESHOP
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
@@ -13,17 +13,60 @@ COMMENT=	Graphite-web, without the inter
 LICENSE=	APACHE20
 
 RUN_DEPENDS=	\
-			${PYTHON_PKGNAMEPREFIX}pytz>0:devel/py-pytz \
-			${PYTHON_PKGNAMEPREFIX}Flask>=0.10.1:www/py-flask \
-			${PYTHON_PKGNAMEPREFIX}Flask-Cache>=0.13.1:www/py-flask-cache \
-			${PYTHON_PKGNAMEPREFIX}tzlocal>=1.1.1:devel/py-tzlocal \
-			${PYTHON_PKGNAMEPREFIX}structlog>=16.0.0:devel/py-structlog \
-			${PYTHON_PKGNAMEPREFIX}pyparsing>=2.0.0:devel/py-pyparsing \
-			${PYTHON_PKGNAMEPREFIX}yaml>3.1:devel/py-yaml \
-			${PYTHON_PKGNAMEPREFIX}cairocffi>=0.7.2:graphics/py-cairocffi \
-			${PYTHON_PKGNAMEPREFIX}gunicorn>=19.4.1:www/py-gunicorn \
-			xorg-fonts-truetype>=0:x11-fonts/xorg-fonts-truetype
+		${PYTHON_PKGNAMEPREFIX}pytz>0:devel/py-pytz \
+		${PYTHON_PKGNAMEPREFIX}Flask>=0.10.1:www/py-flask \
+		${PYTHON_PKGNAMEPREFIX}Flask-Cache>=0.13.1:www/py-flask-cache \
+		${PYTHON_PKGNAMEPREFIX}tzlocal>=1.1.1:devel/py-tzlocal \
+		${PYTHON_PKGNAMEPREFIX}structlog>=16.0.0:devel/py-structlog \
+		${PYTHON_PKGNAMEPREFIX}pyparsing>=2.0.0:devel/py-pyparsing \
+		${PYTHON_PKGNAMEPREFIX}yaml>3.1:devel/py-yaml \
+		${PYTHON_PKGNAMEPREFIX}cairocffi>=0.7.2:graphics/py-cairocffi \
+		${PYTHON_PKGNAMEPREFIX}gunicorn>=19.4.1:www/py-gunicorn \
+		xorg-fonts-truetype>=0:x11-fonts/xorg-fonts-truetype
 
+NO_ARCH=	yes
 USES=		python
-USE_PYTHON=	autoplist distutils
+USE_PYTHON=	distutils
+
+GRAPHITEAPI_APP=	graphiteapi
+
+SUB_FILES=	pkg-message
+SUB_LIST=	PORTNAME=${PORTNAME} \
+		PREFIX=${PREFIX} \
+		GRAPHITEAPI_APP=${GRAPHITEAPI_APP} \
+		GRAPHITEAPI_USER=${GRAPHITEAPI_USER} \
+		GRAPHITEAPI_GROUP=${GRAPHITEAPI_GROUP} \
+		GRAPHITEAPI_LOGDIR=${GRAPHITEAPI_LOGDIR} \
+		GRAPHITEAPI_TMPDIR=${GRAPHITEAPI_TMPDIR} \
+		GRAPHITEAPI_PIDFILE=${GRAPHITEAPI_PIDFILE}
+
+PLIST_SUB=	PORTNAME=${PORTNAME} \
+		PORTVERSION=${PORTVERSION} \
+		PREFIX=${PREFIX} \
+		GRAPHITEAPI_APP=${GRAPHITEAPI_APP} \
+		GRAPHITEAPI_USER=${GRAPHITEAPI_USER} \
+		GRAPHITEAPI_GROUP=${GRAPHITEAPI_GROUP} \
+		GRAPHITEAPI_LOGDIR=${GRAPHITEAPI_LOGDIR} \
+		GRAPHITEAPI_TMPDIR=${GRAPHITEAPI_TMPDIR} \
+		GRAPHITEAPI_PIDFILE=${GRAPHITEAPI_PIDFILE}
+
+GRAPHITEAPI_USER?=	carbon
+GRAPHITEAPI_GROUP?=	carbon
+
+LOCALSTATEDIR=	/var
+USE_RC_SUBR=	${GRAPHITEAPI_APP}
+
+GRAPHITEAPI_LOGDIR=	${LOCALSTATEDIR}/log/${GRAPHITEAPI_APP}
+GRAPHITEAPI_TMPDIR=	${LOCALSTATEDIR}/run/${GRAPHITEAPI_APP}
+GRAPHITEAPI_PIDFILE=	${LOCALSTATEDIR}/run/${GRAPHITEAPI_APP}/${GRAPHITEAPI_APP}.pid
+
+post-install:
+	${MKDIR} \
+	    ${STAGEDIR}${ETCDIR} \
+	    ${STAGEDIR}${GRAPHITEAPI_TMPDIR} \
+	    ${STAGEDIR}${GRAPHITEAPI_LOGDIR}
+	${INSTALL_DATA} \
+	    ${FILESDIR}/${GRAPHITEAPI_APP}.yaml.sample \
+	    ${STAGEDIR}${ETCDIR}/${GRAPHITEAPI_APP}.yaml.sample
+
 .include <bsd.port.mk>

Modified: head/www/py-graphite-api/distinfo
==============================================================================
--- head/www/py-graphite-api/distinfo	Sat Mar 18 02:24:56 2017	(r436377)
+++ head/www/py-graphite-api/distinfo	Sat Mar 18 02:42:09 2017	(r436378)
@@ -1,2 +1,3 @@
-SHA256 (graphite-api-1.1.2.tar.gz) = bfd112cdc7ef1812429afc8b481bda38fb12d85bbabdd098be2c60e55cce1cca
-SIZE (graphite-api-1.1.2.tar.gz) = 74846
+TIMESTAMP = 1489008094
+SHA256 (graphite-api-1.1.3.tar.gz) = f72718124510065be75c53bf49bd69c16cdb13ca31431add77282c0f7c5933e3
+SIZE (graphite-api-1.1.3.tar.gz) = 75501

Added: head/www/py-graphite-api/files/graphiteapi.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/py-graphite-api/files/graphiteapi.in	Sat Mar 18 02:42:09 2017	(r436378)
@@ -0,0 +1,52 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# PROVIDE: graphiteapi
+# REQUIRE: LOGIN DAEMON NETWORKING
+# KEYWORD: shutdown
+
+# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
+# to enable this service:
+#
+# graphiteapi_enable    (bool):   Set to NO by default.
+# Set it to YES to enable graphiteapi.
+#
+# graphiteapi_user      (string): optional username to run daemon under
+# graphiteapi_group     (string): optional groupname to run daemon under
+# graphiteapi_address   (string): optional IP:PORT tuple to bind to
+# graphiteapi_config    (string): optional full path for yaml config file
+# graphiteapi_flags     (string): optional flags to pass through to gunicorn
+
+. /etc/rc.subr
+
+name="%%GRAPHITEAPI_APP%%"
+rcvar="%%GRAPHITEAPI_APP%%_enable"
+
+# defaults
+: ${graphiteapi_enable:="NO"}
+: ${graphiteapi_user="%%GRAPHITEAPI_USER%%"}
+: ${graphiteapi_group="%%GRAPHITEAPI_GROUP%%"}
+: ${graphiteapi_address="127.0.0.1:5600"}
+: ${graphiteapi_config="%%ETCDIR%%/%%GRAPHITEAPI_APP%%.yaml"}
+: ${graphiteapi_flags="--workers 4"}
+
+# daemon
+command="%%PREFIX%%/bin/gunicorn"
+required_files="${graphiteapi_config}"
+command_args="graphite_api.app:app"
+command_args="${command_args} --user ${graphiteapi_user} --group ${graphiteapi_group}"
+command_args="${command_args} --bind ${graphiteapi_address}"
+command_args="${command_args} --env TZ=UTC"
+command_args="${command_args} --env GRAPHITE_API_CONFIG=${graphiteapi_config}"
+command_args="${command_args} --pid %%GRAPHITEAPI_PIDFILE%%"
+command_args="${command_args} --worker-tmp-dir %%GRAPHITEAPI_TMPDIR%%"
+command_args="${command_args} --error-logfile %%GRAPHITEAPI_LOGDIR%%/error.log"
+command_args="${command_args} --access-logfile %%GRAPHITEAPI_LOGDIR%%/access.log"
+
+# support SIGHUP to reload configuration file
+extra_commands="reload"
+
+load_rc_config $name
+run_rc_command "$1"

Added: head/www/py-graphite-api/files/graphiteapi.yaml.sample
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/py-graphite-api/files/graphiteapi.yaml.sample	Sat Mar 18 02:42:09 2017	(r436378)
@@ -0,0 +1,24 @@
+# This configuration should be sufficient if you run graphite's carbon daemon
+# using the default setup from databases/py-carbon. For detailed information
+# see http://graphite-api.readthedocs.io/en/latest/configuration.html
+---
+search_index: /var/db/carbon/index
+finders:
+    - graphite_api.finders.whisper.WhisperFinder
+functions:
+    - graphite_api.functions.SeriesFunctions
+    - graphite_api.functions.PieFunctions
+whisper:
+    directories:
+        - /var/db/carbon/whisper/
+carbon:
+    hosts:
+        - 127.0.0.1:7002
+    timeout: 5
+    retry_delay: 15
+    carbon_prefix: carbon
+    replication_factor: 1
+time_zone: UTC
+allowed_origins:
+    - localhost.localdomain
+

Added: head/www/py-graphite-api/files/pkg-message.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/py-graphite-api/files/pkg-message.in	Sat Mar 18 02:42:09 2017	(r436378)
@@ -0,0 +1,3 @@
+To complete your installation, copy %%ETCDIR%%/%%GRAPHITEAPI_APP%%.yaml.sample to
+%%ETCDIR%%/%%GRAPHITEAPI_APP%%.yaml and edit it as required, particularly ensuring
+your CORS allowed_origins are correct.

Modified: head/www/py-graphite-api/pkg-descr
==============================================================================
--- head/www/py-graphite-api/pkg-descr	Sat Mar 18 02:24:56 2017	(r436377)
+++ head/www/py-graphite-api/pkg-descr	Sat Mar 18 02:42:09 2017	(r436378)
@@ -2,6 +2,6 @@ Graphite-API
 
 This is a minimalistic API server that replicates the behavior of Graphite-web,
 pruned and simplified as much code as possible while keeping the basic
-functionality.
+functionality. Optional caching is available using www/py-flask-cache.
 
 WWW: https://github.com/brutasse/graphite-api

Added: head/www/py-graphite-api/pkg-plist
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/py-graphite-api/pkg-plist	Sat Mar 18 02:42:09 2017	(r436378)
@@ -0,0 +1,69 @@
+@sample %%ETCDIR%%/%%GRAPHITEAPI_APP%%.yaml.sample %%ETCDIR%%/%%GRAPHITEAPI_APP%%.yaml
+@dir(%%GRAPHITEAPI_USER%%,%%GRAPHITEAPI_GROUP%%,0750) %%GRAPHITEAPI_TMPDIR%%
+@dir(%%GRAPHITEAPI_USER%%,%%GRAPHITEAPI_GROUP%%,0750) %%GRAPHITEAPI_LOGDIR%%
+%%PYTHON_SITELIBDIR%%/graphite_api/__init__.py
+%%PYTHON_SITELIBDIR%%/graphite_api/__init__.pyc
+%%PYTHON_SITELIBDIR%%/graphite_api/__init__.pyo
+%%PYTHON_SITELIBDIR%%/graphite_api/_vendor/__init__.py
+%%PYTHON_SITELIBDIR%%/graphite_api/_vendor/__init__.pyc
+%%PYTHON_SITELIBDIR%%/graphite_api/_vendor/__init__.pyo
+%%PYTHON_SITELIBDIR%%/graphite_api/_vendor/whisper.py
+%%PYTHON_SITELIBDIR%%/graphite_api/_vendor/whisper.pyc
+%%PYTHON_SITELIBDIR%%/graphite_api/_vendor/whisper.pyo
+%%PYTHON_SITELIBDIR%%/graphite_api/app.py
+%%PYTHON_SITELIBDIR%%/graphite_api/app.pyc
+%%PYTHON_SITELIBDIR%%/graphite_api/app.pyo
+%%PYTHON_SITELIBDIR%%/graphite_api/carbonlink.py
+%%PYTHON_SITELIBDIR%%/graphite_api/carbonlink.pyc
+%%PYTHON_SITELIBDIR%%/graphite_api/carbonlink.pyo
+%%PYTHON_SITELIBDIR%%/graphite_api/config.py
+%%PYTHON_SITELIBDIR%%/graphite_api/config.pyc
+%%PYTHON_SITELIBDIR%%/graphite_api/config.pyo
+%%PYTHON_SITELIBDIR%%/graphite_api/encoders.py
+%%PYTHON_SITELIBDIR%%/graphite_api/encoders.pyc
+%%PYTHON_SITELIBDIR%%/graphite_api/encoders.pyo
+%%PYTHON_SITELIBDIR%%/graphite_api/finders/__init__.py
+%%PYTHON_SITELIBDIR%%/graphite_api/finders/__init__.pyc
+%%PYTHON_SITELIBDIR%%/graphite_api/finders/__init__.pyo
+%%PYTHON_SITELIBDIR%%/graphite_api/finders/whisper.py
+%%PYTHON_SITELIBDIR%%/graphite_api/finders/whisper.pyc
+%%PYTHON_SITELIBDIR%%/graphite_api/finders/whisper.pyo
+%%PYTHON_SITELIBDIR%%/graphite_api/functions.py
+%%PYTHON_SITELIBDIR%%/graphite_api/functions.pyc
+%%PYTHON_SITELIBDIR%%/graphite_api/functions.pyo
+%%PYTHON_SITELIBDIR%%/graphite_api/intervals.py
+%%PYTHON_SITELIBDIR%%/graphite_api/intervals.pyc
+%%PYTHON_SITELIBDIR%%/graphite_api/intervals.pyo
+%%PYTHON_SITELIBDIR%%/graphite_api/middleware.py
+%%PYTHON_SITELIBDIR%%/graphite_api/middleware.pyc
+%%PYTHON_SITELIBDIR%%/graphite_api/middleware.pyo
+%%PYTHON_SITELIBDIR%%/graphite_api/node.py
+%%PYTHON_SITELIBDIR%%/graphite_api/node.pyc
+%%PYTHON_SITELIBDIR%%/graphite_api/node.pyo
+%%PYTHON_SITELIBDIR%%/graphite_api/readers.py
+%%PYTHON_SITELIBDIR%%/graphite_api/readers.pyc
+%%PYTHON_SITELIBDIR%%/graphite_api/readers.pyo
+%%PYTHON_SITELIBDIR%%/graphite_api/render/__init__.py
+%%PYTHON_SITELIBDIR%%/graphite_api/render/__init__.pyc
+%%PYTHON_SITELIBDIR%%/graphite_api/render/__init__.pyo
+%%PYTHON_SITELIBDIR%%/graphite_api/render/attime.py
+%%PYTHON_SITELIBDIR%%/graphite_api/render/attime.pyc
+%%PYTHON_SITELIBDIR%%/graphite_api/render/attime.pyo
+%%PYTHON_SITELIBDIR%%/graphite_api/render/datalib.py
+%%PYTHON_SITELIBDIR%%/graphite_api/render/datalib.pyc
+%%PYTHON_SITELIBDIR%%/graphite_api/render/datalib.pyo
+%%PYTHON_SITELIBDIR%%/graphite_api/render/glyph.py
+%%PYTHON_SITELIBDIR%%/graphite_api/render/glyph.pyc
+%%PYTHON_SITELIBDIR%%/graphite_api/render/glyph.pyo
+%%PYTHON_SITELIBDIR%%/graphite_api/render/grammar.py
+%%PYTHON_SITELIBDIR%%/graphite_api/render/grammar.pyc
+%%PYTHON_SITELIBDIR%%/graphite_api/render/grammar.pyo
+%%PYTHON_SITELIBDIR%%/graphite_api/search.py
+%%PYTHON_SITELIBDIR%%/graphite_api/search.pyc
+%%PYTHON_SITELIBDIR%%/graphite_api/search.pyo
+%%PYTHON_SITELIBDIR%%/graphite_api/storage.py
+%%PYTHON_SITELIBDIR%%/graphite_api/storage.pyc
+%%PYTHON_SITELIBDIR%%/graphite_api/storage.pyo
+%%PYTHON_SITELIBDIR%%/graphite_api/utils.py
+%%PYTHON_SITELIBDIR%%/graphite_api/utils.pyc
+%%PYTHON_SITELIBDIR%%/graphite_api/utils.pyo



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201703180242.v2I2g9b9080149>