summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dev-db/scylla/Manifest1
-rw-r--r--dev-db/scylla/scylla-1.7.2.ebuild192
2 files changed, 193 insertions, 0 deletions
diff --git a/dev-db/scylla/Manifest b/dev-db/scylla/Manifest
index ff10a62..085386b 100644
--- a/dev-db/scylla/Manifest
+++ b/dev-db/scylla/Manifest
@@ -1,5 +1,6 @@
AUX 10-scylla.conf 64 SHA256 47a2a3b9d581f289ad5bfaa78f92cc01e7f12ddc6e66ee08ceb27463ec0dbcc5 SHA512 c24b3ec2f0ea3b1ad0792c05a8eb044b3a157862b59759e020586ae872f9789a558d423fe1dff1a8c6d8342049cf4d919faf31a1439a6a1c69af915365b4ec82 WHIRLPOOL 0d5a3cae1ae3f29e77d58c010284c3dcadf556c2a5ec67624c010b18b43b3aac477eab5abe9dd70fdaabba02287a01d56cac65929528fe6541b6c8b268d23cf9
AUX scylla-server.confd 386 SHA256 b0da01117d51478b8cf0e0bc77829c7dab0bd8aeadef100f25ebf098d050b3d0 SHA512 5d3c55933a02d3b16837013b37110f6669c14e01599532f30935b5dc29871a5bed897c9eb01a6e89469eab7d645c9231745a06c2ef827f6700e13c8faa9cdb87 WHIRLPOOL 7c0a17760ae83b34384f17abf81e1cd8e9da54c764102320fe237f74fcf94de9396ca1fd8e6576c72c54d7c504cf6daa54847db548cd7900069bdd972efe5676
AUX scylla-server.initd 964 SHA256 b99672314a6e236939fcb19d37c89f98098e34227ea77ff79cb2ce01873408a8 SHA512 e72b817e8a42d843f6766b0cd25c33b8231efbd223f4ad31bca9a2610f670b3980c1be256343f5e3b0fe0f54ba460713f6db8de92c27cf67653140794299f760 WHIRLPOOL 89c88dddfedbc317046ad441a5a4bd2c3a8dde92ca4e81001da47909a4d05f74eb3296141c2f9fd02f57317a02e286f159c53c4909d3f0e2b0594d5cac1be14c
+EBUILD scylla-1.7.2.ebuild 5058 SHA256 9f1b28b3032da5b0330fec6172dfb040ce652e1220a816411528d9b03ea75ddd SHA512 28e0f0cd5f869975a9178d32fbe3dd89b3ebceec8f5b9632c0237ede61a25822ea525712be6c72505553cd730fc06f3521d6508bafc5fac562ee976bf45a6f59 WHIRLPOOL 3e3fce1c0b49737bcc0ee1c4ac2a2e535716b3d1a884e5b4e3e9a5095849a7401d38e5a6c858051f3fb334df5ceabe2a2a6e88da0c66edde3081c2926c799f31
EBUILD scylla-9999.ebuild 5059 SHA256 29c46afc0e9ed43735d3166f465fa97f4efa941c004f083ef71636e2f04efdbd SHA512 b7b4d149594b65f26f4c835a473bd4169d153a1d768ceb7af4ca1503d9c94a4fa7e885e7659d069bb101f776573459b9e0c55c10bd4c966963b4f3df0b0fb5c5 WHIRLPOOL 7a177d88db7ba6ad506b45fa33635e85b5e65bf52b0531964a6e53de932cf00062c70c6e1f68d4f17416802f2a88a97caa9b01f61993cb546a585817abe121cd
MISC metadata.xml 249 SHA256 658f3f0cb7921722166c25f4a815ec0d7418ad183b9e8a0377eb08b3c3139173 SHA512 6eae78a65db44c8f7ef2d20c10c8612cd2072c0204c6294798e4bf94f1283c684c22d1ad28e0f68e78e82a0c60526d6786492c9dacc438d83405218e51c1bf9c WHIRLPOOL 6031231a9c8d06218c688115fb3e0f734964735d3af0b4e4a932afa78cbebecd6586293a16cbf69985fbaad4dce3594b1095a00d91a3a131cf8d683e88c34841
diff --git a/dev-db/scylla/scylla-1.7.2.ebuild b/dev-db/scylla/scylla-1.7.2.ebuild
new file mode 100644
index 0000000..6e2a97e
--- /dev/null
+++ b/dev-db/scylla/scylla-1.7.2.ebuild
@@ -0,0 +1,192 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+EGIT_REPO_URI="https://github.com/scylladb/scylla.git"
+EGIT_COMMIT="scylla-${PV}"
+PYTHON_COMPAT=( python3_{4,5,6} )
+
+inherit git-r3 linux-info python-r1 toolchain-funcs systemd user
+
+DESCRIPTION="NoSQL data store using the seastar framework, compatible with Apache Cassandra"
+HOMEPAGE="http://scylladb.com/"
+
+LICENSE="AGPL-3"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="doc systemd"
+
+RDEPEND="
+ app-admin/collectd
+ app-arch/lz4
+ app-arch/snappy
+ dev-cpp/antlr-cpp:3.5
+ dev-cpp/yaml-cpp
+ dev-java/antlr:3.5
+ dev-libs/boost
+ dev-libs/crypto++
+ dev-libs/jsoncpp
+ dev-libs/libaio
+ dev-libs/libxml2
+ dev-libs/protobuf
+ =dev-libs/thrift-0.9.1
+ dev-python/pyparsing[${PYTHON_USEDEP}]
+ dev-python/pyudev[${PYTHON_USEDEP}]
+ dev-python/requests[${PYTHON_USEDEP}]
+ <dev-util/ragel-7.0
+ dev-python/urwid[${PYTHON_USEDEP}]
+ dev-util/systemtap
+ net-libs/gnutls
+ net-misc/lksctp-tools
+ sys-apps/hwloc
+ sys-fs/xfsprogs
+ sys-libs/libunwind
+ sys-libs/zlib
+ sys-process/numactl
+ x11-libs/libpciaccess
+"
+DEPEND="${RDEPEND}
+ >=sys-kernel/linux-headers-3.5
+ dev-util/ninja
+"
+
+# Discussion about kernel configuration:
+# https://groups.google.com/forum/#!topic/scylladb-dev/qJu2zrryv-s
+# For DPDK, removed HUGETLBFS PROC_PAGE_MONITOR UIO_PCI_GENERIC in favor of VFIO
+CONFIG_CHECK="~NUMA_BALANCING ~SYN_COOKIES ~TRANSPARENT_HUGEPAGE ~VFIO"
+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)."
+ERROR_VFIO="${PN} running with DPDK recommends support for Non-Privileged userspace driver framework (VFIO)."
+
+DOCS=( LICENSE.AGPL README.md )
+PATCHES=()
+
+pkg_setup() {
+ linux-info_pkg_setup
+ enewgroup scylla
+ enewuser scylla -1 -1 /var/lib/${PN} scylla
+}
+
+src_prepare() {
+ default
+ eapply_user
+
+ # set version
+ local git_commit=$(git log --pretty=format:'%h' -n 1)
+ echo "${PV}-${git_commit}" > version
+
+ # fix slotted antlr3 path
+ sed -e 's/antlr3 /antlr3.5 /g' -i configure.py || die
+
+ # fix jsoncpp detection
+ sed -e 's@json/json.h@jsoncpp/json/json.h@g' -i json.hh || die
+
+ # fix systemd service config path
+ cp dist/common/systemd/scylla-server.service.in dist/common/systemd/scylla-server.service || die
+ sed -e "s#@@SYSCONFDIR@@#/etc/sysconfig#g" -i dist/common/systemd/scylla-server.service || die
+
+ # fix seastar -Werror crashing build
+ sed -e 's/ -Werror//g' -i seastar/configure.py || die
+
+ # fix ragel-7.0 bug
+ # https://github.com/scylladb/seastar/issues/296
+}
+
+src_configure() {
+ # TODO: --cflags "${CFLAGS}"
+ ./configure.py --mode=release --with=scylla --enable-dpdk --disable-xen --compiler "$(tc-getCXX)" --ldflags "${LDFLAGS}" || die
+}
+
+src_compile() {
+ # force MAKEOPTS because ninja does a bad job in guessing and the default
+ # build will kill your RAM/Swap in no time
+ ninja -v build/release/scylla build/release/iotune -j4 || die
+}
+
+src_install() {
+ # executables
+ exeinto /usr/lib/scylla
+ doexe dist/common/scripts/*
+ doexe dist/debian/scripts/*
+ doexe seastar/scripts/*
+ doexe seastar/dpdk/usertools/dpdk-devbind.py
+ doexe scylla-blocktune
+ doexe scylla-housekeeping
+
+ # scyllatop
+ insinto /usr/lib/scylla/scyllatop
+ doins -r tools/scyllatop/*
+ fperms +x /usr/lib/scylla/scyllatop/scyllatop.py
+
+ # swagger-ui
+ insinto /usr/lib/scylla/swagger-ui
+ doins -r swagger-ui/dist
+
+ # bin
+ dobin build/release/iotune
+ dobin build/release/scylla
+ dobin dist/common/bin/scyllatop
+
+ # sbin symlinks
+ for util in $(ls dist/common/sbin/); do
+ dosym /usr/lib/scylla/${util} /usr/sbin/${util}
+ done
+
+ insinto /etc/collectd.d
+ doins dist/common/collectd.d/scylla.conf
+
+ for x in /var/lib/${PN}/{data,commitlog,coredump} /var/lib/scylla-housekeeping /var/log/scylla; do
+ keepdir "${x}"
+ fowners scylla:scylla "${x}"
+ done
+
+ insinto /etc/scylla.d
+ mv conf/housekeeping.cfg dist/common/scylla.d/
+ doins dist/common/scylla.d/*.conf
+
+ insinto /etc/scylla
+ doins conf/*
+
+ insinto /etc/security/limits.d
+ doins dist/common/limits.d/scylla.conf
+
+ insinto /etc/sudoers.d
+ doins dist/debian/sudoers.d/scylla
+
+ insinto /etc/sysctl.d
+ doins dist/debian/sysctl.d/99-scylla.conf
+
+ insinto /etc/default
+ doins dist/common/sysconfig/scylla-server
+
+ insinto /etc/modprobe.d
+ doins dist/common/modprobe.d/*
+
+ insinto /etc/rsyslog.d
+ doins "${FILESDIR}/10-scylla.conf"
+
+ insinto /etc/cron.d
+ newins dist/debian/scylla-server.cron.d scylla_delay_fstrim
+
+ newinitd "${FILESDIR}/scylla-server.initd" ${PN}-server
+ newconfd "${FILESDIR}/scylla-server.confd" ${PN}-server
+ systemd_dounit dist/common/systemd/*.service
+ systemd_dounit dist/common/systemd/*.timer
+
+ # TODO: api docs are simple JSON files!?
+ if use doc; then
+ insinto /usr/lib/scylla/api
+ doins -r api/api-doc
+ fi
+}
+
+pkg_postinst() {
+ elog "You should run 'emerge --config dev-db/scylla' to finalize your ScyllaDB installation."
+}
+
+pkg_config() {
+ elog "Running 'scylla_setup'..."
+ scylla_setup
+} \ No newline at end of file