Skip to content

Commit 5f4ca99

Browse files
Fix rabbit_common, amqp_client, amqp10_client publishing to hex.pm
HEX_TARBALL_FILES included ../../rabbitmq-components.mk which modern `rebar3 compile` considers to be unsafe and fails on (quite reasonably). FTR, the error looks like this: ```` ===> Fetching rebar_alias v0.2.0 ===> Analyzing applications... ===> Compiling rebar_alias ===> Verifying dependencies... ===> Fetching amqp_client v4.1.5 escript: exception error: no function clause matching rebar_fetch:format_error({error, {hex_tarball, {inner_tarball, {"../../rabbitmq-components.mk", unsafe_path}}}}) (/home/runner/work/rebar3/rebar3/apps/rebar/src/rebar_fetch.erl, line 99) in function rebar3:handle_error/2 (/home/runner/work/rebar3/rebar3/apps/rebar/src/rebar3.erl, line 383) in call from escript:run/2 (escript.erl, line 904) in call from escript:start/1 (escript.erl, line 418) in call from init:start_it/1 in call from init:start_em/1 in call from init:do_boot/3 ``` Excluding this relative path addresses the issue. rabbit_common/Makefile arguably does not need to add any .mk files to the tarball but let's deal with that in a separate change.
1 parent 34c6ef4 commit 5f4ca99

File tree

4 files changed

+4
-8
lines changed

4 files changed

+4
-8
lines changed

deps/amqp10_client/Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,7 @@ dep_elvis_mk = git https://github.com/inaka/elvis.mk.git master
4444
include ../../rabbitmq-components.mk
4545
include ../../erlang.mk
4646

47-
HEX_TARBALL_FILES += ../../rabbitmq-components.mk \
48-
git-revisions.txt
47+
HEX_TARBALL_FILES += git-revisions.txt
4948

5049
# --------------------------------------------------------------------
5150
# ActiveMQ for the testsuite.

deps/amqp10_common/Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ PLT_APPS = eunit
4848
include ../../rabbitmq-components.mk
4949
include ../../erlang.mk
5050

51-
HEX_TARBALL_FILES += ../../rabbitmq-components.mk \
52-
git-revisions.txt
51+
HEX_TARBALL_FILES += git-revisions.txt
5352

5453
-include development.post.mk

deps/amqp_client/Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,5 +54,4 @@ PLT_APPS = ssl public_key
5454
include ../../rabbitmq-components.mk
5555
include ../../erlang.mk
5656

57-
HEX_TARBALL_FILES += ../../rabbitmq-components.mk \
58-
git-revisions.txt
57+
HEX_TARBALL_FILES += git-revisions.txt

deps/rabbit_common/Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,7 @@ PLT_APPS += mnesia crypto ssl
4848
include ../../rabbitmq-components.mk
4949
include ../../erlang.mk
5050

51-
HEX_TARBALL_FILES += ../../rabbitmq-components.mk \
52-
git-revisions.txt \
51+
HEX_TARBALL_FILES += git-revisions.txt \
5352
mk/rabbitmq-build.mk \
5453
mk/rabbitmq-dist.mk \
5554
mk/rabbitmq-early-plugin.mk \

0 commit comments

Comments
 (0)