summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Lauer <patrick@gentoo.org>2016-03-30 16:07:49 +0200
committerPatrick Lauer <patrick@gentoo.org>2016-03-30 16:08:43 +0200
commit54033c543c56d58d326fea9c50e0d426d4f71714 (patch)
treeeb7b599040a4e8015cbf80348adee82a87645956 /dev-db/aerospike-server-community
parentnet-fs/samba: Fixed smb backend detection by cups (bug #552310) (diff)
downloadgentoo-54033c543c56d58d326fea9c50e0d426d4f71714.tar.gz
gentoo-54033c543c56d58d326fea9c50e0d426d4f71714.tar.bz2
gentoo-54033c543c56d58d326fea9c50e0d426d4f71714.zip
dev-db/aerospike-server-community: Initial import, borrowed and bumped from the adjust overlay
Package-Manager: portage-2.2.28
Diffstat (limited to 'dev-db/aerospike-server-community')
-rw-r--r--dev-db/aerospike-server-community/Manifest1
-rw-r--r--dev-db/aerospike-server-community/aerospike-server-community-3.7.5.ebuild69
-rw-r--r--dev-db/aerospike-server-community/aerospike-server-community-9999.ebuild87
-rw-r--r--dev-db/aerospike-server-community/files/3.5.8-use-system-libs.patch63
-rw-r--r--dev-db/aerospike-server-community/files/aerospike.conf70
-rw-r--r--dev-db/aerospike-server-community/files/aerospike.init53
-rw-r--r--dev-db/aerospike-server-community/files/aerospike.logrotate10
-rw-r--r--dev-db/aerospike-server-community/files/aerospike_mesh.conf73
-rw-r--r--dev-db/aerospike-server-community/files/aerospike_ssd.conf68
-rw-r--r--dev-db/aerospike-server-community/metadata.xml10
10 files changed, 504 insertions, 0 deletions
diff --git a/dev-db/aerospike-server-community/Manifest b/dev-db/aerospike-server-community/Manifest
new file mode 100644
index 000000000000..8aa55053136e
--- /dev/null
+++ b/dev-db/aerospike-server-community/Manifest
@@ -0,0 +1 @@
+DIST aerospike-server-community-3.7.5-debian7.tgz 10810815 SHA256 9177bc49b732534371a27544adafa6792504b90ecb2e1992de7882ed7b221c32 SHA512 55b78b1992fac52f85d0405ae78b590b8af60880da0fc307570e13c2468f7e83fc1b61c3425e4c98fdb955c3d19c96c3f8e557f803c6d8154ec9d3fd453b2ca9 WHIRLPOOL 5569dd54bf68ee68ebb4bc709d8a5d816115781dd3a05997685c1408dfc1129e83f251b973c4f5e736a728998cf8f54543f9800214c9efe6077f1a92c5f40cee
diff --git a/dev-db/aerospike-server-community/aerospike-server-community-3.7.5.ebuild b/dev-db/aerospike-server-community/aerospike-server-community-3.7.5.ebuild
new file mode 100644
index 000000000000..b240552ab9c1
--- /dev/null
+++ b/dev-db/aerospike-server-community/aerospike-server-community-3.7.5.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils user
+
+DESCRIPTION="Flash-optimized, in-memory, nosql database"
+HOMEPAGE="http://www.aerospike.com"
+SRC_URI="http://www.aerospike.com/artifacts/${PN}/${PV}/${P}-debian7.tgz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+RDEPEND="app-crypt/gcr"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/${P}-debian7"
+
+pkg_setup() {
+ enewgroup aerospike
+ enewuser aerospike -1 /bin/bash /opt/aerospike aerospike
+}
+
+src_prepare() {
+ local server_deb="${P}.debian7.x86_64.deb"
+ local tools_deb="aerospike-tools-${PV}.debian7.x86_64.deb"
+
+ ar x "${server_deb}" || die
+ tar xzf data.tar.gz && rm data.tar.gz || die
+
+ ar x "${tools_deb}" || die
+ tar xzf data.tar.gz && rm data.tar.gz || die
+
+ rm *.deb asinstall control.tar.gz debian-binary LICENSE SHA256SUMS
+ rm usr/bin/{asfixownership,asmigrate2to3}
+}
+
+src_install() {
+ insinto /opt/
+ doins -r opt/aerospike
+
+ fperms +x -R /opt/aerospike/bin/
+ fperms +x -R /opt/aerospike/lib/python/
+
+ for dir in '/etc' '/var/log'; do
+ keepdir "${dir}/aerospike"
+ done
+
+ insinto /etc/aerospike
+ for conf in 'aerospike.conf' 'aerospike_mesh.conf' 'aerospike_ssd.conf'; do
+ doins "${FILESDIR}/${conf}"
+ done
+
+ insinto /usr/bin
+ doins usr/bin/*
+ fperms +x -R /usr/bin/asd
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/aerospike.logrotate aerospike
+
+ newinitd "${FILESDIR}"/aerospike.init aerospike
+
+ fowners -R aerospike:aerospike /opt/aerospike/
+ fowners aerospike:aerospike /usr/bin/asd
+ fowners -R aerospike:aerospike /var/log/aerospike
+}
diff --git a/dev-db/aerospike-server-community/aerospike-server-community-9999.ebuild b/dev-db/aerospike-server-community/aerospike-server-community-9999.ebuild
new file mode 100644
index 000000000000..e595d2276e08
--- /dev/null
+++ b/dev-db/aerospike-server-community/aerospike-server-community-9999.ebuild
@@ -0,0 +1,87 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+EGIT_REPO_URI="https://github.com/aerospike/aerospike-server.git"
+
+inherit git-2 systemd user
+
+DESCRIPTION="Flash-optimized, in-memory, nosql database"
+HOMEPAGE="http://www.aerospike.com"
+SRC_URI=""
+
+LICENSE="AGPL-3"
+SLOT="0"
+KEYWORDS=""
+IUSE="+tools"
+
+RDEPEND="app-crypt/gcr
+ dev-libs/jansson
+ dev-libs/jemalloc"
+DEPEND="${RDEPEND}"
+
+DOCS=(
+ README.md
+)
+
+PATCHES=(
+ "${FILESDIR}"/3.5.8-use-system-libs.patch
+)
+
+pkg_setup() {
+ enewgroup aerospike
+ enewuser aerospike -1 /bin/bash /opt/aerospike aerospike
+}
+
+src_prepare() {
+ base_src_prepare
+
+ git submodule update --init
+
+ sed \
+ -e 's/USE_SYSTEM_JEM = 0/USE_SYSTEM_JEM = 1/g' \
+ -e 's/USE_SYSTEM_JANSSON = 0/USE_SYSTEM_JANSSON = 1/g' \
+ -e 's/LD_CRYPTO = static/LD_CRYPTO = dynamic/g' \
+ -e 's/LD_JANSSON = static/LD_JANSSON = dynamic/g' \
+ -e 's/LD_JEM = static/LD_JEM = dynamic/g' \
+ -i make_in/Makefile.vars || die
+
+ rm -rf modules/jansson
+ rm -rf modules/jemalloc
+}
+
+src_install() {
+ base_src_install_docs
+
+ dobin target/Linux-x86_64/bin/asd
+
+ insinto /opt/aerospike/sys/udf/lua
+ doins -r modules/lua-core/src/*
+
+ if use tools; then
+ insinto /opt/aerospike/bin
+ doins tools/afterburner/afterburner.sh
+ fperms +x /opt/aerospike/bin/afterburner.sh
+ fi
+
+ keepdir /opt/aerospike/usr/udf/lua
+ keepdir /var/log/aerospike
+
+ insinto /etc/aerospike
+ for conf in aerospike.conf aerospike_mesh.conf aerospike_ssd.conf; do
+ sed -e "s@/var/run/aerospike/asd.pid@/run/aerospike/aerospike.pid@g" -i as/etc/"${conf}" || die
+ doins as/etc/"${conf}"
+ done
+
+ insinto /etc/logrotate.d
+ newins as/etc/logrotate_asd aerospike
+
+ newinitd "${FILESDIR}"/aerospike.init aerospike
+ systemd_newunit as/etc/aerospike-server.service aerospike.service
+
+ fowners -R aerospike:aerospike /opt/aerospike/
+ fowners aerospike:aerospike /usr/bin/asd
+ fowners -R aerospike:aerospike /var/log/aerospike
+}
diff --git a/dev-db/aerospike-server-community/files/3.5.8-use-system-libs.patch b/dev-db/aerospike-server-community/files/3.5.8-use-system-libs.patch
new file mode 100644
index 000000000000..eb69f5ff2e51
--- /dev/null
+++ b/dev-db/aerospike-server-community/files/3.5.8-use-system-libs.patch
@@ -0,0 +1,63 @@
+diff --git a/Makefile b/Makefile
+index d4ce8ac..26271fd 100644
+--- a/Makefile
++++ b/Makefile
+@@ -54,12 +54,16 @@ ifeq ($(USE_ASM),1)
+ $(MAKE) -C $(ASMALLOC) jem SRCDIR=src
+ endif
+ ifeq ($(USE_JEM),1)
++ifeq ($(USE_SYSTEM_JEM),0)
+ $(MAKE) -C $(JEMALLOC)
+ endif
++endif
+ ifeq ($(USE_LUAJIT),1)
+ $(MAKE) -C $(LUAJIT) Q= TARGET_SONAME=libluajit.so CCDEBUG=-g
+ endif
++ifeq ($(USE_SYSTEM_JANSSON),0)
+ $(MAKE) -C $(JANSSON)
++endif
+ $(MAKE) -C $(COMMON) CF=$(CF) EXT_CFLAGS="$(EXT_CFLAGS)"
+ $(MAKE) -C $(CF)
+ $(MAKE) -C $(MOD_LUA) CF=$(CF) COMMON=$(COMMON) LUA_CORE=$(LUA_CORE) EXT_CFLAGS="$(EXT_CFLAGS)" USE_LUAJIT=$(USE_LUAJIT) LUAJIT=$(LUAJIT)
+@@ -174,16 +178,24 @@ mexp2: mexp1
+ $(MAKE) MEXP_PHASE=2 SRCDIR=$(realpath $(MEXP_DIR))/
+
+ $(JANSSON)/configure:
++ifeq ($(USE_SYSTEM_JANSSON),0)
+ cd $(JANSSON) && autoreconf -i
++endif
+
+ $(JANSSON)/Makefile: $(JANSSON)/configure
++ifeq ($(USE_SYSTEM_JANSSON),0)
+ cd $(JANSSON) && ./configure $(JANSSON_CONFIG_OPT)
++endif
+
+ $(JEMALLOC)/configure:
++ifeq ($(USE_SYSTEM_JEM),0)
+ cd $(JEMALLOC) && autoconf
++endif
+
+ $(JEMALLOC)/Makefile: $(JEMALLOC)/configure
++ifeq ($(USE_SYSTEM_JEM),0)
+ cd $(JEMALLOC) && ./configure $(JEM_CONFIG_OPT)
++endif
+
+ $(LUAJIT)/src/luaconf.h: $(LUAJIT)/src/luaconf.h.orig
+ ln -s $(notdir $<) $@
+diff --git a/make_in/Makefile.vars b/make_in/Makefile.vars
+index efe3226..0b54701 100644
+--- a/make_in/Makefile.vars
++++ b/make_in/Makefile.vars
+@@ -31,6 +31,12 @@ ifeq ($(USE_ASM),1)
+ EXT_CFLAGS += -DUSE_ASM
+ endif
+
++# Use the system provided JEMalloc memory allocator? [By default, no.]
++USE_SYSTEM_JEM = 0
++
++# Use the system provided Jansson JSON API Library? [By default, no.]
++USE_SYSTEM_JANSSON = 0
++
+ # Use the JEMalloc memory allocator? [By default, yes.]
+ USE_JEM = 1
+
diff --git a/dev-db/aerospike-server-community/files/aerospike.conf b/dev-db/aerospike-server-community/files/aerospike.conf
new file mode 100644
index 000000000000..842873bd3e8e
--- /dev/null
+++ b/dev-db/aerospike-server-community/files/aerospike.conf
@@ -0,0 +1,70 @@
+# Aerospike database configuration file.
+
+service {
+ user root
+ group root
+ paxos-single-replica-limit 1 # Number of nodes where the replica count is automatically reduced to 1.
+ pidfile /run/aerospike/aerospike.pid
+ service-threads 4
+ transaction-queues 4
+ transaction-threads-per-queue 4
+ proto-fd-max 15000
+}
+
+logging {
+ # Log file must be an absolute path.
+ file /var/log/aerospike/aerospike.log {
+ context any info
+ }
+}
+
+network {
+ service {
+ address any
+ port 3000
+ }
+
+ heartbeat {
+ mode multicast
+ address 239.1.99.222
+ port 9918
+
+ # To use unicast-mesh heartbeats, remove the 3 lines above, and see
+ # aerospike_mesh.conf for alternative.
+
+ interval 150
+ timeout 10
+ }
+
+ fabric {
+ port 3001
+ }
+
+ info {
+ port 3003
+ }
+}
+
+namespace test {
+ replication-factor 2
+ memory-size 4G
+ default-ttl 30d # 30 days, use 0 to never expire/evict.
+
+ storage-engine memory
+}
+
+namespace bar {
+ replication-factor 2
+ memory-size 4G
+ default-ttl 30d # 30 days, use 0 to never expire/evict.
+
+ storage-engine memory
+
+ # To use file storage backing, comment out the line above and use the
+ # following lines instead.
+# storage-engine device {
+# file /opt/aerospike/data/bar.dat
+# filesize 16G
+# data-in-memory true # Store data in memory in addition to file.
+# }
+}
diff --git a/dev-db/aerospike-server-community/files/aerospike.init b/dev-db/aerospike-server-community/files/aerospike.init
new file mode 100644
index 000000000000..1ded43af1441
--- /dev/null
+++ b/dev-db/aerospike-server-community/files/aerospike.init
@@ -0,0 +1,53 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+config_file=${config_file:-/etc/aerospike/${SVCNAME}.conf}
+run_dir=${run_dir:-/run/aerospike}
+
+command="/usr/bin/asd"
+command_args="--config-file ${config_file}"
+command_background="false"
+pidfile=${run_dir}/${SVCNAME}.pid
+user=${user:-aerospike}
+group=${group:-aerospike}
+start_stop_daemon_args="--user ${user} --group ${group}"
+required_files="${config_file}"
+
+depend() {
+ use net
+}
+
+set_shmall() {
+ mem=`/sbin/sysctl -n kernel.shmall`
+ min=4294967296
+ if [ ${#mem} -le ${#min} ]; then
+ if [ $mem -lt $min ]; then
+ ewarn "kernel.shmall too low, setting to 4G pages = 16TB"
+ /sbin/sysctl -w kernel.shmall=$min
+ fi
+ fi
+}
+
+set_shmmax() {
+ mem=`/sbin/sysctl -n kernel.shmmax`
+ min=1073741824
+ if [ ${#mem} -le ${#min} ]; then
+ if [ $mem -lt $min ]; then
+ ewarn "kernel.shmmax too low, setting to 1GB"
+ /sbin/sysctl -w kernel.shmmax=$min
+ fi
+ fi
+}
+
+start_pre() {
+ checkpath -d -m 0755 -o "${user}":"${group}" "${run_dir}"
+ set_shmall
+ set_shmmax
+ ulimit -n 100000
+ if [ -n $LD_PRELOAD ]; then export LD_PRELOAD; fi
+}
+
+start_post() {
+ ewaitfile 60 "${pidfile}"
+}
diff --git a/dev-db/aerospike-server-community/files/aerospike.logrotate b/dev-db/aerospike-server-community/files/aerospike.logrotate
new file mode 100644
index 000000000000..04aabc4a6017
--- /dev/null
+++ b/dev-db/aerospike-server-community/files/aerospike.logrotate
@@ -0,0 +1,10 @@
+/var/log/aerospike/aerospike.log {
+ daily
+ rotate 90
+ dateext
+ compress
+ olddir /var/log/aerospike/
+ postrotate
+ kill -HUP `cat /var/run/aerospike/aerospike.pid`
+ endscript
+}
diff --git a/dev-db/aerospike-server-community/files/aerospike_mesh.conf b/dev-db/aerospike-server-community/files/aerospike_mesh.conf
new file mode 100644
index 000000000000..26274f310ed0
--- /dev/null
+++ b/dev-db/aerospike-server-community/files/aerospike_mesh.conf
@@ -0,0 +1,73 @@
+# Aerospike database configuration file for deployments using mesh heartbeats.
+
+service {
+ user root
+ group root
+ paxos-single-replica-limit 1 # Number of nodes where the replica count is automatically reduced to 1.
+ pidfile /run/aerospike/aerospike.pid
+ service-threads 4
+ transaction-queues 4
+ transaction-threads-per-queue 4
+ proto-fd-max 15000
+}
+
+logging {
+ # Log file must be an absolute path.
+ file /var/log/aerospike/aerospike.log {
+ context any info
+ }
+}
+
+network {
+ service {
+ address any
+ port 3000
+ }
+
+ heartbeat {
+ mode mesh
+ port 3002 # Heartbeat port for this node.
+
+ # List one or more other nodes, one ip-address & port per line:
+ mesh-seed-address-port 10.10.10.10 3002
+# mesh-seed-address-port 10.10.10.11 3002
+# mesh-seed-address-port 10.10.10.12 3002
+# mesh-seed-address-port 10.10.10.13 3002
+# mesh-seed-address-port 10.10.10.14 3002
+
+ interval 250
+ timeout 10
+ }
+
+ fabric {
+ port 3001
+ }
+
+ info {
+ port 3003
+ }
+}
+
+namespace test {
+ replication-factor 2
+ memory-size 4G
+ default-ttl 30d # 30 days, use 0 to never expire/evict.
+
+ storage-engine memory
+}
+
+namespace bar {
+ replication-factor 2
+ memory-size 4G
+ default-ttl 30d # 30 days, use 0 to never expire/evict.
+
+ storage-engine memory
+
+ # To use file storage backing, comment out the line above and use the
+ # following lines instead.
+# storage-engine device {
+# file /opt/aerospike/data/bar.dat
+# filesize 16G
+# data-in-memory true # Store data in memory in addition to file.
+# }
+}
diff --git a/dev-db/aerospike-server-community/files/aerospike_ssd.conf b/dev-db/aerospike-server-community/files/aerospike_ssd.conf
new file mode 100644
index 000000000000..3d75bd6f7d91
--- /dev/null
+++ b/dev-db/aerospike-server-community/files/aerospike_ssd.conf
@@ -0,0 +1,68 @@
+# Aerospike database configuration file for deployments using raw storage.
+
+service {
+ user root
+ group root
+ paxos-single-replica-limit 1 # Number of nodes where the replica count is automatically reduced to 1.
+ pidfile /run/aerospike/aerospike.pid
+ service-threads 8
+ transaction-queues 8
+ transaction-threads-per-queue 8
+ proto-fd-max 15000
+}
+
+logging {
+ # Log file must be an absolute path.
+ file /var/log/aerospike/aerospike.log {
+ context any info
+ }
+}
+
+network {
+ service {
+ address any
+ port 3000
+ }
+
+ heartbeat {
+ mode multicast
+ address 239.1.99.222
+ port 9918
+
+ # To use unicast-mesh heartbeats, remove the 3 lines above, and see
+ # aerospike_mesh.conf for alternative.
+
+ interval 150
+ timeout 10
+ }
+
+ fabric {
+ port 3001
+ }
+
+ info {
+ port 3003
+ }
+}
+
+namespace test {
+ replication-factor 2
+ memory-size 4G
+ default-ttl 30d # 30 days, use 0 to never expire/evict.
+
+ # Warning - legacy data in defined raw partition devices will be erased.
+ # These partitions must not be mounted by the file system.
+ storage-engine device {
+ # Use one or more lines like those below with actual device paths.
+# device /dev/sdb
+# device /dev/sdc
+
+ # The 2 lines below optimize for SSD.
+ scheduler-mode noop
+ write-block-size 128K
+
+ # Use the line below to store data in memory in addition to devices.
+# data-in-memory true
+ }
+}
+
diff --git a/dev-db/aerospike-server-community/metadata.xml b/dev-db/aerospike-server-community/metadata.xml
new file mode 100644
index 000000000000..1bb7f2a22147
--- /dev/null
+++ b/dev-db/aerospike-server-community/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>patrick@gentoo.org</email>
+ </maintainer>
+ <use>
+ <flag name="tools">Install extra tools</flag>
+ </use>
+</pkgmetadata>