From 9d61885e04fdbde3ecf9e24e4ff637d600cb69da Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Mon, 4 Dec 2023 21:23:45 +0100 Subject: [PATCH] make-binaries: Simplify setting of ERL_DIST_PORT The default ERL_DIST_PORT value can now be specified as an environment variable at build time (since commit cc25bb03579d73357ab197f650c644a5a42e8a29). --- tools/make-binaries | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/make-binaries b/tools/make-binaries index 7e2743531..6b6a5a379 100755 --- a/tools/make-binaries +++ b/tools/make-binaries @@ -468,12 +468,14 @@ build_rel() if [ "$mode" = 'native' ] then ERL_COMPILER_OPTIONS="$erl_compiler_options" \ + ERL_DIST_PORT='3470' \ rebar3 as "$(rebar3_profile "$mode")" tar else ln -s "$prefix/lib" # As expected by the 'cross' profile. ei_inc="$prefix/lib/erlang/lib/erl_interface-"*'/include' ei_lib="$prefix/lib/erlang/lib/erl_interface-"*'/lib' ERL_COMPILER_OPTIONS="$erl_compiler_options" \ + ERL_DIST_PORT='3470' \ ERL_EI_INCLUDE_DIR=$(ls -1d $ei_inc) \ ERL_EI_LIBDIR=$(ls -1d $ei_lib) \ LDLIBS='-lpthread' \ @@ -484,8 +486,6 @@ build_rel() info "Editing $rel_name $rel_vsn for $arch-$libc ..." mkdir "$target_dst_dir" tar -C "$target_dst_dir" -xzf "$rel_dir/$rel_tar" - sed -i 's/^dist_port="${ERL_DIST_PORT:-}"/dist_port="${ERL_DIST_PORT:-3470}"/' \ - "$target_dst_dir/bin/${rel_name}ctl" find "$target_dst_dir/lib" -type f -name 'otp_test_engine.so' \ -delete # Remove shared object file used only in test suite. find "$target_dst_dir/lib/crypto-"* "$target_dst_dir/lib/asn1-"* \