summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dev-db/scylla-bin/Manifest28
-rw-r--r--dev-db/scylla-bin/files/10-scylla.conf2
-rw-r--r--dev-db/scylla-bin/files/scylla-jmx.confd9
-rw-r--r--dev-db/scylla-bin/files/scylla-jmx.initd23
-rw-r--r--dev-db/scylla-bin/files/scylla-server.confd17
-rw-r--r--dev-db/scylla-bin/files/scylla-server.initd37
-rw-r--r--dev-db/scylla-bin/files/scylla.sudoers1
-rw-r--r--dev-db/scylla-bin/metadata.xml8
-rw-r--r--dev-db/scylla-bin/scylla-bin-3.2_p202002221144.ebuild107
9 files changed, 232 insertions, 0 deletions
diff --git a/dev-db/scylla-bin/Manifest b/dev-db/scylla-bin/Manifest
new file mode 100644
index 0000000..0a96163
--- /dev/null
+++ b/dev-db/scylla-bin/Manifest
@@ -0,0 +1,28 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA256
+
+AUX 10-scylla.conf 64 BLAKE2B 31ce1b2173214bcac351b71cf19e5506ab08cefbca446ce23ad753c98c5e4fd7fbb89b0f79703ea4dcf1f6233e7929268365eeaab1b4e2e7b31553aa7928a969 SHA512 c24b3ec2f0ea3b1ad0792c05a8eb044b3a157862b59759e020586ae872f9789a558d423fe1dff1a8c6d8342049cf4d919faf31a1439a6a1c69af915365b4ec82
+AUX scylla-jmx.confd 243 BLAKE2B a056f7c70df3ff6c903a182f352aa34ca9d23eed458b7c6f5a51c9f6656cf0f989c133e8e45b221991800fcc79fd1505b037410dde7d5dfffdf75e0ee6670090 SHA512 18b5f550c2e0616f4c0da123adfda3fb959bec5711b6be57df3e316613cfa154467353e65504b6b68852911f8faa21f1acccf3fa51970a132b639c1e6d1ea402
+AUX scylla-jmx.initd 565 BLAKE2B 76bac90381c9801848445e84ee5e89dff11766b0a80cf4dbbe0f0f9d70f589b0e814a472506ecbc947418ac22ab79eb0a53758322a8d900e855d6ab3caa366a2 SHA512 bd7a022d02b28a398a191faee6aead480687350759400cfe8b07056a1e0eef0591cd61d426e8e234efe3e32149ac5eec3f30ddb453ae8bff19e42e702fe06787
+AUX scylla-server.confd 396 BLAKE2B dc522b308985e51c24449a333d793eaa777a74b8b5594f1ff4a092aae003202791019a255ea478c4e794a83ca0e01d2c49aac3d267501624f461fa3edfe1c41f SHA512 51739cdeedaedb1a73a345ec6a4a2761d29fac1b9cf61f02937559aed43f02112109464254213118d40af1fb7e8491c22f8cb88908c9c88523dfe1b78b8430c7
+AUX scylla-server.initd 1020 BLAKE2B 99aaf3d265b507cbcc36a1cc55b9ac9cabb7f1f04c006a4cdd1dae0484d3ab96fa0b6895da29c96c93a2416f954bf3dbc837a4de2faa28c0549a4656b77a19ee SHA512 27e423779b6092e0bd50008633d9e92351c1ccce3d33801196f3c43565409afee310ac0fe627a6ce04296731075fe81a1104c7dc3ca32e15315fd1df3f943db4
+AUX scylla.sudoers 162 BLAKE2B 9aa0dce391da1f420a070d73d061452eeba60ad268f13a5bb8c0525d714d27dfa438efa9c6871c916b82ebf56f34c507826315de8b1fadc3d0eb5feae663cbcc SHA512 aabdeb3854eaad4b1cf9037a998cf94b8f55b2011e8f81a1778095b71806d89e217f2025e772c636569f833f7df45108e2e30c2c1e70fdb59acf37e6cdf81485
+DIST scylla-bin-3.2_p202002221144-jmx-package.tar.gz 7676117 BLAKE2B 572d5ce1d0114b136181c01ab0105c4b0d954807a6eea75bae86ce628d6da59250dbd5da6ffac9e68b02fc59d42634df292c0b0a80f845a9f887c5b7b4b7019f SHA512 c1c860e7c6be70f669fad65602ddd715ba0edcb0f8cbf9b8e3fa932b9be9c40afaf69871b138bbbcf0461ea29f743596b9d5fad7bdeee5737373e69e75523980
+DIST scylla-bin-3.2_p202002221144-package.tar.gz 1033996280 BLAKE2B 20faa9af84bad4585baef16564fc583bfdfc01a2ea94ffc6e9324fa80b62c625838f46eeeb8a47536c36047640fb68ed738492595c458afb9c2146bdbc070a00 SHA512 f7187c5dd843089a352c607b27efa7ee979dfd10634dc1d5299821ed5d8fa36d65d66f803dd1b5c8addbe6a8e9f7f36ae2d111a86a9e90a2c3514dab4a3435ea
+DIST scylla-bin-3.2_p202002221144-python3.tar.gz 34258383 BLAKE2B 85d4467448d23ecfeff7319fb478bbc2f24598aaf5380d5a01cb0b8866caf8fa3eb9196cd03fdd79da9147549a868cd6e6259a337bfa848a57981356a5b2cc48 SHA512 87b29858d9b1c63f98548fb796c4811160dcfdc92071e368c81b23d5db6b266a3d9b2f8cd583e99f1545f10425c4bb0dbb895ae5cf8ca97a7b8434d53ed41c17
+EBUILD scylla-bin-3.2_p202002221144.ebuild 3151 BLAKE2B 2183332692fed431dc01035b55ba2f89726f5d0bc930c36a63f9da7056bf8805289b7dfe0830c71d179ef920a84e7d10b8f5ec866d8e65ccbd977ebf3243a19d SHA512 8c3848f074c07534c5ca05886ce16dcea2bc456f28b2786193d9c4d696d3e045c7e2e89003dc31418f1edbc18250f4b88252f17032f5f48eb8c394cebbc087e3
+MISC metadata.xml 249 BLAKE2B 40afa233e18ae5678e52194be8b1235d8deda4810e55b33ea192ded6b09a158f1bc941544f90a1b9e396db00bc0fe277c072d267568473ae4aa2dec8bc5c2f89 SHA512 6eae78a65db44c8f7ef2d20c10c8612cd2072c0204c6294798e4bf94f1283c684c22d1ad28e0f68e78e82a0c60526d6786492c9dacc438d83405218e51c1bf9c
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2
+
+iQGTBAEBCAB9FiEEB7NG2KqNbQw8gqQ7Uf8j8ayXdy8FAl5RW75fFIAAAAAALgAo
+aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDA3
+QjM0NkQ4QUE4RDZEMEMzQzgyQTQzQjUxRkYyM0YxQUM5Nzc3MkYACgkQUf8j8ayX
+dy9oqwgA14PqrGL7kqwvxK7kmoL+2fFHetYFD3ciNezbmjN5PNUktokKJpxCnxXW
+aRe2YsI8f3Z3NYxSlBqjL+Q+v2sFT71CTIuDorCdlOWis7yT0WH2OjQJ/djqAH3O
+fJqBeokzn+nlgFC8UHXOy3jXhIHNi1uu3I+PaU1nTiSXzuupv2j6jVUNlgFX8425
+G10jHr7pk/6V43TJv63pB6JU8KzZ1MbQlXj5DBECUWZY/dOgfNPz3/D/xxmOJJSu
+7Pj10GH2IK4k631oyRtGHHATPjlpkykoYI9VCWkLi13IuabxifwMFbbbjwdFDSAd
+pGBRFaNJzAcL7WqDIgKQM1p8QWwI9Q==
+=f7Fw
+-----END PGP SIGNATURE-----
diff --git a/dev-db/scylla-bin/files/10-scylla.conf b/dev-db/scylla-bin/files/10-scylla.conf
new file mode 100644
index 0000000..48cfe7c
--- /dev/null
+++ b/dev-db/scylla-bin/files/10-scylla.conf
@@ -0,0 +1,2 @@
+:syslogtag, startswith, "scylla" /var/log/scylla/scylla.log
+& ~
diff --git a/dev-db/scylla-bin/files/scylla-jmx.confd b/dev-db/scylla-bin/files/scylla-jmx.confd
new file mode 100644
index 0000000..8177e13
--- /dev/null
+++ b/dev-db/scylla-bin/files/scylla-jmx.confd
@@ -0,0 +1,9 @@
+# please check the defaults of scylla in the /etc/default/scylla-jmx file!
+#
+# you can configure the following options for the OpenRC init script:
+# - run_dir
+
+# source scylla default env
+source /etc/default/scylla-jmx
+
+rc_need="scylla-server" \ No newline at end of file
diff --git a/dev-db/scylla-bin/files/scylla-jmx.initd b/dev-db/scylla-bin/files/scylla-jmx.initd
new file mode 100644
index 0000000..996c414
--- /dev/null
+++ b/dev-db/scylla-bin/files/scylla-jmx.initd
@@ -0,0 +1,23 @@
+#!/sbin/openrc-run
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+run_dir=${run_dir:-/run/scylla-jmx}
+
+command="/opt/scylladb/jmx/scylla-jmx"
+command_args=""
+command_background="true"
+command_progress="true"
+pidfile=${run_dir}/${SVCNAME}.pid
+user=${USER:-scylla}
+group=${GROUP:-scylla}
+retry="SIGTERM/120"
+start_stop_daemon_args="--user ${user} --group ${group} --wait 2000 --make-pidfile"
+
+depend() {
+ use net localmount logger
+}
+
+start_pre() {
+ checkpath -d -m 0750 -o "${user}":"${group}" "${run_dir}"
+}
diff --git a/dev-db/scylla-bin/files/scylla-server.confd b/dev-db/scylla-bin/files/scylla-server.confd
new file mode 100644
index 0000000..f210c1b
--- /dev/null
+++ b/dev-db/scylla-bin/files/scylla-server.confd
@@ -0,0 +1,17 @@
+# please check the defaults of scylla in the /etc/default/scylla-server file!
+#
+# you can configure the following options for the OpenRC init script:
+# - chdir
+# - config_file
+# - run_dir
+
+# source scylla default env
+source /etc/default/scylla-server
+
+# source scylla additional configuration
+for i in /etc/scylla.d/*.conf; do
+ if [ "$i" = "/etc/scylla.d/*.conf" ]; then
+ break
+ fi
+ . "$i"
+done
diff --git a/dev-db/scylla-bin/files/scylla-server.initd b/dev-db/scylla-bin/files/scylla-server.initd
new file mode 100644
index 0000000..12aaf1b
--- /dev/null
+++ b/dev-db/scylla-bin/files/scylla-server.initd
@@ -0,0 +1,37 @@
+#!/sbin/openrc-run
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+config_file=${config_file:-/etc/scylla/scylla.yaml}
+run_dir=${run_dir:-/run/scylla}
+chdir=${chdir:-/var/lib/scylla/coredump}
+
+command="/usr/bin/scylla"
+command_args="--options-file ${config_file} ${CPUSET} ${DEV_MODE} ${SEASTAR_IO} ${SCYLLA_ARGS}"
+command_background="true"
+command_progress="true"
+pidfile=${run_dir}/${SVCNAME}.pid
+user=${USER:-scylla}
+group=${GROUP:-scylla}
+retry="SIGTERM/120"
+start_stop_daemon_args="--chdir ${chdir} --user ${user} --group ${group} --wait 5000"
+
+depend() {
+ use net localmount logger
+}
+
+start_pre() {
+ checkpath -d -m 0750 -o "${user}":"${group}" "${run_dir}"
+ if [ ! -f ${config_file} ]; then
+ eerror "Missing configuration file ${config_file}"
+ return 1
+ fi
+ export SCYLLA_CONF SCYLLA_HOME
+ ebegin "Running scylla_prepare"
+ /usr/lib/scylla/scylla_prepare >/dev/null
+}
+
+stop_post() {
+ ebegin "Running scylla_stop"
+ /usr/lib/scylla/scylla_stop >/dev/null
+}
diff --git a/dev-db/scylla-bin/files/scylla.sudoers b/dev-db/scylla-bin/files/scylla.sudoers
new file mode 100644
index 0000000..62270ed
--- /dev/null
+++ b/dev-db/scylla-bin/files/scylla.sudoers
@@ -0,0 +1 @@
+scylla ALL=(ALL) NOPASSWD: /usr/lib/scylla/scylla_prepare,/usr/lib/scylla/scylla_stop,/usr/lib/scylla/scylla_io_setup,/usr/lib/scylla/scylla-ami/scylla_ami_setup
diff --git a/dev-db/scylla-bin/metadata.xml b/dev-db/scylla-bin/metadata.xml
new file mode 100644
index 0000000..f4e95c6
--- /dev/null
+++ b/dev-db/scylla-bin/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>ultrabug@gentoo.org</email>
+ <name>Ultrabug</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/dev-db/scylla-bin/scylla-bin-3.2_p202002221144.ebuild b/dev-db/scylla-bin/scylla-bin-3.2_p202002221144.ebuild
new file mode 100644
index 0000000..b40a21e
--- /dev/null
+++ b/dev-db/scylla-bin/scylla-bin-3.2_p202002221144.ebuild
@@ -0,0 +1,107 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+MY_PV="${PV/_p//}"
+
+inherit linux-info unpacker user
+
+DESCRIPTION="NoSQL data store using the seastar framework, compatible with Apache Cassandra"
+HOMEPAGE="https://scylladb.com/"
+SRC_URI="http://downloads.scylladb.com/relocatable/unstable/branch-${MY_PV}/scylla-package.tar.gz -> ${P}-package.tar.gz http://downloads.scylladb.com/relocatable/unstable/branch-${MY_PV}/scylla-python3-package.tar.gz -> ${P}-python3.tar.gz http://downloads.scylladb.com/relocatable/unstable/branch-${MY_PV}/scylla-jmx-package.tar.gz -> ${P}-jmx-package.tar.gz"
+
+KEYWORDS="~amd64"
+LICENSE="AGPL-3"
+SLOT="0"
+IUSE="doc"
+RESTRICT="strip test"
+
+RDEPEND=""
+DEPEND="${RDEPEND}
+ >=sys-kernel/linux-headers-3.5
+"
+
+# Discussion about kernel configuration:
+# https://groups.google.com/forum/#!topic/scylladb-dev/qJu2zrryv-s
+CONFIG_CHECK="~NUMA_BALANCING ~SYN_COOKIES ~TRANSPARENT_HUGEPAGE"
+ERROR_NUMA_BALANCING="${PN} recommends support for Memory placement aware NUMA scheduler (NUMA_BALANCING)."
+ERROR_SYN_COOKIES="${PN} recommends support for TCP syncookie (SYN_COOKIES)."
+ERROR_TRANSPARENT_HUGEPAGE="${PN} recommends support for Transparent Hugepage (TRANSPARENT_HUGEPAGE)."
+
+# NOTE: maybe later depending on upstream energy, support DPDK
+# For DPDK, removed HUGETLBFS PROC_PAGE_MONITOR UIO_PCI_GENERIC in favor of VFIO
+# CONFIG_CHECK="~NUMA_BALANCING ~SYN_COOKIES ~TRANSPARENT_HUGEPAGE ~VFIO"
+# ERROR_VFIO="${PN} running with DPDK recommends support for Non-Privileged userspace driver framework (VFIO)."
+
+DOCS=( README.md NOTICE.txt SCYLLA-PRODUCT-FILE SCYLLA-RELEASE-FILE SCYLLA-RELOCATABLE-FILE SCYLLA-VERSION-FILE )
+PATCHES=( )
+S=${WORKDIR}
+
+pkg_setup() {
+ linux-info_pkg_setup
+ enewgroup scylla
+ enewuser scylla -1 -1 /var/lib/${PN} scylla
+}
+
+src_unpack() {
+ for pkg in package jmx-package python3;
+ do
+ mkdir "${pkg}" || die
+ pushd "${pkg}" || die
+ unpacker ${P}-${pkg}.tar.gz || die
+ find . -type f -name "*.pyc" -delete
+ popd || die
+ done
+}
+
+install_package() {
+ pushd package
+
+ bash install.sh --root "${D}" --sysconfdir /etc/default || die
+
+ for x in /var/lib/scylla /var/lib/scylla/{data,commitlog,hints,coredump,hints,view_hints} /var/lib/scylla-housekeeping /var/log/scylla; do
+ keepdir "${x}"
+ fowners scylla:scylla "${x}"
+ done
+
+ insinto /etc/sudoers.d
+ newins "${FILESDIR}"/scylla.sudoers scylla
+
+ insinto /etc/rsyslog.d
+ doins "${FILESDIR}/10-scylla.conf"
+
+ newinitd "${FILESDIR}/scylla-server.initd" ${PN}-server
+ newconfd "${FILESDIR}/scylla-server.confd" ${PN}-server
+
+ popd
+}
+
+install_python3() {
+ pushd python3
+ bash install.sh --root "${D}" || die
+ popd
+}
+
+install_jmx_package() {
+ pushd jmx-package
+ bash install.sh --root "${D}" --sysconfdir /etc/default || die
+ newinitd "${FILESDIR}/scylla-jmx.initd" ${PN}-server
+ newconfd "${FILESDIR}/scylla-jmx.confd" ${PN}-server
+ popd
+}
+
+src_install() {
+ install_package
+ install_python3
+ install_jmx_package
+}
+
+pkg_postinst() {
+ elog "You should run 'emerge --config dev-db/scylla' to finalize your Scylla installation."
+}
+
+pkg_config() {
+ elog "Running 'scylla_setup'..."
+ scylla_setup
+}