Hi, an updated patch attached. Only difference is the additional MODPY_ADJ_FILES line in the Makefile in order to fix the python shebang in the rabbitmqadmin tool.
Otherwise, question below if OK in the current release cycle still applies. cheers, Sebastian On Monday, February 9, 2015 20:18 CET, "Sebastian Reitenbach" <[email protected]> wrote: > Hi, > > while playing with the rabbitmq puppet module, getting rabbitmq setup, I > figured that > the patch to the rabbitmqctl script broke the node commands, i.e.: > > rabbitmqct eval 'node().' > > and friends are broken, this ends with an error message. > > I tried my best, keeping the su - to the _rabbitmq user, but failed miserably. > However I changed $*, $@, with different quotes surrounded etc. either way, > it broke completely, or only some part of the commands that can be passed > to the rabbitmqctl utility. > Then I started wondering about the reason of that patch at all. > > As far as I can see, its not necessary, and therefore the reason I removed it. > Why not necessary? The rabbitmq init script has daemon_user=_rabbitmq, > so the daemon will be started as _rabbitmq anyways. > Further attempts to communicate with the rabbitmq daemon are secured with the > /var/rabbitmq/.erlang.cookie. This is only accessible to root or the > _rabbitmq > user. > For that reason, the dance to become the _rabbitmq user within the rabbitmqctl > script, is not really necessary. > > Is this fix OK at the current timing short before release lock? > > Sebastian > Index: Makefile =================================================================== RCS file: /cvs/ports/net/rabbitmq/Makefile,v retrieving revision 1.20 diff -u -r1.20 Makefile --- Makefile 29 Dec 2014 09:28:22 -0000 1.20 +++ Makefile 10 Feb 2015 11:56:50 -0000 @@ -3,6 +3,7 @@ COMMENT = highly reliable Enterprise Messaging System V = 3.4.2 +REVISION = 0 DISTNAME = rabbitmq-server-$V PKGNAME = rabbitmq-$V CATEGORIES = net @@ -40,7 +41,8 @@ SUBST_VARS += RABBITUSER V -MODPY_ADJ_FILES = plugins-src/rabbitmq-amqp1.0/codegen.py +MODPY_ADJ_FILES += plugins-src/rabbitmq-amqp1.0/codegen.py +MODPY_ADJ_FILES += plugins-src/rabbitmq-management/bin/rabbitmqadmin NO_TEST = Yes Index: patches/patch-scripts_rabbitmqctl =================================================================== RCS file: patches/patch-scripts_rabbitmqctl diff -N patches/patch-scripts_rabbitmqctl --- patches/patch-scripts_rabbitmqctl 29 Dec 2014 09:28:23 -0000 1.5 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,18 +0,0 @@ -$OpenBSD: patch-scripts_rabbitmqctl,v 1.5 2014/12/29 09:28:23 jasper Exp $ ---- scripts/rabbitmqctl.orig Sun Dec 28 20:10:23 2014 -+++ scripts/rabbitmqctl Sun Dec 28 20:10:49 2014 -@@ -28,7 +28,7 @@ ${ERL_DIR}erl ${RABBITMQ_NAME_TYPE} rabbitmqctl-prelau - # (e.g. forget_cluster_node --offline) require us to impersonate the - # real node. - RABBITMQ_USE_LONGNAME=${RABBITMQ_USE_LONGNAME} \ --exec ${ERL_DIR}erl \ -+su -s /bin/sh -l ${RABBITUSER} -c "${ERL_DIR}erl \ - -pa "${RABBITMQ_HOME}/ebin" \ - -noinput \ - -hidden \ -@@ -38,4 +38,4 @@ exec ${ERL_DIR}erl \ - -mnesia dir "\"${RABBITMQ_MNESIA_DIR}\"" \ - -s rabbit_control_main \ - -nodename $RABBITMQ_NODENAME \ -- -extra "$@" -+ -extra $*"
