Skip to content

Commit

Permalink
adapted for use in mono_repo
Browse files Browse the repository at this point in the history
  • Loading branch information
dergraf committed Nov 18, 2016
1 parent cca1842 commit 44d728c
Show file tree
Hide file tree
Showing 21 changed files with 47 additions and 210 deletions.
6 changes: 0 additions & 6 deletions apps/vmq_acl/rebar.config

This file was deleted.

Binary file removed apps/vmq_acl/rebar3
Binary file not shown.
4 changes: 2 additions & 2 deletions apps/vmq_bridge/priv/vmq_bridge.schema
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 5,13 @@
%% bridges can configured by using different bridge names (e.g. br0). If the
%% connection supports SSL encryption bridge.ssl.<name> can be used.
{mapping, "bridge.tcp.$name", "vmq_bridge.config", [
{default, {"127.0.0.1:1889"}},
{default, "127.0.0.1:1889"},
{datatype, string},
{include_default, "br0"},
{commented, "127.0.0.1:1889"}
]}.
{mapping, "bridge.ssl.$name", "vmq_bridge.config", [
{default, {"127.0.0.1:1889"}},
{default, "127.0.0.1:1889"},
{datatype, string},
hidden
]}.
Expand Down
4 changes: 0 additions & 4 deletions apps/vmq_bridge/rebar.config

This file was deleted.

Binary file removed apps/vmq_bridge/rebar3
Binary file not shown.
130 changes: 0 additions & 130 deletions apps/vmq_bridge/test/packet.erl

This file was deleted.

Binary file removed apps/vmq_commons/rebar3
Binary file not shown.
File renamed without changes.
2 changes: 1 addition & 1 deletion apps/vmq_commons/src/vmq_commons.app.src
Original file line number Diff line number Diff line change
@@ -1,7 1,7 @@
{application, vmq_commons,
[
{description, "Common Functionality for the VerneMQ MQTT broker"},
{vsn, "1.0.0"},
{vsn, git},
{registered, []},
{applications, [
kernel,
Expand Down
2 changes: 1 addition & 1 deletion apps/vmq_passwd/c_src/Makefile
Original file line number Diff line number Diff line change
@@ -1,3 1,3 @@

compile:
gcc $(CFLAGS) vmq_passwd.c -lcrypto -o vmq_passwd
gcc $(CFLAGS) vmq_passwd.c -lcrypto -o ../priv/vmq_passwd
5 changes: 0 additions & 5 deletions apps/vmq_passwd/rebar.config
Original file line number Diff line number Diff line change
@@ -1,7 1,2 @@
%%-*- mode: erlang -*-
{post_hooks, [{"(linux|darwin|solaris)", compile, "make -C c_src"}]}.
{deps, [
{lager, "3.2.1"}, %% needed this version for erlang 19 compat
{clique, {git, "git://github.com/basho/clique.git", {tag, "0.3.5"}}},
{vmq_commons, ".*", {git, "git://github.com/erlio/vmq_commons.git", {branch, "master"}}}
]}.
3 changes: 0 additions & 3 deletions apps/vmq_plugin/rebar.config
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 3,3 @@
{erl_opts, [warnings_as_errors, {parse_transform, lager_transform}, debug_info]}.
{xref_checks, []}.
{sub_dirs, ["examples/vmq_test_plugin"]}.
{deps, [
clique
]}.
Binary file removed apps/vmq_plugin/rebar3
Binary file not shown.
2 changes: 1 addition & 1 deletion apps/vmq_plugin/src/vmq_plugin_mgr.erl
Original file line number Diff line number Diff line change
Expand Up @@ -947,7 947,7 @@ vmq_plugin_test() ->
],
application:set_env(vmq_plugin, vmq_plugin_hooks, Hooks),
%% we have to step out .eunit
application:set_env(vmq_plugin, plugin_dir, "."),
application:set_env(vmq_plugin, plugin_dir, "apps/vmq_plugin"),
{ok, _} = application:ensure_all_started(vmq_plugin),
%% no plugin is yet registered
call_no_hooks(),
Expand Down
8 changes: 0 additions & 8 deletions apps/vmq_server/rebar.config
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 6,8 @@
debug_info]}.
{xref_checks, []}.
{deps, [
{lager, "3.2.1"},
{cowboy, "1.0.4"},
{ranch, "1.2.1"},
{cuttlefish, "2.0.7"}, %% remove once clique package can be used
{clique, {git, "git://github.com/basho/clique.git", {tag, "0.3.5"}}},
%{clique, "3.0.1"}, % isn't newest version
{riak_sysmon, "2.1.2"},

%% never heard of plumtree... it is an efficient gossiping protocol
Expand All @@ -26,10 22,6 @@
%% efficient counters
{mzmetrics, {git, "git://github.com/erlio/mzmetrics.git", {branch, "master"}}},

%% own deps
{vmq_commons, {git, "git://github.com/erlio/vmq_commons.git", {branch, "master"}}},
{vmq_plugin, {git, "git://github.com/erlio/vmq_plugin.git", {branch, "master"}}},

{time_compat, {git, "git://github.com/lasp-lang/time_compat.git", {branch, "master"}}},
{erlang_rand_compat, {git, "git://github.com/tuncer/erlang-rand-compat.git", {branch, "master"}}},
{gen_server2, {git, "git://github.com/erlio/gen_server2.git", {branch, "master"}}}
Expand Down
Binary file removed apps/vmq_server/rebar3
Binary file not shown.
6 changes: 5 additions & 1 deletion apps/vmq_server/src/vmq_ranch.erl
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 180,11 @@ handle_message({Proto, _, Data}, #st{proto_tag={Proto, _, _}, fsm_mod=FsmMod} =
{error, Reason, Out} ->
lager:debug("[~p][~p] parse error '~p' for data: ~p and parser state: ~p",
[Proto, self(), Reason, Data, Buffer]),
{exit, Reason, State#st{pending=[Pending|Out]}}
{exit, Reason, State#st{pending=[Pending|Out]}};
{error, Reason} ->
lager:debug("[~p][~p] parse error '~p' for data: ~p and parser state: ~p",
[Proto, self(), Reason, Data, Buffer]),
{exit, Reason, State}
end;
handle_message({ProtoClosed, _}, #st{proto_tag={_, ProtoClosed, _}, fsm_mod=FsmMod} = State) ->
%% we regard a tcp_closed as 'normal'
Expand Down
5 changes: 4 additions & 1 deletion apps/vmq_server/test/vmq_test_utils.erl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 12,8 @@ setup_use_default_auth() ->

start_server(StartNoAuth) ->
os:cmd(os:find_executable("epmd") " -daemon"),
ok = maybe_start_distribution(vmq_server),
NodeName = list_to_atom("vmq_server-" integer_to_list(erlang:phash2(os:timestamp()))),
ok = maybe_start_distribution(NodeName),
Datadir = "/tmp/vernemq-test/data/" atom_to_list(node()),
os:cmd("rm -rf " Datadir),
application:load(plumtree),
Expand Down Expand Up @@ -58,6 59,8 @@ teardown() ->
disable_all_plugins(),
vmq_metrics:reset_counters(),
vmq_server:stop(),
application:unload(vmq_server),
application:unload(plumtree),
Datadir = "/tmp/vernemq-test/data/" atom_to_list(node()),
_ = [eleveldb:destroy(Datadir "/meta/" integer_to_list(I), [])
|| I <- lists:seq(0, 11)],
Expand Down
14 changes: 3 additions & 11 deletions rebar.config
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 16,10 @@
{lager_syslog, {git, "git://github.com/basho/lager_syslog.git", {tag, "3.0.1"}}},

%% remove once clique hex package 3.0.2 is released
{clique, {git, "git://github.com/basho/clique.git", {tag, "0.3.5"}}},

{vmq_commons, {git, "git://github.com/erlio/vmq_commons.git", {branch, "master"}}},
{vmq_server, {git, "git://github.com/erlio/vmq_server.git", {branch, "master"}}},
{vmq_acl, {git, "git://github.com/erlio/vmq_acl.git", {branch, "master"}}},
{vmq_passwd, {git, "git://github.com/erlio/vmq_passwd.git", {branch, "master"}}},
{vmq_bridge, {git, "git://github.com/erlio/vmq_bridge.git", {branch,
"master"}}}
{clique, {git, "git://github.com/basho/clique.git", {tag, "0.3.5"}}}
]}.

{overrides, [{override, vmq_passwd, [{post_hooks, [{compile, "make -C c_src"}]}]},
{override, syslog,
{overrides, [{override, syslog,
[{so_name, "syslog_drv"},
{port_sources, ["c_src/*.c"]},
{pre_hooks,
Expand Down Expand Up @@ -102,7 94,7 @@

{copy, "_build/default/lib/vmq_acl/priv/default.acl",
"etc/vmq.acl"},
{copy, "_build/default/lib/vmq_passwd/c_src/vmq_passwd",
{copy, "_build/default/lib/vmq_passwd/priv/vmq_passwd",
"bin/vmq-passwd"},
{copy, "files/vmq_plugin.conf", "lib/vmq_plugin.conf"},

Expand Down
66 changes: 30 additions & 36 deletions rebar.lock
Original file line number Diff line number Diff line change
@@ -1,19 1,24 @@
{"1.1.0",
[{<<"clique">>,
{git,"git://github.com/basho/clique.git",
{ref,"0063cbe2c97aa3f00c1cb289678482cbc5524bc1"}},
0},
{<<"cowboy">>,{pkg,<<"cowboy">>,<<"1.0.4">>},1},
{<<"cowlib">>,{pkg,<<"cowlib">>,<<"1.0.2">>},2},
{<<"cowboy">>,{pkg,<<"cowboy">>,<<"1.0.4">>},0},
{<<"cowlib">>,{pkg,<<"cowlib">>,<<"1.0.2">>},1},
{<<"cuttlefish">>,{pkg,<<"cuttlefish">>,<<"2.0.7">>},0},
{<<"edown">>,
{git,"git://github.com/uwiger/edown.git",
{ref,"b7c8eb0ac1859f8fce11cbfe3526f5ec83194776"}},
2},
1},
{<<"eleveldb">>,
{git,"git://github.com/erlio/eleveldb.git",
{ref,"bc30c2c96636e8fd2113ab45e4b725fbba48fd2f"}},
2},
1},
{<<"eper">>,{pkg,<<"eper">>,<<"0.94.0">>},0},
{<<"gen_server2">>,
{git,"git://github.com/erlio/gen_server2.git",
{ref,"741b44279b9211cf875b40ab4021496583bb6229"}},
0},
{<<"getopt">>,{pkg,<<"getopt">>,<<"0.8.2">>},1},
{<<"goldrush">>,{pkg,<<"goldrush">>,<<"0.1.8">>},1},
{<<"lager">>,{pkg,<<"lager">>,<<"3.2.1">>},0},
Expand All @@ -24,59 29,48 @@
{<<"mzmetrics">>,
{git,"git://github.com/erlio/mzmetrics.git",
{ref,"6687da85a8f3847ecf0968596d5d3bd9d8cdd431"}},
1},
0},
{<<"node_package">>,
{git,"git://github.com/dergraf/node_package.git",
{ref,"f35585f0ba6fe98d8dad6a3889788eaa29f5a150"}},
0},
{<<"plumtree">>,
{git,"git://github.com/erlio/plumtree.git",
{ref,"5ac7fb4939a5c5db6c6e235afab44169949d9802"}},
1},
{<<"ranch">>,{pkg,<<"ranch">>,<<"1.2.1">>},1},
0},
{<<"ranch">>,{pkg,<<"ranch">>,<<"1.2.1">>},0},
{<<"rand_compat">>,
{git,"git://github.com/tuncer/erlang-rand-compat.git",
{ref,"e58647dd3bb3e21829156786dba68a6a55b1b32d"}},
1},
0},
{<<"recon">>,{pkg,<<"recon">>,<<"2.2.1">>},0},
{<<"riak_dt">>,
{git,"git://github.com/basho/riak_dt.git",
{ref,"f7981d4ad7407ddc085f133f204dd71bf9d50c56"}},
2},
{<<"riak_sysmon">>,{pkg,<<"riak_sysmon">>,<<"2.1.2">>},1},
1},
{<<"riak_sysmon">>,{pkg,<<"riak_sysmon">>,<<"2.1.2">>},0},
{<<"sext">>,
{git,"git://github.com/uwiger/sext.git",
{ref,"35520daea8ddc48569249ad19637f4cc75fbd03d"}},
1},
0},
{<<"syslog">>,
{git,"git://github.com/Vagabond/erlang-syslog",
{ref,"e24c9ee8f7bb3f066ec152c210af10c2c712759a"}},
1},
{<<"time_compat">>,
{git,"git://github.com/lasp-lang/time_compat.git",
{ref,"6007f68892104ebb6fa2366cebf9d928d8856273"}},
1},
{<<"vmq_acl">>,
{git,"git://github.com/erlio/vmq_acl.git",
{ref,"6ae2baa28de55c6c69b22b8f9612bc02cd2f7d91"}},
0},
{<<"vmq_bridge">>,
{git,"git://github.com/erlio/vmq_bridge.git",
{ref,"0513dfa82bbd47b54d0b65de108c9b3567e0b05e"}},
0},
{<<"vmq_commons">>,
{git,"git://github.com/erlio/vmq_commons.git",
{ref,"847d92d23ec212430bd8bace097ee91a033a8ff9"}},
0},
{<<"vmq_passwd">>,
{git,"git://github.com/erlio/vmq_passwd.git",
{ref,"a95189c343425d90f136c65868b2c0f8f3bfdf1b"}},
0},
{<<"vmq_plugin">>,
{git,"git://github.com/erlio/vmq_plugin.git",
{ref,"a4da95452f9363489c1fc5e2f753438e1d7b0b34"}},
1},
{<<"vmq_server">>,
{git,"git://github.com/erlio/vmq_server.git",
{ref,"475636b0177cc8d500c2cee97dc9cc118318bda9"}},
0}].
0}]}.
[
{pkg_hash,[
{<<"cowboy">>, <<"A324A8DF9F2316C833A470D918AAF73AE894278B8AA6226CE7A9BF699388F878">>},
{<<"cowlib">>, <<"9D769A1D062C9C3AC753096F868CA121E2730B9A377DE23DEC0F7E08B1DF84EE">>},
{<<"cuttlefish">>, <<"67F007E7564F1C81066DCCB86A6453DA051E937C8685984B888BFF92682CB6AD">>},
{<<"eper">>, <<"F5FB2DAA0DF8878748E1C598428EDA942A173E5121FF35C1D632129B84593A3A">>},
{<<"getopt">>, <<"B17556DB683000BA50370B16C0619DF1337E7AF7ECBF7D64FBF8D1D6BCE3109B">>},
{<<"goldrush">>, <<"2024BA375CEEA47E27EA70E14D2C483B2D8610101B4E852EF7F89163CDB6E649">>},
{<<"lager">>, <<"EEF4E18B39E4195D37606D9088EA05BF1B745986CF8EC84F01D332456FE88D17">>},
{<<"ranch">>, <<"A6FB992C10F2187B46FFD17CE398DDF8A54F691B81768F9EF5F461EA7E28C762">>},
{<<"recon">>, <<"4BB21BADD51A32AD50EDCCE54E5312ACF079A3BC770F266C1997071C7FCADF17">>},
{<<"riak_sysmon">>, <<"24F804606D65DE1F020138F5E6E3E17BE4C5A41567D5170306378253E3705BAE">>}]}
].
Binary file modified rebar3
Binary file not shown.

0 comments on commit 44d728c

Please sign in to comment.