From owner-freebsd-ports-bugs@FreeBSD.ORG Fri May 16 21:20:01 2014 Return-Path: Delivered-To: freebsd-ports-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A6DFF16B for ; Fri, 16 May 2014 21:20:01 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 83D1929ED for ; Fri, 16 May 2014 21:20:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s4GLK1hv094334 for ; Fri, 16 May 2014 21:20:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s4GLK1fV094333; Fri, 16 May 2014 21:20:01 GMT (envelope-from gnats) Resent-Date: Fri, 16 May 2014 21:20:01 GMT Resent-Message-Id: <201405162120.s4GLK1fV094333@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Dave Cottlehuber Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0BD06E66 for ; Fri, 16 May 2014 21:16:43 +0000 (UTC) Received: from cgiserv.freebsd.org (cgiserv.freebsd.org [IPv6:2001:1900:2254:206a::50:4]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E1CC029CC for ; Fri, 16 May 2014 21:16:42 +0000 (UTC) Received: from cgiserv.freebsd.org ([127.0.1.6]) by cgiserv.freebsd.org (8.14.8/8.14.8) with ESMTP id s4GLGgJW022091 for ; Fri, 16 May 2014 21:16:42 GMT (envelope-from nobody@cgiserv.freebsd.org) Received: (from nobody@localhost) by cgiserv.freebsd.org (8.14.8/8.14.8/Submit) id s4GLGg2L022084; Fri, 16 May 2014 21:16:42 GMT (envelope-from nobody) Message-Id: <201405162116.s4GLGg2L022084@cgiserv.freebsd.org> Date: Fri, 16 May 2014 21:16:42 GMT From: Dave Cottlehuber To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: ports/189872: port riemann to X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 May 2014 21:20:01 -0000 >Number: 189872 >Category: ports >Synopsis: port riemann to >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Fri May 16 21:20:00 UTC 2014 >Closed-Date: >Last-Modified: >Originator: Dave Cottlehuber >Release: FreeBSD 10.0R amd64 >Organization: SkunkWerks >Environment: FreeBSD wintermute.skunkwerks.at 10.0-RELEASE-p2 FreeBSD 10.0-RELEASE-p2 #0: Tue Apr 29 17:06:01 UTC 2014 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64 >Description: New port is largely complete, but has an issue I can't nail down. Time to call in the java-trained paratroopers. git branch is also at https://github.com/dch/freebsd-ports/tree/riemann-0.2.5/net-mgmt/riemann >How-To-Repeat: I'm not a java developer and I don't see how to set up the rc scripts such that: - `sudo service riemann start` returns after spawning the JVM - `sudo service riemann stop` knows how to stop the JVM (kill -9 is fine for this app) Currently I use: riemann_start() { JAVA_VERSION="%%JAVA_VERSION%%" \ exec "%%LOCALBASE%%/bin/java" -jar "%%JAVAJARDIR%%/riemann.jar" "$@" } Thanks also to xmj who provided much wisdom, some of which has likely been misunderstood. All errors, etc.. >Fix: Patch attached with submission follows: # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # riemann/ # riemann//pkg-plist # riemann//files # riemann//files/riemann.in # riemann//Makefile # riemann//pkg-descr # riemann//distinfo # echo c - riemann/ mkdir -p riemann/ > /dev/null 2>&1 echo x - riemann//pkg-plist sed 's/^X//' >riemann//pkg-plist << 'END-of-riemann//pkg-plist' X%%JAVAJARDIR%%/riemann.jar X@sample %%ETCDIR%%/riemann.config.sample X@exec mkdir %%LOGDIR%% X@dirrmtry %%ETCDIR%% END-of-riemann//pkg-plist echo c - riemann//files mkdir -p riemann//files > /dev/null 2>&1 echo x - riemann//files/riemann.in sed 's/^X//' >riemann//files/riemann.in << 'END-of-riemann//files/riemann.in' X#!/bin/sh X X# $FreeBSD$ X# X# PROVIDE: riemann X# REQUIRE: LOGIN X# KEYWORD: shutdown X# X# Add the following lines to /etc/rc.conf.local or /etc/rc.conf X# to enable this service: X# X# riemann_enable (bool): Set to NO by default. X# Set it to YES to enable riemann. X# X# riemann_config (string): Optional full path for riemann config X X. /etc/rc.subr X Xname="riemann" Xrcvar=riemann_enable X Xload_rc_config $name X X: ${riemann_enable="NO"} Xriemann_user="${riemann_user:-"riemann"}" Xriemann_config="${riemann_config:-"%%PREFIX%%/etc/riemann/riemann.config"}" Xriemann_logdir="${riemann_logdir:-"/var/log/riemann"}" X Xcommand="%%PREFIX%%/bin/${name}" Xcommand_args="${riemann_config}" Xrequired_files="${riemann_config}" X Xriemann_prestart() X{ X if ! [ -x {$riemann_logdir} ] ; then X mkdir -p 750 "${riemann_logdir}" X fi X chown -R ${riemann_user}:${riemann_user} "${riemann_logdir}" X} X Xstart_precmd="${name}_prestart" X Xriemann_start() X{ X JAVA_VERSION="%%JAVA_VERSION%%" \ X exec "%%LOCALBASE%%/bin/java" -jar "%%JAVAJARDIR%%/riemann.jar" "$@" X} X Xrun_rc_command $1 END-of-riemann//files/riemann.in echo x - riemann//Makefile sed 's/^X//' >riemann//Makefile << 'END-of-riemann//Makefile' X# Created by: Dave Cottlehuber X# $FreeBSD$ X XPORTNAME= riemann XPORTVERSION= 0.2.5 XCATEGORIES= net-mgmt XMASTER_SITES= http://aphyr.com/${PORTNAME}/ XLICENSE= EPL X XMAINTAINER= dch@skunkwerks.at XCOMMENT= Riemann monitors distributed systems X XUSES= tar:bzip2 XNO_BUILD= yes XNO_ARCH= yes XUSE_JAVA= yes XJAVA_VERSION= 1.6+ X XPLIST_SUB= JAVAJARDIR=${JAVAJARDIR} X XSUB_FILES= ${PORTNAME} X XUSERS= ${PORTNAME} XGROUPS= ${PORTNAME} X XUSE_RC_SUBR= ${PORTNAME} X XLOGDIR= /var/log/${PORTNAME} X Xdo-install: X @${MKDIR} ${STAGEDIR}${JAVAJARDIR} ${STAGEDIR}${ETCDIR} X ${INSTALL_DATA} ${WRKSRC}/lib/${PORTNAME}.jar \ X ${STAGEDIR}${JAVAJARDIR}/${PORTNAME}.jar X @${SED} -i -e "s:riemann.log:/var/log/${PORTNAME}/${PORTNAME}.log:g" \ X ${WRKSRC}/etc/${PORTNAME}.config X @${CP} -p ${WRKSRC}/etc/${PORTNAME}.config \ X ${STAGEDIR}${ETCDIR}/${PORTNAME}.config.sample X X.include END-of-riemann//Makefile echo x - riemann//pkg-descr sed 's/^X//' >riemann//pkg-descr << 'END-of-riemann//pkg-descr' XRiemann provides low-latency, transient shared state for systems with many Xmoving parts. X XRiemann aggregates events from your servers and applications with a powerful Xstream processing language. Send an email for every exception raised by your Xcode. Track the latency distribution of your web app. See the top processes Xon any host, by memory and CPU. Combine statistics from every Riak node in Xyour cluster and forward to Graphite. Send alerts when a key process fails Xto check in. Know how many users signed up right this second. X XWWW: http://riemann.io/ END-of-riemann//pkg-descr echo x - riemann//distinfo sed 's/^X//' >riemann//distinfo << 'END-of-riemann//distinfo' XSHA256 (riemann-0.2.5.tar.bz2) = fe8b18a59d056a74225f33b9614d095110e66a65e598e74b30aa4171722ef06f XSIZE (riemann-0.2.5.tar.bz2) = 31402792 END-of-riemann//distinfo exit >Release-Note: >Audit-Trail: >Unformatted: