From e69ca61d49151493d2d41507d131c9192017af4f Mon Sep 17 00:00:00 2001 From: Thales Macedo Garitezi Date: Wed, 2 Mar 2022 14:46:54 -0300 Subject: [PATCH 1/2] fix(mix): do not include gpb in the release Since `gpb` is a GPL compile-time-only dependency, we should not include it in the release. Note that adding `gpb: :none` to the release applications list *will* make Mix include its files *and* reference them in the startup + release scripts... --- mix.exs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mix.exs b/mix.exs index c96753b10..90744f45c 100644 --- a/mix.exs +++ b/mix.exs @@ -90,7 +90,7 @@ defmodule EMQXUmbrella.MixProject do {:ranch, github: "ninenines/ranch", ref: "a692f44567034dacf5efcaa24a24183788594eb7", override: true}, # in conflict by grpc and eetcd - {:gpb, "4.11.2", override: true} + {:gpb, "4.11.2", override: true, runtime: false} ] ++ umbrella_apps() ++ bcrypt_dep() ++ quicer_dep() end From c9058121a1cc3872e16b6ab25a077ba13cdefac2 Mon Sep 17 00:00:00 2001 From: Thales Macedo Garitezi Date: Wed, 2 Mar 2022 14:57:39 -0300 Subject: [PATCH 2/2] chore: add gpb check to elixir build --- build | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/build b/build index 3d826882f..0ee20e456 100755 --- a/build +++ b/build @@ -85,17 +85,22 @@ make_doc() { halt(0)." } -make_rel() { - ./rebar3 as "$PROFILE" tar +assert_no_compile_time_only_deps() { if [ "$("$FIND" "_build/$PROFILE/rel/emqx/lib/" -maxdepth 1 -name 'gpb-*' -type d)" != "" ]; then echo "gpb should not be included in the release" exit 1 fi } +make_rel() { + ./rebar3 as "$PROFILE" tar + assert_no_compile_time_only_deps +} + make_elixir_rel() { export_release_vars "$PROFILE" mix release --overwrite + assert_no_compile_time_only_deps } ## extract previous version .tar.gz files to _build/$PROFILE/rel/emqx before making relup