From owner-svn-ports-all@freebsd.org Mon Aug 21 14:11:35 2017 Return-Path: Delivered-To: svn-ports-all@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 B4EA6DDE276; Mon, 21 Aug 2017 14:11:35 +0000 (UTC) (envelope-from krion@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 7870071760; Mon, 21 Aug 2017 14:11:35 +0000 (UTC) (envelope-from krion@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v7LEBYmA037930; Mon, 21 Aug 2017 14:11:34 GMT (envelope-from krion@FreeBSD.org) Received: (from krion@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v7LEBYsa037922; Mon, 21 Aug 2017 14:11:34 GMT (envelope-from krion@FreeBSD.org) Message-Id: <201708211411.v7LEBYsa037922@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: krion set sender to krion@FreeBSD.org using -f From: Kirill Ponomarev Date: Mon, 21 Aug 2017 14:11:33 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r448474 - in head: . databases databases/cockroach databases/cockroach/files X-SVN-Group: ports-head X-SVN-Commit-Author: krion X-SVN-Commit-Paths: in head: . databases databases/cockroach databases/cockroach/files X-SVN-Commit-Revision: 448474 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Aug 2017 14:11:35 -0000 Author: krion Date: Mon Aug 21 14:11:33 2017 New Revision: 448474 URL: https://svnweb.freebsd.org/changeset/ports/448474 Log: CockroachDB is a distributed SQL database built on a transactional and strongly-consistent key-value store. It scales horizontally; survives disk, machine, rack, and even datacenter failures with minimal latency disruption and no manual intervention; supports strongly-consistent ACID transactions; and provides a familiar SQL API for structuring, manipulating, and querying data. CockroachDB is inspired by Google's Spanner and F1 technologies, and it's completely open source. PR: 221635 Submitted by: James Nugent Approved by: mat (mentor) Differential Revision: https://reviews.freebsd.org/D12088 Added: head/databases/cockroach/ head/databases/cockroach/Makefile (contents, props changed) head/databases/cockroach/distinfo (contents, props changed) head/databases/cockroach/files/ head/databases/cockroach/files/cockroach.in (contents, props changed) head/databases/cockroach/pkg-descr (contents, props changed) Modified: head/GIDs head/UIDs head/databases/Makefile Modified: head/GIDs ============================================================================== --- head/GIDs Mon Aug 21 13:34:54 2017 (r448473) +++ head/GIDs Mon Aug 21 14:11:33 2017 (r448474) @@ -712,7 +712,7 @@ bopm:*:717: # free: 768 # free: 769 postgres:*:770: -# free: 771 +cockroach:*:771: # free: 772 # free: 773 # free: 774 Modified: head/UIDs ============================================================================== --- head/UIDs Mon Aug 21 13:34:54 2017 (r448473) +++ head/UIDs Mon Aug 21 14:11:33 2017 (r448474) @@ -718,7 +718,7 @@ _dnscrypt-wrapper:*:718:65534::0:0:dnscrypt-wrapper us # free: 768 # free: 769 postgres:*:770:770::0:0:PostgreSQL Daemon:/var/db/postgres:/bin/sh -# free: 771 +cockroach:*:771:771::0:0:CockroachDB Daemon:/var/db/cockroach:/usr/sbin/nologin # free: 772 # free: 773 # free: 774 Modified: head/databases/Makefile ============================================================================== --- head/databases/Makefile Mon Aug 21 13:34:54 2017 (r448473) +++ head/databases/Makefile Mon Aug 21 14:11:33 2017 (r448474) @@ -33,6 +33,7 @@ SUBDIR += cego SUBDIR += cegobridge SUBDIR += clickhouse + SUBDIR += cockroach SUBDIR += couchdb SUBDIR += courier-authlib-mysql SUBDIR += courier-authlib-pgsql Added: head/databases/cockroach/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/databases/cockroach/Makefile Mon Aug 21 14:11:33 2017 (r448474) @@ -0,0 +1,40 @@ +# $FreeBSD$ + +PORTNAME= cockroach +PORTVERSION= 1.0.4 +DISTVERSIONPREFIX= v +CATEGORIES= databases +MASTER_SITES= https://binaries.cockroachdb.com/ +EXTRACT_SUFX= .src.tgz + +MAINTAINER= james@jen20.com +COMMENT= Cloud-native SQL database that survive disasters + +LICENSE= APACHE20 +LICENSE_FILE= ${WRKSRC}/src/github.com/cockroachdb/cockroach/LICENSE + +BUILD_DEPENDS= bash:shells/bash \ + cmake:devel/cmake \ + go:lang/go + +USES= gmake + +USE_RC_SUBR= cockroach + +PLIST_FILES= bin/cockroach + +USERS= cockroach +GROUPS= cockroach + +post-patch: + @${REINPLACE_CMD} -e 's|-DCMAKE_CXX_FLAGS=-DNDEBUG)|-DCMAKE_CXX_FLAGS=-DNDEBUG) -DFAIL_ON_WARNINGS=OFF|g' \ + ${WRKSRC}/src/github.com/cockroachdb/cockroach/build/common.mk + +do-build: + @${SETENV} -i PATH="${PATH}" \ + ${MAKE_CMD} -C ${WRKSRC} buildoss + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/src/github.com/cockroachdb/cockroach/cockroach ${STAGEDIR}${PREFIX}/bin/ + +.include Added: head/databases/cockroach/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/databases/cockroach/distinfo Mon Aug 21 14:11:33 2017 (r448474) @@ -0,0 +1,3 @@ +TIMESTAMP = 1502917562 +SHA256 (cockroach-v1.0.4.src.tgz) = 1d135016ccef6c684b7414b6b26219cad74ebec9dea5421862ac8288025476b6 +SIZE (cockroach-v1.0.4.src.tgz) = 69123903 Added: head/databases/cockroach/files/cockroach.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/databases/cockroach/files/cockroach.in Mon Aug 21 14:11:33 2017 (r448474) @@ -0,0 +1,69 @@ +#!/bin/sh + +# $FreeBSD$ +# +# PROVIDE: cockroach +# REQUIRE: LOGIN +# KEYWORD: shutdown +# +# Add the following lines to /etc/rc.conf.local or /etc/rc.conf +# to enable this service: +# +# cockroach_enable (bool): Set to NO by default. +# Set it to YES to enable cockroach. +# cockroach_user (user): Set user to run cockroach. +# Default is "cockroach". +# cockroach_group (group): Set group to run cockroach. +# Default is "cockroach". +# cockroach_dir (dir): Set dir to run cockroach in. +# Default is "path=/var/db/cockroach". +# cockroach_flags (string): Set additional flags with which to run cockroach. +# Default is "--insecure --host=localhost". + +. /etc/rc.subr + +name=cockroach +rcvar=cockroach_enable + +load_rc_config $name + +: ${cockroach_enable:="NO"} +: ${cockroach_user:="cockroach"} +: ${cockroach_group:="cockroach"} +: ${cockroach_dir:="/var/db/cockroachdb"} +: ${cockroach_store:="--store=path=${cockroach_dir}"} +: ${cockroach_flags:="--insecure --host=localhost"} + +start_precmd=cockroach_startprecmd +start_cmd=${name}_start +stop_cmd=${name}_stop + +pidfile=/var/run/cockroach.pid +command="%%PREFIX%%/bin/cockroach" + +cockroach_startprecmd() +{ + if [ ! -e ${pidfile} ]; then + install -o ${cockroach_user} -g ${cockroach_group} /dev/null ${pidfile}; + fi + + if [ ! -d ${cockroach_dir} ]; then + install -d -o ${cockroach_user} -g ${cockroach_group} ${cockroach_dir} + fi +} + +cockroach_start() { + /usr/sbin/daemon -u ${cockroach_user} \ + -p $pidfile ${command} \ + start \ + ${cockroach_store} \ + ${cockroach_flags} +} + +cockroach_stop() { + [ -f $pidfile ] \ + && ${command} quit --insecure \ + || echo ${name} not running? \(check ${pidfile}\) +} + +run_rc_command "$1" Added: head/databases/cockroach/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/databases/cockroach/pkg-descr Mon Aug 21 14:11:33 2017 (r448474) @@ -0,0 +1,11 @@ +CockroachDB is a distributed SQL database built on a transactional +and strongly-consistent key-value store. It scales horizontally; +survives disk, machine, rack, and even datacenter failures with +minimal latency disruption and no manual intervention; supports +strongly-consistent ACID transactions; and provides a familiar SQL +API for structuring, manipulating, and querying data. + +CockroachDB is inspired by Google's Spanner and F1 technologies, and +it's completely open source. + +WWW: https://cockroachlabs.io/