summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net-misc/rabbitmq-server/ChangeLog9
-rw-r--r--net-misc/rabbitmq-server/Manifest8
-rw-r--r--net-misc/rabbitmq-server/files/rabbitmq-script-wrapper53
-rw-r--r--net-misc/rabbitmq-server/files/rabbitmq-server.init-r123
-rw-r--r--net-misc/rabbitmq-server/rabbitmq-server-1.5.4-r2.ebuild57
-rw-r--r--net-misc/rabbitmq-server/rabbitmq-server-2.0.0.ebuild82
6 files changed, 171 insertions, 61 deletions
diff --git a/net-misc/rabbitmq-server/ChangeLog b/net-misc/rabbitmq-server/ChangeLog
index 495692d39242..1ff1c7b32b5c 100644
--- a/net-misc/rabbitmq-server/ChangeLog
+++ b/net-misc/rabbitmq-server/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for net-misc/rabbitmq-server
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/rabbitmq-server/ChangeLog,v 1.6 2010/08/02 23:56:57 hollow Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/rabbitmq-server/ChangeLog,v 1.7 2010/08/28 14:33:03 hollow Exp $
+
+*rabbitmq-server-2.0.0 (28 Aug 2010)
+
+ 28 Aug 2010; Benedikt Böhm <hollow@gentoo.org>
+ -rabbitmq-server-1.5.4-r2.ebuild, +rabbitmq-server-2.0.0.ebuild,
+ +files/rabbitmq-script-wrapper, +files/rabbitmq-server.init-r1:
+ version bump wrt #334543. also fixes #332391.
02 Aug 2010; Benedikt Böhm <hollow@gentoo.org>
files/rabbitmq-server.init:
diff --git a/net-misc/rabbitmq-server/Manifest b/net-misc/rabbitmq-server/Manifest
index 7891bc8efc70..9fe6398f970c 100644
--- a/net-misc/rabbitmq-server/Manifest
+++ b/net-misc/rabbitmq-server/Manifest
@@ -1,7 +1,9 @@
+AUX rabbitmq-script-wrapper 1844 RMD160 255586b0339a8200c63309eaefb952f67712eb0d SHA1 3b4f880d484541e749e3dd0d913adc6a21e4df23 SHA256 46783bc7466f48d8ddc785c5aac2b94d723c811106b6d8251adee170558f316e
AUX rabbitmq-server.init 459 RMD160 b407cb249939b350a8190d37595d69f4fe472edf SHA1 242bb810ab313164865c3ba34906e660af631a20 SHA256 dc401ad19c5c7b8e113cbe1de22652db4c62a742c3a9d8a10b49ddc4b032f00e
-DIST rabbitmq-server-1.5.4.tar.gz 113657 RMD160 af2aeb1c9d18d5bbf619b858278f1ddc8c02f02f SHA1 2ddf5328ab6635168962f76c29b77185064df2bc SHA256 4edc03be70810e04922b7fbcf51487970836a2ce4c0c887b3a6640bc4ebee362
+AUX rabbitmq-server.init-r1 677 RMD160 be421539a5dba2f9cc689492e66d99690036daae SHA1 8a931567b923473defb69483b47ab4c9a423d640 SHA256 f74ac0c623a698b7ecc1db2a85bd464e69253a6ac7fb6f265cbbe35742341c60
DIST rabbitmq-server-1.8.0.tar.gz 202386 RMD160 935d1a5f171d2f7c34b6d785c52c169387a25343 SHA1 99cdd8832e972997b78efec11ff3d4e01846ca26 SHA256 ccb64d1ea0823a0e143444b8888f86b625bd6907f0625c9f7cd28da1d029d8d8
-EBUILD rabbitmq-server-1.5.4-r2.ebuild 1684 RMD160 53101c81a54d8ab59ad6669ebe3e509e8641ef9a SHA1 94c5b9a5f80dcac5ff021ef51add90395fd0ae80 SHA256 11bc0e444aa49428a18c0a797876b84d0ac5d58850812c295e41756a952f6b32
+DIST rabbitmq-server-2.0.0.tar.gz 272752 RMD160 cb7ad2c8b0282b9d11e4eae47646e6b59e81a8e2 SHA1 3c72e4bd540caa81180701414c9bb5ec298d0365 SHA256 68ec7d210e3a379696538f09322d1c8161066dbcb2a8822ffbfed068b7c9bc7f
EBUILD rabbitmq-server-1.8.0.ebuild 1585 RMD160 79e92961b57ad22563e1bbbd1a83948d33e52c6b SHA1 4d9b2306b2203fdd84b6baf15f8f8d23e9209591 SHA256 7723eb784051ef102a34df320f89f8dbadcfcdd848d5a60e1d92e3dae820a946
-MISC ChangeLog 1220 RMD160 dc73ca0586fc46dbf94f606448ebabc17166ef5b SHA1 c40fe9ed06fb5bc0a46f07129671de8cfe9ee2d4 SHA256 611fed238fd29b911857e94d60117139fb51e41a170617d62fa152e43818c753
+EBUILD rabbitmq-server-2.0.0.ebuild 2222 RMD160 b1722d3f9ab6487c219b29f05ce68afc8a8a53e8 SHA1 ebfbc7746f6060575103667dcf7a385edfcf386e SHA256 f85ad676d1d06dfebfd5bbfb1c07439520e2cac4f5417432cb35bfffe218b966
+MISC ChangeLog 1490 RMD160 6336001a40b55950f493fb1b20a6461a303fa2e6 SHA1 0ce41e628b6c1b57497b302f9dcd55ddabd6d599 SHA256 15ff553d33cfb0690d924a562027acf6d2b161aa0bd9f70f8550ec1f4ac05dcf
MISC metadata.xml 256 RMD160 d9b3d76f0f3b12500bf0a1e012563f2f32f4992f SHA1 2520f467b4a64d131a92dd8101e03ad334d6d7a6 SHA256 74f2c9d6b7ef600697deed6d19bc64604a39ba7a2e8c24fae47ca2544def84c0
diff --git a/net-misc/rabbitmq-server/files/rabbitmq-script-wrapper b/net-misc/rabbitmq-server/files/rabbitmq-script-wrapper
new file mode 100644
index 000000000000..91b4b7c7898e
--- /dev/null
+++ b/net-misc/rabbitmq-server/files/rabbitmq-script-wrapper
@@ -0,0 +1,53 @@
+#!/bin/sh
+## The contents of this file are subject to the Mozilla Public License
+## Version 1.1 (the "License"); you may not use this file except in
+## compliance with the License. You may obtain a copy of the License at
+## http://www.mozilla.org/MPL/
+##
+## Software distributed under the License is distributed on an "AS IS"
+## basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+## License for the specific language governing rights and limitations
+## under the License.
+##
+## The Original Code is RabbitMQ.
+##
+## The Initial Developers of the Original Code are LShift Ltd,
+## Cohesive Financial Technologies LLC, and Rabbit Technologies Ltd.
+##
+## Portions created before 22-Nov-2008 00:00:00 GMT by LShift Ltd,
+## Cohesive Financial Technologies LLC, or Rabbit Technologies Ltd
+## are Copyright (C) 2007-2008 LShift Ltd, Cohesive Financial
+## Technologies LLC, and Rabbit Technologies Ltd.
+##
+## Portions created by LShift Ltd are Copyright (C) 2007-2009 LShift
+## Ltd. Portions created by Cohesive Financial Technologies LLC are
+## Copyright (C) 2007-2009 Cohesive Financial Technologies
+## LLC. Portions created by Rabbit Technologies Ltd are Copyright
+## (C) 2007-2009 Rabbit Technologies Ltd.
+##
+## All Rights Reserved.
+##
+## Contributor(s): ______________________________________.
+##
+
+# Escape spaces and quotes, because shell is revolting.
+for arg in "$@" ; do
+ # Escape quotes in parameters, so that they're passed through cleanly.
+ arg=$(sed -e 's/"/\\"/g' <<-END
+ $arg
+ END
+ )
+ CMDLINE="${CMDLINE} \"${arg}\""
+done
+
+cd /var/lib/rabbitmq
+
+SCRIPT=`basename $0`
+
+if [ `id -u` = 0 ] ; then
+ su rabbitmq -s /bin/sh -c "/usr/libexec/rabbitmq/${SCRIPT} ${CMDLINE}"
+else
+ /usr/libexec/rabbitmq/${SCRIPT}
+ echo -e "\nOnly root should run ${SCRIPT}\n"
+ exit 1
+fi
diff --git a/net-misc/rabbitmq-server/files/rabbitmq-server.init-r1 b/net-misc/rabbitmq-server/files/rabbitmq-server.init-r1
new file mode 100644
index 000000000000..d659af4499b1
--- /dev/null
+++ b/net-misc/rabbitmq-server/files/rabbitmq-server.init-r1
@@ -0,0 +1,23 @@
+#!/sbin/runscript
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/rabbitmq-server/files/rabbitmq-server.init-r1,v 1.1 2010/08/28 14:33:02 hollow Exp $
+
+depend() {
+ # uncomment this as soon as bug 334979 is fixed
+ #need epmd
+ need net
+ use dns
+}
+
+start() {
+ ebegin "Starting RabbitMQ..."
+ /usr/sbin/rabbitmq-multi start_all ${NODE_COUNT:-1} >> /var/log/rabbitmq/startup.log 2>> /var/log/rabbitmq/startup.err
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping RabbitMQ..."
+ /usr/sbin/rabbitmq-multi stop_all >> /var/log/rabbitmq/shutdown.log 2>> /var/log/rabbitmq/shutdown.err
+ eend $?
+}
diff --git a/net-misc/rabbitmq-server/rabbitmq-server-1.5.4-r2.ebuild b/net-misc/rabbitmq-server/rabbitmq-server-1.5.4-r2.ebuild
deleted file mode 100644
index 3163f03f8744..000000000000
--- a/net-misc/rabbitmq-server/rabbitmq-server-1.5.4-r2.ebuild
+++ /dev/null
@@ -1,57 +0,0 @@
-# Copyright 1999-2010 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/rabbitmq-server/rabbitmq-server-1.5.4-r2.ebuild,v 1.2 2010/07/03 08:21:06 hollow Exp $
-
-inherit eutils
-
-DESCRIPTION="RabbitMQ is a high-performance AMQP-compliant message broker written in Erlang."
-HOMEPAGE="http://www.rabbitmq.com/"
-SRC_URI="http://www.rabbitmq.com/releases/rabbitmq-server/v${PV}/rabbitmq-server-${PV}.tar.gz"
-LICENSE="MPL-1.1"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE=""
-
-# Q: is RDEPEND-only sufficient for a binary package, since we don't compile?
-DEPEND="dev-lang/erlang
- dev-python/simplejson"
-RDEPEND="${DEPEND}"
-
-src_install() {
- # erlang module
- local targetdir="/usr/$(get_libdir)/erlang/lib/${P}"
-
- einfo "Correcting additional Erlang code path in scripts"
- sed -i -e "s:\`dirname \$0\`\/..\/ebin:${targetdir}:g" scripts/* || die "sed failed"
-
- einfo "Installing Erlang module to ${targetdir}"
- dodir "${targetdir}"
- cp -dpR ebin include "${D}/${targetdir}"
-
- einfo "Installing server scripts to /usr/sbin"
- # Install server scripts to sbin
- dosbin scripts/rabbitmq-multi scripts/rabbitmq-server
-
- einfo "Installing rabbitmqctl to /usr/bin"
- # Install control script to bin
- dobin scripts/rabbitmqctl
-
- # Docs
- dodoc README
-
- # create the directory where our log file will go.
- diropts -m 0770 -o rabbitmq -g rabbitmq
- keepdir /var/log/rabbitmq
-
- # create the mnesia directory
- diropts -m 0770 -o rabbitmq -g rabbitmq
- dodir /var/lib/rabbitmq/mnesia
-
- # Install the init script
- newinitd "${FILESDIR}"/rabbitmq-server.init rabbitmq
-}
-
-pkg_setup() {
- enewgroup rabbitmq
- enewuser rabbitmq -1 -1 -1 rabbitmq
-}
diff --git a/net-misc/rabbitmq-server/rabbitmq-server-2.0.0.ebuild b/net-misc/rabbitmq-server/rabbitmq-server-2.0.0.ebuild
new file mode 100644
index 000000000000..34d0f0000d4b
--- /dev/null
+++ b/net-misc/rabbitmq-server/rabbitmq-server-2.0.0.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/rabbitmq-server/rabbitmq-server-2.0.0.ebuild,v 1.1 2010/08/28 14:33:03 hollow Exp $
+
+EAPI="2"
+
+inherit eutils
+
+DESCRIPTION="RabbitMQ is a high-performance AMQP-compliant message broker written in Erlang."
+HOMEPAGE="http://www.rabbitmq.com/"
+SRC_URI="http://www.rabbitmq.com/releases/rabbitmq-server/v${PV}/rabbitmq-server-${PV}.tar.gz"
+
+LICENSE="MPL-1.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="dev-lang/erlang"
+DEPEND="${RDEPEND}
+ app-text/xmlto
+ dev-libs/libxslt
+ dev-python/simplejson
+"
+
+pkg_setup() {
+ enewgroup rabbitmq
+ enewuser rabbitmq -1 -1 /var/lib/rabbitmq rabbitmq
+}
+
+src_compile() {
+ emake all docs_all || die "emake all failed"
+ gunzip docs/*.gz
+}
+
+src_install() {
+ # erlang module
+ local targetdir="/usr/$(get_libdir)/erlang/lib/${P}"
+
+ einfo "Setting correct RABBITMQ_HOME in scripts"
+ sed -e "s:^RABBITMQ_HOME=.*:RABBITMQ_HOME=\"${targetdir}\":g" \
+ -i scripts/rabbitmq-env
+
+ einfo "Installing Erlang modules to ${targetdir}"
+ insinto "${targetdir}"
+ doins -r ebin include
+
+ einfo "Installing server scripts to /usr/sbin"
+ for script in rabbitmq-env rabbitmq-server rabbitmqctl rabbitmq-multi; do
+ exeinto /usr/libexec/rabbitmq
+ doexe scripts/${script}
+ newsbin "${FILESDIR}"/rabbitmq-script-wrapper ${script}
+ done
+
+ # create the directory where our log file will go.
+ diropts -m 0770 -o rabbitmq -g rabbitmq
+ keepdir /var/log/rabbitmq
+
+ # create the mnesia directory
+ diropts -m 0770 -o rabbitmq -g rabbitmq
+ dodir /var/lib/rabbitmq{,/mnesia}
+
+ # install the init script
+ newinitd "${FILESDIR}"/rabbitmq-server.init-r1 rabbitmq
+
+ # install documentation
+ doman docs/*.[15]
+ dodoc README
+}
+
+pkg_preinst() {
+ if has_version "<=net-misc/rabbitmq-server-1.8.0"; then
+ elog "IMPORTANT UPGRADE NOTICE:"
+ elog
+ elog "RabbitMQ is now running as an unprivileged user instead of root."
+ elog "Therefore you need to fix the permissions for RabbitMQs Mnesia database."
+ elog "Please run the following commands as root:"
+ elog
+ elog " usermod -d /var/lib/rabbitmq rabbitmq"
+ elog " chown rabbitmq:rabbitmq -R /var/lib/rabbitmq"
+ elog
+ fi
+}