diff options
author | Bradford Folkens (mobilfunk) <bfolkens@gmail.com> | 2010-10-28 02:30:57 +0000 |
---|---|---|
committer | Bradford Folkens (mobilfunk) <bfolkens@gmail.com> | 2010-10-28 02:30:57 +0000 |
commit | 1e8e28f88b107438be1dba8efd9502f26ae60a46 (patch) | |
tree | 9b80d5ea43dc621c52cd8c66b27fa5ed5bce2731 /dev-db | |
parent | dev-games/renpy-modules: Enable building for multiple python ABIs. (diff) | |
download | sunrise-1e8e28f88b107438be1dba8efd9502f26ae60a46.tar.gz sunrise-1e8e28f88b107438be1dba8efd9502f26ae60a46.tar.bz2 sunrise-1e8e28f88b107438be1dba8efd9502f26ae60a46.zip |
dev-db/membase-server-community: New ebuild for bug 343021
svn path=/sunrise/; revision=11494
Diffstat (limited to 'dev-db')
8 files changed, 263 insertions, 0 deletions
diff --git a/dev-db/membase-server-community/ChangeLog b/dev-db/membase-server-community/ChangeLog new file mode 100644 index 000000000..8751132a0 --- /dev/null +++ b/dev-db/membase-server-community/ChangeLog @@ -0,0 +1,10 @@ +# ChangeLog for net-misc/memcached +# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 +# $Header: $ + + 28 Oct 2010; Brad Folkens (bfolkens) <bfolkens@gmail.com> + +membase-server-community-1.6.0.1.ebuild, +files/1.6.0.1, + +files/1.6.0.1/config, +files/1.6.0.1/init-epmd, + +files/1.6.0.1/init-server, +files/1.6.0.1/limits, +metadata.xml: + New ebuild for bug 343021 + diff --git a/dev-db/membase-server-community/Manifest b/dev-db/membase-server-community/Manifest new file mode 100644 index 000000000..4a139e4f5 --- /dev/null +++ b/dev-db/membase-server-community/Manifest @@ -0,0 +1,8 @@ +AUX 1.6.0.1/config 37 RMD160 d5992201e57eb06649eeee27ed5a923055e33882 SHA1 3fdd3d2c59d471dc53720fedea2c095b9618bb32 SHA256 33839d8bdb12509e3a30d333be3592857192be05e975015424403bc1add86d3e +AUX 1.6.0.1/init-epmd 573 RMD160 9210818ca7436ed6b4d4978a941ed5ece35d2a6f SHA1 83bd514f71350dfa764335509cc2604cea168ab0 SHA256 4d4f75b1ffc36276f95b4726ada1c471dd0ae407685aac486d5350b603866bfc +AUX 1.6.0.1/init-server 1477 RMD160 df9552d596f0b81c5ef172ab72c0880b7f2afb9d SHA1 5a20e1832f4d7f9d606fc57f9e6c8486e97089ff SHA256 5a2ecc9254e478e4827de712aed2d0e74999021a679b45e10c72611e9c444a97 +AUX 1.6.0.1/limits 88 RMD160 af9a929f2e63b67e40a95afd6a2eaca9043d06b6 SHA1 7ea69a703d0a0c90bb0bc25f4caa41a6fc0ea081 SHA256 8f9005c0ea6f3b97702783cee53509d471d2e5f96d73d95bb634ae9a6a74042e +DIST membase-server-community_1.6.0.1_src.tar.gz 11562668 RMD160 0203aff2cb097b979dab75dd5964bc1f61148c46 SHA1 e800bfa11c1ea3f3a0f25db29e1924820a30e638 SHA256 5d88b20e4311a495ec3e7ffd403b0a370db3267d9346aafebd30c8fe97a07e1e +EBUILD membase-server-community-1.6.0.1.ebuild 4088 RMD160 2e70517624ea43d03ce4d59cbba605e5a870345d SHA1 888cb1ae962055d5e2b4564d0ef63cc49adb837d SHA256 d4ad19f46d94577e36fca79373ba186018458079cd0321ca50e2f479301c9571 +MISC ChangeLog 387 RMD160 b0cccde62b8dccefc89329291575cdb8364a191c SHA1 6ea2f0ff2a17fc39cdb7ebedeeb66f7adc09eb76 SHA256 8d769bde18a088635342de724c6ec1a71a43d7e27cbfbc436cc60015d05c7a90 +MISC metadata.xml 794 RMD160 14769213fac3a2c8c9ef845ecff9096703754895 SHA1 40b0df9a094c4a4730bcbc897fd8ae7885c82edb SHA256 5980d8e1e218ad174835fc376af6e6116887ac0dcc3e7149ab79d13eea01dac1 diff --git a/dev-db/membase-server-community/files/1.6.0.1/config b/dev-db/membase-server-community/files/1.6.0.1/config new file mode 100644 index 000000000..3ac3adbd3 --- /dev/null +++ b/dev-db/membase-server-community/files/1.6.0.1/config @@ -0,0 +1 @@ +{directory, "/etc/membase/1.6.0.1"}. diff --git a/dev-db/membase-server-community/files/1.6.0.1/init-epmd b/dev-db/membase-server-community/files/1.6.0.1/init-epmd new file mode 100755 index 000000000..a2e7ae61a --- /dev/null +++ b/dev-db/membase-server-community/files/1.6.0.1/init-epmd @@ -0,0 +1,26 @@ +#!/sbin/runscript +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +VER=1.6.0.1 +MEMBASE_USER=membase +MEMBASE_PATH=/opt/membase/$VER + +depend() { + need net +} + +start() { + cd $MEMBASE_PATH/ns_server + + # Initialize distributed erlang on the system (i.e. epmd) + start-stop-daemon --start \ + -c membase -m --pidfile /var/run/membase/epmd.pid \ + --exec /usr/bin/erl --oknodo -- \ + -noshell -setcookie nocookie -sname init -run init stop 2>&1 > /dev/null +} + +stop() { + start-stop-daemon --stop --name epmd +} diff --git a/dev-db/membase-server-community/files/1.6.0.1/init-server b/dev-db/membase-server-community/files/1.6.0.1/init-server new file mode 100755 index 000000000..755db76ac --- /dev/null +++ b/dev-db/membase-server-community/files/1.6.0.1/init-server @@ -0,0 +1,51 @@ +#!/sbin/runscript +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +VER=1.6.0.1 +NODE_NAME=ns_1@127.0.0.1 +MEMBASE_USER=membase +MEMBASE_PATH=/opt/membase/$VER +MEMBASE_LOGS=/var/log/membase/$VER +MNESIA_PATH=/var/lib/membase/$VER/mnesia +CONFIG_PATH=/etc/membase/$VER/config +PIDFILE=/var/run/membase-server.pid + +depend() { + need net membase-epmd +} + +start() { + ebegin "Starting membase" + + touch $PIDFILE + chown membase:daemon $PIDFILE + + # pam-limits (/etc/security/limits.d and limits.conf) aren't working with start-stop-daemon + ulimit -n 10240 + + start-stop-daemon --start --oknodo --chdir $MEMBASE_PATH/ns_server -c "$MEMBASE_USER" --exec /usr/bin/erl -- \ + +A 16 \ + -pa `find $MEMBASE_PATH/ns_server -type d -name ebin` \ + -setcookie nocookie \ + -ns_server error_logger_mf_dir \"$MEMBASE_LOGS\" \ + -ns_server error_logger_mf_maxbytes 10485760 \ + -ns_server error_logger_mf_maxfiles 10 \ + -kernel inet_dist_listen_min 21100 inet_dist_listen_max 21199 \ + -ns_server pidfile \"$PIDFILE\" \ + -ns_server ns_server_config \"$CONFIG_PATH\" \ + -mnesia dir \"$MNESIA_PATH\" \ + -detached \ + -noshell -noinput \ + -run ns_bootstrap + #-name $NODE_NAME \ # causing things to break? + eend $? "Failed to start membase" +} + +stop() { + ebegin "Stopping membase" + start-stop-daemon --stop --pidfile ${PIDFILE} + eend $? "Failed to stop membase" + rm -f ${PIDFILE} +} diff --git a/dev-db/membase-server-community/files/1.6.0.1/limits b/dev-db/membase-server-community/files/1.6.0.1/limits new file mode 100644 index 000000000..8c9bb7cf5 --- /dev/null +++ b/dev-db/membase-server-community/files/1.6.0.1/limits @@ -0,0 +1,3 @@ +#<domain> <type> <item> <value> + +membase - nofile 10240 diff --git a/dev-db/membase-server-community/membase-server-community-1.6.0.1.ebuild b/dev-db/membase-server-community/membase-server-community-1.6.0.1.ebuild new file mode 100644 index 000000000..0e81aa2a0 --- /dev/null +++ b/dev-db/membase-server-community/membase-server-community-1.6.0.1.ebuild @@ -0,0 +1,151 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header$ + +EAPI=2 +inherit eutils + +MY_PV="${PV/_rc/-rc}" +MY_P="${PN}_${MY_PV}" + +DESCRIPTION="Distributed key-value database management system" +HOMEPAGE="http://www.membase.org/" +SRC_URI="http://c2512712.cdn.cloudfiles.rackspacecloud.com/${MY_P}_src.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="-ia64 -x86" +IUSE="" + +RDEPEND=">=dev-libs/libevent-2.0.7 + >=net-misc/curl-7.21.1 + >=dev-lang/erlang-13.2.4 + >=sys-devel/gcc-4.3.0 + >=dev-libs/check-0.9.4" +DEPEND="${RDEPEND} + !>=dev-lang/erlang-14" + # Erlang 14A no longer allows compile option nowarn_bif_clash + +S="${WORKDIR}/${MY_P}_src" + +src_configure() { + dodir lib doc + + einfo "Configuring and building memcached" + cd "${S}/memcached" || die + econf --enable-isasl && emake || die + + einfo "Configuring bucket_engine" + cd "${S}/bucket_engine" || die + econf --with-memcached="${S}/memcached" || die + + einfo "Configuring ep-engine" + cd "${S}/ep-engine" || die + econf --with-memcached="${S}/memcached" || die + + # Some libs are depended on during the config process so build them now + + einfo "Configuring and building libmemcached" + cd "${S}/libmemcached" || die + econf --prefix="${S}/lib" \ + --mandir="${S}/doc" \ + --disable-shared \ + --disable-dtrace \ + --enable-static \ + --with-memcached="${S}/memcached/memcached" || die + emake && emake install || die + + einfo "Configuring and building libvbucket" + cd "${S}/libvbucket" || die + econf --prefix="${S}/lib" \ + --mandir="${S}/doc" \ + --disable-shared \ + --enable-static || die + emake && emake install || die + + einfo "Configuring and building vbucketmigrator" + cd "${S}/vbucketmigrator" || die + econf --prefix="${S}/lib" \ + --mandir="${S}/doc" \ + --without-sasl \ + --with-isasl \ + --with-memcached="${S}/memcached" || die + emake || die + + einfo "Configuring and building libconflate" + cd "${S}/libconflate" || die + econf --prefix="${S}/lib" \ + --mandir="${S}/doc" \ + --disable-shared \ + --enable-static || die + emake && emake install || die + + einfo "Configuring moxi" + cd "${S}/moxi" || die + econf --prefix="${S}/lib" \ + --mandir="${S}/doc" \ + --with-memcached="${S}/memcached/memcached" \ + --enable-moxi-libvbucket \ + --enable-moxi-libmemcached \ + CFLAGS="-I${S}/lib/include -Wno-error" \ + LDFLAGS="-L${S}/lib/lib" || die +} + +src_compile() { + echo "Building bucket_engine" + cd "${S}/bucket_engine" || die + emake || die + + echo "Building ep-engine" + cd "${S}/ep-engine" || die + emake || die + + echo "Building moxi" + cd "${S}/moxi" || die + emake || die + + echo "Building ns-server" + cd "${S}/ns_server" + emake || die +} + +src_install() { + # Just copy the whole directory over to /opt until we split out packages + # more efficiently (and/or respect the Makefile destinations) + dodir opt/membase + cp -a "${S}"/{bucket_engine,ep-engine,libconflate,libmemcached,libvbucket,membase-cli,memcached,moxi,ns_server,vbucketmigrator} \ + "${D}/opt/membase" || die "Install failed!" + + # Setup keeps for the data, config, and log dirs + dodir "etc/membase/${PV}" + keepdir "etc/membase/${PV}" + cp "${FILESDIR}/${PV}/config" "${D}/etc/membase/${PV}" || \ + die "Install failed!" + dosym "etc/membase/${PV}/priv" "/etc/membase/${PV}" + chown -R membase:daemon "${D}/etc/membase" || \ + die "Install failed!" + + dodir "var/lib/membase/${PV}/mnesia" "var/lib/membase/${PV}/data" + keepdir "var/lib/membase/${PV}/mnesia" "var/lib/membase/${PV}/data" + chown -R membase:daemon "${D}/var/lib/membase" || \ + die "Install failed!" + + dodir "var/log/membase/${PV}" + keepdir "var/log/membase/${PV}" + chown -R membase:daemon "${D}/var/log/membase/${PV}" || \ + die "Install failed!" + + # TODO: Sort through all the misc docs in the different subprojects and + # dodoc them + doman doc/man1/* || die + doman doc/man3/* || die + doman doc/man4/* || die + + # Install the initscripts + newinitd "${FILESDIR}/${PV}/init-epmd" membase-epmd + newinitd "${FILESDIR}/${PV}/init-server" membase-server +} + +pkg_setup() { + enewuser membase -1 -1 /var/lib/membase daemon +} diff --git a/dev-db/membase-server-community/metadata.xml b/dev-db/membase-server-community/metadata.xml new file mode 100644 index 000000000..b294d18a5 --- /dev/null +++ b/dev-db/membase-server-community/metadata.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>no-herd</herd> +<maintainer> + <email>bfolkens@gmail.com</email> +</maintainer> +<longdescription> +Membase is a distributed key-value database management system, optimized for storing data behind interactive web applications. Membase automatically spreads data and I/O across servers. This "scale out" approach at the data layer permits virtually unlimited growth of transaction capacity, with linear increases in cost and constant per-operation performance. + +Membase is in production behind thousands of applications, from shared-server deployments at Heroku to dedicated Membase clusters with hundreds of servers at Zynga and NHN. +</longdescription> +</pkgmetadata> |