diff options
author | Simon MacMullen <simon@rabbitmq.com> | 2012-10-19 14:14:25 +0100 |
---|---|---|
committer | Simon MacMullen <simon@rabbitmq.com> | 2012-10-19 14:14:25 +0100 |
commit | 904f841d161001483cefaa5d9aacdb049f90204f (patch) | |
tree | c5556c66caadac783e133d9487bc73290d7d009e | |
parent | 919f1011640f8a95a52376ddad85d42da5d0f580 (diff) | |
parent | 804c4bb4f3396f4ef5d60d12fb5beb77634ffce9 (diff) | |
download | rabbitmq-server-904f841d161001483cefaa5d9aacdb049f90204f.tar.gz |
Merge bug25205
-rw-r--r-- | packaging/RPMS/Fedora/Makefile | 11 | ||||
-rw-r--r-- | packaging/RPMS/Fedora/rabbitmq-server.init | 4 | ||||
-rw-r--r-- | packaging/RPMS/Fedora/rabbitmq-server.spec | 10 | ||||
-rw-r--r-- | packaging/debs/Debian/debian/control | 4 | ||||
-rw-r--r-- | src/rabbit.erl | 6 | ||||
-rw-r--r-- | src/rabbit_backing_queue_qc.erl | 9 |
6 files changed, 33 insertions, 11 deletions
diff --git a/packaging/RPMS/Fedora/Makefile b/packaging/RPMS/Fedora/Makefile index 03e513f8..4f5f1327 100644 --- a/packaging/RPMS/Fedora/Makefile +++ b/packaging/RPMS/Fedora/Makefile @@ -13,13 +13,17 @@ RPM_OS=fedora endif ifeq "$(RPM_OS)" "suse" +FUNCTION_LIBRARY= REQUIRES=/sbin/chkconfig /sbin/service OS_DEFINES=--define '_initrddir /etc/init.d' --define 'dist .suse' -START_PROG=setsid +SPEC_DEFINES=--define 'group_tag Productivity/Networking/Other' +START_PROG=startproc else +FUNCTION_LIBRARY=\# Source function library.\n. /etc/init.d/functions REQUIRES=chkconfig initscripts OS_DEFINES=--define '_initrddir /etc/rc.d/init.d' -START_PROG=runuser rabbitmq --session-command +SPEC_DEFINES=--define 'group_tag Development/Libraries' +START_PROG=daemon endif rpms: clean server @@ -35,6 +39,7 @@ prepare: cp rabbitmq-server.init SOURCES/rabbitmq-server.init sed -i \ -e 's|^START_PROG=.*$$|START_PROG="$(START_PROG)"|' \ + -e 's|^@FUNCTION_LIBRARY@|$(FUNCTION_LIBRARY)|' \ SOURCES/rabbitmq-server.init ifeq "$(RPM_OS)" "fedora" # Fedora says that only vital services should have Default-Start @@ -47,7 +52,7 @@ endif cp rabbitmq-server.logrotate SOURCES/rabbitmq-server.logrotate server: prepare - rpmbuild -ba --nodeps SPECS/rabbitmq-server.spec $(DEFINES) $(OS_DEFINES) + rpmbuild -ba --nodeps SPECS/rabbitmq-server.spec $(DEFINES) $(OS_DEFINES) $(SPEC_DEFINES) clean: rm -rf SOURCES SPECS RPMS SRPMS BUILD tmp diff --git a/packaging/RPMS/Fedora/rabbitmq-server.init b/packaging/RPMS/Fedora/rabbitmq-server.init index 2d2680e3..3e48147b 100644 --- a/packaging/RPMS/Fedora/rabbitmq-server.init +++ b/packaging/RPMS/Fedora/rabbitmq-server.init @@ -10,12 +10,14 @@ # Provides: rabbitmq-server # Required-Start: $remote_fs $network # Required-Stop: $remote_fs $network -# Default-Start: 3 4 5 +# Default-Start: 3 5 # Default-Stop: 0 1 2 6 # Description: RabbitMQ broker # Short-Description: Enable AMQP service provided by RabbitMQ broker ### END INIT INFO +@FUNCTION_LIBRARY@ + PATH=/sbin:/usr/sbin:/bin:/usr/bin NAME=rabbitmq-server DAEMON=/usr/sbin/${NAME} diff --git a/packaging/RPMS/Fedora/rabbitmq-server.spec b/packaging/RPMS/Fedora/rabbitmq-server.spec index a6899005..d73c5634 100644 --- a/packaging/RPMS/Fedora/rabbitmq-server.spec +++ b/packaging/RPMS/Fedora/rabbitmq-server.spec @@ -3,8 +3,8 @@ Name: rabbitmq-server Version: %%VERSION%% Release: 1%{?dist} -License: MPLv1.1 -Group: Development/Libraries +License: MPLv1.1 and MIT and ASL 2.0 and BSD +Group: %{group_tag} Source: http://www.rabbitmq.com/releases/rabbitmq-server/v%{version}/%{name}-%{version}.tar.gz Source1: rabbitmq-server.init Source2: rabbitmq-script-wrapper @@ -31,8 +31,10 @@ scalable implementation of an AMQP broker. %define _rabbit_server_ocf %{_builddir}/`basename %{S:4}` %define _plugins_state_dir %{_localstatedir}/lib/rabbitmq/plugins + %define _maindir %{buildroot}%{_rabbit_erllibdir} + %prep %setup -q @@ -110,8 +112,8 @@ done %files -f ../%{name}.files %defattr(-,root,root,-) -%attr(0750, rabbitmq, rabbitmq) %dir %{_localstatedir}/lib/rabbitmq -%attr(0750, rabbitmq, rabbitmq) %dir %{_localstatedir}/log/rabbitmq +%attr(0755, rabbitmq, rabbitmq) %dir %{_localstatedir}/lib/rabbitmq +%attr(0755, rabbitmq, rabbitmq) %dir %{_localstatedir}/log/rabbitmq %dir %{_sysconfdir}/rabbitmq %{_initrddir}/rabbitmq-server %config(noreplace) %{_sysconfdir}/logrotate.d/rabbitmq-server diff --git a/packaging/debs/Debian/debian/control b/packaging/debs/Debian/debian/control index 943ed48f..d4526d87 100644 --- a/packaging/debs/Debian/debian/control +++ b/packaging/debs/Debian/debian/control @@ -5,12 +5,12 @@ Maintainer: RabbitMQ Team <packaging@rabbitmq.com> Uploaders: Emile Joubert <emile@rabbitmq.com> DM-Upload-Allowed: yes Build-Depends: cdbs, debhelper (>= 5), erlang-dev, python-simplejson, xmlto, xsltproc, erlang-nox (>= 1:12.b.3), erlang-src (>= 1:12.b.3), unzip, zip -Standards-Version: 3.8.0 +Standards-Version: 3.9.2 Package: rabbitmq-server Architecture: all Depends: erlang-nox (>= 1:12.b.3), adduser, logrotate, ${misc:Depends} -Description: An AMQP server written in Erlang +Description: AMQP server written in Erlang RabbitMQ is an implementation of AMQP, the emerging standard for high performance enterprise messaging. The RabbitMQ server is a robust and scalable implementation of an AMQP broker. diff --git a/src/rabbit.erl b/src/rabbit.erl index c3938312..ae73ebc8 100644 --- a/src/rabbit.erl +++ b/src/rabbit.erl @@ -303,6 +303,7 @@ start() -> ok = ensure_working_log_handlers(), rabbit_node_monitor:prepare_cluster_status_files(), rabbit_mnesia:check_cluster_consistency(), + exit(bang), ok = app_utils:start_applications( app_startup_order(), fun handle_app_error/2), ok = print_plugin_info(rabbit_plugins:active()) @@ -349,7 +350,7 @@ start_it(StartFun) -> end. stop() -> - rabbit_log:info("Stopping Rabbit~n"), + rabbit_log:info("Stopping RabbitMQ~n"), ok = app_utils:stop_applications(app_shutdown_order()). stop_and_halt() -> @@ -417,6 +418,9 @@ rotate_logs(BinarySuffix) -> start(normal, []) -> case erts_version_check() of ok -> + {ok, Vsn} = application:get_key(rabbit, vsn), + error_logger:info_msg("Starting RabbitMQ ~s on Erlang ~s~n", + [Vsn, erlang:system_info(otp_release)]), {ok, SupPid} = rabbit_sup:start_link(), true = register(rabbit, self()), print_banner(), diff --git a/src/rabbit_backing_queue_qc.erl b/src/rabbit_backing_queue_qc.erl index e40d9b29..d658f0f0 100644 --- a/src/rabbit_backing_queue_qc.erl +++ b/src/rabbit_backing_queue_qc.erl @@ -391,4 +391,13 @@ drop_messages(Messages) -> end end. +-else. + +-export([prop_disabled/0]). + +prop_disabled() -> + exit({compiled_without_proper, + "PropEr was not present during compilation of the test module. " + "Hence all tests are disabled."}). + -endif. |