Bug 221635

Summary: [NEW PORT] databases/cockroach: Open source SQL database
Product: Ports & Packages Reporter: James Nugent <freebsd>
Component: Individual Port(s)Assignee: Kirill Ponomarev <krion>
Status: Closed FIXED    
Severity: Affects Only Me CC: freebsd, krion
Priority: ---    
Version: Latest   
Hardware: amd64   
OS: Any   
Attachments:
Description Flags
diff
none
Updated patch working on 12.0-CURRENT
none
Tested on 11.1-RELEASE and 12.0-CURRENT none

Description James Nugent 2017-08-19 19:33:42 UTC
Created attachment 185586 [details]
diff

Tested with portlint, Poudriere on 11.1-RELEASE.
Comment 1 Kirill Ponomarev freebsd_committer freebsd_triage 2017-08-20 12:17:45 UTC
I couldn't build it on CURRENT, please fix it:

http://pkg.krion.cc/data/12amd64-default/2017-08-20_14h14m52s/logs/errors/cockroach-1.0.4.log
Comment 2 James Nugent 2017-08-20 18:45:32 UTC
Created attachment 185612 [details]
Updated patch working on 12.0-CURRENT
Comment 3 James Nugent 2017-08-20 18:45:46 UTC
It seems a new warning, -Wunused-lambda-capture, has appeared or been enabled by default between the 11.1-RELEASE version of Clang and that in 12.0-CURRENT. The error is during the compilation of RockDB and was fixed upstream in a later version, simply by removing the unnecessary variable capture.

Because of the slightly unusual way in which the RocksDB dependency is pulled into releases of CockroachDB, I've instead patched the build flags for just RocksDB to disable warnings as errors, as patching the offending file during the usual patch step is difficult, since it is part of an archive which does not get expanded until later in the build. I'm not certain this is the best way to approach this, but I can't find anything analogous in either the handbook or other ports.
Comment 4 James Nugent 2017-08-21 11:23:28 UTC
Created attachment 185636 [details]
Tested on 11.1-RELEASE and 12.0-CURRENT

In my edits the patch to `databases/Makefile` got lost - the latest patch includes that and the fix for 12.0-CURRENT.
Comment 5 commit-hook freebsd_committer freebsd_triage 2017-08-21 14:12:04 UTC
A commit references this bug:

Author: krion
Date: Mon Aug 21 14:11:34 UTC 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 <freebsd@jen20.com>
  Approved by:	mat (mentor)
  Differential Revision: https://reviews.freebsd.org/D12088

Changes:
  head/GIDs
  head/UIDs
  head/databases/Makefile
  head/databases/cockroach/
  head/databases/cockroach/Makefile
  head/databases/cockroach/distinfo
  head/databases/cockroach/files/
  head/databases/cockroach/files/cockroach.in
  head/databases/cockroach/pkg-descr