couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From beno...@apache.org
Subject [1/2] git commit: updated refs/heads/1994-merge-rcouch to 5622151
Date Tue, 07 Jan 2014 15:16:35 GMT
Updated Branches:
  refs/heads/1994-merge-rcouch 868a28492 -> 5622151ce


add release build


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/7bf5cda8
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/7bf5cda8
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/7bf5cda8

Branch: refs/heads/1994-merge-rcouch
Commit: 7bf5cda81d901bdb7dd59ab578c51489e421c349
Parents: 868a284
Author: Benoit Chesneau <benoitc@apache.org>
Authored: Tue Jan 7 15:18:21 2014 +0100
Committer: Benoit Chesneau <benoitc@apache.org>
Committed: Tue Jan 7 15:18:21 2014 +0100

----------------------------------------------------------------------
 .gitignore                        |   3 +-
 apps/couch/c_src/couch_js/help.h  |   2 +-
 apps/couch/rebar.config.script    |   6 +-
 apps/couch_rel/ebin/couch_rel.app |  18 ++
 apps/couch_rel/src/etop_txt.erl   | 134 +++++++++++++
 bootstrap                         |   2 +-
 etc/couchdb/default.ini.tpl.in    | 351 ---------------------------------
 etc/couchdb/local.ini             |  97 ---------
 pkg.vars.config.in                |  52 +++++
 rebar.config                      |   9 +-
 rel/files/app.config              |  30 +++
 rel/files/couch.ini               | 350 ++++++++++++++++++++++++++++++++
 rel/files/local.ini               |  97 +++++++++
 rel/files/vm.args                 |  24 +++
 rel/reltool.config.script         | 149 ++++++++++++++
 rel/vars.config                   |  53 +++++
 vars.config.in                    |  27 ---
 17 files changed, 920 insertions(+), 484 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/7bf5cda8/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index 3fce481..eacde2b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -135,7 +135,7 @@ src/fauxton/test/test.config.js
 src/fauxton/app/initialize.js
 
 deps
-vars.config
+pkg.vars.config
 
 # rebar
 support/rebar/rebar
@@ -155,6 +155,7 @@ apps/couch_mrview/ebin
 apps/couch_index/ebin
 apps/couch_dbupdates/ebin
 apps/couch_plugins/ebin
+apps/couch_rel/ebin/*.beam
 
 # couchjs
 apps/couch/c_src/couch_js/*.o

http://git-wip-us.apache.org/repos/asf/couchdb/blob/7bf5cda8/apps/couch/c_src/couch_js/help.h
----------------------------------------------------------------------
diff --git a/apps/couch/c_src/couch_js/help.h b/apps/couch/c_src/couch_js/help.h
index f4ddb24..81bae4d 100644
--- a/apps/couch/c_src/couch_js/help.h
+++ b/apps/couch/c_src/couch_js/help.h
@@ -73,7 +73,7 @@ static const char USAGE_TEMPLATE[] =
             USAGE_TEMPLATE,                     \
             basename,                           \
             basename,                           \
-            PACKAGE_NAME,                       \
+            VENDOR_NAME,                       \
             basename,                           \
             PACKAGE_BUGREPORT)
 

http://git-wip-us.apache.org/repos/asf/couchdb/blob/7bf5cda8/apps/couch/rebar.config.script
----------------------------------------------------------------------
diff --git a/apps/couch/rebar.config.script b/apps/couch/rebar.config.script
index df8c48e..e8b987c 100644
--- a/apps/couch/rebar.config.script
+++ b/apps/couch/rebar.config.script
@@ -14,14 +14,13 @@
 %% the License.
 
 
-Cfg = case file:consult("../../vars.config") of
+Cfg = case file:consult("../../pkg.vars.config") of
           {ok, Terms} ->
               Terms;
           _Err ->
               []
       end,
 
-
 %% get version infos
 MajorVersion = integer_to_list(proplists:get_value(version_major, Cfg, 0)),
 MinorVersion = integer_to_list(proplists:get_value(version_minor, Cfg, 0)),
@@ -39,7 +38,7 @@ Version = case os:getenv("RELEASE") of
         BaseVersion ++ SecondaryVersion
 end,
 
-Cfg1 = [{package_string, proplists:get_value(package_name, Cfg, "")
+Cfg1 = [{package_string, proplists:get_value(vendor_name, Cfg, "")
                          ++ " " ++ Version },
         {package_version, Version}] ++ Cfg,
 
@@ -55,7 +54,6 @@ CfgStr = lists:foldl(fun({K, V}, Acc) ->
 ok = file:write_file("c_src/couch_js/config.h", iolist_to_binary(CfgStr)),
 
 
-
 GetFlag = fun(Name, Default) ->
         case os:getenv(Name) of
             false -> Default;

http://git-wip-us.apache.org/repos/asf/couchdb/blob/7bf5cda8/apps/couch_rel/ebin/couch_rel.app
----------------------------------------------------------------------
diff --git a/apps/couch_rel/ebin/couch_rel.app b/apps/couch_rel/ebin/couch_rel.app
new file mode 100644
index 0000000..2d207c9
--- /dev/null
+++ b/apps/couch_rel/ebin/couch_rel.app
@@ -0,0 +1,18 @@
+%% -*- tab-width: 4;erlang-indent-level: 4;indent-tabs-mode: nil -*-
+%% ex: ft=erlang ts=4 sw=4 et
+%%
+% Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+%
+% Unless required by applicable law or agreed to in writing, software
+% distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+% WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+% License for the specific language governing permissions and limitations under
+% the License.
+
+{application, couch_rel, [
+    {description,"couch extremely-early boot items"},
+        {modules, [etop_txt]}]}.

http://git-wip-us.apache.org/repos/asf/couchdb/blob/7bf5cda8/apps/couch_rel/src/etop_txt.erl
----------------------------------------------------------------------
diff --git a/apps/couch_rel/src/etop_txt.erl b/apps/couch_rel/src/etop_txt.erl
new file mode 100644
index 0000000..031f5d8
--- /dev/null
+++ b/apps/couch_rel/src/etop_txt.erl
@@ -0,0 +1,134 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2002-2009. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% 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.
+%%
+%% %CopyrightEnd%
+%%
+-module(etop_txt).
+-author('siri@erix.ericsson.se').
+-author('scott@basho.com').
+
+%%-compile(export_all).
+-export([init/1,stop/1]).
+-export([do_update/3]).
+
+%%-include("etop.hrl").
+-record(etop_proc_info,
+        {pid,
+         mem=0,
+         reds=0,
+         name,
+         runtime=0,
+         cf,
+         mq=0}).
+-record(etop_info,
+        {now = {0, 0, 0},
+         n_procs = 0,
+         wall_clock = {0, 0},
+         runtime = {0, 0},
+         run_queue = 0,
+         alloc_areas = [],
+         memi = [{total, 0},
+                 {processes, 0},
+                 {ets, 0},
+                 {atom, 0},
+                 {code, 0},
+                 {binary, 0}],
+         procinfo = []
+        }).
+%%-include("etop_defs.hrl").
+-define(SYSFORM,
+        " ~-72w~10s~n"
+        " Load:  cpu  ~8w               Memory:  total    ~8w    binary   ~8w~n"
+        "        procs~8w                        processes~8w    code     ~8w~n"
+        "        runq ~8w                        atom     ~8w    ets      ~8w~n").
+-record(opts, {node=node(), port = 8415, accum = false, intv = 5000, lines = 10,
+               width = 700, height = 340, sort = runtime, tracing = on,
+               %% Other state information
+               out_mod=etop_gui, out_proc, server, host, tracer, store,
+               accum_tab, remote}).
+
+-import(etop,[loadinfo/1,meminfo/2]).
+-import(etop_gui,[formatmfa/1,to_list/1]).
+
+-define(PROCFORM,"~-20w~-25s~8w~11w~11w~11w ~-40s~n").
+
+stop(Pid) -> Pid ! stop.
+
+init(Config) ->
+    loop(Config).
+
+loop(Config) ->
+    Info = do_update(Config),
+    receive
+	stop -> stopped;
+	{dump,Fd} -> do_update(Fd,Info,Config), loop(Config);
+	{config,_,Config1} -> loop(Config1)
+    after Config#opts.intv-500 -> loop(Config)
+    end.
+
+do_update(Config) ->
+    Info = etop:update(Config),
+    do_update(standard_io,Info,Config).
+
+do_update(Fd,Info,Config) ->
+    {Cpu,NProcs,RQ,Clock} = loadinfo(Info),
+    io:nl(Fd),
+    writedoubleline(Fd),
+    case Info#etop_info.memi of
+	undefined ->
+	    io:fwrite(Fd, " ~-72w~10s~n"
+		      " Load:  cpu  ~8w~n"
+		      "        procs~8w~n"
+		      "        runq ~8w~n",
+		      [Config#opts.node,Clock,
+		       Cpu,NProcs,RQ]);
+	Memi ->
+	    [Tot,Procs,Atom,Bin,Code,Ets] =
+		meminfo(Memi, [total,processes,atom,binary,code,ets]),
+	    io:fwrite(Fd, ?SYSFORM,
+		      [Config#opts.node,Clock,
+		       Cpu,Tot,Bin,
+		       NProcs,Procs,Code,
+		       RQ,Atom,Ets])
+    end,
+    io:nl(Fd),
+    writepinfo_header(Fd),
+    writesingleline(Fd),
+    writepinfo(Fd,Info#etop_info.procinfo),
+    %%writedoubleline(Fd),
+    %%io:nl(Fd),
+    Info.
+
+writepinfo_header(Fd) ->
+    io:fwrite(Fd,"Pid                 Name or Initial Func         Time       Reds     Memory       MsgQ Current Function~n",[]).
+
+writesingleline(Fd) ->
+    io:fwrite(Fd,"-------------------------------------------------------------------------------------------------------------------------------~n",[]).
+writedoubleline(Fd) ->
+    io:fwrite(Fd,"===============================================================================================================================~n",[]).
+
+writepinfo(Fd,[#etop_proc_info{pid=Pid,
+			       mem=Mem,
+			       reds=Reds,
+			       name=Name,
+			       runtime=Time,
+			       cf=MFA,
+			       mq=MQ}
+	       |T]) ->
+    io:fwrite(Fd,?PROCFORM,[Pid,to_list(Name),Time,Reds,Mem,MQ,formatmfa(MFA)]),
+    writepinfo(Fd,T);
+writepinfo(_Fd,[]) ->
+    ok.

http://git-wip-us.apache.org/repos/asf/couchdb/blob/7bf5cda8/bootstrap
----------------------------------------------------------------------
diff --git a/bootstrap b/bootstrap
index c3bb067..4e2a42f 100755
--- a/bootstrap
+++ b/bootstrap
@@ -62,7 +62,7 @@ if test -z "$REVISION"; then
         REVISION=`git describe --always`
     fi
 fi
-sed "s/%revision%/$REVISION/" < vars.config.in > vars.config
+sed "s/%revision%/$REVISION/" < pkg.vars.config.in > pkg.vars.config
 
 # build rebar
 export SUPPORT_DIR=$CURRENT/support

http://git-wip-us.apache.org/repos/asf/couchdb/blob/7bf5cda8/etc/couchdb/default.ini.tpl.in
----------------------------------------------------------------------
diff --git a/etc/couchdb/default.ini.tpl.in b/etc/couchdb/default.ini.tpl.in
deleted file mode 100644
index fb85fd7..0000000
--- a/etc/couchdb/default.ini.tpl.in
+++ /dev/null
@@ -1,351 +0,0 @@
-; @configure_input@
-
-; Upgrading CouchDB will overwrite this file.
-[vendor]
-name = %package_author_name%
-version = %version%
-
-[couchdb]
-database_dir = %localstatelibdir%
-view_index_dir = %localstatelibdir%
-util_driver_dir = %couchprivlibdir%
-max_document_size = 4294967296 ; 4 GB
-os_process_timeout = 5000 ; 5 seconds. for view and external servers.
-max_dbs_open = 100
-delayed_commits = true ; set this to false to ensure an fsync before 201 Created is returned
-uri_file = %localstaterundir%/couch.uri
-; Method used to compress everything that is appended to database and view index files, except
-; for attachments (see the attachments section). Available methods are:
-;
-; none         - no compression
-; snappy       - use google snappy, a very fast compressor/decompressor
-; deflate_[N]  - use zlib's deflate, N is the compression level which ranges from 1 (fastest,
-;                lowest compression ratio) to 9 (slowest, highest compression ratio)
-file_compression = snappy
-; Higher values may give better read performance due to less read operations
-; and/or more OS page cache hits, but they can also increase overall response
-; time for writes when there are many attachment write requests in parallel.
-attachment_stream_buffer_size = 4096
-
-plugin_dir = %locallibdir%/plugins
-
-[database_compaction]
-; larger buffer sizes can originate smaller files
-doc_buffer_size = 524288 ; value in bytes
-checkpoint_after = 5242880 ; checkpoint after every N bytes were written
-
-[view_compaction]
-; larger buffer sizes can originate smaller files
-keyvalue_buffer_size = 2097152 ; value in bytes
-
-[httpd]
-port = 5984
-bind_address = 127.0.0.1
-authentication_handlers = {couch_httpd_oauth, oauth_authentication_handler}, {couch_httpd_auth, cookie_authentication_handler}, {couch_httpd_auth, default_authentication_handler}
-default_handler = {couch_httpd_db, handle_request}
-secure_rewrites = true
-vhost_global_handlers = _utils, _uuids, _session, _oauth, _users
-allow_jsonp = false
-; Options for the MochiWeb HTTP server.
-;server_options = [{backlog, 128}, {acceptor_pool_size, 16}]
-; For more socket options, consult Erlang's module 'inet' man page.
-;socket_options = [{recbuf, 262144}, {sndbuf, 262144}, {nodelay, true}]
-log_max_chunk_size = 1000000
-enable_cors = false
-
-[ssl]
-port = 6984
-
-[log]
-file = %localstatelogdir%/couch.log
-level = info
-include_sasl = true
-
-[couch_httpd_auth]
-authentication_db = _users
-authentication_redirect = /_utils/session.html
-require_valid_user = false
-timeout = 600 ; number of seconds before automatic logout
-auth_cache_size = 50 ; size is number of cache entries
-allow_persistent_cookies = false ; set to true to allow persistent cookies
-iterations = 10 ; iterations for password hashing
-; comma-separated list of public fields, 404 if empty
-; public_fields =
-
-[cors]
-credentials = false
-; List of origins separated by a comma, * means accept all
-; Origins must include the scheme: http://example.com
-; You can’t set origins: * and credentials = true at the same time.
-;origins = *
-; List of accepted headers separated by a comma
-; headers =
-; List of accepted methods
-; methods =
-
-
-; Configuration for a vhost
-;[cors:http://example.com]
-; credentials = false
-; List of origins separated by a comma
-; Origins must include the scheme: http://example.com
-; You can’t set origins: * and credentials = true at the same time.
-;origins =
-; List of accepted headers separated by a comma
-; headers =
-; List of accepted methods
-; methods =
-
-[couch_httpd_oauth]
-; If set to 'true', oauth token and consumer secrets will be looked up
-; in the authentication database (_users). These secrets are stored in
-; a top level property named "oauth" in user documents. Example:
-;     {
-;         "_id": "org.couchdb.user:joe",
-;         "type": "user",
-;         "name": "joe",
-;         "password_sha": "fe95df1ca59a9b567bdca5cbaf8412abd6e06121",
-;         "salt": "4e170ffeb6f34daecfd814dfb4001a73"
-;         "roles": ["foo", "bar"],
-;         "oauth": {
-;             "consumer_keys": {
-;                 "consumerKey1": "key1Secret",
-;                 "consumerKey2": "key2Secret"
-;             },
-;             "tokens": {
-;                 "token1": "token1Secret",
-;                 "token2": "token2Secret"
-;             }
-;         }
-;     }
-use_users_db = false
-
-[query_servers]
-javascript = %bindir%/%couchjs_command_name% %localbuilddatadir%/server/main.js
-coffeescript = %bindir%/%couchjs_command_name% %localbuilddatadir%/server/main-coffee.js
-
-
-; Changing reduce_limit to false will disable reduce_limit.
-; If you think you're hitting reduce_limit with a "good" reduce function,
-; please let us know on the mailing list so we can fine tune the heuristic.
-[query_server_config]
-reduce_limit = true
-os_process_limit = 25
-
-[daemons]
-external_manager={couch_external_manager, start_link, []}
-query_servers={couch_query_servers, start_link, []}
-vhosts={couch_httpd_vhost, start_link, []}
-httpd={couch_httpd, start_link, []}
-stats_aggregator={couch_stats_aggregator, start, []}
-stats_collector={couch_stats_collector, start, []}
-uuids={couch_uuids, start, []}
-auth_cache={couch_auth_cache, start_link, []}
-os_daemons={couch_os_daemons, start_link, []}
-compaction_daemon={couch_compaction_daemon, start_link, []}
-
-[httpd_global_handlers]
-/ = {couch_httpd_misc_handlers, handle_welcome_req, <<"Welcome">>}
-favicon.ico = {couch_httpd_misc_handlers, handle_favicon_req, "%localdatadir%/www"}
-
-_utils = {couch_httpd_misc_handlers, handle_utils_dir_req, "%localdatadir%/www"}
-_all_dbs = {couch_httpd_misc_handlers, handle_all_dbs_req}
-_active_tasks = {couch_httpd_misc_handlers, handle_task_status_req}
-_config = {couch_httpd_misc_handlers, handle_config_req}
-_replicate = {couch_replicator_httpd, handle_req}
-_uuids = {couch_httpd_misc_handlers, handle_uuids_req}
-_restart = {couch_httpd_misc_handlers, handle_restart_req}
-_stats = {couch_httpd_stats_handlers, handle_stats_req}
-_log = {couch_httpd_misc_handlers, handle_log_req}
-_session = {couch_httpd_auth, handle_session_req}
-_oauth = {couch_httpd_oauth, handle_oauth_req}
-_db_updates = {couch_dbupdates_httpd, handle_req}
-_plugins = {couch_plugins_httpd, handle_req}
-
-[httpd_db_handlers]
-_all_docs = {couch_mrview_http, handle_all_docs_req}
-_changes = {couch_httpd_db, handle_changes_req}
-_compact = {couch_httpd_db, handle_compact_req}
-_design = {couch_httpd_db, handle_design_req}
-_temp_view = {couch_mrview_http, handle_temp_view_req}
-_view_cleanup = {couch_mrview_http, handle_cleanup_req}
-
-; The external module takes an optional argument allowing you to narrow it to a
-; single script. Otherwise the script name is inferred from the first path section
-; after _external's own path.
-; _mypath = {couch_httpd_external, handle_external_req, <<"mykey">>}
-; _external = {couch_httpd_external, handle_external_req}
-
-[httpd_design_handlers]
-_compact = {couch_mrview_http, handle_compact_req}
-_info = {couch_mrview_http, handle_info_req}
-_list = {couch_mrview_show, handle_view_list_req}
-_rewrite = {couch_httpd_rewrite, handle_rewrite_req}
-_show = {couch_mrview_show, handle_doc_show_req}
-_update = {couch_mrview_show, handle_doc_update_req}
-_view = {couch_mrview_http, handle_view_req}
-
-; enable external as an httpd handler, then link it with commands here.
-; note, this api is still under consideration.
-; [external]
-; mykey = /path/to/mycommand
-
-; Here you can setup commands for CouchDB to manage
-; while it is alive. It will attempt to keep each command
-; alive if it exits.
-; [os_daemons]
-; some_daemon_name = /path/to/script -with args
-
-
-[uuids]
-; Known algorithms:
-;   random - 128 bits of random awesome
-;     All awesome, all the time.
-;   sequential - monotonically increasing ids with random increments
-;     First 26 hex characters are random. Last 6 increment in
-;     random amounts until an overflow occurs. On overflow, the
-;     random prefix is regenerated and the process starts over.
-;   utc_random - Time since Jan 1, 1970 UTC with microseconds
-;     First 14 characters are the time in hex. Last 18 are random.
-;   utc_id - Time since Jan 1, 1970 UTC with microseconds, plus utc_id_suffix string
-;     First 14 characters are the time in hex. uuids/utc_id_suffix string value is appended to these.
-algorithm = sequential
-; The utc_id_suffix value will be appended to uuids generated by the utc_id algorithm.
-; Replicating instances should have unique utc_id_suffix values to ensure uniqueness of utc_id ids.
-utc_id_suffix =
-
-[stats]
-; rate is in milliseconds
-rate = 1000
-; sample intervals are in seconds
-samples = [0, 60, 300, 900]
-
-[attachments]
-compression_level = 8 ; from 1 (lowest, fastest) to 9 (highest, slowest), 0 to disable compression
-compressible_types = text/*, application/javascript, application/json, application/xml
-
-[replicator]
-db = _replicator
-; Maximum replicaton retry count can be a non-negative integer or "infinity".
-max_replication_retry_count = 10
-; More worker processes can give higher network throughput but can also
-; imply more disk and network IO.
-worker_processes = 4
-; With lower batch sizes checkpoints are done more frequently. Lower batch sizes
-; also reduce the total amount of used RAM memory.
-worker_batch_size = 500
-; Maximum number of HTTP connections per replication.
-http_connections = 20
-; HTTP connection timeout per replication.
-; Even for very fast/reliable networks it might need to be increased if a remote
-; database is too busy.
-connection_timeout = 30000
-; If a request fails, the replicator will retry it up to N times.
-retries_per_request = 10
-; Some socket options that might boost performance in some scenarios:
-;       {nodelay, boolean()}
-;       {sndbuf, integer()}
-;       {recbuf, integer()}
-;       {priority, integer()}
-; See the `inet` Erlang module's man page for the full list of options.
-socket_options = [{keepalive, true}, {nodelay, false}]
-; Path to a file containing the user's certificate.
-;cert_file = /full/path/to/server_cert.pem
-; Path to file containing user's private PEM encoded key.
-;key_file = /full/path/to/server_key.pem
-; String containing the user's password. Only used if the private keyfile is password protected.
-;password = somepassword
-; Set to true to validate peer certificates.
-verify_ssl_certificates = false
-; File containing a list of peer trusted certificates (in the PEM format).
-;ssl_trusted_certificates_file = /etc/ssl/certs/ca-certificates.crt
-; Maximum peer certificate depth (must be set even if certificate validation is off).
-ssl_certificate_max_depth = 3
-
-[compaction_daemon]
-; The delay, in seconds, between each check for which database and view indexes
-; need to be compacted.
-check_interval = 300
-; If a database or view index file is smaller then this value (in bytes),
-; compaction will not happen. Very small files always have a very high
-; fragmentation therefore it's not worth to compact them.
-min_file_size = 131072
-
-[compactions]
-; List of compaction rules for the compaction daemon.
-; The daemon compacts databases and their respective view groups when all the
-; condition parameters are satisfied. Configuration can be per database or
-; global, and it has the following format:
-;
-; database_name = [ {ParamName, ParamValue}, {ParamName, ParamValue}, ... ]
-; _default = [ {ParamName, ParamValue}, {ParamName, ParamValue}, ... ]
-;
-; Possible parameters:
-;
-; * db_fragmentation - If the ratio (as an integer percentage), of the amount
-;                      of old data (and its supporting metadata) over the database
-;                      file size is equal to or greater then this value, this
-;                      database compaction condition is satisfied.
-;                      This value is computed as:
-;
-;                           (file_size - data_size) / file_size * 100
-;
-;                      The data_size and file_size values can be obtained when
-;                      querying a database's information URI (GET /dbname/).
-;
-; * view_fragmentation - If the ratio (as an integer percentage), of the amount
-;                        of old data (and its supporting metadata) over the view
-;                        index (view group) file size is equal to or greater then
-;                        this value, then this view index compaction condition is
-;                        satisfied. This value is computed as:
-;
-;                            (file_size - data_size) / file_size * 100
-;
-;                        The data_size and file_size values can be obtained when
-;                        querying a view group's information URI
-;                        (GET /dbname/_design/groupname/_info).
-;
-; * from _and_ to - The period for which a database (and its view groups) compaction
-;                   is allowed. The value for these parameters must obey the format:
-;
-;                   HH:MM - HH:MM  (HH in [0..23], MM in [0..59])
-;
-; * strict_window - If a compaction is still running after the end of the allowed
-;                   period, it will be canceled if this parameter is set to 'true'.
-;                   It defaults to 'false' and it's meaningful only if the *period*
-;                   parameter is also specified.
-;
-; * parallel_view_compaction - If set to 'true', the database and its views are
-;                              compacted in parallel. This is only useful on
-;                              certain setups, like for example when the database
-;                              and view index directories point to different
-;                              disks. It defaults to 'false'.
-;
-; Before a compaction is triggered, an estimation of how much free disk space is
-; needed is computed. This estimation corresponds to 2 times the data size of
-; the database or view index. When there's not enough free disk space to compact
-; a particular database or view index, a warning message is logged.
-;
-; Examples:
-;
-; 1) [{db_fragmentation, "70%"}, {view_fragmentation, "60%"}]
-;    The `foo` database is compacted if its fragmentation is 70% or more.
-;    Any view index of this database is compacted only if its fragmentation
-;    is 60% or more.
-;
-; 2) [{db_fragmentation, "70%"}, {view_fragmentation, "60%"}, {from, "00:00"}, {to, "04:00"}]
-;    Similar to the preceding example but a compaction (database or view index)
-;    is only triggered if the current time is between midnight and 4 AM.
-;
-; 3) [{db_fragmentation, "70%"}, {view_fragmentation, "60%"}, {from, "00:00"}, {to, "04:00"}, {strict_window, true}]
-;    Similar to the preceding example - a compaction (database or view index)
-;    is only triggered if the current time is between midnight and 4 AM. If at
-;    4 AM the database or one of its views is still compacting, the compaction
-;    process will be canceled.
-;
-; 4) [{db_fragmentation, "70%"}, {view_fragmentation, "60%"}, {from, "00:00"}, {to, "04:00"}, {strict_window, true}, {parallel_view_compaction, true}]
-;    Similar to the preceding example, but a database and its views can be
-;    compacted in parallel.
-;
-;_default = [{db_fragmentation, "70%"}, {view_fragmentation, "60%"}, {from, "23:00"}, {to, "04:00"}]
-

http://git-wip-us.apache.org/repos/asf/couchdb/blob/7bf5cda8/etc/couchdb/local.ini
----------------------------------------------------------------------
diff --git a/etc/couchdb/local.ini b/etc/couchdb/local.ini
deleted file mode 100644
index 8aae331..0000000
--- a/etc/couchdb/local.ini
+++ /dev/null
@@ -1,97 +0,0 @@
-; CouchDB Configuration Settings
-
-; Custom settings should be made in this file. They will override settings
-; in default.ini, but unlike changes made to default.ini, this file won't be
-; overwritten on server upgrade.
-
-[couchdb]
-;max_document_size = 4294967296 ; bytes
-
-[httpd]
-;port = 5984
-;bind_address = 127.0.0.1
-; Options for the MochiWeb HTTP server.
-;server_options = [{backlog, 128}, {acceptor_pool_size, 16}]
-; For more socket options, consult Erlang's module 'inet' man page.
-;socket_options = [{recbuf, 262144}, {sndbuf, 262144}, {nodelay, true}]
-
-; Uncomment next line to trigger basic-auth popup on unauthorized requests.
-;WWW-Authenticate = Basic realm="administrator"
-
-; Uncomment next line to set the configuration modification whitelist. Only
-; whitelisted values may be changed via the /_config URLs. To allow the admin
-; to change this value over HTTP, remember to include {httpd,config_whitelist}
-; itself. Excluding it from the list would require editing this file to update
-; the whitelist.
-;config_whitelist = [{httpd,config_whitelist}, {log,level}, {etc,etc}]
-
-[query_servers]
-;nodejs = /usr/local/bin/couchjs-node /path/to/couchdb/share/server/main.js
-
-
-[httpd_global_handlers]
-;_google = {couch_httpd_proxy, handle_proxy_req, <<"http://www.google.com">>}
-
-[couch_httpd_auth]
-; If you set this to true, you should also uncomment the WWW-Authenticate line
-; above. If you don't configure a WWW-Authenticate header, CouchDB will send
-; Basic realm="server" in order to prevent you getting logged out.
-; require_valid_user = false
-
-[log]
-;level = debug
-
-[log_level_by_module]
-; In this section you can specify any of the four log levels 'none', 'info',
-; 'error' or 'debug' on a per-module basis. See src/*/*.erl for various
-; modules.
-;couch_httpd = error
-
-
-[os_daemons]
-; For any commands listed here, CouchDB will attempt to ensure that
-; the process remains alive. Daemons should monitor their environment
-; to know when to exit. This can most easily be accomplished by exiting
-; when stdin is closed.
-;foo = /path/to/command -with args
-
-[daemons]
-; enable SSL support by uncommenting the following line and supply the PEM's below.
-; the default ssl port CouchDB listens on is 6984
-; httpsd = {couch_httpd, start_link, [https]}
-
-[ssl]
-;cert_file = /full/path/to/server_cert.pem
-;key_file = /full/path/to/server_key.pem
-;password = somepassword
-; set to true to validate peer certificates
-verify_ssl_certificates = false
-; Path to file containing PEM encoded CA certificates (trusted
-; certificates used for verifying a peer certificate). May be omitted if
-; you do not want to verify the peer.
-;cacert_file = /full/path/to/cacertf
-; The verification fun (optional) if not specified, the default
-; verification fun will be used.
-;verify_fun = {Module, VerifyFun}
-; maximum peer certificate depth
-ssl_certificate_max_depth = 1
-
-; To enable Virtual Hosts in CouchDB, add a vhost = path directive. All requests to
-; the Virual Host will be redirected to the path. In the example below all requests
-; to http://example.com/ are redirected to /database.
-; If you run CouchDB on a specific port, include the port number in the vhost:
-; example.com:5984 = /database
-[vhosts]
-;example.com = /database/
-
-[update_notification]
-;unique notifier name=/full/path/to/exe -with "cmd line arg"
-
-; To create an admin account uncomment the '[admins]' section below and add a
-; line in the format 'username = password'. When you next start CouchDB, it
-; will change the password to a hash (so that your passwords don't linger
-; around in plain-text files). You can add more admin accounts with more
-; 'username = password' lines. Don't forget to restart CouchDB after
-; changing this.
-[admins]
-;admin = mysecretpassword

http://git-wip-us.apache.org/repos/asf/couchdb/blob/7bf5cda8/pkg.vars.config.in
----------------------------------------------------------------------
diff --git a/pkg.vars.config.in b/pkg.vars.config.in
new file mode 100644
index 0000000..9042b15
--- /dev/null
+++ b/pkg.vars.config.in
@@ -0,0 +1,52 @@
+%% -*- tab-width: 4;erlang-indent-level: 4;indent-tabs-mode: nil -*-
+%% ex: ft=erlang ts=4 sw=4 et
+
+% Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+%
+% Unless required by applicable law or agreed to in writing, software
+% distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+% WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+% License for the specific language governing permissions and limitations under
+% the License.
+
+{package_name, "apache-couchdb"}.
+{package_install_name, "couchdb"}.
+{package_install_user, "couchdb"}.
+{package_install_group, "couchdb"}.
+{package_install_user_desc, "Apache CouchDB user"}.
+{package_bugreport, "https://issues.apache.org/jira/browse/COUCHDB"}.
+{package_commands, {list, [[{name, "couch"}], [{name, "couchjs"}]]}}.
+{package_shortdesc, "Apache CouchDB"}.
+{package_desc, "Apache CouchDB - document oriented database"}.
+{package_patch_dir, "couch-patches"}.
+{solaris_pkgname, "ApacheCouchdb"}.
+{license_type, "Apache 2"}.
+{copyright, "2014 (c) The Apache Software Foundation"}.
+{vendor_name, "The Apache Software Foundation"}.
+{vendor_url, "http://couchdb.apache.org"}.
+{vendor_contact_name, "Apache CouchDB"}.
+{vendor_contact_email, "dev@couchdb.apache.org"}.
+{license_full_text, "This file is provided to you under the Apache License,\n"
+"Version 2.0 (the \"License\"); you may not use this file\n"
+"except in compliance with the License.  You may obtain\n"
+"a copy of the License at\n"
+"\n"
+"  http://www.apache.org/licenses/LICENSE-2.0\n"
+"\n"
+"Unless required by applicable law or agreed to in writing,\n"
+"software distributed under the License is distributed on an\n"
+"\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n"
+"KIND, either express or implied.  See the License for the\n"
+"specific language governing permissions and limitations\n"
+"under the License."}.
+
+{version_major, 1}.
+{version_minor, 6}.
+{version_revision, 0}.
+{version_stage, "+build"}.
+{version_release, ".%revision%"}.
+{couchjs_name, "couchjs"}.

http://git-wip-us.apache.org/repos/asf/couchdb/blob/7bf5cda8/rebar.config
----------------------------------------------------------------------
diff --git a/rebar.config b/rebar.config
index 319a3b1..e630795 100644
--- a/rebar.config
+++ b/rebar.config
@@ -25,7 +25,11 @@
                    {branch, "refuge"}}},
 
     %% json module, encode/decode module
-    {jiffy, ".*", {git, "git://github.com/refuge/jiffy.git", "master"}}
+    {jiffy, ".*", {git, "git://github.com/refuge/jiffy.git", "master"}},
+
+    %% packaging
+    {node_package, ".*", {git, "git://github.com/basho/node_package",
+                         {tag, "1.3.8"}}}
 
 ]}.
 
@@ -36,5 +40,6 @@
     "apps/couch_mrview",
     "apps/couch_replicator",
     "apps/couch_plugins",
-    "apps/couch_dbupdates"
+    "apps/couch_dbupdates",
+    "apps/couch_rel"
 ]}.

http://git-wip-us.apache.org/repos/asf/couchdb/blob/7bf5cda8/rel/files/app.config
----------------------------------------------------------------------
diff --git a/rel/files/app.config b/rel/files/app.config
new file mode 100644
index 0000000..15e16c6
--- /dev/null
+++ b/rel/files/app.config
@@ -0,0 +1,30 @@
+%% -*- tab-width: 4;erlang-indent-level: 4;indent-tabs-mode: nil -*-
+%% ex: ft=erlang ts=4 sw=4 et
+
+[
+ %% default couchdb config
+ {couch, [
+        {config_files, [
+                "{{platform_etc_dir}}/couch.ini",
+                "{{platform_etc_dir}}/local.ini"
+                ]}
+        ]},
+
+ %% os_mon config
+ {os_mon, [
+        {start_memsup, false},
+        {start_cpu_sup, false},
+        {disk_space_check_interval, 1},
+        {disk_almost_full_thresold, 1}
+    ]},
+
+ %% SASL config
+ {sasl, [
+         {utc_log, true},
+         {sasl_error_logger, {file, "{{sasl_error_log}}"}},
+         {errlog_type, error},
+         {error_logger_mf_dir, "{{sasl_log_dir}}"},      % Log directory
+         {error_logger_mf_maxbytes, 10485760},   % 10 MB max file size
+         {error_logger_mf_maxfiles, 5}           % 5 files max
+        ]}
+].

http://git-wip-us.apache.org/repos/asf/couchdb/blob/7bf5cda8/rel/files/couch.ini
----------------------------------------------------------------------
diff --git a/rel/files/couch.ini b/rel/files/couch.ini
new file mode 100644
index 0000000..2e13484
--- /dev/null
+++ b/rel/files/couch.ini
@@ -0,0 +1,350 @@
+; @configure_input@
+
+; Upgrading CouchDB will overwrite this file.
+[vendor]
+name = {{vendor_name}}
+version = {{rel_vsn}}
+
+[couchdb]
+database_dir = {{platform_data_dir}}
+view_index_dir = {{platform_view_dir}}
+max_document_size = 4294967296 ; 4 GB
+os_process_timeout = 5000 ; 5 seconds. for view and external servers.
+max_dbs_open = 100
+delayed_commits = true ; set this to false to ensure an fsync before 201 Created is returned
+uri_file = {{platform_data_dir}}/couch.uri
+; Method used to compress everything that is appended to database and view index files, except
+; for attachments (see the attachments section). Available methods are:
+;
+; none         - no compression
+; snappy       - use google snappy, a very fast compressor/decompressor
+; deflate_[N]  - use zlib's deflate, N is the compression level which ranges from 1 (fastest,
+;                lowest compression ratio) to 9 (slowest, highest compression ratio)
+file_compression = snappy
+; Higher values may give better read performance due to less read operations
+; and/or more OS page cache hits, but they can also increase overall response
+; time for writes when there are many attachment write requests in parallel.
+attachment_stream_buffer_size = 4096
+
+plugin_dir = {{platform_data_dir}}/plugins
+
+[database_compaction]
+; larger buffer sizes can originate smaller files
+doc_buffer_size = 524288 ; value in bytes
+checkpoint_after = 5242880 ; checkpoint after every N bytes were written
+
+[view_compaction]
+; larger buffer sizes can originate smaller files
+keyvalue_buffer_size = 2097152 ; value in bytes
+
+[httpd]
+port = 5984
+bind_address = 127.0.0.1
+authentication_handlers = {couch_httpd_oauth, oauth_authentication_handler}, {couch_httpd_auth, cookie_authentication_handler}, {couch_httpd_auth, default_authentication_handler}
+default_handler = {couch_httpd_db, handle_request}
+secure_rewrites = true
+vhost_global_handlers = _utils, _uuids, _session, _oauth, _users
+allow_jsonp = false
+; Options for the MochiWeb HTTP server.
+;server_options = [{backlog, 128}, {acceptor_pool_size, 16}]
+; For more socket options, consult Erlang's module 'inet' man page.
+;socket_options = [{recbuf, 262144}, {sndbuf, 262144}, {nodelay, true}]
+log_max_chunk_size = 1000000
+enable_cors = false
+
+[ssl]
+port = 6984
+
+[log]
+file = {{platform_log_dir}}/couch.log
+level = info
+include_sasl = true
+
+[couch_httpd_auth]
+authentication_db = _users
+authentication_redirect = /_utils/session.html
+require_valid_user = false
+timeout = 600 ; number of seconds before automatic logout
+auth_cache_size = 50 ; size is number of cache entries
+allow_persistent_cookies = false ; set to true to allow persistent cookies
+iterations = 10 ; iterations for password hashing
+; comma-separated list of public fields, 404 if empty
+; public_fields =
+
+[cors]
+credentials = false
+; List of origins separated by a comma, * means accept all
+; Origins must include the scheme: http://example.com
+; You can’t set origins: * and credentials = true at the same time.
+;origins = *
+; List of accepted headers separated by a comma
+; headers =
+; List of accepted methods
+; methods =
+
+
+; Configuration for a vhost
+;[cors:http://example.com]
+; credentials = false
+; List of origins separated by a comma
+; Origins must include the scheme: http://example.com
+; You can’t set origins: * and credentials = true at the same time.
+;origins =
+; List of accepted headers separated by a comma
+; headers =
+; List of accepted methods
+; methods =
+
+[couch_httpd_oauth]
+; If set to 'true', oauth token and consumer secrets will be looked up
+; in the authentication database (_users). These secrets are stored in
+; a top level property named "oauth" in user documents. Example:
+;     {
+;         "_id": "org.couchdb.user:joe",
+;         "type": "user",
+;         "name": "joe",
+;         "password_sha": "fe95df1ca59a9b567bdca5cbaf8412abd6e06121",
+;         "salt": "4e170ffeb6f34daecfd814dfb4001a73"
+;         "roles": ["foo", "bar"],
+;         "oauth": {
+;             "consumer_keys": {
+;                 "consumerKey1": "key1Secret",
+;                 "consumerKey2": "key2Secret"
+;             },
+;             "tokens": {
+;                 "token1": "token1Secret",
+;                 "token2": "token2Secret"
+;             }
+;         }
+;     }
+use_users_db = false
+
+[query_servers]
+javascript =  {{platform_bin_dir}}/{{couchjs_name}} {{platform_share_dir}}/server/main.js
+coffeescript = {{platform_bin_dir}}/{{couchjs_name}} {{platform_share_dir}}/server/main-coffee.js
+
+
+; Changing reduce_limit to false will disable reduce_limit.
+; If you think you're hitting reduce_limit with a "good" reduce function,
+; please let us know on the mailing list so we can fine tune the heuristic.
+[query_server_config]
+reduce_limit = true
+os_process_limit = 25
+
+[daemons]
+external_manager={couch_external_manager, start_link, []}
+query_servers={couch_query_servers, start_link, []}
+vhosts={couch_httpd_vhost, start_link, []}
+httpd={couch_httpd, start_link, []}
+stats_aggregator={couch_stats_aggregator, start, []}
+stats_collector={couch_stats_collector, start, []}
+uuids={couch_uuids, start, []}
+auth_cache={couch_auth_cache, start_link, []}
+os_daemons={couch_os_daemons, start_link, []}
+compaction_daemon={couch_compaction_daemon, start_link, []}
+
+[httpd_global_handlers]
+/ = {couch_httpd_misc_handlers, handle_welcome_req, <<"Welcome">>}
+favicon.ico = {couch_httpd_misc_handlers, handle_favicon_req, "%localdatadir%/www"}
+
+_utils = {couch_httpd_misc_handlers, handle_utils_dir_req, "%localdatadir%/www"}
+_all_dbs = {couch_httpd_misc_handlers, handle_all_dbs_req}
+_active_tasks = {couch_httpd_misc_handlers, handle_task_status_req}
+_config = {couch_httpd_misc_handlers, handle_config_req}
+_replicate = {couch_replicator_httpd, handle_req}
+_uuids = {couch_httpd_misc_handlers, handle_uuids_req}
+_restart = {couch_httpd_misc_handlers, handle_restart_req}
+_stats = {couch_httpd_stats_handlers, handle_stats_req}
+_log = {couch_httpd_misc_handlers, handle_log_req}
+_session = {couch_httpd_auth, handle_session_req}
+_oauth = {couch_httpd_oauth, handle_oauth_req}
+_db_updates = {couch_dbupdates_httpd, handle_req}
+_plugins = {couch_plugins_httpd, handle_req}
+
+[httpd_db_handlers]
+_all_docs = {couch_mrview_http, handle_all_docs_req}
+_changes = {couch_httpd_db, handle_changes_req}
+_compact = {couch_httpd_db, handle_compact_req}
+_design = {couch_httpd_db, handle_design_req}
+_temp_view = {couch_mrview_http, handle_temp_view_req}
+_view_cleanup = {couch_mrview_http, handle_cleanup_req}
+
+; The external module takes an optional argument allowing you to narrow it to a
+; single script. Otherwise the script name is inferred from the first path section
+; after _external's own path.
+; _mypath = {couch_httpd_external, handle_external_req, <<"mykey">>}
+; _external = {couch_httpd_external, handle_external_req}
+
+[httpd_design_handlers]
+_compact = {couch_mrview_http, handle_compact_req}
+_info = {couch_mrview_http, handle_info_req}
+_list = {couch_mrview_show, handle_view_list_req}
+_rewrite = {couch_httpd_rewrite, handle_rewrite_req}
+_show = {couch_mrview_show, handle_doc_show_req}
+_update = {couch_mrview_show, handle_doc_update_req}
+_view = {couch_mrview_http, handle_view_req}
+
+; enable external as an httpd handler, then link it with commands here.
+; note, this api is still under consideration.
+; [external]
+; mykey = /path/to/mycommand
+
+; Here you can setup commands for CouchDB to manage
+; while it is alive. It will attempt to keep each command
+; alive if it exits.
+; [os_daemons]
+; some_daemon_name = /path/to/script -with args
+
+
+[uuids]
+; Known algorithms:
+;   random - 128 bits of random awesome
+;     All awesome, all the time.
+;   sequential - monotonically increasing ids with random increments
+;     First 26 hex characters are random. Last 6 increment in
+;     random amounts until an overflow occurs. On overflow, the
+;     random prefix is regenerated and the process starts over.
+;   utc_random - Time since Jan 1, 1970 UTC with microseconds
+;     First 14 characters are the time in hex. Last 18 are random.
+;   utc_id - Time since Jan 1, 1970 UTC with microseconds, plus utc_id_suffix string
+;     First 14 characters are the time in hex. uuids/utc_id_suffix string value is appended to these.
+algorithm = sequential
+; The utc_id_suffix value will be appended to uuids generated by the utc_id algorithm.
+; Replicating instances should have unique utc_id_suffix values to ensure uniqueness of utc_id ids.
+utc_id_suffix =
+
+[stats]
+; rate is in milliseconds
+rate = 1000
+; sample intervals are in seconds
+samples = [0, 60, 300, 900]
+
+[attachments]
+compression_level = 8 ; from 1 (lowest, fastest) to 9 (highest, slowest), 0 to disable compression
+compressible_types = text/*, application/javascript, application/json, application/xml
+
+[replicator]
+db = _replicator
+; Maximum replicaton retry count can be a non-negative integer or "infinity".
+max_replication_retry_count = 10
+; More worker processes can give higher network throughput but can also
+; imply more disk and network IO.
+worker_processes = 4
+; With lower batch sizes checkpoints are done more frequently. Lower batch sizes
+; also reduce the total amount of used RAM memory.
+worker_batch_size = 500
+; Maximum number of HTTP connections per replication.
+http_connections = 20
+; HTTP connection timeout per replication.
+; Even for very fast/reliable networks it might need to be increased if a remote
+; database is too busy.
+connection_timeout = 30000
+; If a request fails, the replicator will retry it up to N times.
+retries_per_request = 10
+; Some socket options that might boost performance in some scenarios:
+;       {nodelay, boolean()}
+;       {sndbuf, integer()}
+;       {recbuf, integer()}
+;       {priority, integer()}
+; See the `inet` Erlang module's man page for the full list of options.
+socket_options = [{keepalive, true}, {nodelay, false}]
+; Path to a file containing the user's certificate.
+;cert_file = /full/path/to/server_cert.pem
+; Path to file containing user's private PEM encoded key.
+;key_file = /full/path/to/server_key.pem
+; String containing the user's password. Only used if the private keyfile is password protected.
+;password = somepassword
+; Set to true to validate peer certificates.
+verify_ssl_certificates = false
+; File containing a list of peer trusted certificates (in the PEM format).
+;ssl_trusted_certificates_file = /etc/ssl/certs/ca-certificates.crt
+; Maximum peer certificate depth (must be set even if certificate validation is off).
+ssl_certificate_max_depth = 3
+
+[compaction_daemon]
+; The delay, in seconds, between each check for which database and view indexes
+; need to be compacted.
+check_interval = 300
+; If a database or view index file is smaller then this value (in bytes),
+; compaction will not happen. Very small files always have a very high
+; fragmentation therefore it's not worth to compact them.
+min_file_size = 131072
+
+[compactions]
+; List of compaction rules for the compaction daemon.
+; The daemon compacts databases and their respective view groups when all the
+; condition parameters are satisfied. Configuration can be per database or
+; global, and it has the following format:
+;
+; database_name = [ {ParamName, ParamValue}, {ParamName, ParamValue}, ... ]
+; _default = [ {ParamName, ParamValue}, {ParamName, ParamValue}, ... ]
+;
+; Possible parameters:
+;
+; * db_fragmentation - If the ratio (as an integer percentage), of the amount
+;                      of old data (and its supporting metadata) over the database
+;                      file size is equal to or greater then this value, this
+;                      database compaction condition is satisfied.
+;                      This value is computed as:
+;
+;                           (file_size - data_size) / file_size * 100
+;
+;                      The data_size and file_size values can be obtained when
+;                      querying a database's information URI (GET /dbname/).
+;
+; * view_fragmentation - If the ratio (as an integer percentage), of the amount
+;                        of old data (and its supporting metadata) over the view
+;                        index (view group) file size is equal to or greater then
+;                        this value, then this view index compaction condition is
+;                        satisfied. This value is computed as:
+;
+;                            (file_size - data_size) / file_size * 100
+;
+;                        The data_size and file_size values can be obtained when
+;                        querying a view group's information URI
+;                        (GET /dbname/_design/groupname/_info).
+;
+; * from _and_ to - The period for which a database (and its view groups) compaction
+;                   is allowed. The value for these parameters must obey the format:
+;
+;                   HH:MM - HH:MM  (HH in [0..23], MM in [0..59])
+;
+; * strict_window - If a compaction is still running after the end of the allowed
+;                   period, it will be canceled if this parameter is set to 'true'.
+;                   It defaults to 'false' and it's meaningful only if the *period*
+;                   parameter is also specified.
+;
+; * parallel_view_compaction - If set to 'true', the database and its views are
+;                              compacted in parallel. This is only useful on
+;                              certain setups, like for example when the database
+;                              and view index directories point to different
+;                              disks. It defaults to 'false'.
+;
+; Before a compaction is triggered, an estimation of how much free disk space is
+; needed is computed. This estimation corresponds to 2 times the data size of
+; the database or view index. When there's not enough free disk space to compact
+; a particular database or view index, a warning message is logged.
+;
+; Examples:
+;
+; 1) [{db_fragmentation, "70%"}, {view_fragmentation, "60%"}]
+;    The `foo` database is compacted if its fragmentation is 70% or more.
+;    Any view index of this database is compacted only if its fragmentation
+;    is 60% or more.
+;
+; 2) [{db_fragmentation, "70%"}, {view_fragmentation, "60%"}, {from, "00:00"}, {to, "04:00"}]
+;    Similar to the preceding example but a compaction (database or view index)
+;    is only triggered if the current time is between midnight and 4 AM.
+;
+; 3) [{db_fragmentation, "70%"}, {view_fragmentation, "60%"}, {from, "00:00"}, {to, "04:00"}, {strict_window, true}]
+;    Similar to the preceding example - a compaction (database or view index)
+;    is only triggered if the current time is between midnight and 4 AM. If at
+;    4 AM the database or one of its views is still compacting, the compaction
+;    process will be canceled.
+;
+; 4) [{db_fragmentation, "70%"}, {view_fragmentation, "60%"}, {from, "00:00"}, {to, "04:00"}, {strict_window, true}, {parallel_view_compaction, true}]
+;    Similar to the preceding example, but a database and its views can be
+;    compacted in parallel.
+;
+;_default = [{db_fragmentation, "70%"}, {view_fragmentation, "60%"}, {from, "23:00"}, {to, "04:00"}]
+

http://git-wip-us.apache.org/repos/asf/couchdb/blob/7bf5cda8/rel/files/local.ini
----------------------------------------------------------------------
diff --git a/rel/files/local.ini b/rel/files/local.ini
new file mode 100644
index 0000000..8aae331
--- /dev/null
+++ b/rel/files/local.ini
@@ -0,0 +1,97 @@
+; CouchDB Configuration Settings
+
+; Custom settings should be made in this file. They will override settings
+; in default.ini, but unlike changes made to default.ini, this file won't be
+; overwritten on server upgrade.
+
+[couchdb]
+;max_document_size = 4294967296 ; bytes
+
+[httpd]
+;port = 5984
+;bind_address = 127.0.0.1
+; Options for the MochiWeb HTTP server.
+;server_options = [{backlog, 128}, {acceptor_pool_size, 16}]
+; For more socket options, consult Erlang's module 'inet' man page.
+;socket_options = [{recbuf, 262144}, {sndbuf, 262144}, {nodelay, true}]
+
+; Uncomment next line to trigger basic-auth popup on unauthorized requests.
+;WWW-Authenticate = Basic realm="administrator"
+
+; Uncomment next line to set the configuration modification whitelist. Only
+; whitelisted values may be changed via the /_config URLs. To allow the admin
+; to change this value over HTTP, remember to include {httpd,config_whitelist}
+; itself. Excluding it from the list would require editing this file to update
+; the whitelist.
+;config_whitelist = [{httpd,config_whitelist}, {log,level}, {etc,etc}]
+
+[query_servers]
+;nodejs = /usr/local/bin/couchjs-node /path/to/couchdb/share/server/main.js
+
+
+[httpd_global_handlers]
+;_google = {couch_httpd_proxy, handle_proxy_req, <<"http://www.google.com">>}
+
+[couch_httpd_auth]
+; If you set this to true, you should also uncomment the WWW-Authenticate line
+; above. If you don't configure a WWW-Authenticate header, CouchDB will send
+; Basic realm="server" in order to prevent you getting logged out.
+; require_valid_user = false
+
+[log]
+;level = debug
+
+[log_level_by_module]
+; In this section you can specify any of the four log levels 'none', 'info',
+; 'error' or 'debug' on a per-module basis. See src/*/*.erl for various
+; modules.
+;couch_httpd = error
+
+
+[os_daemons]
+; For any commands listed here, CouchDB will attempt to ensure that
+; the process remains alive. Daemons should monitor their environment
+; to know when to exit. This can most easily be accomplished by exiting
+; when stdin is closed.
+;foo = /path/to/command -with args
+
+[daemons]
+; enable SSL support by uncommenting the following line and supply the PEM's below.
+; the default ssl port CouchDB listens on is 6984
+; httpsd = {couch_httpd, start_link, [https]}
+
+[ssl]
+;cert_file = /full/path/to/server_cert.pem
+;key_file = /full/path/to/server_key.pem
+;password = somepassword
+; set to true to validate peer certificates
+verify_ssl_certificates = false
+; Path to file containing PEM encoded CA certificates (trusted
+; certificates used for verifying a peer certificate). May be omitted if
+; you do not want to verify the peer.
+;cacert_file = /full/path/to/cacertf
+; The verification fun (optional) if not specified, the default
+; verification fun will be used.
+;verify_fun = {Module, VerifyFun}
+; maximum peer certificate depth
+ssl_certificate_max_depth = 1
+
+; To enable Virtual Hosts in CouchDB, add a vhost = path directive. All requests to
+; the Virual Host will be redirected to the path. In the example below all requests
+; to http://example.com/ are redirected to /database.
+; If you run CouchDB on a specific port, include the port number in the vhost:
+; example.com:5984 = /database
+[vhosts]
+;example.com = /database/
+
+[update_notification]
+;unique notifier name=/full/path/to/exe -with "cmd line arg"
+
+; To create an admin account uncomment the '[admins]' section below and add a
+; line in the format 'username = password'. When you next start CouchDB, it
+; will change the password to a hash (so that your passwords don't linger
+; around in plain-text files). You can add more admin accounts with more
+; 'username = password' lines. Don't forget to restart CouchDB after
+; changing this.
+[admins]
+;admin = mysecretpassword

http://git-wip-us.apache.org/repos/asf/couchdb/blob/7bf5cda8/rel/files/vm.args
----------------------------------------------------------------------
diff --git a/rel/files/vm.args b/rel/files/vm.args
new file mode 100644
index 0000000..33f615e
--- /dev/null
+++ b/rel/files/vm.args
@@ -0,0 +1,24 @@
+## Name of the node
+-name {{node}}
+
+## Cookie for distributed erlang
+-setcookie {{cookie}}
+
+## Heartbeat management; auto-restarts VM if it dies or becomes unresponsive
+#-heart
+
+## Enable kernel poll and a few async threads
++K true
++A 64
+
+## Treat error_logger warnings as warnings
++W w
+
+## Increase number of concurrent ports/sockets
+-env ERL_MAX_PORTS 131072
+
+## Tweak GC to run more often
+-env ERL_FULLSWEEP_AFTER 0
+
+## Set the location of crash dumps
+-env ERL_CRASH_DUMP {{crash_dump}}

http://git-wip-us.apache.org/repos/asf/couchdb/blob/7bf5cda8/rel/reltool.config.script
----------------------------------------------------------------------
diff --git a/rel/reltool.config.script b/rel/reltool.config.script
new file mode 100644
index 0000000..fb1bcf9
--- /dev/null
+++ b/rel/reltool.config.script
@@ -0,0 +1,149 @@
+%% -*- tab-width: 4;erlang-indent-level: 4;indent-tabs-mode: nil -*-
+%% ex: ft=erlang ts=4 sw=4 et
+%%
+% Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+%
+% Unless required by applicable law or agreed to in writing, software
+% distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+% WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+% License for the specific language governing permissions and limitations under
+% the License.
+
+Cfg = case file:consult("../pkg.vars.config") of
+          {ok, Terms} ->
+              Terms;
+          _Err ->
+              []
+      end,
+
+
+%% get version infos
+MajorVersion = integer_to_list(proplists:get_value(version_major, Cfg, 0)),
+MinorVersion = integer_to_list(proplists:get_value(version_minor, Cfg, 0)),
+RevVersion = integer_to_list(proplists:get_value(version_revision, Cfg, 0)),
+StageVersion = proplists:get_value(version_stage, Cfg, ""),
+RelVersion = proplists:get_value(version_release, Cfg, ""),
+
+%% build the version
+BaseVersion = MajorVersion ++ "." ++ MinorVersion ++ "." ++ RevVersion,
+SecondaryVersion = StageVersion ++ RelVersion,
+Vsn = case os:getenv("RELEASE") of
+    "1" ->
+        BaseVersion;
+    _ ->
+        BaseVersion ++ SecondaryVersion
+end,
+
+
+{sys, [
+        {lib_dirs, ["../deps", "../apps"]},
+        {rel, "couchdb", Vsn,
+            [
+                kernel,
+                stdlib,
+                sasl,
+                public_key,
+                ssl,
+                os_mon,
+                crypto,
+                inets,
+                xmerl,
+                runtime_tools,
+                mochiweb,
+                ibrowse,
+                oauth,
+                jiffy,
+                snappy,
+                couch_stats,
+                couch,
+                couch_collates,
+                couch_index,
+                couch_mrview,
+                couch_replicator,
+                couch_dbupdates,
+                couch_plugins
+            ]},
+        {rel, "start_clean", "", [kernel, stdlib]},
+        {boot_rel, "couch"},
+        {profile, embedded},
+        {relocatable, true},
+        {app_file, strip},
+        {debug_info, strip},
+        {incl_cond, exclude},
+
+        {excl_sys_filters, ["^bin/.*", "^erts.*/bin/(dialyzer|typer)"]},
+        {excl_archive_filters, [".*"]},
+
+        %% stdlib
+        {app, asn1, [{incl_cond, include}]},
+        {app, sasl, [{incl_cond, include}]},
+        {app, crypto, [{incl_cond, include}]},
+        {app, public_key, [{incl_cond, include}]},
+        {app, ssl, [{incl_cond, include}]},
+        {app, xmerl, [{incl_cond, include}]},
+
+        {app, kernel, [{incl_cond, include}]},
+        {app, stdlib, [{incl_cond, include}]},
+        {app, inets, [{incl_cond, include}]},
+        {app, os_mon, [{incl_cond, include}]},
+        {app, compiler, [{incl_cond, include}]},
+        {app, syntax_tools, [{incl_cond, include}]},
+        {app, runtime_tools, [{incl_cond, include}]},
+
+        %% dependencies
+        {app, mochiweb, [{incl_cond, include}]},
+        {app, oauth, [{incl_cond, include}]},
+        {app, jiffy, [{incl_cond, include}]},
+        {app, snappy, [{incl_cond, include}]},
+        {app, ibrowse, [{incl_cond, include}]},
+
+        %% couchdb
+        {app, couch, [{incl_cond, include}]},
+        {app, couch_collate, [{incl_cond, include}]},
+        {app, couch_index, [{incl_cond, include}]},
+        {app, couch_mrview, [{incl_cond, include}]},
+        {app, couch_replicator, [{incl_cond, include}]},
+        {app, couch_dbupdates, [{incl_cond, include}]},
+        {app, couch_pluguns, [{incl_cond, include}]}
+
+    ]}.
+
+{target_dir, "apache-couchdb"}.
+
+{overlay_vars, "vars.config"}.
+
+{overlay, [
+    {mkdir, "log"},
+    {mkdir, "run"},
+    {mkdir, "data"},
+
+    %% keep empty files
+    {copy, "files/empty", "log/KEEP"},
+    {copy, "files/empty", "data/KEEP"},
+
+    %% Copy base files for starting and interacting w/ node
+    {copy, "../deps/node_package/priv/base/erl", "{{erts_vsn}}/bin/erl"},
+    {copy, "../deps/node_package/priv/base/nodetool", "{{erts_vsn}}/bin/nodetool"},
+    {template, "../deps/node_package/priv/base/runner",  "bin/couch"},
+    {template, "../deps/node_package/priv/base/env.sh", "lib/env.sh"},
+
+
+    %% config files
+    {template, "files/app.config", "etc/app.config"},
+    {template, "files/vm.args", "etc/vm.args"},
+    {template, "files/couch.ini", "etc/couch.ini"},
+    {template, "files/local.ini", "etc/local.ini"},
+
+    %% couchdb data files
+    {copy, "../share"},
+    {copy, "../apps/couch/couchjs", "bin/couchjs"},
+
+    %% misc
+    {mkdir, "lib/couch-patches"},
+    {copy, "../apps/couch_rel/ebin/etop_txt.beam", "lib/couch-patches"}
+
+]}.

http://git-wip-us.apache.org/repos/asf/couchdb/blob/7bf5cda8/rel/vars.config
----------------------------------------------------------------------
diff --git a/rel/vars.config b/rel/vars.config
new file mode 100644
index 0000000..c30c13c
--- /dev/null
+++ b/rel/vars.config
@@ -0,0 +1,53 @@
+%% -*- tab-width: 4;erlang-indent-level: 4;indent-tabs-mode: nil -*-
+%% ex: ft=erlang ts=4 sw=4 et
+
+% Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+%
+% Unless required by applicable law or agreed to in writing, software
+% distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+% WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+% License for the specific language governing permissions and limitations under
+% the License.
+
+%% Platform-specific installation paths
+{platform_bin_dir,  "./bin"}.
+{platform_data_dir, "./data"}.
+{platform_view_dir, "./data"}.
+{platform_etc_dir,  "./etc"}.
+{platform_lib_dir,  "./lib"}.
+{platform_log_dir,  "./log"}.
+{platform_run_dir,  "./run"}.
+{platform_share_dir, "./share"}.
+
+%% vendor info
+{vendor_name, "The Apache Software Foundation"}.
+
+%% couchjs name
+{couchjs_name, "couchjs"}.
+
+
+%% app config
+{couchdb_ip, "0.0.0.0"}.
+{couchdb_port, 5984}.
+{ssl_port, 6986}.
+{sasl_error_log, "log/sasl-error.log"}.
+{sasl_log_dir, "log/sasl"}.
+
+%% node
+{node, "couchdb@127.0.0.1"}.
+{cookie, "couchdb"}.
+{crash_dump,   "log/erl_crash.dump"}.
+
+{runner_script_dir,  "$(cd ${0%/*} && pwd)"}.
+{runner_base_dir,    "{{runner_script_dir}}/.."}.
+{runner_etc_dir,     "$RUNNER_BASE_DIR/etc"}.
+{runner_log_dir,     "$RUNNER_BASE_DIR/log"}.
+{runner_lib_dir,     "$RUNNER_BASE_DIR/lib"}.
+{runner_patch_dir,   "$RUNNER_BASE_DIR/lib/couchdb-patches"}.
+{pipe_dir,           "/tmp/$RUNNER_BASE_DIR/"}.
+{runner_user,        ""}.
+{runner_wait_process, "couch_server_sup"}.

http://git-wip-us.apache.org/repos/asf/couchdb/blob/7bf5cda8/vars.config.in
----------------------------------------------------------------------
diff --git a/vars.config.in b/vars.config.in
deleted file mode 100644
index bcceefe..0000000
--- a/vars.config.in
+++ /dev/null
@@ -1,27 +0,0 @@
-%% -*- tab-width: 4;erlang-indent-level: 4;indent-tabs-mode: nil -*-
-%% ex: ft=erlang ts=4 sw=4 et
-
-% Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
-%
-% Unless required by applicable law or agreed to in writing, software
-% distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-% WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-% License for the specific language governing permissions and limitations under
-% the License.
-
-{package_author_name, "The Apache Software Foundation"}.
-{package_author_address, "dev@couchdb.apache.org"}.
-{package_identifier, "couchdb"}.
-{package_tarname, "apache-couchdb"}.
-{package_name, "Apache CouchDB"}.
-{package_bugreport, "https://issues.apache.org/jira/browse/COUCHDB"}.
-{version_major, 1}.
-{version_minor, 6}.
-{version_revision, 0}.
-{version_stage, "+build"}.
-{version_release, ".%revision%"}.
-{couchjs_name, "couchjs"}.


Mime
View raw message