[PATCH] Use erlang21 for net/rabbitmq

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH] Use erlang21 for net/rabbitmq

Greg Steuck-5
The other victim of my quest to get rid of erlang19 which is not
-fno-common friendly.

The package builds fine, but once installed it fails to start due to
"Error when reading /var/rabbitmq/.erlang.cookie: eacces" when launched
with `/etc/rc.d/rabbitmq -d start`. The cookie file is for some reason
owned by root so a manual fixup of `chown _rabbitmq
/var/rabbitmq/.erlang.cookie` makes the daemon runnable.

I don't know what else to test and never heard of rabbitmq until today.

If somebody feels this is enough, OK?

diff --git net/rabbitmq/Makefile net/rabbitmq/Makefile
index 5003dcf1bfe..e6b95d3eb66 100644
--- net/rabbitmq/Makefile
+++ net/rabbitmq/Makefile
@@ -3,7 +3,7 @@
 COMMENT = highly reliable Enterprise Messaging System
 
 V = 3.6.15
-REVISION = 2
+REVISION = 3
 DISTNAME = rabbitmq-server-$V
 PKGNAME = rabbitmq-$V
 CATEGORIES = net
@@ -20,7 +20,7 @@ EXTRACT_SUFX = .tar.xz
 
 MODULES = lang/erlang \
  lang/python
-MODERL_VERSION = 19
+MODERL_VERSION = 21
 
 USE_GMAKE = Yes
 CONFIGURE_STYLE = none
--
2.30.0

Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Use erlang21 for net/rabbitmq

Stuart Henderson
On 2021/02/08 20:59, Greg Steuck wrote:
> The other victim of my quest to get rid of erlang19 which is not
> -fno-common friendly.
>
> The package builds fine, but once installed it fails to start due to
> "Error when reading /var/rabbitmq/.erlang.cookie: eacces" when launched
> with `/etc/rc.d/rabbitmq -d start`. The cookie file is for some reason
> owned by root so a manual fixup of `chown _rabbitmq
> /var/rabbitmq/.erlang.cookie` makes the daemon runnable.

that's because "rc_check" runs rabbitmqctl status as root

> I don't know what else to test and never heard of rabbitmq until today.
>
> If somebody feels this is enough, OK?

If it's not enough then I have an attempt at an update to 3.8.8 (newer
ones will need erlang 22) but it will need someone who knows what they
are doing with this software to finish it. junkpile.org/rabbitmq.diff


Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Use erlang21 for net/rabbitmq

Greg Steuck-5
Stuart Henderson <[hidden email]> writes:

> On 2021/02/08 20:59, Greg Steuck wrote:
>> The other victim of my quest to get rid of erlang19 which is not
>> -fno-common friendly.
>>
>> The package builds fine, but once installed it fails to start due to
>> "Error when reading /var/rabbitmq/.erlang.cookie: eacces" when launched
>> with `/etc/rc.d/rabbitmq -d start`. The cookie file is for some reason
>> owned by root so a manual fixup of `chown _rabbitmq
>> /var/rabbitmq/.erlang.cookie` makes the daemon runnable.
>
> that's because "rc_check" runs rabbitmqctl status as root

Thanks for figuring this out!

>> I don't know what else to test and never heard of rabbitmq until today.
>>
>> If somebody feels this is enough, OK?
>
> If it's not enough then I have an attempt at an update to 3.8.8 (newer
> ones will need erlang 22) but it will need someone who knows what they
> are doing with this software to finish it. junkpile.org/rabbitmq.diff

The current state of the port is broken by -fno-commit which took out
erlang19. On top of that the imported version has known security issues
and EOLed upstream support. I'm inclined to remove the port and let
somebody who needs the port send a working version with resolved
security issues.

OK to remove net/rabbitmq?

Thanks
Greg

Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Use erlang21 for net/rabbitmq

Stuart Henderson
On 2021/02/09 17:44, Greg Steuck wrote:
> The current state of the port is broken by -fno-commit which took out
> erlang19. On top of that the imported version has known security issues
> and EOLed upstream support. I'm inclined to remove the port and let
> somebody who needs the port send a working version with resolved
> security issues.

sebastia@, could you comment please? are you still using this?

The bad security issues fixed are Windows-specific, the others (XSS and
DoS in management interfaces) there are probably much worse than those
in other ports. It is overdue an update though.

> OK to remove net/rabbitmq?

If it is going, I would prefer to mark BROKEN than remove. It is quite
possobly something that someone will want to fix at some point and cvs
makes it a pain to readd removed ports.

Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Use erlang21 for net/rabbitmq

Stuart Henderson
In reply to this post by Greg Steuck-5
On 2021/02/08 20:59, Greg Steuck wrote:

> The other victim of my quest to get rid of erlang19 which is not
> -fno-common friendly.
>
> The package builds fine, but once installed it fails to start due to
> "Error when reading /var/rabbitmq/.erlang.cookie: eacces" when launched
> with `/etc/rc.d/rabbitmq -d start`. The cookie file is for some reason
> owned by root so a manual fixup of `chown _rabbitmq
> /var/rabbitmq/.erlang.cookie` makes the daemon runnable.
>
> I don't know what else to test and never heard of rabbitmq until today.
>
> If somebody feels this is enough, OK?
>
> diff --git net/rabbitmq/Makefile net/rabbitmq/Makefile
> index 5003dcf1bfe..e6b95d3eb66 100644
> --- net/rabbitmq/Makefile
> +++ net/rabbitmq/Makefile
> @@ -3,7 +3,7 @@
>  COMMENT = highly reliable Enterprise Messaging System
>  
>  V = 3.6.15
> -REVISION = 2
> +REVISION = 3
>  DISTNAME = rabbitmq-server-$V
>  PKGNAME = rabbitmq-$V
>  CATEGORIES = net
> @@ -20,7 +20,7 @@ EXTRACT_SUFX = .tar.xz
>  
>  MODULES = lang/erlang \
>   lang/python
> -MODERL_VERSION = 19
> +MODERL_VERSION = 21
>  
>  USE_GMAKE = Yes
>  CONFIGURE_STYLE = none
> --
> 2.30.0
>

Upstream says "Maximum supported Erlang/OTP: 20.3.x" for 3.6.15.
Please just mark it BROKEN.

Sebastian, if you don't want to maintain the port, please drop
the MAINTAINER line.

Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Use erlang21 for net/rabbitmq

Sebastian Reitenbach
Hi,


Am Sonntag, Februar 14, 2021 23:01 CET, schrieb Stuart Henderson <[hidden email]>:

> On 2021/02/08 20:59, Greg Steuck wrote:
> > The other victim of my quest to get rid of erlang19 which is not
> > -fno-common friendly.
> >
> > The package builds fine, but once installed it fails to start due to
> > "Error when reading /var/rabbitmq/.erlang.cookie: eacces" when launched
> > with `/etc/rc.d/rabbitmq -d start`. The cookie file is for some reason
> > owned by root so a manual fixup of `chown _rabbitmq
> > /var/rabbitmq/.erlang.cookie` makes the daemon runnable.
> >
> > I don't know what else to test and never heard of rabbitmq until today.
> >
> > If somebody feels this is enough, OK?
> >
> > diff --git net/rabbitmq/Makefile net/rabbitmq/Makefile
> > index 5003dcf1bfe..e6b95d3eb66 100644
> > --- net/rabbitmq/Makefile
> > +++ net/rabbitmq/Makefile
> > @@ -3,7 +3,7 @@
> >  COMMENT = highly reliable Enterprise Messaging System
> >
> >  V = 3.6.15
> > -REVISION = 2
> > +REVISION = 3
> >  DISTNAME = rabbitmq-server-$V
> >  PKGNAME = rabbitmq-$V
> >  CATEGORIES = net
> > @@ -20,7 +20,7 @@ EXTRACT_SUFX = .tar.xz
> >
> >  MODULES = lang/erlang \
> >   lang/python
> > -MODERL_VERSION = 19
> > +MODERL_VERSION = 21
> >
> >  USE_GMAKE = Yes
> >  CONFIGURE_STYLE = none
> > --
> > 2.30.0
> >
>
> Upstream says "Maximum supported Erlang/OTP: 20.3.x" for 3.6.15.
> Please just mark it BROKEN.
>
> Sebastian, if you don't want to maintain the port, please drop
> the MAINTAINER line.
>

 sorry for the late reply, I only read ports@ ocassionally, and when I'm only CC: instead of TO:
it doesn't end up in my inbox catching my attention, but gets filtered to the ports subfolder.

In any case, I still have it running, but probably should not. I marked it BROKEN,
and dropped MAINTAINER.

Sebastian

Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Use erlang21 for net/rabbitmq

Aisha Tammy-5
Hi,
I've been using rabbitmq for a while and am interested in updating the port.
The latest version 3.8.11 , recommends >= erlang 23 (needs >=22.3):
https://rabbitmq.com/which-erlang.html
I'll try a hand at updating but I might not be able to do soon, plus the
erlang
port itself looks a bit complex. Just wanted to let know, incase someone
was thinking of removing it.
If someone else is interested in fixing, thats good too.

Cheers,
Aisha

On 2/15/21 2:34 PM, Sebastian Reitenbach wrote:

> Hi,
>
>  
> Am Sonntag, Februar 14, 2021 23:01 CET, schrieb Stuart Henderson <[hidden email]>:
>  
>> On 2021/02/08 20:59, Greg Steuck wrote:
>>> The other victim of my quest to get rid of erlang19 which is not
>>> -fno-common friendly.
>>>
>>> The package builds fine, but once installed it fails to start due to
>>> "Error when reading /var/rabbitmq/.erlang.cookie: eacces" when launched
>>> with `/etc/rc.d/rabbitmq -d start`. The cookie file is for some reason
>>> owned by root so a manual fixup of `chown _rabbitmq
>>> /var/rabbitmq/.erlang.cookie` makes the daemon runnable.
>>>
>>> I don't know what else to test and never heard of rabbitmq until today.
>>>
>>> If somebody feels this is enough, OK?
>>>
>>> diff --git net/rabbitmq/Makefile net/rabbitmq/Makefile
>>> index 5003dcf1bfe..e6b95d3eb66 100644
>>> --- net/rabbitmq/Makefile
>>> +++ net/rabbitmq/Makefile
>>> @@ -3,7 +3,7 @@
>>>   COMMENT = highly reliable Enterprise Messaging System
>>>  
>>>   V = 3.6.15
>>> -REVISION = 2
>>> +REVISION = 3
>>>   DISTNAME = rabbitmq-server-$V
>>>   PKGNAME = rabbitmq-$V
>>>   CATEGORIES = net
>>> @@ -20,7 +20,7 @@ EXTRACT_SUFX = .tar.xz
>>>  
>>>   MODULES = lang/erlang \
>>>   lang/python
>>> -MODERL_VERSION = 19
>>> +MODERL_VERSION = 21
>>>  
>>>   USE_GMAKE = Yes
>>>   CONFIGURE_STYLE = none
>>> --
>>> 2.30.0
>>>
>> Upstream says "Maximum supported Erlang/OTP: 20.3.x" for 3.6.15.
>> Please just mark it BROKEN.
>>
>> Sebastian, if you don't want to maintain the port, please drop
>> the MAINTAINER line.
>>
>  
>   sorry for the late reply, I only read ports@ ocassionally, and when I'm only CC: instead of TO:
> it doesn't end up in my inbox catching my attention, but gets filtered to the ports subfolder.
>
> In any case, I still have it running, but probably should not. I marked it BROKEN,
> and dropped MAINTAINER.
>
> Sebastian
>

Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Use erlang21 for net/rabbitmq

Stuart Henderson
On 2021/02/15 15:05, Aisha Tammy wrote:
> Hi,
> I've been using rabbitmq for a while and am interested in updating the port.
> The latest version 3.8.11 , recommends >= erlang 23 (needs >=22.3):
> https://rabbitmq.com/which-erlang.html
> I'll try a hand at updating but I might not be able to do soon, plus the
> erlang
> port itself looks a bit complex. Just wanted to let know, incase someone
> was thinking of removing it.
> If someone else is interested in fixing, thats good too.

Here's a start of an update/tidy to 3.8.8 - not the newest but it
still supports Erlang 21.x. (3.8.9 and 3.8.10 may still work, 3.8.11
explicitly requires 22.x or later and recommends 23.x).

I haven't used rabbitmq before so not quite sure what to expect but it
seemed to die soon after startup.

I'm unlikely to spend much more time on this myself but at least it
should save some work merging diffs. I followed upstream's location
for some of the files which is different to the previous version of
the port, saves replicating parts of upstream's install target in
post-install.

Index: Makefile
===================================================================
RCS file: /cvs/ports/net/rabbitmq/Makefile,v
retrieving revision 1.36
diff -u -p -r1.36 Makefile
--- Makefile 15 Feb 2021 19:30:49 -0000 1.36
+++ Makefile 16 Feb 2021 15:41:35 -0000
@@ -4,8 +4,7 @@ BROKEN = security issues, and need updat
 
 COMMENT = highly reliable Enterprise Messaging System
 
-V = 3.6.15
-REVISION = 3
+V = 3.8.8
 DISTNAME = rabbitmq-server-$V
 PKGNAME = rabbitmq-$V
 CATEGORIES = net
@@ -15,60 +14,66 @@ HOMEPAGE = https://www.rabbitmq.com/
 # MPL
 PERMIT_PACKAGE= Yes
 
-MASTER_SITES = https://www.rabbitmq.com/releases/rabbitmq-server/v${V}/
+MASTER_SITES = https://github.com/rabbitmq/rabbitmq-server/releases/download/v$V/
 EXTRACT_SUFX = .tar.xz
 
 MODULES = lang/erlang \
  lang/python
-MODERL_VERSION = 19
+MODERL_VERSION = 21
 
 USE_GMAKE = Yes
 CONFIGURE_STYLE = none
 
 BUILD_DEPENDS = archivers/unzip \
  archivers/zip \
+ lang/elixir \
  net/rsync \
  textproc/docbook \
  textproc/docbook-xsl \
  textproc/libxslt \
  textproc/xmlto
 
-MAKE_ENV = PYTHON=${MODPY_BIN} VERSION=${V} V=1
+MAKE_FLAGS = MANDIR=${PREFIX}/man \
+ RMQ_ROOTDIR=${PREFIX} \
+ RMQ_ERLAPP_DIR=${PREFIX}/lib/rabbitmq \
+ PYTHON=${MODPY_BIN} \
+ VERSION=${V} \
+ V=2
 
-RABBITUSER = _rabbitmq
-
-SUBST_VARS += RABBITUSER V
+SUBST_VARS += V MODERL_ERL
 
+MODPY_VERSION = ${MODPY_DEFAULT_VERSION_3}
 MODPY_ADJ_FILES += deps/rabbit_common/codegen.py
 MODPY_ADJ_FILES += deps/rabbitmq_management/bin/rabbitmqadmin
 
 NO_TEST = Yes
 
-FAKE_FLAGS = DESTDIR=''
-
 ALL_TARGET = all manpages
+INSTALL_TARGET = install install-bin
 
-pre-build:
- ${SUBST_CMD} ${WRKSRC}/deps/rabbit/scripts/rabbitmqctl \
- ${WRKSRC}/deps/rabbit/scripts/rabbitmq-defaults
+pre-configure:
+ ${SUBST_CMD} ${WRKSRC}/deps/rabbit/scripts/rabbitmq-{server,env}
+ sed -i 's,/var/lib/rabbitmq,/var/rabbitmq,g' \
+    ${WRKSRC}/scripts/rabbitmq-server-ha.ocf
 
 post-install:
- ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/rabbitmq
- for file in INSTALL LICENSE*; do \
- mv ${PREFIX}/lib/rabbitmq/$$file \
- ${PREFIX}/share/doc/rabbitmq; \
- done
- for f in rabbitmqctl rabbitmq-defaults rabbitmq-env rabbitmq-plugins \
- rabbitmq-server; do \
- cd ${PREFIX}/sbin && ln -s ../lib/rabbitmq/sbin/$$f \
- $$f; \
- done
- ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/rabbitmq
+ ${INSTALL_DATA_DIR} ${PREFIX}/share/{doc,examples}/rabbitmq \
+    ${PREFIX}/share/bash-completions/completions \
+    ${PREFIX}/share/zsh-completions/vendor-completions
+ cd ${WRKBUILD}/deps/rabbit/docs && \
+    ${INSTALL_DATA} *.8 ${PREFIX}/man/man8/ && \
+    ${INSTALL_DATA} *.5 ${PREFIX}/man/man5/ && \
+    ${INSTALL_DATA} *conf*example ${PREFIX}/share/examples/rabbitmq
+ mv ${PREFIX}/lib/rabbitmq/{INSTALL,LICENSE*} \
+    ${PREFIX}/share/doc/rabbitmq
  ${SUBST_CMD} -m 0644 -c ${FILESDIR}/rabbitmq.conf \
- ${PREFIX}/share/examples/rabbitmq/rabbitmq-env.conf
- ${INSTALL_DATA} ${WRKBUILD}/deps/rabbit/docs/*.1 \
- ${PREFIX}/man/man1/
- ${INSTALL_DATA} ${WRKBUILD}/deps/rabbit/docs/*.5 \
- ${PREFIX}/man/man5/
+    ${PREFIX}/share/examples/rabbitmq/rabbitmq-env.conf
+ sed -i 's,/usr/lib/rabbitmq/bin/rabbitmqctl,${PREFIX}/bin/rabbitmqctl,g' \
+    ${PREFIX}/autocomplete/bash_autocomplete.sh
+ mv ${PREFIX}/autocomplete/bash_autocomplete.sh \
+    ${PREFIX}/share/bash-completions/completions/rabbitmq
+ mv ${PREFIX}/autocomplete/zsh_autocomplete.sh \
+    ${PREFIX}/share/zsh-completions/vendor-completions/_rabbitmq
+ rm -r ${PREFIX}/autocomplete
 
 .include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /cvs/ports/net/rabbitmq/distinfo,v
retrieving revision 1.9
diff -u -p -r1.9 distinfo
--- distinfo 30 May 2019 16:24:33 -0000 1.9
+++ distinfo 16 Feb 2021 15:41:35 -0000
@@ -1,2 +1,2 @@
-SHA256 (rabbitmq-server-3.6.15.tar.xz) = HiX5rrNqquGn2B88vzmOVMjrWtGHbAlEqxLWUwyNtf0=
-SIZE (rabbitmq-server-3.6.15.tar.xz) = 3950180
+SHA256 (rabbitmq-server-3.8.8.tar.xz) = Z77Gf7Cq0kioPUv39g8pisZpb9DhWuLvZid2rGakP5M=
+SIZE (rabbitmq-server-3.8.8.tar.xz) = 3073288
Index: files/rabbitmq.conf
===================================================================
RCS file: /cvs/ports/net/rabbitmq/files/rabbitmq.conf,v
retrieving revision 1.3
diff -u -p -r1.3 rabbitmq.conf
--- files/rabbitmq.conf 11 Dec 2019 14:28:36 -0000 1.3
+++ files/rabbitmq.conf 16 Feb 2021 15:41:35 -0000
@@ -4,4 +4,4 @@
 # NODENAME=hare
 
 # needed by rabbitmqctl to pick up auth token
-HOME=~${RABBITUSER}
+HOME=~_rabbitmq
Index: patches/patch-Makefile
===================================================================
RCS file: /cvs/ports/net/rabbitmq/patches/patch-Makefile,v
retrieving revision 1.10
diff -u -p -r1.10 patch-Makefile
--- patches/patch-Makefile 30 May 2019 16:24:33 -0000 1.10
+++ patches/patch-Makefile 16 Feb 2021 15:41:35 -0000
@@ -1,19 +1,19 @@
-$OpenBSD: patch-Makefile,v 1.10 2019/05/30 16:24:33 sebastia Exp $
+$OpenBSD$
+
+quieten upstream's tar check
+
 Index: Makefile
 --- Makefile.orig
 +++ Makefile
-@@ -238,11 +238,11 @@ DESTDIR ?=
- PREFIX ?= /usr/local
- WINDOWS_PREFIX ?= rabbitmq-server-windows-$(PROJECT_VERSION)
+@@ -275,9 +275,9 @@ $(SOURCE_DIST).manifest: $(SOURCE_DIST)
+ $(gen_verbose) cd $(dir $(SOURCE_DIST)) && \
+ find $(notdir $(SOURCE_DIST)) | LC_COLLATE=C sort > $@
 
--MANDIR ?= $(PREFIX)/share/man
--RMQ_ROOTDIR ?= $(PREFIX)/lib/erlang
-+MANDIR ?= $(PREFIX)/man
-+RMQ_ROOTDIR ?= $(PREFIX)
- RMQ_BINDIR ?= $(RMQ_ROOTDIR)/bin
- RMQ_LIBDIR ?= $(RMQ_ROOTDIR)/lib
--RMQ_ERLAPP_DIR ?= $(RMQ_LIBDIR)/rabbitmq_server-$(PROJECT_VERSION)
-+RMQ_ERLAPP_DIR ?= $(RMQ_LIBDIR)/rabbitmq
-
- SCRIPTS = rabbitmq-defaults \
-  rabbitmq-env \
+-ifeq ($(shell tar --version | grep -c "GNU tar"),0)
++ifeq ($(shell tar --version 2>/dev/null | grep -c "GNU tar"),0)
+ # Skip all flags if this is Darwin (a.k.a. macOS, a.k.a. OS X)
+-ifeq ($(shell uname | grep -c "Darwin"),0)
++ifeq ($(shell uname | grep -c -e Darwin -e OpenBSD),0)
+ TAR_FLAGS_FOR_REPRODUCIBLE_BUILDS = --uid 0 \
+    --gid 0 \
+    --numeric-owner \
Index: patches/patch-deps_rabbit_scripts_rabbitmq-defaults
===================================================================
RCS file: patches/patch-deps_rabbit_scripts_rabbitmq-defaults
diff -N patches/patch-deps_rabbit_scripts_rabbitmq-defaults
--- patches/patch-deps_rabbit_scripts_rabbitmq-defaults 30 May 2019 16:24:33 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,22 +0,0 @@
-$OpenBSD: patch-deps_rabbit_scripts_rabbitmq-defaults,v 1.1 2019/05/30 16:24:33 sebastia Exp $
-Index: deps/rabbit/scripts/rabbitmq-defaults
---- deps/rabbit/scripts/rabbitmq-defaults.orig
-+++ deps/rabbit/scripts/rabbitmq-defaults
-@@ -19,7 +19,7 @@
- SYS_PREFIX=
-
- ### next line will be updated when generating a standalone release
--ERL_DIR=
-+ERL_DIR=${MODERL_BASEDIR}/bin/
-
- CLEAN_BOOT_FILE=start_clean
- SASL_BOOT_FILE=start_sasl
-@@ -36,7 +36,7 @@ BOOT_MODULE="rabbit"
-
- CONFIG_FILE=${SYS_PREFIX}/etc/rabbitmq/rabbitmq
- LOG_BASE=${SYS_PREFIX}/var/log/rabbitmq
--MNESIA_BASE=${SYS_PREFIX}/var/lib/rabbitmq/mnesia
-+MNESIA_BASE=${SYS_PREFIX}/var/rabbitmq/mnesia
- ENABLED_PLUGINS_FILE=${SYS_PREFIX}/etc/rabbitmq/enabled_plugins
-
- PLUGINS_DIR="${RABBITMQ_HOME}/plugins"
Index: patches/patch-deps_rabbit_scripts_rabbitmq-env
===================================================================
RCS file: patches/patch-deps_rabbit_scripts_rabbitmq-env
diff -N patches/patch-deps_rabbit_scripts_rabbitmq-env
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-deps_rabbit_scripts_rabbitmq-env 16 Feb 2021 15:41:35 -0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: deps/rabbit/scripts/rabbitmq-env
+--- deps/rabbit/scripts/rabbitmq-env.orig
++++ deps/rabbit/scripts/rabbitmq-env
+@@ -183,7 +183,7 @@ run_escript()
+     # Important: do not quote RABBITMQ_CTL_ERL_ARGS as they must be
+     # word-split
+     # shellcheck disable=SC2086
+-    exec erl +B \
++    exec ${MODERL_ERL} +B \
+         -boot "$CLEAN_BOOT_FILE" \
+         -noinput -noshell -hidden -smp enable \
+         $RABBITMQ_CTL_ERL_ARGS \
Index: patches/patch-deps_rabbit_scripts_rabbitmq-server
===================================================================
RCS file: patches/patch-deps_rabbit_scripts_rabbitmq-server
diff -N patches/patch-deps_rabbit_scripts_rabbitmq-server
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-deps_rabbit_scripts_rabbitmq-server 16 Feb 2021 15:41:35 -0000
@@ -0,0 +1,23 @@
+$OpenBSD$
+
+Index: deps/rabbit/scripts/rabbitmq-server
+--- deps/rabbit/scripts/rabbitmq-server.orig
++++ deps/rabbit/scripts/rabbitmq-server
+@@ -39,7 +39,7 @@ fi
+ ensure_thread_pool_size() {
+     if [ -z "${RABBITMQ_IO_THREAD_POOL_SIZE}" ]; then
+         RABBITMQ_IO_THREAD_POOL_SIZE=$(
+-            erl \
++            ${MODERL_ERL} \
+                 -noinput \
+                 -boot "${CLEAN_BOOT_FILE}" \
+                 -s rabbit_misc report_default_thread_pool_size
+@@ -96,7 +96,7 @@ start_rabbitmq_server() {
+
+     check_start_params
+
+-    exec erl \
++    exec ${MODERL_ERL} \
+         -pa "$RABBITMQ_SERVER_CODE_PATH" \
+         ${RABBITMQ_START_RABBIT} \
+         -boot "${SASL_BOOT_FILE}" \
Index: patches/patch-deps_rabbitmq_cli_mix_exs
===================================================================
RCS file: patches/patch-deps_rabbitmq_cli_mix_exs
diff -N patches/patch-deps_rabbitmq_cli_mix_exs
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-deps_rabbitmq_cli_mix_exs 16 Feb 2021 15:41:35 -0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: deps/rabbitmq_cli/mix.exs
+--- deps/rabbitmq_cli/mix.exs.orig
++++ deps/rabbitmq_cli/mix.exs
+@@ -20,7 +20,7 @@ defmodule RabbitMQCtl.MixfileBase do
+     [
+       app: :rabbitmqctl,
+       version: "3.8.0-dev",
+-      elixir: ">= 1.8.0 and < 1.11.0",
++      elixir: ">= 1.8.0 and < 1.12.0",
+       build_embedded: Mix.env == :prod,
+       start_permanent: Mix.env == :prod,
+       escript: [main_module: RabbitMQCtl,
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/net/rabbitmq/pkg/PLIST,v
retrieving revision 1.11
diff -u -p -r1.11 PLIST
--- pkg/PLIST 11 Dec 2019 14:28:36 -0000 1.11
+++ pkg/PLIST 16 Feb 2021 15:41:35 -0000
@@ -1,164 +1,63 @@
 @comment $OpenBSD: PLIST,v 1.11 2019/12/11 14:28:36 zhuk Exp $
-@newgroup ${RABBITUSER}:646
-@newuser ${RABBITUSER}:646:${RABBITUSER}:daemon:RabbitMQ account:/var/rabbitmq:/sbin/nologin
+@newgroup _rabbitmq:646
+@newuser _rabbitmq:646:_rabbitmq:daemon:RabbitMQ account:/var/rabbitmq:/sbin/nologin
 @rcscript ${RCDIR}/rabbitmq
 @mode 700
-@owner ${RABBITUSER}
-@group ${RABBITUSER}
+@owner _rabbitmq
+@group _rabbitmq
 @sample /var/log/rabbitmq/
 @sample /var/rabbitmq/
 @sample /var/rabbitmq/mnesia/
 @mode
 @owner
 @group
+bin/rabbitmq-defaults
+bin/rabbitmq-diagnostics
+bin/rabbitmq-env
+bin/rabbitmq-plugins
+bin/rabbitmq-queues
+bin/rabbitmq-server
+bin/rabbitmq-upgrade
+bin/rabbitmqctl
 lib/rabbitmq/
-lib/rabbitmq/ebin/
-lib/rabbitmq/ebin/background_gc.beam
-lib/rabbitmq/ebin/dtree.beam
-lib/rabbitmq/ebin/gatherer.beam
-lib/rabbitmq/ebin/gm.beam
-lib/rabbitmq/ebin/lqueue.beam
-lib/rabbitmq/ebin/mirrored_supervisor_sups.beam
-lib/rabbitmq/ebin/pg_local.beam
-lib/rabbitmq/ebin/rabbit.app
-lib/rabbitmq/ebin/rabbit.beam
-lib/rabbitmq/ebin/rabbit_access_control.beam
-lib/rabbitmq/ebin/rabbit_alarm.beam
-lib/rabbitmq/ebin/rabbit_amqqueue.beam
-lib/rabbitmq/ebin/rabbit_amqqueue_process.beam
-lib/rabbitmq/ebin/rabbit_amqqueue_sup.beam
-lib/rabbitmq/ebin/rabbit_amqqueue_sup_sup.beam
-lib/rabbitmq/ebin/rabbit_auth_backend_internal.beam
-lib/rabbitmq/ebin/rabbit_auth_mechanism_amqplain.beam
-lib/rabbitmq/ebin/rabbit_auth_mechanism_cr_demo.beam
-lib/rabbitmq/ebin/rabbit_auth_mechanism_plain.beam
-lib/rabbitmq/ebin/rabbit_autoheal.beam
-lib/rabbitmq/ebin/rabbit_basic.beam
-lib/rabbitmq/ebin/rabbit_binding.beam
-lib/rabbitmq/ebin/rabbit_boot_steps.beam
-lib/rabbitmq/ebin/rabbit_channel.beam
-lib/rabbitmq/ebin/rabbit_channel_interceptor.beam
-lib/rabbitmq/ebin/rabbit_channel_sup.beam
-lib/rabbitmq/ebin/rabbit_channel_sup_sup.beam
-lib/rabbitmq/ebin/rabbit_cli.beam
-lib/rabbitmq/ebin/rabbit_client_sup.beam
-lib/rabbitmq/ebin/rabbit_connection_helper_sup.beam
-lib/rabbitmq/ebin/rabbit_connection_sup.beam
-lib/rabbitmq/ebin/rabbit_control_main.beam
-lib/rabbitmq/ebin/rabbit_control_pbe.beam
-lib/rabbitmq/ebin/rabbit_core_metrics_gc.beam
-lib/rabbitmq/ebin/rabbit_credential_validation.beam
-lib/rabbitmq/ebin/rabbit_credential_validator.beam
-lib/rabbitmq/ebin/rabbit_credential_validator_accept_everything.beam
-lib/rabbitmq/ebin/rabbit_credential_validator_min_password_length.beam
-lib/rabbitmq/ebin/rabbit_credential_validator_password_regexp.beam
-lib/rabbitmq/ebin/rabbit_ctl_usage.beam
-lib/rabbitmq/ebin/rabbit_dead_letter.beam
-lib/rabbitmq/ebin/rabbit_diagnostics.beam
-lib/rabbitmq/ebin/rabbit_direct.beam
-lib/rabbitmq/ebin/rabbit_disk_monitor.beam
-lib/rabbitmq/ebin/rabbit_epmd_monitor.beam
-lib/rabbitmq/ebin/rabbit_error_logger.beam
-lib/rabbitmq/ebin/rabbit_error_logger_file_h.beam
-lib/rabbitmq/ebin/rabbit_exchange.beam
-lib/rabbitmq/ebin/rabbit_exchange_decorator.beam
-lib/rabbitmq/ebin/rabbit_exchange_parameters.beam
-lib/rabbitmq/ebin/rabbit_exchange_type_direct.beam
-lib/rabbitmq/ebin/rabbit_exchange_type_fanout.beam
-lib/rabbitmq/ebin/rabbit_exchange_type_headers.beam
-lib/rabbitmq/ebin/rabbit_exchange_type_invalid.beam
-lib/rabbitmq/ebin/rabbit_exchange_type_topic.beam
-lib/rabbitmq/ebin/rabbit_fhc_helpers.beam
-lib/rabbitmq/ebin/rabbit_file.beam
-lib/rabbitmq/ebin/rabbit_framing.beam
-lib/rabbitmq/ebin/rabbit_guid.beam
-lib/rabbitmq/ebin/rabbit_health_check.beam
-lib/rabbitmq/ebin/rabbit_hipe.beam
-lib/rabbitmq/ebin/rabbit_limiter.beam
-lib/rabbitmq/ebin/rabbit_looking_glass.beam
-lib/rabbitmq/ebin/rabbit_memory_monitor.beam
-lib/rabbitmq/ebin/rabbit_metrics.beam
-lib/rabbitmq/ebin/rabbit_mirror_queue_coordinator.beam
-lib/rabbitmq/ebin/rabbit_mirror_queue_master.beam
-lib/rabbitmq/ebin/rabbit_mirror_queue_misc.beam
-lib/rabbitmq/ebin/rabbit_mirror_queue_mode.beam
-lib/rabbitmq/ebin/rabbit_mirror_queue_mode_all.beam
-lib/rabbitmq/ebin/rabbit_mirror_queue_mode_exactly.beam
-lib/rabbitmq/ebin/rabbit_mirror_queue_mode_nodes.beam
-lib/rabbitmq/ebin/rabbit_mirror_queue_slave.beam
-lib/rabbitmq/ebin/rabbit_mirror_queue_sync.beam
-lib/rabbitmq/ebin/rabbit_mnesia.beam
-lib/rabbitmq/ebin/rabbit_mnesia_rename.beam
-lib/rabbitmq/ebin/rabbit_msg_file.beam
-lib/rabbitmq/ebin/rabbit_msg_store.beam
-lib/rabbitmq/ebin/rabbit_msg_store_ets_index.beam
-lib/rabbitmq/ebin/rabbit_msg_store_gc.beam
-lib/rabbitmq/ebin/rabbit_networking.beam
-lib/rabbitmq/ebin/rabbit_node_monitor.beam
-lib/rabbitmq/ebin/rabbit_nodes.beam
-lib/rabbitmq/ebin/rabbit_parameter_validation.beam
-lib/rabbitmq/ebin/rabbit_password.beam
-lib/rabbitmq/ebin/rabbit_password_hashing_md5.beam
-lib/rabbitmq/ebin/rabbit_password_hashing_sha256.beam
-lib/rabbitmq/ebin/rabbit_password_hashing_sha512.beam
-lib/rabbitmq/ebin/rabbit_plugins.beam
-lib/rabbitmq/ebin/rabbit_plugins_main.beam
-lib/rabbitmq/ebin/rabbit_plugins_usage.beam
-lib/rabbitmq/ebin/rabbit_policies.beam
-lib/rabbitmq/ebin/rabbit_policy.beam
-lib/rabbitmq/ebin/rabbit_prelaunch.beam
-lib/rabbitmq/ebin/rabbit_prequeue.beam
-lib/rabbitmq/ebin/rabbit_priority_queue.beam
-lib/rabbitmq/ebin/rabbit_queue_collector.beam
-lib/rabbitmq/ebin/rabbit_queue_consumers.beam
-lib/rabbitmq/ebin/rabbit_queue_decorator.beam
-lib/rabbitmq/ebin/rabbit_queue_index.beam
-lib/rabbitmq/ebin/rabbit_queue_location_client_local.beam
-lib/rabbitmq/ebin/rabbit_queue_location_min_masters.beam
-lib/rabbitmq/ebin/rabbit_queue_location_random.beam
-lib/rabbitmq/ebin/rabbit_queue_location_validator.beam
-lib/rabbitmq/ebin/rabbit_queue_master_location_misc.beam
-lib/rabbitmq/ebin/rabbit_reader.beam
-lib/rabbitmq/ebin/rabbit_recovery_terms.beam
-lib/rabbitmq/ebin/rabbit_registry.beam
-lib/rabbitmq/ebin/rabbit_restartable_sup.beam
-lib/rabbitmq/ebin/rabbit_router.beam
-lib/rabbitmq/ebin/rabbit_runtime_parameters.beam
-lib/rabbitmq/ebin/rabbit_sasl_report_file_h.beam
-lib/rabbitmq/ebin/rabbit_ssl.beam
-lib/rabbitmq/ebin/rabbit_sup.beam
-lib/rabbitmq/ebin/rabbit_table.beam
-lib/rabbitmq/ebin/rabbit_trace.beam
-lib/rabbitmq/ebin/rabbit_upgrade.beam
-lib/rabbitmq/ebin/rabbit_upgrade_functions.beam
-lib/rabbitmq/ebin/rabbit_variable_queue.beam
-lib/rabbitmq/ebin/rabbit_version.beam
-lib/rabbitmq/ebin/rabbit_vhost.beam
-lib/rabbitmq/ebin/rabbit_vm.beam
-lib/rabbitmq/ebin/supervised_lifecycle.beam
-lib/rabbitmq/ebin/tcp_listener.beam
-lib/rabbitmq/ebin/tcp_listener_sup.beam
-lib/rabbitmq/ebin/term_to_binary_compat.beam
-lib/rabbitmq/ebin/truncate.beam
-lib/rabbitmq/include/
-lib/rabbitmq/include/gm_specs.hrl
-lib/rabbitmq/include/old_builtin_types.hrl
-lib/rabbitmq/include/rabbit.hrl
-lib/rabbitmq/include/rabbit_cli.hrl
-lib/rabbitmq/include/rabbit_core_metrics.hrl
-lib/rabbitmq/include/rabbit_framing.hrl
-lib/rabbitmq/include/rabbit_memory.hrl
-lib/rabbitmq/include/rabbit_misc.hrl
-lib/rabbitmq/include/rabbit_msg_store.hrl
+lib/rabbitmq/escript/
+lib/rabbitmq/escript/rabbitmq-diagnostics
+lib/rabbitmq/escript/rabbitmq-plugins
+lib/rabbitmq/escript/rabbitmq-queues
+lib/rabbitmq/escript/rabbitmq-upgrade
+lib/rabbitmq/escript/rabbitmqctl
 lib/rabbitmq/plugins/
 lib/rabbitmq/plugins/README
+lib/rabbitmq/plugins/accept-0.3.5.ez
+lib/rabbitmq/plugins/amqp10_client-${V}.ez
+lib/rabbitmq/plugins/amqp10_common-${V}.ez
 lib/rabbitmq/plugins/amqp_client-${V}.ez
-lib/rabbitmq/plugins/cowboy-1.0.4.ez
-lib/rabbitmq/plugins/cowlib-1.0.2.ez
+lib/rabbitmq/plugins/aten-0.5.5.ez
+lib/rabbitmq/plugins/base64url-0.0.1.ez
+lib/rabbitmq/plugins/cowboy-2.6.1.ez
+lib/rabbitmq/plugins/cowlib-2.7.0.ez
+lib/rabbitmq/plugins/credentials_obfuscation-2.2.0.ez
+lib/rabbitmq/plugins/cuttlefish-2.4.1.ez
+lib/rabbitmq/plugins/eetcd-0.3.3.ez
+lib/rabbitmq/plugins/gen_batch_server-0.8.4.ez
+lib/rabbitmq/plugins/getopt-1.0.1.ez
+lib/rabbitmq/plugins/goldrush-0.1.9.ez
+lib/rabbitmq/plugins/gun-1.3.3.ez
+lib/rabbitmq/plugins/jose-1.10.1.ez
+lib/rabbitmq/plugins/jsx-2.11.0.ez
+lib/rabbitmq/plugins/lager-3.8.0.ez
+lib/rabbitmq/plugins/observer_cli-1.5.4.ez
+lib/rabbitmq/plugins/prometheus-4.6.0.ez
+lib/rabbitmq/plugins/ra-1.1.6.ez
+lib/rabbitmq/plugins/rabbit-${V}.ez
 lib/rabbitmq/plugins/rabbit_common-${V}.ez
 lib/rabbitmq/plugins/rabbitmq_amqp1_0-${V}.ez
+lib/rabbitmq/plugins/rabbitmq_auth_backend_cache-${V}.ez
+lib/rabbitmq/plugins/rabbitmq_auth_backend_http-${V}.ez
 lib/rabbitmq/plugins/rabbitmq_auth_backend_ldap-${V}.ez
+lib/rabbitmq/plugins/rabbitmq_auth_backend_oauth2-${V}.ez
 lib/rabbitmq/plugins/rabbitmq_auth_mechanism_ssl-${V}.ez
+lib/rabbitmq/plugins/rabbitmq_aws-${V}.ez
 lib/rabbitmq/plugins/rabbitmq_consistent_hash_exchange-${V}.ez
 lib/rabbitmq/plugins/rabbitmq_event_exchange-${V}.ez
 lib/rabbitmq/plugins/rabbitmq_federation-${V}.ez
@@ -166,8 +65,14 @@ lib/rabbitmq/plugins/rabbitmq_federation
 lib/rabbitmq/plugins/rabbitmq_jms_topic_exchange-${V}.ez
 lib/rabbitmq/plugins/rabbitmq_management-${V}.ez
 lib/rabbitmq/plugins/rabbitmq_management_agent-${V}.ez
-lib/rabbitmq/plugins/rabbitmq_management_visualiser-${V}.ez
 lib/rabbitmq/plugins/rabbitmq_mqtt-${V}.ez
+lib/rabbitmq/plugins/rabbitmq_peer_discovery_aws-${V}.ez
+lib/rabbitmq/plugins/rabbitmq_peer_discovery_common-${V}.ez
+lib/rabbitmq/plugins/rabbitmq_peer_discovery_consul-${V}.ez
+lib/rabbitmq/plugins/rabbitmq_peer_discovery_etcd-${V}.ez
+lib/rabbitmq/plugins/rabbitmq_peer_discovery_k8s-${V}.ez
+lib/rabbitmq/plugins/rabbitmq_prelaunch-${V}.ez
+lib/rabbitmq/plugins/rabbitmq_prometheus-${V}.ez
 lib/rabbitmq/plugins/rabbitmq_random_exchange-${V}.ez
 lib/rabbitmq/plugins/rabbitmq_recent_history_exchange-${V}.ez
 lib/rabbitmq/plugins/rabbitmq_sharding-${V}.ez
@@ -182,51 +87,62 @@ lib/rabbitmq/plugins/rabbitmq_web_mqtt-$
 lib/rabbitmq/plugins/rabbitmq_web_mqtt_examples-${V}.ez
 lib/rabbitmq/plugins/rabbitmq_web_stomp-${V}.ez
 lib/rabbitmq/plugins/rabbitmq_web_stomp_examples-${V}.ez
-lib/rabbitmq/plugins/ranch-1.3.2.ez
-lib/rabbitmq/plugins/recon-2.3.2.ez
-lib/rabbitmq/plugins/sockjs-0.3.4.ez
+lib/rabbitmq/plugins/ranch-1.7.1.ez
+lib/rabbitmq/plugins/recon-2.5.1.ez
+lib/rabbitmq/plugins/stdout_formatter-0.2.4.ez
+lib/rabbitmq/plugins/syslog-3.4.5.ez
+lib/rabbitmq/plugins/sysmon_handler-1.3.0.ez
 lib/rabbitmq/sbin/
 lib/rabbitmq/sbin/rabbitmq-defaults
+lib/rabbitmq/sbin/rabbitmq-diagnostics
 lib/rabbitmq/sbin/rabbitmq-env
 lib/rabbitmq/sbin/rabbitmq-plugins
+lib/rabbitmq/sbin/rabbitmq-queues
 lib/rabbitmq/sbin/rabbitmq-server
+lib/rabbitmq/sbin/rabbitmq-upgrade
 lib/rabbitmq/sbin/rabbitmqctl
-@man man/man1/rabbitmq-plugins.1
-@man man/man1/rabbitmq-server.1
-@man man/man1/rabbitmqctl.1
 @man man/man5/rabbitmq-env.conf.5
-sbin/rabbitmq-defaults
-sbin/rabbitmq-env
-sbin/rabbitmq-plugins
-sbin/rabbitmq-server
-sbin/rabbitmqctl
+@man man/man8/rabbitmq-diagnostics.8
+@man man/man8/rabbitmq-echopid.8
+@man man/man8/rabbitmq-plugins.8
+@man man/man8/rabbitmq-queues.8
+@man man/man8/rabbitmq-server.8
+@man man/man8/rabbitmq-service.8
+@man man/man8/rabbitmq-upgrade.8
+@man man/man8/rabbitmqctl.8
+share/bash-completions/
+share/bash-completions/completions/
+share/bash-completions/completions/rabbitmq
 share/doc/rabbitmq/
 share/doc/rabbitmq/INSTALL
 share/doc/rabbitmq/LICENSE
 share/doc/rabbitmq/LICENSE-APACHE2
 share/doc/rabbitmq/LICENSE-APACHE2-ExplorerCanvas
 share/doc/rabbitmq/LICENSE-APACHE2-excanvas
-share/doc/rabbitmq/LICENSE-APL2-Rebar
 share/doc/rabbitmq/LICENSE-APL2-Stomp-Websocket
 share/doc/rabbitmq/LICENSE-BSD-base64js
-share/doc/rabbitmq/LICENSE-BSD-glMatrix
 share/doc/rabbitmq/LICENSE-BSD-recon
-share/doc/rabbitmq/LICENSE-EPL-OTP
 share/doc/rabbitmq/LICENSE-ISC-cowboy
 share/doc/rabbitmq/LICENSE-MIT-EJS
 share/doc/rabbitmq/LICENSE-MIT-EJS10
 share/doc/rabbitmq/LICENSE-MIT-Erlware-Commons
 share/doc/rabbitmq/LICENSE-MIT-Flot
 share/doc/rabbitmq/LICENSE-MIT-Mochi
-share/doc/rabbitmq/LICENSE-MIT-Mochiweb
 share/doc/rabbitmq/LICENSE-MIT-Sammy
 share/doc/rabbitmq/LICENSE-MIT-Sammy060
-share/doc/rabbitmq/LICENSE-MIT-SockJS
 share/doc/rabbitmq/LICENSE-MIT-jQuery
 share/doc/rabbitmq/LICENSE-MIT-jQuery164
+share/doc/rabbitmq/LICENSE-MPL
 share/doc/rabbitmq/LICENSE-MPL-RabbitMQ
-share/doc/rabbitmq/LICENSE-MPL2
+share/doc/rabbitmq/LICENSE-erlcloud
+share/doc/rabbitmq/LICENSE-httpc_aws
+share/doc/rabbitmq/LICENSE-rabbitmq_aws
 share/examples/rabbitmq/
 @sample ${SYSCONFDIR}/rabbitmq/
+share/examples/rabbitmq/advanced.config.example
 share/examples/rabbitmq/rabbitmq-env.conf
 @sample ${SYSCONFDIR}/rabbitmq/rabbitmq-env.conf
+share/examples/rabbitmq/rabbitmq.conf.example
+share/zsh-completions/
+share/zsh-completions/vendor-completions/
+share/zsh-completions/vendor-completions/_rabbitmq
Index: pkg/rabbitmq.rc
===================================================================
RCS file: /cvs/ports/net/rabbitmq/pkg/rabbitmq.rc,v
retrieving revision 1.6
diff -u -p -r1.6 rabbitmq.rc
--- pkg/rabbitmq.rc 11 Jan 2018 19:27:07 -0000 1.6
+++ pkg/rabbitmq.rc 16 Feb 2021 15:41:35 -0000
@@ -2,7 +2,7 @@
 #
 # $OpenBSD: rabbitmq.rc,v 1.6 2018/01/11 19:27:07 rpe Exp $
 
-daemon="${TRUEPREFIX}/sbin/rabbitmq-server -detached"
+daemon="${TRUEPREFIX}/bin/rabbitmq-server -detached"
 daemon_user="_rabbitmq"
 
 . /etc/rc.d/rc.subr
@@ -16,11 +16,11 @@ rc_pre() {
 
 rc_check() {
  # return 1 is needed: rabbitmqctl returns a higher error code on failure
- ${TRUEPREFIX}/sbin/rabbitmqctl status || return 1
+ $rcexec ${TRUEPREFIX}/bin/rabbitmqctl status || return 1
 }
 
 rc_stop() {
- ${TRUEPREFIX}/sbin/rabbitmqctl stop
+ ${TRUEPREFIX}/bin/rabbitmqctl stop
 }
 
 rc_cmd $1