From owner-svn-ports-head@freebsd.org Wed Mar 21 16:49:22 2018 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 89786F53A8A; Wed, 21 Mar 2018 16:49:22 +0000 (UTC) (envelope-from pi@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 368817A2DE; Wed, 21 Mar 2018 16:49:22 +0000 (UTC) (envelope-from pi@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 26AE12D377; Wed, 21 Mar 2018 16:49:22 +0000 (UTC) (envelope-from pi@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2LGnLgH053539; Wed, 21 Mar 2018 16:49:21 GMT (envelope-from pi@FreeBSD.org) Received: (from pi@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2LGnLgw053530; Wed, 21 Mar 2018 16:49:21 GMT (envelope-from pi@FreeBSD.org) Message-Id: <201803211649.w2LGnLgw053530@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pi set sender to pi@FreeBSD.org using -f From: Kurt Jaeger Date: Wed, 21 Mar 2018 16:49:21 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r465192 - in head/www: . carbonapi carbonapi/files X-SVN-Group: ports-head X-SVN-Commit-Author: pi X-SVN-Commit-Paths: in head/www: . carbonapi carbonapi/files X-SVN-Commit-Revision: 465192 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Mar 2018 16:49:22 -0000 Author: pi Date: Wed Mar 21 16:49:20 2018 New Revision: 465192 URL: https://svnweb.freebsd.org/changeset/ports/465192 Log: New port: www/carbonapi carbonapi is a frontend for carbonzipper and can partially replace graphiteweb. WWW: https://github.com/go-graphite/carbonapi PR: 226808 Submitted by: Andreas Andersson Added: head/www/carbonapi/ head/www/carbonapi/Makefile (contents, props changed) head/www/carbonapi/distinfo (contents, props changed) head/www/carbonapi/files/ head/www/carbonapi/files/carbonapi.in (contents, props changed) head/www/carbonapi/files/patch-carbonapi.example.toml (contents, props changed) head/www/carbonapi/files/patch-carbonapi.example.yaml (contents, props changed) head/www/carbonapi/pkg-descr (contents, props changed) head/www/carbonapi/pkg-message (contents, props changed) head/www/carbonapi/pkg-plist (contents, props changed) Modified: head/www/Makefile Modified: head/www/Makefile ============================================================================== --- head/www/Makefile Wed Mar 21 16:28:01 2018 (r465191) +++ head/www/Makefile Wed Mar 21 16:49:20 2018 (r465192) @@ -62,6 +62,7 @@ SUBDIR += calamaris-devel SUBDIR += caldavzap SUBDIR += calendarserver + SUBDIR += carbonapi SUBDIR += castget SUBDIR += cblog SUBDIR += cgi-lib Added: head/www/carbonapi/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/carbonapi/Makefile Wed Mar 21 16:49:20 2018 (r465192) @@ -0,0 +1,46 @@ +# $FreeBSD$ + +PORTNAME= carbonapi +DISTVERSION= 0.10.0.1 +CATEGORIES= www + +MAINTAINER= a.andersson.thn@gmail.com +COMMENT= Go implementation of carbonapi + +LICENSE= BSD2CLAUSE +LICENSE_FILE= ${WRKSRC}/LICENSE + +BUILD_DEPENDS= go>=1.8:lang/go + +USES= gmake + +USE_GITHUB= yes +GH_ACCOUNT= go-graphite +GH_SUBDIR= src/github.com/${GH_ACCOUNT}/${PORTNAME} +USE_RC_SUBR= ${PORTNAME} + +USERS= carbon +GROUPS= carbon + +OPTIONS_DEFINE= CAIRO + +CAIRO_USES= pkgconfig +CAIRO_VARS= CARBON_API_ARGS=${PORTNAME} +CAIRO_VARS_OFF= CARBON_API_ARGS=nocairo +CAIRO_LIB_DEPENDS= libcairo.so:graphics/cairo + +do-build: + @cd ${WRKSRC}/${GH_SUBDIR} && \ + ${SETENV} ${MAKE_ENV} GOPATH=${WRKSRC} VERSION=${DISTVERSION} \ + ${MAKE_CMD} ${CARBON_API_ARGS} + +do-install: + @${MKDIR} ${STAGEDIR}/${PREFIX}/etc/carbonapi + @${MKDIR} ${STAGEDIR}/var/log/carbonapi + ${INSTALL_PROGRAM} ${WRKSRC}/carbonapi ${STAGEDIR}${PREFIX}/bin + ${INSTALL_DATA} ${WRKSRC}/carbonapi.example.toml ${STAGEDIR}${PREFIX}/etc/carbonapi + ${INSTALL_DATA} ${WRKSRC}/carbonapi.example.yaml ${STAGEDIR}${PREFIX}/etc/carbonapi + ${INSTALL_DATA} ${WRKSRC}/graphTemplates.example.toml ${STAGEDIR}${PREFIX}/etc/carbonapi + ${INSTALL_DATA} ${WRKSRC}/graphTemplates.example.yaml ${STAGEDIR}${PREFIX}/etc/carbonapi + +.include Added: head/www/carbonapi/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/carbonapi/distinfo Wed Mar 21 16:49:20 2018 (r465192) @@ -0,0 +1,3 @@ +TIMESTAMP = 1521573171 +SHA256 (go-graphite-carbonapi-0.10.0.1_GH0.tar.gz) = c8d701c23d75fd709aeb59168f04c356a22e0d8b2911f43712d36699b8a3e868 +SIZE (go-graphite-carbonapi-0.10.0.1_GH0.tar.gz) = 1884119 Added: head/www/carbonapi/files/carbonapi.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/carbonapi/files/carbonapi.in Wed Mar 21 16:49:20 2018 (r465192) @@ -0,0 +1,42 @@ +# $FreeBSD$ +# +# PROVIDE: carbonapi +# REQUIRE: LOGIN +# KEYWORD: shutdown + +# Add the following lines to /etc/rc.conf to enable carbonapi +# carbonapi_enable="YES" +# +# carbonapi_enable (bool): Set to YES to enable carbonapi +# Default: NO +# carbonapi_conf (str): carbonapi configration file +# Default: empty +# carbonapi_user (str): carbonapi daemon user +# Default: carbon +# carbonapi_group (str): carbonapi daemon group +# Default: carbon + +. /etc/rc.subr + +name="carbonapi" +rcvar=carbonapi_enable +load_rc_config $name + +: ${carbonapi_enable:="NO"} +: ${carbonapi_user:="carbon"} +: ${carbonapi_group:="carbon"} +: ${carbonapi_conf:=""} +: ${carbonapi_options:="-config ${carbonapi_conf}"} + +pidfile="/var/run/${name}.pid" +procname="%%PREFIX%%/bin/carbonapi" +command=/usr/sbin/daemon +command_args="-f -c -p ${pidfile} ${procname} ${carbonapi_options}" +start_precmd="carbonapi_precmd" + +carbonapi_precmd() +{ + install -o ${carbonapi_user} /dev/null ${pidfile} +} + +run_rc_command "$1" Added: head/www/carbonapi/files/patch-carbonapi.example.toml ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/carbonapi/files/patch-carbonapi.example.toml Wed Mar 21 16:49:20 2018 (r465192) @@ -0,0 +1,19 @@ +--- carbonapi.example.toml.orig 2018-03-20 21:03:28 UTC ++++ carbonapi.example.toml +@@ -11,7 +11,7 @@ maxBatchSize = 100 + pidFile = "" + sendGlobsAsIs = false + tz = "" +-graphTemplates = "graphTemplates.example.toml" ++graphTemplates = "/usr/local/etc/carbonapi/graphTemplates.example.toml" + + [cache] + defaultTimeoutSec = 60 +@@ -35,7 +35,7 @@ logger = "" + + [[logger]] + encoding = "json" +-file = "carbonapi.log" ++file = "/var/log/carbonapi/carbonapi.log" + level = "info" + logger = "" Added: head/www/carbonapi/files/patch-carbonapi.example.yaml ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/carbonapi/files/patch-carbonapi.example.yaml Wed Mar 21 16:49:20 2018 (r465192) @@ -0,0 +1,19 @@ +--- carbonapi.example.yaml.orig 2018-03-20 21:04:44 UTC ++++ carbonapi.example.yaml +@@ -106,7 +106,7 @@ upstreams: + # If not zero, enabled cache for find requests + # This parameter controls when it will expire (in seconds) + # Default: 600 (10 minutes) +-graphTemplates: graphTemplates.example.yaml ++graphTemplates: /usr/local/etc/carbonapi/graphTemplates.example.yaml + expireDelaySec: 10 + # Uncomment this to get the behavior of graphite-web as proposed in https://github.com/graphite-project/graphite-web/pull/2239 + # Beware this will make darkbackground graphs less readable +@@ -125,6 +125,6 @@ logger: + encodingTime: "iso8601" + encodingDuration: "seconds" + - logger: "" +- file: "carbonapi.log" ++ file: "/var/log/carbonapi/carbonapi.log" + level: "info" + encoding: "json" Added: head/www/carbonapi/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/carbonapi/pkg-descr Wed Mar 21 16:49:20 2018 (r465192) @@ -0,0 +1,3 @@ +carbonapi is a frontend for carbonzipper and can partially replace graphiteweb. + +WWW: https://github.com/go-graphite/carbonapi Added: head/www/carbonapi/pkg-message ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/carbonapi/pkg-message Wed Mar 21 16:49:20 2018 (r465192) @@ -0,0 +1,4 @@ +NOTE ABOUT CARBONAPI: + +This daemon can be configured with both yaml and toml. Choose one and specify +it's path in carbonapi_conf in /etc/rc.conf or with sysrc. Added: head/www/carbonapi/pkg-plist ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/carbonapi/pkg-plist Wed Mar 21 16:49:20 2018 (r465192) @@ -0,0 +1,6 @@ +bin/carbonapi +%%ETCDIR%%/carbonapi.example.toml +%%ETCDIR%%/carbonapi.example.yaml +%%ETCDIR%%/graphTemplates.example.toml +%%ETCDIR%%/graphTemplates.example.yaml +@dir(carbon,carbon,0750) /var/log/carbonapi