You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by rn...@apache.org on 2020/08/04 13:17:36 UTC

[couchdb] branch aegis_key_manager_app updated (514af24 -> 5fe682c)

This is an automated email from the ASF dual-hosted git repository.

rnewson pushed a change to branch aegis_key_manager_app
in repository https://gitbox.apache.org/repos/asf/couchdb.git.


 discard 514af24  Optionally add a key manager application as a dependency
     new 5fe682c  Optionally add a key manager application as a dependency

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (514af24)
            \
             N -- N -- N   refs/heads/aegis_key_manager_app (5fe682c)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 src/aegis/rebar.config.script | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


[couchdb] 01/01: Optionally add a key manager application as a dependency

Posted by rn...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rnewson pushed a commit to branch aegis_key_manager_app
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit 5fe682c2b25f4cd2fa0815ec27ebbc9e330af86f
Author: Robert Newson <rn...@apache.org>
AuthorDate: Tue Aug 4 12:18:40 2020 +0100

    Optionally add a key manager application as a dependency
---
 src/aegis/rebar.config.script                      | 11 +++++++++--
 .../src/{aegis.app.src => aegis.app.src.script}    | 23 +++++++++++++++-------
 2 files changed, 25 insertions(+), 9 deletions(-)

diff --git a/src/aegis/rebar.config.script b/src/aegis/rebar.config.script
index ef148bf..2c5a272 100644
--- a/src/aegis/rebar.config.script
+++ b/src/aegis/rebar.config.script
@@ -26,10 +26,17 @@ AegisKeyManager = case lists:keyfind(aegis_key_manager, 1, CouchConfig) of
         aegis_noop_key_manager
 end,
 
+AegisKeyManagerOpt = case lists:keyfind(aegis_key_manager_app, 1, CouchConfig) of
+    {aegis_key_manager_app, AppName} when AppName /= "" ->
+        [{d, 'AEGIS_KEY_MANAGER_APP', list_to_atom(AppName)}];
+    _ ->
+        []
+end,
+
 CurrentOpts = case lists:keyfind(erl_opts, 1, CONFIG) of
     {erl_opts, Opts} -> Opts;
     false -> []
 end,
 
-AegisOpts = {d, 'AEGIS_KEY_MANAGER', AegisKeyManager},
-lists:keystore(erl_opts, 1, CONFIG, {erl_opts, [AegisOpts | CurrentOpts]}).
+AegisOpts = AegisKeyManagerOpt ++ [{d, 'AEGIS_KEY_MANAGER', AegisKeyManager}],
+lists:keystore(erl_opts, 1, CONFIG, {erl_opts, AegisOpts ++ CurrentOpts}).
diff --git a/src/aegis/src/aegis.app.src b/src/aegis/src/aegis.app.src.script
similarity index 78%
rename from src/aegis/src/aegis.app.src
rename to src/aegis/src/aegis.app.src.script
index deb1526..3d6b842 100644
--- a/src/aegis/src/aegis.app.src
+++ b/src/aegis/src/aegis.app.src.script
@@ -10,6 +10,21 @@
 % License for the specific language governing permissions and limitations under
 % the License.
 
+AegisKeyManagerApp = case os:getenv("AEGIS_KEY_MANAGER_APP") of
+    false -> [];
+    AppName -> [AppName]
+end.
+
+BaseApplications = [
+    kernel,
+    stdlib,
+    crypto,
+    couch_log,
+    erlfdb
+].
+
+Applications = AegisKeyManagerApp ++ BaseApplications.
+
 {application, aegis,
  [
   {description, "If it's good enough for Zeus, it's good enough for CouchDB"},
@@ -18,13 +33,7 @@
   {registered, [
     aegis_server
   ]},
-  {applications,
-   [kernel,
-    stdlib,
-    crypto,
-    couch_log,
-    erlfdb
-   ]},
+  {applications, Applications},
   {env,[]},
   {modules, []},
   {maintainers, []},