summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-db/scylla/scylla-1.7.4.ebuild')
-rw-r--r--dev-db/scylla/scylla-1.7.4.ebuild170
1 files changed, 109 insertions, 61 deletions
diff --git a/dev-db/scylla/scylla-1.7.4.ebuild b/dev-db/scylla/scylla-1.7.4.ebuild
index 6e2a97e..4563ff4 100644
--- a/dev-db/scylla/scylla-1.7.4.ebuild
+++ b/dev-db/scylla/scylla-1.7.4.ebuild
@@ -3,23 +3,47 @@
EAPI=6
-EGIT_REPO_URI="https://github.com/scylladb/scylla.git"
-EGIT_COMMIT="scylla-${PV}"
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="https://github.com/scylladb/scylla.git"
+ inherit git-r3
+else
+ AMI_COMMIT="407e8f37cac3dc46bbf50e798efaa96bce072e0a"
+ C_ARES_COMMIT="fd6124c74da0801f23f9d324559d8b66fb83f533"
+ DPDK_COMMIT="af56afcd99004edfc9dd53d162ab3dadf1ac03d7"
+ FMT_COMMIT="0a2032577d18afa12e426ec9637e81d5dd50a9ac"
+ SEASTAR_COMMIT="8d9fd92d5dc215b1fef9d3af0630d5929e8ea488"
+ SWAGGER_COMMIT="1b212bbe713905aac22af1edb836f5cf8cc39cc2"
+ SRC_URI="
+ https://github.com/scylladb/${PN}/archive/scylla-${PV}.tar.gz -> ${P}.tar.gz
+ https://github.com/scylladb/scylla-seastar/archive/${SEASTAR_COMMIT}.tar.gz -> scylla-seastar-${SEASTAR_COMMIT}.tar.gz
+ https://github.com/scylladb/scylla-swagger-ui/archive/${SWAGGER_COMMIT}.tar.gz -> scylla-swagger-ui-${SWAGGER_COMMIT}.tar.gz
+ https://github.com/scylladb/dpdk/archive/${DPDK_COMMIT}.tar.gz -> dpdk-${DPDK_COMMIT}.tar.gz
+ https://github.com/scylladb/fmt/archive/${FMT_COMMIT}.tar.gz -> fmt-${FMT_COMMIT}.tar.gz
+ https://github.com/scylladb/c-ares/archive/${C_ARES_COMMIT}.tar.gz -> c-ares-${C_ARES_COMMIT}.tar.gz
+ https://github.com/scylladb/scylla-ami/archive/${AMI_COMMIT}.tar.gz -> scylla-ami-${AMI_COMMIT}.tar.gz
+ "
+ KEYWORDS="~amd64"
+ S="${WORKDIR}/scylla-${P}"
+fi
+
PYTHON_COMPAT=( python3_{4,5,6} )
-inherit git-r3 linux-info python-r1 toolchain-funcs systemd user
+inherit autotools 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"
+RESTRICT="test"
+
RDEPEND="
app-admin/collectd
app-arch/lz4
+ =app-admin/scylla-tools-${PV}
+ =app-admin/scylla-jmx-${PV}
app-arch/snappy
dev-cpp/antlr-cpp:3.5
dev-cpp/yaml-cpp
@@ -45,6 +69,7 @@ RDEPEND="
sys-libs/zlib
sys-process/numactl
x11-libs/libpciaccess
+ systemd? ( sys-apps/systemd )
"
DEPEND="${RDEPEND}
>=sys-kernel/linux-headers-3.5
@@ -60,7 +85,7 @@ 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 )
+DOCS=( LICENSE.AGPL NOTICE.txt ORIGIN README.md README-DPDK.md )
PATCHES=()
pkg_setup() {
@@ -71,11 +96,34 @@ pkg_setup() {
src_prepare() {
default
- eapply_user
- # set version
- local git_commit=$(git log --pretty=format:'%h' -n 1)
- echo "${PV}-${git_commit}" > version
+ # replace git submodules by symlinks
+ if [[ ${PV} == "9999" ]] ; then
+ # set version
+ local git_commit=$(git log --pretty=format:'%h' -n 1)
+ echo "${PV}-${git_commit}" > version
+ else
+ rmdir seastar || die
+ mv "${WORKDIR}/scylla-seastar-${SEASTAR_COMMIT}" seastar || die
+
+ rmdir seastar/dpdk || die
+ mv "${WORKDIR}/dpdk-${DPDK_COMMIT}" seastar/dpdk || die
+
+ rmdir seastar/c-ares || die
+ mv "${WORKDIR}/c-ares-${C_ARES_COMMIT}" seastar/c-ares || die
+
+ rmdir seastar/fmt || die
+ mv "${WORKDIR}/fmt-${FMT_COMMIT}" seastar/fmt || die
+
+ rmdir swagger-ui || die
+ mv "${WORKDIR}/scylla-swagger-ui-${SWAGGER_COMMIT}" swagger-ui || die
+
+ rmdir dist/ami/files/scylla-ami || die
+ mv "${WORKDIR}/scylla-ami-${AMI_COMMIT}" dist/ami/files/scylla-ami || die
+
+ # set version
+ echo "${PV}-gentoo" > version
+ fi
# fix slotted antlr3 path
sed -e 's/antlr3 /antlr3.5 /g' -i configure.py || die
@@ -84,14 +132,17 @@ src_prepare() {
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
+ mkdir build || die
+ cp dist/common/systemd/scylla-server.service.in build/scylla-server.service || die
+ sed -e "s#@@SYSCONFDIR@@#/etc/sysconfig#g" -i build/scylla-server.service || die
# fix seastar -Werror crashing build
- sed -e 's/ -Werror//g' -i seastar/configure.py || die
+ # sed -e 's/ -Werror//g' -i seastar/configure.py || die
- # fix ragel-7.0 bug
- # https://github.com/scylladb/seastar/issues/296
+ # run a clean autoreconf on c-ares
+ pushd seastar/c-ares
+ eautoreconf || die
+ popd
}
src_configure() {
@@ -100,86 +151,83 @@ src_configure() {
}
src_compile() {
- # force MAKEOPTS because ninja does a bad job in guessing and the default
- # build will kill your RAM/Swap in no time
+ # force number of parallel builds 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
+ default
+
+ insinto /etc/default
+ doins dist/common/sysconfig/scylla-server
+
+ insinto /etc/security/limits.d
+ doins dist/common/limits.d/scylla.conf
+
+ insinto /etc/collectd.d
+ doins dist/common/collectd.d/scylla.conf
+
+ insinto /etc/scylla.d
+ mv conf/housekeeping.cfg dist/common/scylla.d/
+ doins dist/common/scylla.d/*.conf
+
+ insinto /etc/sysctl.d
+ doins dist/common/sysctl.d/*.conf
+
+ insinto /etc/modprobe.d
+ doins dist/common/modprobe.d/*
+
+ insinto /etc/scylla
+ doins conf/*
+
+ systemd_dounit build/*.service
+ systemd_dounit dist/common/systemd/*.service
+ systemd_dounit dist/common/systemd/*.timer
+
+ newinitd "${FILESDIR}/scylla-server.initd" ${PN}-server
+ newconfd "${FILESDIR}/scylla-server.confd" ${PN}-server
+
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
+ dobin build/release/iotune
+ dobin build/release/scylla
+ dobin dist/common/bin/scyllatop
+
+ dodoc -r licenses
- # 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
+ insinto /usr/lib/scylla/api
+ doins -r api/api-doc
+
+ insinto /usr/lib/scylla/scyllatop
+ doins -r tools/scyllatop/*
+ fperms +x /usr/lib/scylla/scyllatop/scyllatop.py
- # 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() {