Skip to content

Commit 9e6524b

Browse files
author
Matthias Radestock
committed
merge default into bug20399
2 parents f83fd77 + ef14e00 commit 9e6524b

21 files changed

+355
-117
lines changed

.hgignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ syntax: regexp
1111
^include/rabbit_framing\.hrl$
1212
^src/rabbit_framing\.erl$
1313
^rabbit\.plt$
14+
^basic.plt$
1415
^ebin/rabbit\.(app|rel|boot|script)$
1516
^plugins/
1617
^priv/plugins/

Makefile

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,16 @@ SOURCE_DIR=src
1111
EBIN_DIR=ebin
1212
INCLUDE_DIR=include
1313
SOURCES=$(wildcard $(SOURCE_DIR)/*.erl)
14-
BEAM_TARGETS=$(EBIN_DIR)/rabbit_framing.beam $(patsubst $(SOURCE_DIR)/%.erl, $(EBIN_DIR)/%.beam,$(SOURCES))
14+
BEAM_TARGETS=$(EBIN_DIR)/rabbit_framing.beam $(patsubst $(SOURCE_DIR)/%.erl, $(EBIN_DIR)/%.beam, $(SOURCES))
1515
TARGETS=$(EBIN_DIR)/rabbit.app $(BEAM_TARGETS)
1616
WEB_URL=http://stage.rabbitmq.com/
1717
MANPAGES=$(patsubst %.pod, %.gz, $(wildcard docs/*.[0-9].pod))
1818

1919
PYTHON=python
2020

21+
BASIC_PLT=basic.plt
22+
RABBIT_PLT=rabbit.plt
23+
2124
ifndef USE_SPECS
2225
# our type specs rely on features / bug fixes in dialyzer that are
2326
# only available in R13B upwards (R13B is eshell 5.7.1)
@@ -39,6 +42,8 @@ AMQP_SPEC_JSON_PATH=$(AMQP_CODEGEN_DIR)/amqp-0.8.json
3942

4043
ERL_CALL=erl_call -sname $(RABBITMQ_NODENAME) -e
4144

45+
ERL_EBIN=erl -noinput -pa $(EBIN_DIR)
46+
4247
all: $(TARGETS)
4348

4449
$(EBIN_DIR)/rabbit.app: $(EBIN_DIR)/rabbit_app.in $(BEAM_TARGETS) generate_app
@@ -57,17 +62,32 @@ $(INCLUDE_DIR)/rabbit_framing.hrl: codegen.py $(AMQP_CODEGEN_DIR)/amqp_codegen.p
5762
$(SOURCE_DIR)/rabbit_framing.erl: codegen.py $(AMQP_CODEGEN_DIR)/amqp_codegen.py $(AMQP_SPEC_JSON_PATH)
5863
$(PYTHON) codegen.py body $(AMQP_SPEC_JSON_PATH) $@
5964

60-
$(EBIN_DIR)/rabbit.boot $(EBIN_DIR)/rabbit.script: $(EBIN_DIR)/rabbit.app $(EBIN_DIR)/rabbit.rel $(TARGETS)
61-
erl -noshell -eval 'systools:make_script("ebin/rabbit", [{path, ["ebin"]}]), halt().'
65+
dialyze: $(BEAM_TARGETS) $(BASIC_PLT)
66+
$(ERL_EBIN) -eval \
67+
"rabbit_dialyzer:halt_with_code(rabbit_dialyzer:dialyze_files(\"$(BASIC_PLT)\", \"$(BEAM_TARGETS)\"))."
68+
69+
# rabbit.plt is used by rabbitmq-erlang-client's dialyze make target
70+
create-plt: $(RABBIT_PLT)
6271

63-
dialyze: $(BEAM_TARGETS)
64-
dialyzer -c $?
72+
$(RABBIT_PLT): $(BEAM_TARGETS) $(BASIC_PLT)
73+
cp $(BASIC_PLT) $@
74+
$(ERL_EBIN) -eval \
75+
"rabbit_dialyzer:halt_with_code(rabbit_dialyzer:add_to_plt(\"$@\", \"$(BEAM_TARGETS)\"))."
76+
77+
$(BASIC_PLT): $(BEAM_TARGETS)
78+
if [ -f $@ ]; then \
79+
touch $@; \
80+
else \
81+
$(ERL_EBIN) -eval \
82+
"rabbit_dialyzer:halt_with_code(rabbit_dialyzer:create_basic_plt(\"$@\"))."; \
83+
fi
6584

6685
clean:
6786
rm -f $(EBIN_DIR)/*.beam
68-
rm -f $(EBIN_DIR)/rabbit.app $(EBIN_DIR)/rabbit.boot $(EBIN_DIR)/rabbit.script
87+
rm -f $(EBIN_DIR)/rabbit.app $(EBIN_DIR)/rabbit.boot $(EBIN_DIR)/rabbit.script $(EBIN_DIR)/rabbit.rel
6988
rm -f $(INCLUDE_DIR)/rabbit_framing.hrl $(SOURCE_DIR)/rabbit_framing.erl codegen.pyc
7089
rm -f docs/*.[0-9].gz
90+
rm -f $(RABBIT_PLT)
7191

7292
cleandb:
7393
rm -rf $(RABBITMQ_MNESIA_DIR)/*
@@ -82,13 +102,14 @@ BASIC_SCRIPT_ENVIRONMENT_SETTINGS=\
82102

83103
run: all
84104
$(BASIC_SCRIPT_ENVIRONMENT_SETTINGS) \
85-
RABBITMQ_NODE_ONLY=true \
86-
RABBITMQ_SERVER_START_ARGS="$(RABBITMQ_SERVER_START_ARGS) -s rabbit" \
105+
RABBITMQ_ALLOW_INPUT=true \
106+
RABBITMQ_SERVER_START_ARGS="$(RABBITMQ_SERVER_START_ARGS)" \
87107
./scripts/rabbitmq-server
88108

89109
run-node: all
90110
$(BASIC_SCRIPT_ENVIRONMENT_SETTINGS) \
91111
RABBITMQ_NODE_ONLY=true \
112+
RABBITMQ_ALLOW_INPUT=true \
92113
RABBITMQ_SERVER_START_ARGS="$(RABBITMQ_SERVER_START_ARGS)" \
93114
./scripts/rabbitmq-server
94115

@@ -173,7 +194,7 @@ install: all docs_all install_dirs
173194
cp -r ebin include LICENSE LICENSE-MPL-RabbitMQ INSTALL $(TARGET_DIR)
174195

175196
chmod 0755 scripts/*
176-
for script in rabbitmq-env rabbitmq-server rabbitmqctl rabbitmq-multi rabbitmq-activate-plugins; do \
197+
for script in rabbitmq-env rabbitmq-server rabbitmqctl rabbitmq-multi rabbitmq-activate-plugins rabbitmq-deactivate-plugins; do \
177198
cp scripts/$$script $(TARGET_DIR)/sbin; \
178199
[ -e $(SBIN_DIR)/$$script ] || ln -s $(SCRIPTS_REL_PATH)/$$script $(SBIN_DIR)/$$script; \
179200
done

docs/rabbitmq-activate-plugins.1.pod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ execute:
2626
=head1 SEE ALSO
2727

2828
L<rabbitmq.conf(5)>, L<rabbitmq-multi(1)>, L<rabbitmq-server(1)>,
29-
L<rabbitmqctl(1)>
29+
L<rabbitmqctl(1)>, L<rabbitmq-deactivate-plugins(1)>
3030

3131
=head1 AUTHOR
3232

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
=head1 NAME
2+
3+
rabbitmq-deactivate-plugins - command line tool for deactivating plugins
4+
in a RabbitMQ broker
5+
6+
=head1 SYNOPSIS
7+
8+
rabbitmq-deactivate-plugins
9+
10+
=head1 DESCRIPTION
11+
12+
RabbitMQ is an implementation of AMQP, the emerging standard for high
13+
performance enterprise messaging. The RabbitMQ server is a robust and
14+
scalable implementation of an AMQP broker.
15+
16+
rabbitmq-deactivate-plugins is a command line tool for deactivating
17+
plugins installed into the broker.
18+
19+
=head1 EXAMPLES
20+
21+
To deactivate all of the installed plugins in the current RabbitMQ install,
22+
execute:
23+
24+
rabbitmq-deactivate-plugins
25+
26+
=head1 SEE ALSO
27+
28+
L<rabbitmq.conf(5)>, L<rabbitmq-multi(1)>, L<rabbitmq-server(1)>,
29+
L<rabbitmqctl(1)>, L<rabbitmq-activate-plugins(1)>
30+
31+
=head1 AUTHOR
32+
33+
The RabbitMQ Team <[email protected]>
34+
35+
=head1 REFERENCES
36+
37+
RabbitMQ Web Site: L<http://www.rabbitmq.com>

ebin/rabbit_app.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
{env, [{tcp_listeners, [{"0.0.0.0", 5672}]},
1818
{ssl_listeners, []},
1919
{ssl_options, []},
20-
{extra_startup_steps, []},
2120
{default_user, <<"guest">>},
2221
{default_pass, <<"guest">>},
2322
{default_vhost, <<"/">>},

packaging/RPMS/Fedora/rabbitmq-server.spec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ install -p -D -m 0755 %{_rabbit_wrapper} %{buildroot}%{_sbindir}/rabbitmqctl
5656
install -p -D -m 0755 %{_rabbit_wrapper} %{buildroot}%{_sbindir}/rabbitmq-server
5757
install -p -D -m 0755 %{_rabbit_wrapper} %{buildroot}%{_sbindir}/rabbitmq-multi
5858
install -p -D -m 0755 %{_rabbit_asroot_wrapper} %{buildroot}%{_sbindir}/rabbitmq-activate-plugins
59+
install -p -D -m 0755 %{_rabbit_asroot_wrapper} %{buildroot}%{_sbindir}/rabbitmq-deactivate-plugins
5960

6061
install -p -D -m 0644 %{S:3} %{buildroot}%{_sysconfdir}/logrotate.d/rabbitmq-server
6162

packaging/common/rabbitmq-asroot-script-wrapper

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
# Escape spaces and quotes, because shell is revolting.
3434
for arg in "$@" ; do
3535
# Escape quotes in parameters, so that they're passed through cleanly.
36-
arg=$(sed -e 's/"/\\"/' <<-END
36+
arg=$(sed -e 's/"/\\"/g' <<-END
3737
$arg
3838
END
3939
)

packaging/common/rabbitmq-script-wrapper

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
# Escape spaces and quotes, because shell is revolting.
3434
for arg in "$@" ; do
3535
# Escape quotes in parameters, so that they're passed through cleanly.
36-
arg=$(sed -e 's/"/\\"/' <<-END
36+
arg=$(sed -e 's/"/\\"/g' <<-END
3737
$arg
3838
END
3939
)

packaging/debs/Debian/debian/rules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ install/rabbitmq-server::
1717
for script in rabbitmqctl rabbitmq-server rabbitmq-multi; do \
1818
install -p -D -m 0755 debian/rabbitmq-script-wrapper $(DEB_DESTDIR)usr/sbin/$$script; \
1919
done
20-
for script in rabbitmq-activate-plugins; do \
20+
for script in rabbitmq-activate-plugins rabbitmq-deactivate-plugins; do \
2121
install -p -D -m 0755 debian/rabbitmq-asroot-script-wrapper $(DEB_DESTDIR)usr/sbin/$$script; \
2222
done

packaging/macports/net/rabbitmq-server/Portfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ post-destroot {
9494
${wrappersbin}/rabbitmq-activate-plugins
9595
file copy ${wrappersbin}/rabbitmq-multi ${wrappersbin}/rabbitmq-server
9696
file copy ${wrappersbin}/rabbitmq-multi ${wrappersbin}/rabbitmqctl
97+
file copy ${wrappersbin}/rabbitmq-activate-plugins ${wrappersbin}/rabbitmq-deactivate-plugins
9798
}
9899

99100
pre-install {

0 commit comments

Comments
 (0)