summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlvaro Videla <alvaro@rabbitmq.com>2012-11-16 13:58:30 +0100
committerAlvaro Videla <alvaro@rabbitmq.com>2012-11-16 13:58:30 +0100
commit73110798abe6b3ca4a1091f8597d0a09d9a07026 (patch)
tree5076408391e613dd7018f7f772b68e30d37d973d
parentf3654f1ece558874e1e5500c95b92884947caff8 (diff)
downloadrabbitmq-server-73110798abe6b3ca4a1091f8597d0a09d9a07026.tar.gz
cosmetics + comments
-rw-r--r--packaging/standalone/src/rabbit_release.erl34
1 files changed, 29 insertions, 5 deletions
diff --git a/packaging/standalone/src/rabbit_release.erl b/packaging/standalone/src/rabbit_release.erl
index bcba2699..a7569595 100644
--- a/packaging/standalone/src/rabbit_release.erl
+++ b/packaging/standalone/src/rabbit_release.erl
@@ -1,4 +1,18 @@
-%% based on rabbit_prelaunch.erl from rabbitmq-server source code
+%% 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.
+%%
-module(rabbit_release).
-export([start/0, stop/0, make_tar/2]).
@@ -8,6 +22,13 @@
-define(BaseApps, [rabbit]).
-define(ERROR_CODE, 1).
+%% This module is based on rabbit_prelaunch.erl from rabbitmq-server source code
+%% We need to calculate all the ERTS apps we need to ship with a
+%% standalone rabbit. To acomplish that we need to unpack and load the plugins
+%% apps that are shiped with rabbit.
+%% Once we get that we generate an erlang release inside a tarball.
+%% Our make file will work with that release to generate our final rabbitmq
+%% package.
start() ->
%% Determine our various directories
[PluginsDistDir, UnpackedPluginDir, RabbitHome] =
@@ -16,10 +37,12 @@ start() ->
prepare_plugins(PluginsDistDir, UnpackedPluginDir),
- PluginAppNames = [ P#plugin.name || P <- rabbit_plugins:list(PluginsDistDir) ],
+ PluginAppNames = [P#plugin.name ||
+ P <- rabbit_plugins:list(PluginsDistDir)],
- %% we need to call find_plugins because it has the secondary effect of adding the
- %% plugin ebin folder to the code path. We need that in order to load the plugin app
+ %% we need to call find_plugins because it has the secondary effect of
+ %% adding the plugin ebin folder to the code path.
+ %% We need that in order to load the plugin app
RequiredApps = find_plugins(UnpackedPluginDir),
%% Build the entire set of dependencies - this will load the
@@ -89,7 +112,8 @@ prepare_plugins(PluginsDistDir, DestDir) ->
{error, E2} -> terminate("Could not create dir ~s (~p)", [DestDir, E2])
end,
- [prepare_plugin(Plugin, DestDir) || Plugin <- rabbit_plugins:list(PluginsDistDir)].
+ [prepare_plugin(Plugin, DestDir) ||
+ Plugin <- rabbit_plugins:list(PluginsDistDir)].
prepare_plugin(#plugin{type = ez, location = Location}, PluginDestDir) ->
zip:unzip(Location, [{cwd, PluginDestDir}]);