public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] dev/ultrabug:master commit in: dev-db/aerospike-server-community/files/, dev-db/aerospike-server-community/
@ 2015-04-10 15:05 Alexys Jacob
  0 siblings, 0 replies; 2+ messages in thread
From: Alexys Jacob @ 2015-04-10 15:05 UTC (permalink / raw
  To: gentoo-commits

commit:     fef8d0d79d27a4a8d0a68d987b5f56928853086d
Author:     Ultrabug <ultrabug <AT> gentoo <DOT> org>
AuthorDate: Fri Apr 10 15:05:17 2015 +0000
Commit:     Alexys Jacob <ultrabug <AT> gentoo <DOT> org>
CommitDate: Fri Apr 10 15:05:17 2015 +0000
URL:        https://gitweb.gentoo.org/dev/ultrabug.git/commit/?id=fef8d0d7

new dev-db/aerospike-server-community

 dev-db/aerospike-server-community/Manifest         |  7 +++
 .../aerospike-server-community-3.5.4.ebuild        | 72 +++++++++++++++++++++
 .../files/aerospike.conf                           | 70 +++++++++++++++++++++
 .../files/aerospike.init                           | 54 ++++++++++++++++
 .../files/aerospike.logrotate                      | 10 +++
 .../files/aerospike_mesh.conf                      | 73 ++++++++++++++++++++++
 .../files/aerospike_ssd.conf                       | 68 ++++++++++++++++++++
 7 files changed, 354 insertions(+)

diff --git a/dev-db/aerospike-server-community/Manifest b/dev-db/aerospike-server-community/Manifest
new file mode 100644
index 0000000..8239254
--- /dev/null
+++ b/dev-db/aerospike-server-community/Manifest
@@ -0,0 +1,7 @@
+AUX aerospike.conf 1265 SHA256 546cc602656e4889eb9ad201874d54356fdd3058e821a70bb803637a1c1575e2 SHA512 5d2b2a368bb31e8230d2f88073befbf5f1aa33aecc628b669e5714cfde71e83d53143b28c0ee95b52f13e84027283413927abd97470a97e36946cc05605b15ed WHIRLPOOL c67e134dde02d2c04e2fa9f118a84b448d9a8d2ff01d952283b7f14fad590cc0d10c23d0f6432849b37f313e2b52e6d4a9d6bbcb2824bba4c81f0c0aa0a73f9c
+AUX aerospike.init 1307 SHA256 cc89cd2ebdfb2d5a028b054af75d446d2636131ddabac6ec500b008fd2ae449b SHA512 765d315d64f77c3efaadba0b2734029cb727c9520cdb603c2c24b1dbc701a4c67f741977537a2ea0e5a18a2cba4d8b6ff65d919707ab6436608a231d2f05ed78 WHIRLPOOL 35ae7e66501f26f44e9650c34f5c017a1ab8838b1d17fc9b5a0a866ad9d760a1c62f26abbed0dd5b447675fbfc3c512f856510a018e9f7395c5a8c9b7354a0f8
+AUX aerospike.logrotate 191 SHA256 2984ecf6a19f08cea0ee4fdad725922f29b3b878df7478b6619f6b885263abb6 SHA512 4c014730ad2f829197f1a76912a1327586b36e5d4018a48ea1bbb7970698a5de94e98dbcd720b71656f7986fafa6fae5b9273b0f835d0cb33f3fcab5e57cbf70 WHIRLPOOL 9bd399d5c525280ad915d5725de6628d2fe46d163f62a611f601cd81edacb9686281cef66da38c20e315def6c3c78a1a61f5fb54cf3b87504db126e397369f73
+AUX aerospike_mesh.conf 1476 SHA256 27cd3b9304c5af4855ca1edea949b471e209d1402a27a15044b59f7329624572 SHA512 a7d5e52738a3153b649cc81d8a9b635b70fe21335802f5c2f348fe71f3b7087ea85aaf926c4ad3ce71514fa1b479f98bc27aadb95995a5bbb8808219bcbe28c4 WHIRLPOOL 27209abe9aae485e8a540dd6b4563d38c43d8e9a19f2c97e41ca7c995349b7c8f1abcef08e0a92f38431d4fe919838eb6442990201bd3506cc5126e37b92f2d1
+AUX aerospike_ssd.conf 1341 SHA256 11dbbffdea382e30d606c4564a577e0657f3ff87f37156f5169806d52acdb711 SHA512 0382842d4e7b20caaa4c39d999da0cd2b67c24bdd9fad6e5d2d393758b6f788decf0039ae9a262a4db7e89b358cbb9954efd082a15549d12e3e244b2c51675c9 WHIRLPOOL 2aa9230d6d1b477aad21b81f6760a915d15bbd51499512a618a1a0dd24342eb9ed0d46cbe0318885a6c446433bd009641adad5fa5e2fdf34e15138ffcabb1f84
+DIST aerospike-server-community-3.5.4-debian7.tgz 8395788 SHA256 80c23ea858278419297c51d8fd924ac64d7b62684b24334440c16725ba856e45 SHA512 0136bf48131a04754ff32faa1d3ec7dc9b0332312d902781171d8cb2828ad2245a182d190ac32fb16b314d7e9c15edaf7e64df3ed55ee845ed30d5b65b8f272c WHIRLPOOL a83257b2ffc591571f80332dee6e2e0c647bd1a2c47fdf55fdefa601cdffeea6759041bf36d7fdeb0aa4426823b8a656d60911f0e9f85e40a97cc6e115036a6e
+EBUILD aerospike-server-community-3.5.4.ebuild 1676 SHA256 d2a605e4458ccac67de0a7f28b56610da2ee4e96c2900cabe8a953bd8ef8b930 SHA512 47e0c3b2d89a1def83b752cc4e2e9c4f39572c93e7f782f53645f09f58d080628a7837f7bf4932049a2b7c6661c816c8583b6018448cce3fa3b22763ab5ac51f WHIRLPOOL 7c601c2cecb7a1b2f03be5859395fcb6de4682bb9e8a0987598ebb92d194b6a86009f2a774e4798a678b4726bd788be719882f1657d3919e74f5607d2d6f4095

diff --git a/dev-db/aerospike-server-community/aerospike-server-community-3.5.4.ebuild b/dev-db/aerospike-server-community/aerospike-server-community-3.5.4.ebuild
new file mode 100644
index 0000000..baf4871
--- /dev/null
+++ b/dev-db/aerospike-server-community/aerospike-server-community-3.5.4.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header $
+
+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="AEROSPIKE SERVER LICENSE"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+RDEPEND="app-crypt/gcr"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/${P}-debian7"
+
+# change me at every version bump
+TOOLS_PV="3.5.3"
+
+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-${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/files/aerospike.conf b/dev-db/aerospike-server-community/files/aerospike.conf
new file mode 100644
index 0000000..842873b
--- /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 100755
index 0000000..1188424
--- /dev/null
+++ b/dev-db/aerospike-server-community/files/aerospike.init
@@ -0,0 +1,54 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-db/mongodb/files/mongodb.initd-r2,v 1.2 2014/05/26 08:03:45 ultrabug Exp $
+
+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 0750 -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 0000000..410f5be
--- /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/asd.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 0000000..26274f3
--- /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 0000000..3d75bd6
--- /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
+	}
+}
+


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] dev/ultrabug:master commit in: dev-db/aerospike-server-community/files/, dev-db/aerospike-server-community/
@ 2015-04-20 10:26 Alexys Jacob
  0 siblings, 0 replies; 2+ messages in thread
From: Alexys Jacob @ 2015-04-20 10:26 UTC (permalink / raw
  To: gentoo-commits

commit:     94e28e808dae934a988f3ae6677646e31640cb9c
Author:     Ultrabug <ultrabug <AT> gentoo <DOT> org>
AuthorDate: Mon Apr 20 10:26:21 2015 +0000
Commit:     Alexys Jacob <ultrabug <AT> gentoo <DOT> org>
CommitDate: Mon Apr 20 10:26:21 2015 +0000
URL:        https://gitweb.gentoo.org/dev/ultrabug.git/commit/?id=94e28e80

wip, source built aerospike server ebuild

 dev-db/aerospike-server-community/Manifest         |  2 +
 .../aerospike-server-community-3.5.8-r1.ebuild     | 77 ++++++++++++++++++++++
 .../files/3.5.8-use-system-libs.patch              | 63 ++++++++++++++++++
 .../files/aerospike.init                           |  0
 4 files changed, 142 insertions(+)

diff --git a/dev-db/aerospike-server-community/Manifest b/dev-db/aerospike-server-community/Manifest
index 713aceb..ed88421 100644
--- a/dev-db/aerospike-server-community/Manifest
+++ b/dev-db/aerospike-server-community/Manifest
@@ -1,7 +1,9 @@
+AUX 3.5.8-use-system-libs.patch 1755 SHA256 7aca6ecbffb26a15e43af4f63fc96dcaf5c16d6eac2b9e4082ff6264ed12179d SHA512 9124fc14481bc1390a743d2365aa51723445e90db428607aa76d7d59e2c73bc4236da4d1a57c765d4484895147f06254bb269f80b0ff9f7029fcb2f782a418a4 WHIRLPOOL 32bed32f5cb3b75cfe94b8a3e9acff189e71f8f6ac4802dd87fe8bb3834a0be35758a77b25e02e7b1173628af3cc869563cb32fd8c1ba789855b0ce422a34582
 AUX aerospike.conf 1265 SHA256 546cc602656e4889eb9ad201874d54356fdd3058e821a70bb803637a1c1575e2 SHA512 5d2b2a368bb31e8230d2f88073befbf5f1aa33aecc628b669e5714cfde71e83d53143b28c0ee95b52f13e84027283413927abd97470a97e36946cc05605b15ed WHIRLPOOL c67e134dde02d2c04e2fa9f118a84b448d9a8d2ff01d952283b7f14fad590cc0d10c23d0f6432849b37f313e2b52e6d4a9d6bbcb2824bba4c81f0c0aa0a73f9c
 AUX aerospike.init 1307 SHA256 76840025b5ad07a891fb1fc4cbd41af1ae66d75e60d7417f0d9ff13cb983556d SHA512 6dc8365a24408e1a3b5e39ec10dac552eca1d7e63a9d1e0333f31bb8b5a35d9304ce4f8ba25264ae7f7b491fc9e5aa801a0d2f2ee35cbfee06e04727dbff5735 WHIRLPOOL 4b91e4709bb26a371bc3e61e00d8006418f0a9ec3b6ee5fbfcbf1908da097a624b80dfcc80682f928e9a6400f7e40e89d09ab974d658668e9d3f426398031382
 AUX aerospike.logrotate 191 SHA256 2984ecf6a19f08cea0ee4fdad725922f29b3b878df7478b6619f6b885263abb6 SHA512 4c014730ad2f829197f1a76912a1327586b36e5d4018a48ea1bbb7970698a5de94e98dbcd720b71656f7986fafa6fae5b9273b0f835d0cb33f3fcab5e57cbf70 WHIRLPOOL 9bd399d5c525280ad915d5725de6628d2fe46d163f62a611f601cd81edacb9686281cef66da38c20e315def6c3c78a1a61f5fb54cf3b87504db126e397369f73
 AUX aerospike_mesh.conf 1476 SHA256 27cd3b9304c5af4855ca1edea949b471e209d1402a27a15044b59f7329624572 SHA512 a7d5e52738a3153b649cc81d8a9b635b70fe21335802f5c2f348fe71f3b7087ea85aaf926c4ad3ce71514fa1b479f98bc27aadb95995a5bbb8808219bcbe28c4 WHIRLPOOL 27209abe9aae485e8a540dd6b4563d38c43d8e9a19f2c97e41ca7c995349b7c8f1abcef08e0a92f38431d4fe919838eb6442990201bd3506cc5126e37b92f2d1
 AUX aerospike_ssd.conf 1341 SHA256 11dbbffdea382e30d606c4564a577e0657f3ff87f37156f5169806d52acdb711 SHA512 0382842d4e7b20caaa4c39d999da0cd2b67c24bdd9fad6e5d2d393758b6f788decf0039ae9a262a4db7e89b358cbb9954efd082a15549d12e3e244b2c51675c9 WHIRLPOOL 2aa9230d6d1b477aad21b81f6760a915d15bbd51499512a618a1a0dd24342eb9ed0d46cbe0318885a6c446433bd009641adad5fa5e2fdf34e15138ffcabb1f84
 DIST aerospike-server-community-3.5.8-debian7.tgz 8358739 SHA256 b7832823a03d827ba78bc91480f86edbb285b377b9f170d352cbc811ce6a2d51 SHA512 e2e0c9a39bfdcc09143eae2dd73bd7cf9734dff2824f56b4ad8852ea95f8d365e43b7e1310ec6e52c4db08b718c861edd391a1e0234f9c318f6a298ec4615e17 WHIRLPOOL d76c808845ce736abe42b7d12f603d0d88e1bd4cbbd9188d6b65b19d78f615d25dafafc77a936f83eb5a0533eee86610eb6b84b0b9df49a4c6f22c0c4ef02068
+EBUILD aerospike-server-community-3.5.8-r1.ebuild 1844 SHA256 85008c95c4c2553bf600828cce2dadabff98e87e2c02d957a4cfaa4a6eb74b31 SHA512 7cc045d76b924e3e3f78690a3b171f3afaaae1534f0d47f154f247455f61dc857ba381ecde8d38aa8e1c661775be42dd9ed06522cbe19fb6509fe328932ef3c5 WHIRLPOOL 7fd9baa9dc52b13db6f50503004258c89aead4cc265096cf2efa19a0d85a65fed8899e826e2df581ae41ef7dbfdfe6a9809059da7bdebf35eaa73724f9d979cb
 EBUILD aerospike-server-community-3.5.8.ebuild 1663 SHA256 29a4869c9fbca46e49e774cfecc8a0db7d6d817bb0c03738a3c89c6a243275fb SHA512 7a958e273f32eecc64d72fe74849b0b118c655e040c4034a53313b071619c188ee30fa775e62dbe64a4f5d647a55e4a550b6c9625ad93b19313e5bfc324eff0b WHIRLPOOL 5cd77ee1e480da8bced78bce389348cfc89b3eac3909fd16fac0aa1457bb3cc7a21f9eef48984f4cf7c893db3e0787f4f87d163d75912d654f8d15b6d0c5087b

diff --git a/dev-db/aerospike-server-community/aerospike-server-community-3.5.8-r1.ebuild b/dev-db/aerospike-server-community/aerospike-server-community-3.5.8-r1.ebuild
new file mode 100644
index 0000000..8525005
--- /dev/null
+++ b/dev-db/aerospike-server-community/aerospike-server-community-3.5.8-r1.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=5
+
+EGIT_REPO_URI="https://github.com/aerospike/aerospike-server.git"
+
+inherit autotools base eutils git-2 user
+
+DESCRIPTION="Flash-optimized, in-memory, nosql database"
+HOMEPAGE="http://www.aerospike.com"
+SRC_URI=""
+
+LICENSE="AGPL"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="+tools"
+
+RDEPEND="app-crypt/gcr
+	dev-libs/jansson
+	dev-libs/jemalloc"
+DEPEND="${RDEPEND}"
+
+
+pkg_setup() {
+	enewgroup aerospike
+	enewuser aerospike -1 /bin/bash /opt/aerospike aerospike
+}
+
+src_prepare() {
+	git submodule update --init
+
+	epatch "${FILESDIR}/3.5.8-use-system-libs.patch"
+
+	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() {
+	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
+
+	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 0000000..eb69f5f
--- /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.init b/dev-db/aerospike-server-community/files/aerospike.init
old mode 100755
new mode 100644


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-04-20 10:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-20 10:26 [gentoo-commits] dev/ultrabug:master commit in: dev-db/aerospike-server-community/files/, dev-db/aerospike-server-community/ Alexys Jacob
  -- strict thread matches above, loose matches on Subject: below --
2015-04-10 15:05 Alexys Jacob

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox