[MacPorts] #67995: Erlang 26.0 (default) is not supported by Rabbitmq 3.11.15 (default), Erlang 25.3 is needed.
MacPorts
noreply at macports.org
Thu Sep 7 00:54:41 UTC 2023
#67995: Erlang 26.0 (default) is not supported by Rabbitmq 3.11.15 (default),
Erlang 25.3 is needed.
------------------------------+-----------------------------
Reporter: ed1507 | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.8.1
Resolution: | Keywords: rabbitmq erlang
Port: rabbitmq-server |
------------------------------+-----------------------------
Comment (by ed1507):
I worked around a solution by take the approach documented in
[https://guide.macports.org/#development.local-repositories]
Please be aware this info contains hash-codes and URLs used for download
code. Please verify the information is current and updated in order to
avoid compromise the security of your system. Take it by your own risk.
This example is intended as reference because it works for me. Actually
you can compare it with the actual code in MacPorts git repository to
identify what the actual changes are [https://github.com/macports
/macports-ports/tree/master/net/rabbitmq-server]
{{{
%find .
./net
./net/rabbitmq-server
./net/rabbitmq-server/Portfile
./net/rabbitmq-server/files
./net/rabbitmq-server/files/rabbitmq-script-wrapper
}}}
{{{
%cat ./net/rabbitmq-server/Portfile
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c
-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4
PortSystem 1.0
PortGroup github 1.0
github.setup rabbitmq rabbitmq-server 3.12.4 v
revision 0
checksums rmd160 0a6b504916759efcdd39b8f03cedd4a1f50d6a58 \
sha256
03bc521e664afd8278d40193bb6fbe3d66d6301fc24cbb120bf53fda6613ef36 \
size 15639796
categories net
platforms {darwin any}
maintainers nomaintainer
license MPL-1.1 MIT Apache-2
supported_archs noarch
description The RabbitMQ AMQP Server
long_description \
RabbitMQ is an implementation of AMQP, the emerging standard for \
high performance enterprise messaging. The RabbitMQ server is a \
robust and scalable implementation of an AMQP broker.
homepage https://www.rabbitmq.com
github.tarball_from releases
use_xz yes
distfiles ${name}-generic-unix-${version}${extract.suffix}
worksrcdir [string map {- _} $name]-$version
depends_lib port:erlang
depends_build port:libxslt
if {${os.platform} eq "darwin" && ${os.major} <= 9} {
depends_build-append port:py27-simplejson
build.args PYTHON=${prefix}/bin/python2.7
} else {
# python3.X doesn't work
build.args PYTHON=python2.7
}
set serveruser rabbitmq
set servergroup rabbitmq
set serverhome ${prefix}/var/lib/rabbitmq
set logdir ${prefix}/var/log/rabbitmq
set confdir ${prefix}/etc/rabbitmq
set mnesiadbdir ${prefix}/var/lib/rabbitmq/mnesia
set plistloc ${prefix}/etc/LaunchDaemons/org.macports.${name}
set rootdest ${prefix}/lib/rabbitmq
set rootserver ${rootdest}/lib/${worksrcdir}
set sbindir ${destroot}${rootdest}/bin
set wrappersbin ${destroot}${prefix}/sbin
set realsbin ${destroot}${rootserver}/sbin
set mansrc ${workpath}/${worksrcdir}/share/man
set mandest ${destroot}${prefix}/share/man
add_users ${serveruser} group=${servergroup} realname=RabbitMQ\ Server
home=${serverhome}
use_configure no
build {}
destroot.keepdirs \
${destroot}${confdir} \
${destroot}${logdir} \
${destroot}${mnesiadbdir}
destroot {
# This is a hack: We need to patch the startupitem, so generate it
manually
# here, then define the function to empty to avoid overwriting it
later
package require portstartupitem 1.0
portstartupitem::startupitem_create
proc portstartupitem::startupitem_create {args} {}
system -W "${destroot}${plistloc}" "/usr/libexec/PlistBuddy -c \"Add
:UserName string ${serveruser}\" org.macports.${name}.plist"
xinstall -d -m 0775 ${destroot}${confdir}
xinstall -d -g [existsgroup ${servergroup}] -m 0775
${destroot}${logdir}
xinstall -d -g [existsgroup ${servergroup}] -m 0775
${destroot}${serverhome}
xinstall -d -g [existsgroup ${servergroup}] -m 0775
${destroot}${mnesiadbdir}
xinstall -d -g [existsgroup ${servergroup}] -m 0775
${destroot}${rootserver}
xinstall -d -g [existsgroup ${servergroup}] -m 0775 ${destroot}
xinstall -d -g [existsgroup ${servergroup}] -m 0775 ${sbindir}
copy {*}[glob ${worksrcpath}/*] ${destroot}${rootserver}/
reinplace -E
"s:^SYS_PREFIX=\\\${RABBITMQ_HOME}$:SYS_PREFIX=${prefix}:" \
${realsbin}/rabbitmq-defaults
xinstall -m 0755 ${filespath}/rabbitmq-script-wrapper \
${wrappersbin}/rabbitmq-server
reinplace -E "s:@MACPORTS_PREFIX@:${prefix}:g" \
${wrappersbin}/rabbitmq-server
reinplace -E "s:/usr/lib/rabbitmq/bin/:${prefix}/lib/rabbitmq/bin/:g"
\
${wrappersbin}/rabbitmq-server
reinplace -E "s:/var/lib/rabbitmq:${prefix}/var/lib/rabbitmq:g" \
${wrappersbin}/rabbitmq-server
copy ${wrappersbin}/rabbitmq-server ${wrappersbin}/rabbitmqctl
copy ${wrappersbin}/rabbitmq-server ${wrappersbin}/rabbitmq-plugins
file attributes ${destroot}${serverhome} -owner ${serveruser} -group
${servergroup}
file attributes ${destroot}${logdir} -owner ${serveruser} -group
${servergroup}
foreach script {rabbitmq-defaults rabbitmq-env rabbitmq-plugins
rabbitmq-server rabbitmqctl cuttlefish} {
ln -s ../lib/${worksrcdir}/sbin/${script} ${sbindir}/${script}
}
xinstall -m 0644 -W ${mansrc}/man8 rabbitmq-plugins.8.gz \
rabbitmq-server.8.gz rabbitmqctl.8.gz ${mandest}/man8/
xinstall -m 0644 -W ${mansrc}/man5 rabbitmq-env.conf.5.gz
${mandest}/man5/
}
startupitem.create yes
startupitem.init "PATH=${prefix}/bin:${prefix}/sbin:\$PATH; export
PATH"
startupitem.start "rabbitmq-server 2>&1"
startupitem.stop "rabbitmqctl stop 2>&1"
startupitem.logfile ${prefix}/var/log/rabbitmq/startupitem.log
github.livecheck.regex {([0-9.]+)}
master_sites https://github.com/rabbitmq/rabbitmq-server/releases
version 3.12.4
}}}
{{{
%cat ./net/rabbitmq-server/files/rabbitmq-script-wrapper
#!/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 Developer of the Original Code is VMware, Inc.
## Copyright (c) 2007-2012 VMware, Inc. All rights reserved.
##
# 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` = `id -u rabbitmq` -a "$SCRIPT" = "rabbitmq-server" ] ; then
/usr/lib/rabbitmq/bin/rabbitmq-server "$@" @STDOUT_STDERR_REDIRECTION@
elif [ `id -u` = `id -u rabbitmq` -o "$SCRIPT" = "rabbitmq-plugins" ] ;
then
/usr/lib/rabbitmq/bin/${SCRIPT} "$@"
elif [ `id -u` = 0 ] ; then
SHELL=/bin/sh HOME=/var/lib/rabbitmq USER=rabbitmq LOGNAME=rabbitmq
PATH="$(eval `PATH=@MACPORTS_PREFIX@/bin /usr/libexec/path_helper -s`;
echo $PATH)" su -m rabbitmq -c "/usr/lib/rabbitmq/bin/${SCRIPT}
${CMDLINE}"
else
/usr/lib/rabbitmq/bin/${SCRIPT}
echo
echo "Only root or rabbitmq should run ${SCRIPT}"
echo
exit 1
fi
}}}
--
Ticket URL: <https://trac.macports.org/ticket/67995#comment:3>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list