summaryrefslogtreecommitdiff
path: root/dev-db/cockroach
diff options
context:
space:
mode:
Diffstat (limited to 'dev-db/cockroach')
-rw-r--r--dev-db/cockroach/Manifest16
-rw-r--r--dev-db/cockroach/cockroach-1.0-r1.ebuild61
-rw-r--r--dev-db/cockroach/cockroach-1.0.1.ebuild61
-rw-r--r--dev-db/cockroach/cockroach-1.0.3.ebuild61
-rw-r--r--dev-db/cockroach/cockroach-1.0.ebuild61
-rw-r--r--dev-db/cockroach/cockroach-1.0_rc1.ebuild59
-rw-r--r--dev-db/cockroach/files/cockroach-limits.conf4
-rw-r--r--dev-db/cockroach/files/cockroach.confd14
-rw-r--r--dev-db/cockroach/files/cockroach.confd-1.045
-rw-r--r--dev-db/cockroach/files/cockroach.initd23
-rw-r--r--dev-db/cockroach/files/cockroach.initd-1.060
-rw-r--r--dev-db/cockroach/files/cockroach.initd-1.0.170
-rw-r--r--dev-db/cockroach/metadata.xml12
13 files changed, 547 insertions, 0 deletions
diff --git a/dev-db/cockroach/Manifest b/dev-db/cockroach/Manifest
new file mode 100644
index 000000000000..aec3d99b4f88
--- /dev/null
+++ b/dev-db/cockroach/Manifest
@@ -0,0 +1,16 @@
+AUX cockroach-limits.conf 136 SHA256 a237b61426c43735d44e7da85a19d34a46f95e70185dd3a3447302b85b7c252f SHA512 c8c68263967f0d25eaf29dc3023046edeaf9e36f23f6f296d7e1dd7b2126a0b4f431af60e34fcb5c075855260f19d7ffc0516d6ef68ff852b3c95a2632cdd6ae WHIRLPOOL 4ee01e79cffa35e3ed4d2724eed9c232701aa3a714ccaebd76f3e221101845534b57374dfcf361ded633a3e1f0ccf50a83c02bddd24108157ad74faf8fcef7a1
+AUX cockroach.confd 521 SHA256 0ed6f58c92ce5f73b10cea42821cc2e8272ec7e3d310c68ac668a002ba483603 SHA512 81efbc65e1e6dbcc4f98ab0f9ca201c9dd299140ee31cc04bfab82c7d33215a69cad15b3c190c23eb0e4a11b9050bc588b5d1097630bf2ebee4f3f14d53f3183 WHIRLPOOL f8b806370069c1d25c3b3204332924abc324d63c730395b6a0f86dc1d2d1afe7d8e29c9a3348a03d21f9df74dccf8356775a827ef4c710ceeced6c1b90840f35
+AUX cockroach.confd-1.0 1324 SHA256 cc03748d00c038bc5c509c61038fe207adf1dc53f9f9a48be528a27496321f3d SHA512 538042bb5484acfdb31c5a750be73d5e6efeb03a3b243d5bc204db9266a7b02daf7ea9d4687fd3a5223dc6d493a1672c1b581e4527599cb3e7c31e11ec2742fd WHIRLPOOL 8394f832670a97cfa0b44d7cc5c20afb14bbef1a09a166eecf39ef05c765f8b46e7cfec5091230332cf7b38ceec2d3932f04c5e86ded32557d57ee1f58107232
+AUX cockroach.initd 542 SHA256 dbd006aca5decf34579d02c9d67637738679899ca9cb1a9bd6133628b6fb2d3d SHA512 86684b238413812b6787bf0841dc34302f80b9ad2c25a47a349100503b37f61ec8851870c29bb4fe697216443a39ad5e2decbcedea90664adb3b7316c440e345 WHIRLPOOL b339f1cee7e597e8f162d14515adc2038ce2b445a398186afa1cc1dce5800025a81b93dce48a19e8d0ed5bdfd3e1964d4e9b44259218e5549e9995c53f258a33
+AUX cockroach.initd-1.0 1676 SHA256 de2403cbcc4d5bf608b2dbea71c560b44f8e85c3a4ab0bbfae2f82af68dcab34 SHA512 5f0b6ade2b25372cfc7d810d9dbe10e9732e79527c0ad73eec0cdbbad894a773bfd4aaffb958d3c0e0e7ecb636a07214be494cfdd5e69f4faacc30849f7e3eb9 WHIRLPOOL 29aef55e02d3e12e9edbfbd336264a1a458c962b66a4d77752d51175e38e172de16bfcdeb02d14ca9d014fb6bad588ff6b2af032695ea6269fd9c582c9b62cd7
+AUX cockroach.initd-1.0.1 1820 SHA256 3accf29051f04fcc4febf416d40a7ee985760f44c3a8ae21cef29a57e9c11f1f SHA512 df0c06bb6ee97c3f531250486ca1fe3d2333c1e280e2d0acb24c9aa061bd6ba35358504e29bf934a382e0a677c812e6dd474e78fcab1cd5188e93e8082748e04 WHIRLPOOL 2e0b7810db9d549c63cf894c0929432378291a2e673ca4e255bac7c12a13339ad174dce999103818580467c7efd0b1de1e93eb4d974b520606fb438ad2fbdb0a
+DIST cockroach-v1.0-rc.1.src.tgz 68784067 SHA256 162e3954ff41515bf2ab2017ab38f9cdf76775d7d67fdeead343234d470dca6c SHA512 c68fc712068cbfce167d98008cdcb46270a8fa772624281da23a70d0492c7990c9ce8513334fedc31d7dde5176087fa6211a4e90d77741ed0079f9568c71e0ff WHIRLPOOL 510dbefb6348f9707e1e3fcd94d873911350b8d2d767c093df3bfff514e7f72ca1ff1e16d0539c48f80dd53a725d8ab4f3fe901862ee88a4e5e1e9999034eeaf
+DIST cockroach-v1.0.1.src.tgz 69116931 SHA256 35c0b9e7e0330822f35c17339ecd635153274ae47e56a110a710e788cdb1b1c9 SHA512 d388d84c09f1318420f859c964c46b78e5237685fbc2b1a8d55fad2ce1dabc89461ad5eaa6d95283dda4551542f33e5df2feda4afd7129e1f850e469e0d17e69 WHIRLPOOL 82dba367bbc09ead8cb2480fb4cbe38e95571abe76d99a1c60628b0a15c4166ef414ed74899fe55912e3c287859d8b1786c58d60ec648683bb32930c90fbbd08
+DIST cockroach-v1.0.3.src.tgz 69127502 SHA256 80e9f3858dc0fd3e0cf08540b3f9a3e3f0fcefd8bc66bfc14e716de36be25765 SHA512 2bae99faba0f56774ab964d920f8628afc6af61ce53bc3e99f1b360c0606e0777b90dd93cbd6844109c3224867fc4180fb42e6dacc75e4eb4db8a4f93f586577 WHIRLPOOL 58f8b117b8fc1b052b43652507861aa0c18cced7c88393c7a5d2c860683070fdd2b61b5050fc11bd07316c4d400c80ca1fb4a05594a5e5c15a88ec1833f5671d
+DIST cockroach-v1.0.src.tgz 68753479 SHA256 ca87b10eec688195e0df4f85431b019f2980ae4b511ee321f91f945315efeb76 SHA512 d74ad9546908535f9a7ad4172a04a5f86f5ed22698bbb005aec7478a52632e0497a966b859fd68b40894eb7ee68bfa80dc4188d198f2f23725b9cadd50a55191 WHIRLPOOL c6011b09c2b20757ae5e3268cf050748a3856ec1fe1d86755e773390c97ebdb8494db3d51119298a797689bcc201bc20bf4bc8b5bdebff44d7598265c9379b93
+EBUILD cockroach-1.0-r1.ebuild 1703 SHA256 3c469f2de14d78dcd97e3cb7f5165cf00c7822379f2e28f59158ddbec7e07930 SHA512 f9d54c7b9395e8ef6552211535641b9241df50d922f6c2e8c74c1782538ea25953c8c15fd89bf6ab17c6264b75bcfd23b5fd27ea9b4054f6579a2753b81c9eb3 WHIRLPOOL 625f420833cb893c7a2932d6b38681ee4401e5a46a253ac29c00ea5c028560e44046ae231ab2a2346a1734099e225a998ae72e4ac06f64fc907479ffc65f6751
+EBUILD cockroach-1.0.1.ebuild 1701 SHA256 965d0b06f2cba95e5c7c80976b57634e4bd9376318af69251338671846d6395f SHA512 61ded57cbd28008a27b3b8a2e048a89a70be76317d350c29554ac0450de8932c275aedb63f6d032997013abb63b8a29aff4dae107bccf7876d7afe7ed14149df WHIRLPOOL 8d737e7c55dc27f2dbc1e0535240192b27f817b8f9eb449d7787cb158527382503ea38c5672b1820a191314f376571c89e6b89ac5540c7c61b73c3020db71628
+EBUILD cockroach-1.0.3.ebuild 1701 SHA256 fbf4948d7c56b724efd1afb0626d4fb89457af298e9c365480944501e73c03a2 SHA512 b1a0a2adb8555a227bdb9caff6a91efba4c010a82372b5ad446ab2feb9b68a98456b5b60c14513e5aeebae290a56fd936a8c17194821d12f2b910e8e0f3d1979 WHIRLPOOL 9ba79350953543cb305f19226c965128f3a20bbdc5db74f8b50c596de0e60dbda29b20565af1a8ae39a52ec750404dcc506003a99fc20c64130c419ed8af4dc3
+EBUILD cockroach-1.0.ebuild 1689 SHA256 73936d87d3dde1f06d265b797546a2306cb507929420b7c61e2f9a6c8e6d3e89 SHA512 66a6c94d7804cdb62eaa66083961d40b2e2fb8d4bde08a084fedf4b57ac67eadb28d97dfd0087b3e5cefd6ab9d1ddf4ec7a05b5e7413d803a5cfbcc2ba0a733b WHIRLPOOL 8dfef06a94e835ada80f81242cdc043dbb4799bd34707b7d5457d0cebc1187126e30d7e778c729d8608b224f607c5202598a3fd775f3acae45f1528da45f76f2
+EBUILD cockroach-1.0_rc1.ebuild 1593 SHA256 80b34d34c9a1298ea6193baa93a79c1c033c47facfd5aa7cc41cac9ac2721475 SHA512 6f273468fd5b869144d474027dd644a9031c18f1b18525c89775c9d8eacdeb59d64b195216189ebe6a2251973abc500b2f3047fc88af7d97aa9798c0db8fa16a WHIRLPOOL 75ff19fec6663afcf9bc9523df6255b07307a982545cb2c524fa3a299f78d04d00b30e3a22a368ed10907223e12b32900747b1260a901610e1a229a53fbcaadf
+MISC metadata.xml 409 SHA256 f5bafcf3d9325295524b3de69c6737a2cc2d0b0a41a4cf1c004636f18ef4f622 SHA512 e4494324632e55e32fdfe7c1d1b25301b8f7cff3f7475efaf7c6c59d435777eab7245bb200b39b90121babce4e1573038fb0f42e586854a820e1489c1afddd19 WHIRLPOOL b2c63749fa2337bdcdaed4e6e2aac84b689b830c72a1311251d154f7d1a33c077ccc1a4769a9828cbbf56eaa888d39acb9669cd0891c5d3292c32f9927d589e8
diff --git a/dev-db/cockroach/cockroach-1.0-r1.ebuild b/dev-db/cockroach/cockroach-1.0-r1.ebuild
new file mode 100644
index 000000000000..4b19589a461b
--- /dev/null
+++ b/dev-db/cockroach/cockroach-1.0-r1.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+MY_PV=v${PV}
+CHECKREQS_MEMORY="2G"
+
+inherit check-reqs toolchain-funcs user
+
+DESCRIPTION="open source database for building cloud services"
+HOMEPAGE="https://www.cockroachlabs.com"
+SRC_URI="https://binaries.cockroachdb.com/cockroach-${MY_PV}.src.tgz"
+
+LICENSE="Cockroach Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+DEPEND=">=app-arch/xz-utils-5.2.3
+ >=dev-lang/go-1.8.1
+ >=dev-util/cmake-3.8.1"
+
+S="${WORKDIR}/cockroach-${MY_PV}"
+
+pkg_pretend() {
+ check-reqs_pkg_pretend
+ if [[ ${MERGE_TYPE} != binary && $(gcc-major-version) -lt 6 ]]; then
+ eerror "Cockroach cannot be built with this version of gcc."
+ eerror "You need at least gcc-6.0"
+ die "Your C compiler is too old for this package."
+ fi
+}
+
+pkg_setup() {
+ check-reqs_pkg_setup
+ enewgroup cockroach
+ enewuser cockroach -1 /bin/sh /var/lib/cockroach cockroach
+}
+
+src_compile() {
+ emake GOPATH="${S}" build
+}
+
+src_install() {
+ dobin src/github.com/cockroachdb/cockroach/cockroach
+insinto /etc/security/limits.d
+newins "${FILESDIR}"/cockroach-limits.conf cockroach.conf
+newconfd "${FILESDIR}"/cockroach.confd-${PV} cockroach
+newinitd "${FILESDIR}"/cockroach.initd-${PV} cockroach
+dodir /var/log/cockroach
+fowners cockroach:cockroach /var/log/cockroach
+if [[ -z ${REPLACING_VERSIONS} ]]; then
+ ewarn "The default setup is for the first node of an insecure"
+ ewarn "cluster that only listens on localhost."
+ ewarn "Please read the cockroach manual at the following url"
+ ewarn "and configure /etc/conf.d/cockroach correctly if you"
+ ewarn "plan to use it in production."
+ ewarn
+ ewarn "http://cockroachlabs.com/docs"
+ fi
+}
diff --git a/dev-db/cockroach/cockroach-1.0.1.ebuild b/dev-db/cockroach/cockroach-1.0.1.ebuild
new file mode 100644
index 000000000000..212bede14658
--- /dev/null
+++ b/dev-db/cockroach/cockroach-1.0.1.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+MY_PV=v${PV}
+CHECKREQS_MEMORY="2G"
+
+inherit check-reqs toolchain-funcs user
+
+DESCRIPTION="open source database for building cloud services"
+HOMEPAGE="https://www.cockroachlabs.com"
+SRC_URI="https://binaries.cockroachdb.com/cockroach-${MY_PV}.src.tgz"
+
+LICENSE="Cockroach Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+DEPEND=">=app-arch/xz-utils-5.2.3
+ >=dev-lang/go-1.8.1
+ >=dev-util/cmake-3.8.1"
+
+S="${WORKDIR}/cockroach-${MY_PV}"
+
+pkg_pretend() {
+ check-reqs_pkg_pretend
+ if [[ ${MERGE_TYPE} != binary && $(gcc-major-version) -lt 6 ]]; then
+ eerror "Cockroach cannot be built with this version of gcc."
+ eerror "You need at least gcc-6.0"
+ die "Your C compiler is too old for this package."
+ fi
+}
+
+pkg_setup() {
+ check-reqs_pkg_setup
+ enewgroup cockroach
+ enewuser cockroach -1 /bin/sh /var/lib/cockroach cockroach
+}
+
+src_compile() {
+ emake GOPATH="${S}" build
+}
+
+src_install() {
+ dobin src/github.com/cockroachdb/cockroach/cockroach
+insinto /etc/security/limits.d
+newins "${FILESDIR}"/cockroach-limits.conf cockroach.conf
+newconfd "${FILESDIR}"/cockroach.confd-1.0 cockroach
+newinitd "${FILESDIR}"/cockroach.initd-${PV} cockroach
+dodir /var/log/cockroach
+fowners cockroach:cockroach /var/log/cockroach
+if [[ -z ${REPLACING_VERSIONS} ]]; then
+ ewarn "The default setup is for the first node of an insecure"
+ ewarn "cluster that only listens on localhost."
+ ewarn "Please read the cockroach manual at the following url"
+ ewarn "and configure /etc/conf.d/cockroach correctly if you"
+ ewarn "plan to use it in production."
+ ewarn
+ ewarn "http://cockroachlabs.com/docs"
+ fi
+}
diff --git a/dev-db/cockroach/cockroach-1.0.3.ebuild b/dev-db/cockroach/cockroach-1.0.3.ebuild
new file mode 100644
index 000000000000..0b0e1d9f89d0
--- /dev/null
+++ b/dev-db/cockroach/cockroach-1.0.3.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+MY_PV=v${PV}
+CHECKREQS_MEMORY="2G"
+
+inherit check-reqs toolchain-funcs user
+
+DESCRIPTION="open source database for building cloud services"
+HOMEPAGE="https://www.cockroachlabs.com"
+SRC_URI="https://binaries.cockroachdb.com/cockroach-${MY_PV}.src.tgz"
+
+LICENSE="Cockroach Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+DEPEND=">=app-arch/xz-utils-5.2.3
+ >=dev-lang/go-1.8.3
+ >=dev-util/cmake-3.8.1"
+
+S="${WORKDIR}/cockroach-${MY_PV}"
+
+pkg_pretend() {
+ check-reqs_pkg_pretend
+ if [[ ${MERGE_TYPE} != binary && $(gcc-major-version) -lt 6 ]]; then
+ eerror "Cockroach cannot be built with this version of gcc."
+ eerror "You need at least gcc-6.0"
+ die "Your C compiler is too old for this package."
+ fi
+}
+
+pkg_setup() {
+ check-reqs_pkg_setup
+ enewgroup cockroach
+ enewuser cockroach -1 /bin/sh /var/lib/cockroach cockroach
+}
+
+src_compile() {
+ emake GOPATH="${S}" build
+}
+
+src_install() {
+ dobin src/github.com/cockroachdb/cockroach/cockroach
+insinto /etc/security/limits.d
+newins "${FILESDIR}"/cockroach-limits.conf cockroach.conf
+newconfd "${FILESDIR}"/cockroach.confd-1.0 cockroach
+newinitd "${FILESDIR}"/cockroach.initd-1.0.1 cockroach
+dodir /var/log/cockroach
+fowners cockroach:cockroach /var/log/cockroach
+if [[ -z ${REPLACING_VERSIONS} ]]; then
+ ewarn "The default setup is for the first node of an insecure"
+ ewarn "cluster that only listens on localhost."
+ ewarn "Please read the cockroach manual at the following url"
+ ewarn "and configure /etc/conf.d/cockroach correctly if you"
+ ewarn "plan to use it in production."
+ ewarn
+ ewarn "http://cockroachlabs.com/docs"
+ fi
+}
diff --git a/dev-db/cockroach/cockroach-1.0.ebuild b/dev-db/cockroach/cockroach-1.0.ebuild
new file mode 100644
index 000000000000..c7253935686f
--- /dev/null
+++ b/dev-db/cockroach/cockroach-1.0.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+MY_PV=v${PV}
+CHECKREQS_MEMORY="2G"
+
+inherit check-reqs toolchain-funcs user
+
+DESCRIPTION="open source database for building cloud services"
+HOMEPAGE="https://www.cockroachlabs.com"
+SRC_URI="https://binaries.cockroachdb.com/cockroach-${MY_PV}.src.tgz"
+
+LICENSE="Cockroach Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+DEPEND=">=app-arch/xz-utils-5.2.3
+ >=dev-lang/go-1.8.1
+ >=dev-util/cmake-3.8.1"
+
+S="${WORKDIR}/cockroach-${MY_PV}"
+
+pkg_pretend() {
+ check-reqs_pkg_pretend
+ if [[ ${MERGE_TYPE} != binary && $(gcc-major-version) -lt 6 ]]; then
+ eerror "Cockroach cannot be built with this version of gcc."
+ eerror "You need at least gcc-6.0"
+ die "Your C compiler is too old for this package."
+ fi
+}
+
+pkg_setup() {
+ check-reqs_pkg_setup
+ enewgroup cockroach
+ enewuser cockroach -1 /bin/sh /var/lib/cockroach cockroach
+}
+
+src_compile() {
+ emake GOPATH="${S}" build
+}
+
+src_install() {
+ dobin src/github.com/cockroachdb/cockroach/cockroach
+insinto /etc/security/limits.d
+newins "${FILESDIR}"/cockroach-limits.conf cockroach.conf
+newconfd "${FILESDIR}"/cockroach.confd cockroach
+newinitd "${FILESDIR}"/cockroach.initd cockroach
+dodir /var/log/cockroach
+fowners cockroach:cockroach /var/log/cockroach
+if [[ -z ${REPLACING_VERSIONS} ]]; then
+ ewarn "The default setup is for the first node of an insecure"
+ ewarn "cluster that only listens on localhost."
+ ewarn "Please read the cockroach manual at the following url"
+ ewarn "and configure /etc/conf.d/cockroach correctly if you"
+ ewarn "plan to use it in production."
+ elog
+ elog "http://cockroachlabs.com/docs"
+ fi
+}
diff --git a/dev-db/cockroach/cockroach-1.0_rc1.ebuild b/dev-db/cockroach/cockroach-1.0_rc1.ebuild
new file mode 100644
index 000000000000..7ce069fb3180
--- /dev/null
+++ b/dev-db/cockroach/cockroach-1.0_rc1.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+MY_PV=v1.0-rc.1
+CHECKREQS_MEMORY="2G"
+
+inherit check-reqs toolchain-funcs user
+
+DESCRIPTION="open source database for building cloud services"
+HOMEPAGE="https://www.cockroachlabs.com"
+SRC_URI="https://binaries.cockroachdb.com/cockroach-${MY_PV}.src.tgz"
+
+LICENSE="Cockroach Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+DEPEND=">=dev-lang/go-1.8.1"
+
+S="${WORKDIR}/cockroach-${MY_PV}"
+
+pkg_pretend() {
+ check-reqs_pkg_pretend
+ if [[ ${MERGE_TYPE} != binary && $(gcc-major-version) -lt 6 ]]; then
+ eerror "Cockroach cannot be built with this version of gcc."
+ eerror "You need at least gcc-6.0"
+ die "Your C compiler is too old for this package."
+ fi
+}
+
+pkg_setup() {
+ check-reqs_pkg_setup
+ enewgroup cockroach
+ enewuser cockroach -1 /bin/sh /var/lib/cockroach cockroach
+}
+
+src_compile() {
+ emake GOPATH="${S}" build || die
+}
+
+src_install() {
+ emake GOPATH="${S}" install || die
+dobin bin/*
+insinto /etc/security/limits.d
+newins "${FILESDIR}"/cockroach-limits.conf cockroach.conf
+newinitd "${FILESDIR}"/cockroach.initd cockroach
+dodir /var/log/cockroach
+fowners cockroach:cockroach /var/log/cockroach
+if [[ -z ${REPLACING_VERSIONS} ]]; then
+ ewarn "The default setup is for the first node of an insecure"
+ ewarn "cluster that only listens on localhost."
+ ewarn "Please read the cockroach manual at the following url"
+ ewarn "and configure /etc/conf.d/cockroach correctly if you"
+ ewarn "plan to use it in production."
+ elog
+ elog "http://cockroachlabs.com/docs"
+ fi
+}
diff --git a/dev-db/cockroach/files/cockroach-limits.conf b/dev-db/cockroach/files/cockroach-limits.conf
new file mode 100644
index 000000000000..2014a5d508cb
--- /dev/null
+++ b/dev-db/cockroach/files/cockroach-limits.conf
@@ -0,0 +1,4 @@
+# This is needed because cockroach can open a high number of file
+# descriptors
+cockroach soft nofile 35000
+cockroach hard nofile 35000
diff --git a/dev-db/cockroach/files/cockroach.confd b/dev-db/cockroach/files/cockroach.confd
new file mode 100644
index 000000000000..37593e217c71
--- /dev/null
+++ b/dev-db/cockroach/files/cockroach.confd
@@ -0,0 +1,14 @@
+# The default setup is for the first node of an insecure cluster that only
+# listens on localhost.
+# Please read the cockroach manual at the following url and configure
+# the start_args and stop_args correctly if you plan to use cockroach in
+# production.
+#
+# http://cockroachlabs.com/docs
+#
+# arguments to use when starting the database
+start_args="--http-host=localhost --host=localhost --insecure
+--store=/var/lib/cockroach/data"
+#
+# arguments to use when stopping the database
+stop_args="--host localhost --insecure"
diff --git a/dev-db/cockroach/files/cockroach.confd-1.0 b/dev-db/cockroach/files/cockroach.confd-1.0
new file mode 100644
index 000000000000..7874cc1cab23
--- /dev/null
+++ b/dev-db/cockroach/files/cockroach.confd-1.0
@@ -0,0 +1,45 @@
+# The default setup is for the first node of an insecure cluster that only
+# listens on localhost.
+#
+# Please read the cockroach manual at the following url and configure
+# this file correctly if you plan to use cockroach in production.
+#
+# http://cockroachlabs.com/docs
+#
+#For more information about what the arguments mean, run
+#"cockroach start --help" or "cockroach quit --help".
+#
+#These values are passed to the appropriate arguments when starting or
+#stopping the cockroach database.
+#Leaving these commented accepts the cockroach defaults with the
+#exceptions of host, http_host, insecure and log_path.
+#
+#The default for host and http_host is localhost instead of the catch-all
+#address. If you want to use the catch-all address for either of these,
+#please use
+# "all" for the setting. #
+#
+# The default for insecure is yes which passes the --insecure argument to
+# cockroach. If you want a secure connection, set insecure=no and set
+# certs_path to the location of your certificates.
+#
+#log_path defaults to /var/log/${RC_SVCNAME}.
+#
+#attrs=""
+#cache=""
+#certs_path=""
+#host=""
+#http_host=""
+#http_port=""
+#insecure=""
+#join=""
+#locality=""
+#log_path=""
+#port=""
+#store=""
+#
+# extra arguments to use when starting the database
+# start_args=""
+#
+# extra arguments to use when stopping the database
+# stop_args=""
diff --git a/dev-db/cockroach/files/cockroach.initd b/dev-db/cockroach/files/cockroach.initd
new file mode 100644
index 000000000000..3629cb6605fa
--- /dev/null
+++ b/dev-db/cockroach/files/cockroach.initd
@@ -0,0 +1,23 @@
+#!/sbin/openrc-run
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+command="/usr/bin/cockroach"
+pidfile=/run/cockroach/cockroach.pid
+command_args="start --background --log-dir=/var/log/cockroach
+ --pid-file=\"${pidfile}\" ${start_args}"
+start_stop_daemon_args="--quiet --user cockroach"
+
+depend() {
+ use net
+}
+
+start_pre() {
+ checkpath -d -m 0755 -o cockroach:cockroach $(dirname ${pidfile})
+}
+
+stop() {
+ebegin "bringing down ${RC_SVCNAME}"
+"${command}" quit ${stop_args}
+eend $?
+}
diff --git a/dev-db/cockroach/files/cockroach.initd-1.0 b/dev-db/cockroach/files/cockroach.initd-1.0
new file mode 100644
index 000000000000..b2b4f6a0884f
--- /dev/null
+++ b/dev-db/cockroach/files/cockroach.initd-1.0
@@ -0,0 +1,60 @@
+#!/sbin/openrc-run
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+command=/usr/bin/cockroach
+pidfile=/run/${RC_SVCNAME}/cockroach.pid
+start_stop_daemon_args="--quiet --user cockroach"
+[ -n "${attrs}" ] && attrs_arg="--attrs=${attrs}"
+[ -n "${cache}" ] && cache_arg="--cache=${cache}"
+[ -n "${certs_path}" ] && certs_dir_arg="--certs-dir=${certs_path}"
+[ "${host}" != all ] && host_arg="--host=${host:-localhost}"
+[ "$http_host" != all ] && http_host_arg="--http-host=${http_host:-localhost}"
+[ -n "${http_port}" ] && http_port_arg="--http-port=${http_port}"
+yesno "${insecure:-yes}" && insecure_arg="--insecure"
+[ -n "${join}" ] && join_arg="--join=${join}"
+[ -n "${locality}" ] && locality_arg="--locality=\"${locality}\""
+log_path="${log_path:-/var/log/${RC_SVCNAME}}"
+[ -n "${log_path}" ] && log_dir_arg="--log-dir=${log_path}"
+ pidfile_arg="--pid-file=${pidfile}"
+[ -n "${port}" ] && port_arg="--port=${port}"
+store_arg="--store=${store:-/var/lib/cockroach/data}"
+command_args="start --background
+ ${attrs_arg}
+ ${cache_arg}
+ ${certs_dir_arg}
+ ${host_arg}
+ ${http_host_arg}
+ ${http_port_arg}
+ ${insecure_arg}
+ ${join_arg}
+ ${locality_arg}
+ ${log_dir_arg}
+ ${pidfile_arg}
+ ${port_arg}
+ ${store_arg}
+ ${start_args}"
+quit_args="
+ ${certs_dir_arg}
+ ${host_arg}
+ ${insecure_arg}
+ ${port_arg}
+ "
+
+depend() {
+ use net
+}
+
+start_pre() {
+ if [ -n "${log_path}" ]; then
+ checkpath -d -m 0755 -o cockroach:cockroach "${log_path}" ||
+ return 1
+ fi
+ checkpath -d -m 0755 -o cockroach:cockroach "$(dirname ${pidfile})"
+}
+
+stop() {
+ebegin "bringing down ${RC_SVCNAME}"
+eval ${command} quit ${quit_args} ${stop_args}
+eend $?
+}
diff --git a/dev-db/cockroach/files/cockroach.initd-1.0.1 b/dev-db/cockroach/files/cockroach.initd-1.0.1
new file mode 100644
index 000000000000..252fc6bf7bb8
--- /dev/null
+++ b/dev-db/cockroach/files/cockroach.initd-1.0.1
@@ -0,0 +1,70 @@
+#!/sbin/openrc-run
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+command=/usr/bin/cockroach
+pidfile=/run/${RC_SVCNAME}/cockroach.pid
+start_stop_daemon_args="--quiet --user cockroach"
+[ -n "${attrs}" ] && attrs_arg="--attrs=${attrs}"
+[ -n "${cache}" ] && cache_arg="--cache=${cache}"
+[ -n "${certs_path}" ] && certs_dir_arg="--certs-dir=${certs_path}"
+[ "${host}" != all ] && host_arg="--host=${host:-localhost}"
+[ "$http_host" != all ] && http_host_arg="--http-host=${http_host:-localhost}"
+[ -n "${http_port}" ] && http_port_arg="--http-port=${http_port}"
+yesno "${insecure:-yes}" && insecure_arg="--insecure"
+[ -n "${join}" ] && join_arg="--join=${join}"
+[ -n "${locality}" ] && locality_arg="--locality=\"${locality}\""
+log_path="${log_path:-/var/log/${RC_SVCNAME}}"
+[ -n "${log_path}" ] && log_dir_arg="--log-dir=${log_path}"
+ pidfile_arg="--pid-file=${pidfile}"
+[ -n "${port}" ] && port_arg="--port=${port}"
+store_arg="--store=${store:-/var/lib/cockroach/data}"
+command_args="start --background
+ ${attrs_arg}
+ ${cache_arg}
+ ${certs_dir_arg}
+ ${host_arg}
+ ${http_host_arg}
+ ${http_port_arg}
+ ${insecure_arg}
+ ${join_arg}
+ ${locality_arg}
+ ${log_dir_arg}
+ ${pidfile_arg}
+ ${port_arg}
+ ${store_arg}
+ ${start_args}"
+quit_args="
+ ${certs_dir_arg}
+ ${host_arg}
+ ${insecure_arg}
+ ${port_arg}
+ "
+
+depend() {
+ use net
+}
+
+start_pre() {
+ if [ -n "${log_path}" ]; then
+ checkpath -d -m 0755 -o cockroach:cockroach "${log_path}" ||
+ return 1
+ fi
+ checkpath -d -m 0755 -o cockroach:cockroach "$(dirname ${pidfile})"
+}
+
+stop() {
+ebegin "bringing down ${RC_SVCNAME}"
+eval ${command} quit ${quit_args} ${stop_args}
+eend $?
+}
+
+stop_post() {
+ local cr_pid
+ read -r cr_pid < "${pidfile}"
+ while [ -d /proc/"${cr_pid}" ]; do
+ sleep 1
+ done
+ rm -f "${pidfile}"
+ return 0
+}
diff --git a/dev-db/cockroach/metadata.xml b/dev-db/cockroach/metadata.xml
new file mode 100644
index 000000000000..b02140041af5
--- /dev/null
+++ b/dev-db/cockroach/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>williamh@gentoo.org</email>
+ <name>William Hubbs</name>
+ </maintainer>
+ <longdescription lang="en">
+ CockroachDB is an open source database for building global, scalable
+ cloud services that survive disasters.
+ </longdescription>
+</pkgmetadata>