From owner-svn-ports-head@freebsd.org Sat May 20 21:51:03 2017 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E550CD761B1; Sat, 20 May 2017 21:51:03 +0000 (UTC) (envelope-from sunpoet@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 mx1.freebsd.org (Postfix) with ESMTPS id A786F301; Sat, 20 May 2017 21:51:03 +0000 (UTC) (envelope-from sunpoet@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4KLp2r8037543; Sat, 20 May 2017 21:51:02 GMT (envelope-from sunpoet@FreeBSD.org) Received: (from sunpoet@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4KLp2p1037538; Sat, 20 May 2017 21:51:02 GMT (envelope-from sunpoet@FreeBSD.org) Message-Id: <201705202151.v4KLp2p1037538@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sunpoet set sender to sunpoet@FreeBSD.org using -f From: Sunpoet Po-Chuan Hsieh Date: Sat, 20 May 2017 21:51:02 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r441350 - in head: . databases/kyototycoon databases/kyototycoon/files X-SVN-Group: ports-head 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.23 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: Sat, 20 May 2017 21:51:04 -0000 Author: sunpoet Date: Sat May 20 21:51:02 2017 New Revision: 441350 URL: https://svnweb.freebsd.org/changeset/ports/441350 Log: Add rc.d script - Assign default UID and GID - Bump PORTREVISION for package change PR: 217083 Submitted by: Dave Cottlehuber Added: head/databases/kyototycoon/files/kyototycoon.in (contents, props changed) Modified: head/GIDs head/UIDs head/databases/kyototycoon/Makefile Modified: head/GIDs ============================================================================== --- head/GIDs Sat May 20 21:50:56 2017 (r441349) +++ head/GIDs Sat May 20 21:51:02 2017 (r441350) @@ -155,7 +155,7 @@ shoutcast:*:210: git:*:211: hg:*:212: drizzle:*:213: -# free: 214 +kyototycoon:*:214: opendnssec:*:215: nsd:*:216: # free: 217 Modified: head/UIDs ============================================================================== --- head/UIDs Sat May 20 21:50:56 2017 (r441349) +++ head/UIDs Sat May 20 21:51:02 2017 (r441350) @@ -160,7 +160,7 @@ shoutcast:*:210:210::0:0:Shoutcast sandb git:*:211:211::0:0:gitosis user:/usr/local/git:/bin/sh hg:*:212:212::0:0:mercurial-server user:/usr/local/hg:/bin/sh drizzle:*:213:213::0:0:Drizzle daemon:/var/db/drizzle:/usr/sbin/nologin -# free: 214 +kyototycoon:*:214:214::0:0:kyototycoon user:/var/empty:/usr/sbin/nologin opendnssec:*:215:215::0:0:Opendnssec Pseudo User:/nonexistent:/usr/sbin/nologin nsd:*:216:216::0:0:NSD DNS Server:/nonexistent:/usr/sbin/nologin # free: 217 Modified: head/databases/kyototycoon/Makefile ============================================================================== --- head/databases/kyototycoon/Makefile Sat May 20 21:50:56 2017 (r441349) +++ head/databases/kyototycoon/Makefile Sat May 20 21:51:02 2017 (r441350) @@ -3,7 +3,7 @@ PORTNAME= kyototycoon PORTVERSION= 0.9.56 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= databases MASTER_SITES= http://fallabs.com/${PORTNAME}/pkg/ \ LOCAL/sunpoet @@ -26,9 +26,30 @@ MAKE_ARGS= PCDIR=${PREFIX}/libdata/pkgco REINPLACE_ARGS= -i '' TEST_TARGET= check USE_LDCONFIG= yes +USE_RC_SUBR= ${PORTNAME} USES= gmake pkgconfig +PLIST_SUB= KYOTOTYCOON_USER=${KYOTOTYCOON_USER} \ + KYOTOTYCOON_GROUP=${KYOTOTYCOON_GROUP} \ + KYOTOTYCOON_DBDIR=${KYOTOTYCOON_DBDIR} \ + KYOTOTYCOON_LOGDIR=${KYOTOTYCOON_LOGDIR} \ + KYOTOTYCOON_PIDFILE=${KYOTOTYCOON_PIDFILE} PORTDOCS= * +SUB_FILES= ${PORTNAME} +SUB_LIST= KYOTOTYCOON_USER=${KYOTOTYCOON_USER} \ + KYOTOTYCOON_GROUP=${KYOTOTYCOON_GROUP} \ + KYOTOTYCOON_DBDIR=${KYOTOTYCOON_DBDIR} \ + KYOTOTYCOON_LOGDIR=${KYOTOTYCOON_LOGDIR} \ + KYOTOTYCOON_PIDFILE=${KYOTOTYCOON_PIDFILE} + +USERS= ${KYOTOTYCOON_USER} +GROUPS= ${KYOTOTYCOON_GROUP} + +KYOTOTYCOON_USER?= ${PORTNAME} +KYOTOTYCOON_GROUP?= ${PORTNAME} +KYOTOTYCOON_DBDIR?= /var/db/${PORTNAME} +KYOTOTYCOON_LOGDIR?= /var/log/${PORTNAME} +KYOTOTYCOON_PIDFILE?= /var/run/${PORTNAME}.pid LZO_CONFIGURE_OFF= ac_cv_lib_lzo2_main=no LZO_CONFIGURE_ON= ac_cv_lib_lzo2_main=yes Added: head/databases/kyototycoon/files/kyototycoon.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/databases/kyototycoon/files/kyototycoon.in Sat May 20 21:51:02 2017 (r441350) @@ -0,0 +1,56 @@ +#!/bin/sh + +# $FreeBSD$ +# +# PROVIDE: kyototycoon +# REQUIRE: LOGIN NETWORKING SERVERS +# KEYWORD: shutdown +# +# Add the following lines to /etc/rc.conf.local or /etc/rc.conf +# to enable this service: +# +# kyototycoon_enable (bool): Set to NO by default. +# Set it to YES to enable kyototycoon. +# +# kyototycoon_user (user): Set to kyototycoon by default. +# kyototycoon_group (group): Set to kyototycoon by default. +# kyototycoon_dbdir (path): Path to database files. +# kyototycoon_log (path): Path to log file. +# kyototycoon_sid (int): ServerID - 0-65535 +# kyototycoon_opts (args): Additional command-line arguments. + +. /etc/rc.subr + +name="kyototycoon" +rcvar=kyototycoon_enable + +load_rc_config $name + +: ${kyototycoon_enable="NO"} +: ${kyototycoon_user:="%%KYOTOTYCOON_USER%%"} +: ${kyototycoon_group:="%%KYOTOTYCOON_GROUP%%"} +: ${kyototycoon_dbdir="%%KYOTOTYCOON_DBDIR%%"} +: ${kyototycoon_log="%%KYOTOTYCOON_LOGDIR%%/kyoto.log"} +: ${kyototycoon_sid="1"} +: ${kyototycoon_opts:=" -li"} + +command="/usr/sbin/daemon" +command_args="-f -c -r -t ${name} -P ${pidfile} \ + %%PREFIX%%/bin/ktserver \ + -bgs ${kyototycoon_dbdir}/snapshots \ + -ulog ${kyototycoon_dbdir}/updates \ + -log ${kyototycoon_log} \ + -sid ${kyototycoon_sid} \ + ${kyototycoon_opts}" +pidfile="%%KYOTOTYCOON_PIDFILE%%" + +required_dirs="${kyototycoon_dbdir}/snapshots ${kyototycoon_dbdir}/updates" +required_files="${kyototycoon_log}" + +kyototycoon_prestart() +{ + install -o ${kyototycoon_user} /dev/null ${pidfile} +} +start_precmd=${name}_prestart + +run_rc_command "$1"