# HG changeset patch # User holger # Date 1293889439 -3600 # Node ID 32de8e2c4a2cde4c5ce98120469aff67d4815119 # Parent c982d5c6f5eb6251b88e8148d54bb4c266dddd55 update rabbitmq to 2.2.0, cleanups diff -r c982d5c6f5eb -r 32de8e2c4a2c net-misc/rabbitmq-server/Manifest --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/net-misc/rabbitmq-server/Manifest Sat Jan 01 14:43:59 2011 +0100 @@ -0,0 +1,5 @@ +AUX rabbitmq-script-wrapper 1844 RMD160 255586b0339a8200c63309eaefb952f67712eb0d SHA1 3b4f880d484541e749e3dd0d913adc6a21e4df23 SHA256 46783bc7466f48d8ddc785c5aac2b94d723c811106b6d8251adee170558f316e +AUX rabbitmq-server.init-r1 627 RMD160 bfcb3cdd1301bf497a80613ce18cac03186beb4e SHA1 de798f739de02f0013cca8e063f772cf75f739c9 SHA256 03f0f3c3495ff339d8768b303da302823c75bdd5d1bab1b48c5b69d614aafab9 +DIST rabbitmq-server-2.2.0.tar.gz 287123 RMD160 7912a9374726cb3d71b09e3ac47f35a2db2c3b1c SHA1 1f426dbc7961a0eac3864e57e623474bf8c46d74 SHA256 3e6b55bbac4dc7b7bf264528dd518b51ab4ab2873cf0f8aceeead386e8e0b0e1 +EBUILD rabbitmq-server-2.2.0.ebuild 2252 RMD160 459b31bd0d462e3aeea384196a2344ce71ab2b36 SHA1 954f4883d57e0d90ee0f2339e1858602edca9d8b SHA256 492e2b188664c606ebbcf8792e5c4b9351c21ae102e31cc2f4bc5ec39540a99b +MISC metadata.xml 256 RMD160 d9b3d76f0f3b12500bf0a1e012563f2f32f4992f SHA1 2520f467b4a64d131a92dd8101e03ad334d6d7a6 SHA256 74f2c9d6b7ef600697deed6d19bc64604a39ba7a2e8c24fae47ca2544def84c0 diff -r c982d5c6f5eb -r 32de8e2c4a2c net-misc/rabbitmq-server/files/rabbitmq-script-wrapper --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/net-misc/rabbitmq-server/files/rabbitmq-script-wrapper Sat Jan 01 14:43:59 2011 +0100 @@ -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 -r c982d5c6f5eb -r 32de8e2c4a2c net-misc/rabbitmq-server/files/rabbitmq-server.init-r1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/net-misc/rabbitmq-server/files/rabbitmq-server.init-r1 Sat Jan 01 14:43:59 2011 +0100 @@ -0,0 +1,22 @@ +#!/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() { + 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 -r c982d5c6f5eb -r 32de8e2c4a2c net-misc/rabbitmq-server/metadata.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/net-misc/rabbitmq-server/metadata.xml Sat Jan 01 14:43:59 2011 +0100 @@ -0,0 +1,10 @@ + + + + no-herd + + hollow@gentoo.org + Benedikt Böhm + + + diff -r c982d5c6f5eb -r 32de8e2c4a2c net-misc/rabbitmq-server/rabbitmq-server-2.2.0.ebuild --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/net-misc/rabbitmq-server/rabbitmq-server-2.2.0.ebuild Sat Jan 01 14:43:59 2011 +0100 @@ -0,0 +1,83 @@ +# 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.1.0.ebuild,v 1.1 2010/09/19 08:35:51 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/docbook-xml-dtd:4.5 + 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 +}