Merge branch 'stable'

This commit is contained in:
Daniil Fedotov 2017-08-30 19:20:38 +01:00
commit 61fb2316e8
6 changed files with 189 additions and 66 deletions

View File

@ -17,7 +17,7 @@
ERLANG_MK_FILENAME := $(realpath $(lastword $(MAKEFILE_LIST)))
export ERLANG_MK_FILENAME
ERLANG_MK_VERSION = 2.0.0-pre.2-256-g2cce185
ERLANG_MK_VERSION = 2.0.0-pre.2-278-gd9a9158
ERLANG_MK_WITHOUT =
# Make 3.81 and 3.82 are deprecated.
@ -2023,6 +2023,14 @@ pkg_ibrowse_fetch = git
pkg_ibrowse_repo = https://github.com/cmullaparthi/ibrowse
pkg_ibrowse_commit = master
PACKAGES += idna
pkg_idna_name = idna
pkg_idna_description = Erlang IDNA lib
pkg_idna_homepage = https://github.com/benoitc/erlang-idna
pkg_idna_fetch = git
pkg_idna_repo = https://github.com/benoitc/erlang-idna
pkg_idna_commit = master
PACKAGES += ierlang
pkg_ierlang_name = ierlang
pkg_ierlang_description = An Erlang language kernel for IPython.
@ -2298,9 +2306,9 @@ pkg_kvs_commit = master
PACKAGES += lager
pkg_lager_name = lager
pkg_lager_description = A logging framework for Erlang/OTP.
pkg_lager_homepage = https://github.com/basho/lager
pkg_lager_homepage = https://github.com/erlang-lager/lager
pkg_lager_fetch = git
pkg_lager_repo = https://github.com/basho/lager
pkg_lager_repo = https://github.com/erlang-lager/lager
pkg_lager_commit = master
PACKAGES += lager_amqp_backend
@ -2314,9 +2322,9 @@ pkg_lager_amqp_backend_commit = master
PACKAGES += lager_syslog
pkg_lager_syslog_name = lager_syslog
pkg_lager_syslog_description = Syslog backend for lager
pkg_lager_syslog_homepage = https://github.com/basho/lager_syslog
pkg_lager_syslog_homepage = https://github.com/erlang-lager/lager_syslog
pkg_lager_syslog_fetch = git
pkg_lager_syslog_repo = https://github.com/basho/lager_syslog
pkg_lager_syslog_repo = https://github.com/erlang-lager/lager_syslog
pkg_lager_syslog_commit = master
PACKAGES += lambdapad
@ -3786,9 +3794,9 @@ pkg_trie_commit = master
PACKAGES += triq
pkg_triq_name = triq
pkg_triq_description = Trifork QuickCheck
pkg_triq_homepage = https://github.com/krestenkrab/triq
pkg_triq_homepage = https://github.com/triqng/triq
pkg_triq_fetch = git
pkg_triq_repo = https://github.com/krestenkrab/triq
pkg_triq_repo = https://github.com/triqng/triq.git
pkg_triq_commit = master
PACKAGES += tunctl
@ -4280,7 +4288,7 @@ endef
# if given. Do it for all 3 possible Makefile file names.
ifeq ($(NO_AUTOPATCH_ERLANG_MK),)
define dep_autopatch_erlang_mk
$t for f in Makefile makefile GNUmakefile; do \
for f in Makefile makefile GNUmakefile; do \
if [ -f $(DEPS_DIR)/$1/$$f ]; then \
sed -i.bak s/'include *erlang.mk'/'include $$(if $$(ERLANG_MK_FILENAME),$$(ERLANG_MK_FILENAME),erlang.mk)'/ $(DEPS_DIR)/$1/$$f; \
fi \
@ -4357,6 +4365,8 @@ define dep_autopatch_rebar.erl
lists:foreach(fun
({d, D}) ->
Write("ERLC_OPTS += -D" ++ atom_to_list(D) ++ "=1\n");
({d, DKey, DVal}) ->
Write("ERLC_OPTS += -D" ++ atom_to_list(DKey) ++ "=" ++ atom_to_list(DVal) ++ "\n");
({i, I}) ->
Write(["ERLC_OPTS += -I ", I, "\n"]);
({platform_define, Regex, D}) ->
@ -4579,7 +4589,7 @@ define dep_autopatch_appsrc_script.erl
AppSrc = "$(call core_native_path,$(DEPS_DIR)/$1/src/$1.app.src)",
AppSrcScript = AppSrc ++ ".script",
Bindings = erl_eval:new_bindings(),
{ok, Conf} = file:script(AppSrcScript, Bindings),
{ok, [Conf]} = file:script(AppSrcScript, Bindings),
ok = file:write_file(AppSrc, io_lib:format("~p.~n", [Conf])),
halt()
endef
@ -4731,6 +4741,87 @@ ERLANG_MK_RECURSIVE_REL_DEPS_LIST = $(ERLANG_MK_TMP)/recursive-rel-deps-list.log
ERLANG_MK_RECURSIVE_TEST_DEPS_LIST = $(ERLANG_MK_TMP)/recursive-test-deps-list.log
ERLANG_MK_RECURSIVE_SHELL_DEPS_LIST = $(ERLANG_MK_TMP)/recursive-shell-deps-list.log
# Copyright (c) 2015-2017, Loïc Hoguin <essen@ninenines.eu>
# This file is part of erlang.mk and subject to the terms of the ISC License.
.PHONY: distclean-kerl
KERL_INSTALL_DIR ?= $(HOME)/erlang
ifeq ($(strip $(KERL)),)
KERL := $(ERLANG_MK_TMP)/kerl/kerl
endif
export KERL
KERL_GIT ?= https://github.com/kerl/kerl
KERL_COMMIT ?= master
KERL_MAKEFLAGS ?=
OTP_GIT ?= https://github.com/erlang/otp
define kerl_otp_target
ifeq ($(wildcard $(KERL_INSTALL_DIR)/$(1)),)
$(KERL_INSTALL_DIR)/$(1): $(KERL)
MAKEFLAGS="$(KERL_MAKEFLAGS)" $(KERL) build git $(OTP_GIT) $(1) $(1)
$(KERL) install $(1) $(KERL_INSTALL_DIR)/$(1)
endif
endef
define kerl_hipe_target
ifeq ($(wildcard $(KERL_INSTALL_DIR)/$1-native),)
$(KERL_INSTALL_DIR)/$1-native: $(KERL)
KERL_CONFIGURE_OPTIONS=--enable-native-libs \
MAKEFLAGS="$(KERL_MAKEFLAGS)" $(KERL) build git $(OTP_GIT) $1 $1-native
$(KERL) install $1-native $(KERL_INSTALL_DIR)/$1-native
endif
endef
$(KERL):
$(verbose) mkdir -p $(ERLANG_MK_TMP)
$(gen_verbose) git clone --depth 1 $(KERL_GIT) $(ERLANG_MK_TMP)/kerl
$(verbose) cd $(ERLANG_MK_TMP)/kerl && git checkout $(KERL_COMMIT)
$(verbose) chmod +x $(KERL)
distclean:: distclean-kerl
distclean-kerl:
$(gen_verbose) rm -rf $(KERL)
# Allow users to select which version of Erlang/OTP to use for a project.
ERLANG_OTP ?=
ERLANG_HIPE ?=
# Use kerl to enforce a specific Erlang/OTP version for a project.
ifneq ($(strip $(ERLANG_OTP)),)
export PATH := $(KERL_INSTALL_DIR)/$(ERLANG_OTP)/bin:$(PATH)
SHELL := env PATH=$(PATH) $(SHELL)
$(eval $(call kerl_otp_target,$(ERLANG_OTP)))
# Build Erlang/OTP only if it doesn't already exist.
ifeq ($(wildcard $(KERL_INSTALL_DIR)/$(ERLANG_OTP))$(BUILD_ERLANG_OTP),)
$(info Building Erlang/OTP $(ERLANG_OTP)... Please wait...)
$(shell $(MAKE) $(KERL_INSTALL_DIR)/$(ERLANG_OTP) ERLANG_OTP=$(ERLANG_OTP) BUILD_ERLANG_OTP=1 >&2)
endif
else
# Same for a HiPE enabled VM.
ifneq ($(strip $(ERLANG_HIPE)),)
export PATH := $(KERL_INSTALL_DIR)/$(ERLANG_HIPE)-native/bin:$(PATH)
SHELL := env PATH=$(PATH) $(SHELL)
$(eval $(call kerl_hipe_target,$(ERLANG_HIPE)))
# Build Erlang/OTP only if it doesn't already exist.
ifeq ($(wildcard $(KERL_INSTALL_DIR)/$(ERLANG_HIPE))$(BUILD_ERLANG_OTP),)
$(info Building HiPE-enabled Erlang/OTP $(ERLANG_OTP)... Please wait...)
$(shell $(MAKE) $(KERL_INSTALL_DIR)/$(ERLANG_HIPE) ERLANG_HIPE=$(ERLANG_HIPE) BUILD_ERLANG_OTP=1 >&2)
endif
endif
endif
# Copyright (c) 2015-2016, Loïc Hoguin <essen@ninenines.eu>
# This file is part of erlang.mk and subject to the terms of the ISC License.
@ -5966,10 +6057,10 @@ else
$(call render_template,bs_erl_nif,src/$n.erl)
endif
# Copyright (c) 2015-2016, Loïc Hoguin <essen@ninenines.eu>
# Copyright (c) 2015-2017, Loïc Hoguin <essen@ninenines.eu>
# This file is part of erlang.mk and subject to the terms of the ISC License.
.PHONY: ci ci-prepare ci-setup distclean-kerl
.PHONY: ci ci-prepare ci-setup
CI_OTP ?=
CI_HIPE ?=
@ -5987,24 +6078,9 @@ ifeq ($(strip $(CI_OTP) $(CI_HIPE) $(CI_ERLLVM)),)
ci::
else
ifeq ($(strip $(KERL)),)
KERL := $(ERLANG_MK_TMP)/kerl/kerl
endif
export KERL
KERL_GIT ?= https://github.com/kerl/kerl
KERL_COMMIT ?= master
KERL_MAKEFLAGS ?=
OTP_GIT ?= https://github.com/erlang/otp
CI_INSTALL_DIR ?= $(HOME)/erlang
ci:: $(addprefix ci-,$(CI_OTP) $(addsuffix -native,$(CI_HIPE)) $(addsuffix -erllvm,$(CI_ERLLVM)))
ci-prepare: $(addprefix $(CI_INSTALL_DIR)/,$(CI_OTP) $(addsuffix -native,$(CI_HIPE)))
ci-prepare: $(addprefix $(KERL_INSTALL_DIR)/,$(CI_OTP) $(addsuffix -native,$(CI_HIPE)))
ci-setup::
@ -6014,10 +6090,10 @@ ci_verbose_0 = @echo " CI " $(1);
ci_verbose = $(ci_verbose_$(V))
define ci_target
ci-$1: $(CI_INSTALL_DIR)/$2
ci-$1: $(KERL_INSTALL_DIR)/$2
$(verbose) $(MAKE) --no-print-directory clean
$(ci_verbose) \
PATH="$(CI_INSTALL_DIR)/$2/bin:$(PATH)" \
PATH="$(KERL_INSTALL_DIR)/$2/bin:$(PATH)" \
CI_OTP_RELEASE="$1" \
CT_OPTS="-label $1" \
CI_VM="$3" \
@ -6029,32 +6105,8 @@ $(foreach otp,$(CI_OTP),$(eval $(call ci_target,$(otp),$(otp),otp)))
$(foreach otp,$(CI_HIPE),$(eval $(call ci_target,$(otp)-native,$(otp)-native,native)))
$(foreach otp,$(CI_ERLLVM),$(eval $(call ci_target,$(otp)-erllvm,$(otp)-native,erllvm)))
define ci_otp_target
ifeq ($(wildcard $(CI_INSTALL_DIR)/$(1)),)
$(CI_INSTALL_DIR)/$(1): $(KERL)
MAKEFLAGS="$(KERL_MAKEFLAGS)" $(KERL) build git $(OTP_GIT) $(1) $(1)
$(KERL) install $(1) $(CI_INSTALL_DIR)/$(1)
endif
endef
$(foreach otp,$(CI_OTP),$(eval $(call ci_otp_target,$(otp))))
define ci_hipe_target
ifeq ($(wildcard $(CI_INSTALL_DIR)/$1-native),)
$(CI_INSTALL_DIR)/$1-native: $(KERL)
KERL_CONFIGURE_OPTIONS=--enable-native-libs \
MAKEFLAGS="$(KERL_MAKEFLAGS)" $(KERL) build git $(OTP_GIT) $1 $1-native
$(KERL) install $1-native $(CI_INSTALL_DIR)/$1-native
endif
endef
$(foreach otp,$(sort $(CI_HIPE) $(CI_ERLLLVM)),$(eval $(call ci_hipe_target,$(otp))))
$(KERL):
$(verbose) mkdir -p $(ERLANG_MK_TMP)
$(gen_verbose) git clone --depth 1 $(KERL_GIT) $(ERLANG_MK_TMP)/kerl
$(verbose) cd $(ERLANG_MK_TMP)/kerl && git checkout $(KERL_COMMIT)
$(verbose) chmod +x $(KERL)
$(foreach otp,$(CI_OTP),$(eval $(call kerl_otp_target,$(otp))))
$(foreach otp,$(sort $(CI_HIPE) $(CI_ERLLLVM)),$(eval $(call kerl_hipe_target,$(otp))))
help::
$(verbose) printf "%s\n" "" \
@ -6064,10 +6116,6 @@ help::
"The CI_OTP variable must be defined with the Erlang versions" \
"that must be tested. For example: CI_OTP = OTP-17.3.4 OTP-17.5.3"
distclean:: distclean-kerl
distclean-kerl:
$(gen_verbose) rm -rf $(KERL)
endif
# Copyright (c) 2013-2016, Loïc Hoguin <essen@ninenines.eu>
@ -6433,6 +6481,60 @@ apps-eunit:
endif
endif
# Copyright (c) 2015-2017, Loïc Hoguin <essen@ninenines.eu>
# This file is part of erlang.mk and subject to the terms of the ISC License.
ifeq ($(filter proper,$(DEPS) $(TEST_DEPS)),proper)
.PHONY: proper
# Targets.
tests:: proper
define proper_check.erl
code:add_pathsa(["$(call core_native_path,$(CURDIR)/ebin)", "$(call core_native_path,$(DEPS_DIR)/*/ebin)"]),
Module = fun(M) ->
[true] =:= lists:usort([
case atom_to_list(F) of
"prop_" ++ _ ->
io:format("Testing ~p:~p/0~n", [M, F]),
proper:quickcheck(M:F());
_ ->
true
end
|| {F, 0} <- M:module_info(exports)])
end,
try
case $(1) of
all -> [true] =:= lists:usort([Module(M) || M <- [$(call comma_list,$(3))]]);
module -> Module($(2));
function -> proper:quickcheck($(2))
end
of
true -> halt(0);
_ -> halt(1)
catch error:undef ->
io:format("Undefined property or module?~n~p~n", [erlang:get_stacktrace()]),
halt(0)
end.
endef
ifdef t
ifeq (,$(findstring :,$(t)))
proper: test-build
$(verbose) $(call erlang,$(call proper_check.erl,module,$(t)))
else
proper: test-build
$(verbose) echo Testing $(t)/0
$(verbose) $(call erlang,$(call proper_check.erl,function,$(t)()))
endif
else
proper: test-build
$(eval MODULES := $(patsubst %,'%',$(sort $(notdir $(basename $(wildcard ebin/*.beam))))))
$(gen_verbose) $(call erlang,$(call proper_check.erl,all,undefined,$(MODULES)))
endif
endif
# Copyright (c) 2013-2016, Loïc Hoguin <essen@ninenines.eu>
# This file is part of erlang.mk and subject to the terms of the ISC License.
@ -6443,7 +6545,7 @@ endif
RELX ?= $(ERLANG_MK_TMP)/relx
RELX_CONFIG ?= $(CURDIR)/relx.config
RELX_URL ?= https://github.com/erlware/relx/releases/download/v3.19.0/relx
RELX_URL ?= https://github.com/erlware/relx/releases/download/v3.23.0/relx
RELX_OPTS ?=
RELX_OUTPUT_DIR ?= _rel
RELX_REL_EXT ?=
@ -6489,7 +6591,7 @@ distclean-relx-rel:
# Run target.
ifeq ($(wildcard $(RELX_CONFIG)),)
run:
run::
else
define get_relx_release.erl
@ -6513,7 +6615,7 @@ ifeq ($(PLATFORM),msys2)
RELX_REL_EXT := .cmd
endif
run: all
run:: all
$(verbose) $(RELX_OUTPUT_DIR)/$(RELX_REL_NAME)/bin/$(RELX_REL_NAME)$(RELX_REL_EXT) console
help::
@ -6579,7 +6681,10 @@ ifeq ($(filter triq,$(DEPS) $(TEST_DEPS)),triq)
tests:: triq
define triq_check.erl
code:add_pathsa(["$(call core_native_path,$(CURDIR)/ebin)", "$(call core_native_path,$(DEPS_DIR)/*/ebin)"]),
code:add_pathsa([
"$(call core_native_path,$(CURDIR)/ebin)",
"$(call core_native_path,$(DEPS_DIR)/*/ebin)",
"$(call core_native_path,$(TEST_DIR))"]),
try
case $(1) of
all -> [true] =:= lists:usort([triq:check(M) || M <- [$(call comma_list,$(3))]]);
@ -6590,7 +6695,7 @@ define triq_check.erl
true -> halt(0);
_ -> halt(1)
catch error:undef ->
io:format("Undefined property or module~n"),
io:format("Undefined property or module?~n~p~n", [erlang:get_stacktrace()]),
halt(0)
end.
endef
@ -6606,7 +6711,8 @@ triq: test-build
endif
else
triq: test-build
$(eval MODULES := $(patsubst %,'%',$(sort $(notdir $(basename $(wildcard ebin/*.beam))))))
$(eval MODULES := $(patsubst %,'%',$(sort $(notdir $(basename \
$(wildcard ebin/*.beam) $(call core_find,$(TEST_DIR)/,*.beam))))))
$(gen_verbose) $(call erlang,$(call triq_check.erl,all,undefined,$(MODULES)))
endif
endif

View File

@ -586,6 +586,16 @@ function fmt_shortened_uri(uri) {
}
}
function fmt_uri_with_credentials(uri) {
if (typeof uri == 'string') {
// mask password
var mask = /^([a-zA-Z0-9+-.]+):\/\/(.*):(.*)@/;
return uri.replace(mask, "$1://$2:[redacted]@");
} else {
return UNKNOWN_REPR;
}
}
function fmt_client_name(properties) {
var res = [];
if (properties.product != undefined) {

View File

@ -21,6 +21,7 @@ var KNOWN_ARGS = {'alternate-exchange': {'short': 'AE', 'type': 'string'
'x-max-length-bytes': {'short': 'Lim B', 'type': 'int'},
'x-dead-letter-exchange': {'short': 'DLX', 'type': 'string'},
'x-dead-letter-routing-key': {'short': 'DLK', 'type': 'string'},
'x-queue-master-locator': {'short': 'ML', 'type': 'string'},
'x-max-priority': {'short': 'Pri', 'type': 'int'}};
// Things that are like arguments that we format the same way in listings.

View File

@ -35,6 +35,9 @@ HELP = {
'queue-lazy':
'Set the queue into lazy mode, keeping as many messages as possible on disk to reduce RAM usage; if not set, the queue will keep an in-memory cache to deliver messages as fast as possible.<br/>(Sets the "<a target="_blank" href="https://www.rabbitmq.com/lazy-queues.html">x-queue-mode</a>" argument.)',
'queue-master-locator':
'Set the queue into master location mode, determining the rule by which the queue master is located when declared on a cluster of nodes.<br/>(Sets the "<a target="_blank" href="https://www.rabbitmq.com/ha.html">x-queue-master-locator</a>" argument.)',
'queue-messages':
'<p>Message counts.</p><p>Note that "in memory" and "persistent" are not mutually exclusive; persistent messages can be in memory as well as on disc, and transient messages can be paged out if memory is tight. Non-durable queues will consider all messages to be transient.</p>',

View File

@ -119,7 +119,8 @@
<span class="argument-link" field="definition" key="max-length-bytes" type="number">Max length bytes</span><br/>
<span class="argument-link" field="definition" key="dead-letter-exchange" type="string">Dead letter exchange</span> |
<span class="argument-link" field="definition" key="dead-letter-routing-key" type="string">Dead letter routing key</span> |
<span class="argument-link" field="definition" key="queue-mode" type="string" value="lazy">Lazy mode</span>
<span class="argument-link" field="definition" key="queue-mode" type="string" value="lazy">Lazy mode</span> |
<span class="argument-link" field="definition" key="queue-master-locator" type="string">Master Locator</span>
</td>
</tr>
<tr>

View File

@ -256,6 +256,8 @@
<span class="argument-link" field="arguments" key="x-dead-letter-routing-key" type="string">Dead letter routing key</span> <span class="help" id="queue-dead-letter-routing-key"></span> |
<span class="argument-link" field="arguments" key="x-max-priority" type="number">Maximum priority</span> <span class="help" id="queue-max-priority"></span><br/>
<span class="argument-link" field="arguments" key="x-queue-mode" type="string" value="lazy">Lazy mode</span> <span class="help" id="queue-lazy"></span>
<span class="argument-link" field="arguments" key="x-queue-master-locator" type="string" value="">Master locator</span> <span class="help" id="queue-master-locator"></span>
</td>
</tr>
</table>