diff options
author | Ultrabug <ultrabug@gentoo.org> | 2020-02-22 17:50:37 +0100 |
---|---|---|
committer | Ultrabug <ultrabug@gentoo.org> | 2020-02-22 17:50:37 +0100 |
commit | 82ce9df3f16f40fb52c6c8b4f6484ead55cac7ed (patch) | |
tree | 4ffe00b35ead7ad12cdf633c6fd3b069297a1c06 /dev-db/scylla-bin/scylla-bin-3.2_p202002221144.ebuild | |
parent | app-admin/scylla-manager-agent: new ebuild (diff) | |
download | ultrabug-82ce9df3f16f40fb52c6c8b4f6484ead55cac7ed.tar.gz ultrabug-82ce9df3f16f40fb52c6c8b4f6484ead55cac7ed.tar.bz2 ultrabug-82ce9df3f16f40fb52c6c8b4f6484ead55cac7ed.zip |
dev-db/scylla-bin: new ebuild for relocatable package
Package-Manager: Portage-2.3.81, Repoman-2.3.20
Manifest-Sign-Key: 34FCB257983BA23A8CEC5EB7EB9E6405C24BFAE5
Signed-off-by: Alexys Jacob <ultrabug@gentoo.org>
Diffstat (limited to 'dev-db/scylla-bin/scylla-bin-3.2_p202002221144.ebuild')
-rw-r--r-- | dev-db/scylla-bin/scylla-bin-3.2_p202002221144.ebuild | 107 |
1 files changed, 107 insertions, 0 deletions
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 +} |