diff options
author | William Hubbs <williamh@gentoo.org> | 2017-06-09 10:27:36 -0500 |
---|---|---|
committer | William Hubbs <williamh@gentoo.org> | 2017-06-09 10:27:36 -0500 |
commit | dd37cc9959d83dabc46ca9b81211f53acc42b5ea (patch) | |
tree | 90a9cff497a4dd59ac67c7404a7ac8fd5b6eba5e /dev-db/cockroach | |
parent | dev-python/incremental: Add missing setuptools dep bug 621074 (diff) | |
download | gentoo-dd37cc9959d83dabc46ca9b81211f53acc42b5ea.tar.gz gentoo-dd37cc9959d83dabc46ca9b81211f53acc42b5ea.tar.bz2 gentoo-dd37cc9959d83dabc46ca9b81211f53acc42b5ea.zip |
dev-db/cockroach: 1.0.1 version bump
Package-Manager: Portage-2.3.5, Repoman-2.3.1
Diffstat (limited to 'dev-db/cockroach')
-rw-r--r-- | dev-db/cockroach/Manifest | 1 | ||||
-rw-r--r-- | dev-db/cockroach/cockroach-1.0.1.ebuild | 61 | ||||
-rw-r--r-- | dev-db/cockroach/files/cockroach.initd-1.0.1 | 70 |
3 files changed, 132 insertions, 0 deletions
diff --git a/dev-db/cockroach/Manifest b/dev-db/cockroach/Manifest index af574b9a2ea3..473de42bbc78 100644 --- a/dev-db/cockroach/Manifest +++ b/dev-db/cockroach/Manifest @@ -1,2 +1,3 @@ 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.src.tgz 68753479 SHA256 ca87b10eec688195e0df4f85431b019f2980ae4b511ee321f91f945315efeb76 SHA512 d74ad9546908535f9a7ad4172a04a5f86f5ed22698bbb005aec7478a52632e0497a966b859fd68b40894eb7ee68bfa80dc4188d198f2f23725b9cadd50a55191 WHIRLPOOL c6011b09c2b20757ae5e3268cf050748a3856ec1fe1d86755e773390c97ebdb8494db3d51119298a797689bcc201bc20bf4bc8b5bdebff44d7598265c9379b93 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/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 +} |