diff options
| author | Matthias Radestock <matthias@lshift.net> | 2008-12-05 09:31:03 +0000 |
|---|---|---|
| committer | Matthias Radestock <matthias@lshift.net> | 2008-12-05 09:31:03 +0000 |
| commit | dafac6b5b795d388b67cca7743e2d0d3a7d698ea (patch) | |
| tree | 55213ac76a9b152ebc012cc5fe65d8a5d3596a0a /packaging | |
| parent | b81de62c0f32ee685ce662a29fa53e8421eff494 (diff) | |
| parent | b86b36403118cb3ade913af785b2533e3e762984 (diff) | |
| download | rabbitmq-server-git-dafac6b5b795d388b67cca7743e2d0d3a7d698ea.tar.gz | |
merge default into bug19900
Diffstat (limited to 'packaging')
| -rw-r--r-- | packaging/RPMS/Fedora/rabbitmq-server.spec | 2 | ||||
| -rw-r--r-- | packaging/debs/Debian/debian/control | 4 | ||||
| -rw-r--r-- | packaging/debs/Debian/debian/dirs | 1 | ||||
| -rw-r--r-- | packaging/debs/Debian/debian/init.d | 4 | ||||
| -rw-r--r-- | packaging/debs/Debian/debian/postinst | 22 | ||||
| -rw-r--r-- | packaging/debs/Debian/debian/rabbitmqctl_wrapper | 9 | ||||
| -rw-r--r-- | packaging/debs/Debian/debian/rules | 9 | ||||
| -rw-r--r-- | packaging/debs/Debian/debian/templates | 16 | ||||
| -rw-r--r-- | packaging/windows/Makefile | 3 | ||||
| -rw-r--r-- | packaging/windows/rabbitmq-service.pod | 138 |
10 files changed, 197 insertions, 11 deletions
diff --git a/packaging/RPMS/Fedora/rabbitmq-server.spec b/packaging/RPMS/Fedora/rabbitmq-server.spec index 23ebecefb9..9067a8443b 100644 --- a/packaging/RPMS/Fedora/rabbitmq-server.spec +++ b/packaging/RPMS/Fedora/rabbitmq-server.spec @@ -11,7 +11,7 @@ URL: http://www.rabbitmq.com/ Vendor: LShift Ltd., Cohesive Financial Technologies LLC., Rabbit Technlogies Ltd. %if 0%{?debian} %else -BuildRequires: erlang, python-json +BuildRequires: erlang, python-simplejson %endif Requires: erlang, logrotate Packager: Hubert Plociniczak <hubert@lshift.net> diff --git a/packaging/debs/Debian/debian/control b/packaging/debs/Debian/debian/control index 749791a4bd..f6761713dd 100644 --- a/packaging/debs/Debian/debian/control +++ b/packaging/debs/Debian/debian/control @@ -2,12 +2,12 @@ Source: rabbitmq-server Section: net Priority: extra Maintainer: Tony Garnock-Jones <tonyg@rabbitmq.com> -Build-Depends: cdbs, debhelper (>= 5), erlang-nox, erlang-dev, python-json +Build-Depends: cdbs, debhelper (>= 5), erlang-nox, erlang-dev, python-simplejson Standards-Version: 3.7.2 Package: rabbitmq-server Architecture: all -Depends: erlang-nox, adduser, logrotate +Depends: erlang-nox, adduser, logrotate, debconf Description: An 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 diff --git a/packaging/debs/Debian/debian/dirs b/packaging/debs/Debian/debian/dirs index 74f8631437..1a707bc191 100644 --- a/packaging/debs/Debian/debian/dirs +++ b/packaging/debs/Debian/debian/dirs @@ -1,3 +1,4 @@ +usr/lib/rabbitmq/bin usr/lib/erlang/lib usr/sbin usr/share/man diff --git a/packaging/debs/Debian/debian/init.d b/packaging/debs/Debian/debian/init.d index a93f306692..ace474c59f 100644 --- a/packaging/debs/Debian/debian/init.d +++ b/packaging/debs/Debian/debian/init.d @@ -10,7 +10,7 @@ ### END INIT INFO PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin -DAEMON=/usr/sbin/rabbitmq-multi +DAEMON=/usr/lib/rabbitmq/bin/rabbitmq-multi NAME=rabbitmq-server DESC=rabbitmq-server USER=rabbitmq @@ -51,7 +51,7 @@ start_rabbitmq () { stop_rabbitmq () { set +e status_rabbitmq quiet - if [ $RETVAL == 0 ] ; then + if [ $RETVAL = 0 ] ; then su $USER -s /bin/sh -c "$DAEMON stop_all" > /var/log/rabbitmq/shutdown_log 2> /var/log/rabbitmq/shutdown_err RETVAL=$? if [ $RETVAL != 0 ] ; then diff --git a/packaging/debs/Debian/debian/postinst b/packaging/debs/Debian/debian/postinst index f92131d0c8..13d8552f3d 100644 --- a/packaging/debs/Debian/debian/postinst +++ b/packaging/debs/Debian/debian/postinst @@ -34,6 +34,28 @@ chown -R rabbitmq:rabbitmq /var/log/rabbitmq case "$1" in configure) + . /usr/share/debconf/confmodule + + if ! su rabbitmq -s /bin/sh -c /usr/lib/rabbitmq/bin/rabbitmq-mnesia-current ; then + db_beginblock + db_input high rabbitmq-server/mnesia-dir-note || true + db_input high rabbitmq-server/do-what-with-mnesia-dir || true + db_endblock + db_go + + db_get rabbitmq-server/do-what-with-mnesia-dir + if [ "$RET" = "Delete it" ]; then + rm -r /var/lib/rabbitmq/mnesia/ + elif [ "$RET" = "Move it elsewhere" ]; then + db_input high rabbitmq-server/move-mnesia-dir-where || true + db_go + + db_get rabbitmq-server/move-mnesia-dir-where + + mkdir -p "`dirname $RET`" + mv /var/lib/rabbitmq/mnesia "$RET" + fi + fi ;; abort-upgrade|abort-remove|abort-deconfigure) diff --git a/packaging/debs/Debian/debian/rabbitmqctl_wrapper b/packaging/debs/Debian/debian/rabbitmqctl_wrapper index c484bb27ea..774731fc9e 100644 --- a/packaging/debs/Debian/debian/rabbitmqctl_wrapper +++ b/packaging/debs/Debian/debian/rabbitmqctl_wrapper @@ -10,5 +10,12 @@ for arg in "$@" ; do done cd / -su rabbitmq -s /bin/sh -c "/usr/sbin/rabbitmqctl_real ${CMDLINE}" + +if [ ${UID} = 0 ] ; then + su rabbitmq -s /bin/sh -c "/usr/lib/rabbitmq/bin/rabbitmqctl ${CMDLINE}" +else + /usr/lib/rabbitmq/bin/rabbitmqctl + echo -e "\nOnly root should run rabbitmqctl\n" + exit 1 +fi diff --git a/packaging/debs/Debian/debian/rules b/packaging/debs/Debian/debian/rules index 39af711c13..fa4cb855cc 100644 --- a/packaging/debs/Debian/debian/rules +++ b/packaging/debs/Debian/debian/rules @@ -3,17 +3,16 @@ include /usr/share/cdbs/1/rules/debhelper.mk include /usr/share/cdbs/1/class/makefile.mk -RABBIT_LIB=$(DEB_DESTDIR)usr/lib/erlang/lib/rabbitmq_server-$(DEB_UPSTREAM_VERSION) +RABBIT_LIB=$(DEB_DESTDIR)usr/lib/erlang/lib/rabbitmq_server-$(DEB_UPSTREAM_VERSION)/ +RABBIT_BIN=$(DEB_DESTDIR)usr/lib/rabbitmq/bin/ -DEB_MAKE_INSTALL_TARGET := install TARGET_DIR=$(RABBIT_LIB)/ SBIN_DIR=$(DEB_DESTDIR)usr/sbin MAN_DIR=$(DEB_DESTDIR)usr/share/man +DEB_MAKE_INSTALL_TARGET := install TARGET_DIR=$(RABBIT_LIB) SBIN_DIR=$(RABBIT_BIN) MAN_DIR=$(DEB_DESTDIR)usr/share/man/ DOCDIR=$(DEB_DESTDIR)usr/share/doc/rabbitmq-server/ install/rabbitmq-server:: mkdir -p $(DOCDIR) - rm $(RABBIT_LIB)/LICENSE* - mv $(DEB_DESTDIR)usr/sbin/rabbitmqctl $(DEB_DESTDIR)usr/sbin/rabbitmqctl_real + rm $(RABBIT_LIB)LICENSE* cp debian/rabbitmqctl_wrapper $(DEB_DESTDIR)usr/sbin/rabbitmqctl cp debian/rabbitmq-server.logrotate $(DEB_DESTDIR)etc/logrotate.d/rabbitmq-server - cp $(DEB_DESTDIR)usr/share/man/man1/rabbitmqctl.1.gz $(DEB_DESTDIR)usr/share/man/man1/rabbitmqctl_real.1.gz chmod a+x $(DEB_DESTDIR)usr/sbin/rabbitmqctl diff --git a/packaging/debs/Debian/debian/templates b/packaging/debs/Debian/debian/templates new file mode 100644 index 0000000000..89f5754bd7 --- /dev/null +++ b/packaging/debs/Debian/debian/templates @@ -0,0 +1,16 @@ +Template: rabbitmq-server/mnesia-dir-note +Type: note +Description: Schema changed + The RabbitMQ database schema has changed. If your RabbitMQ database contains important data, such as user accounts, durable exchanges and queues, or persistent messages, then we recommend you contact support@rabbitmq.com for assistance with the upgrade. If you want to experiment with the new version in the meantime, simply move the database directory to a safe place. In all other cases just remove the directory. + + +Template: rabbitmq-server/do-what-with-mnesia-dir +Type: select +Choices: Delete it, Move it elsewhere, Keep it in place (WILL BREAK) +Default: Delete it +Description: What do you want to do with the RabbitMQ database directory? + +Template: rabbitmq-server/move-mnesia-dir-where +Type: string +Default: /var/lib/rabbitmq/mnesia-old/ +Description: Where do you want to move the RabbitMQ database directory? diff --git a/packaging/windows/Makefile b/packaging/windows/Makefile index f9437da7ca..9d16fd9fb3 100644 --- a/packaging/windows/Makefile +++ b/packaging/windows/Makefile @@ -10,6 +10,7 @@ dist: mkdir $(SOURCE_DIR)/sbin mv $(SOURCE_DIR)/scripts/rabbitmq-server.bat $(SOURCE_DIR)/sbin + mv $(SOURCE_DIR)/scripts/rabbitmq-service.bat $(SOURCE_DIR)/sbin mv $(SOURCE_DIR)/scripts/rabbitmqctl.bat $(SOURCE_DIR)/sbin mv $(SOURCE_DIR)/scripts/rabbitmq-multi.bat $(SOURCE_DIR)/sbin rm -rf $(SOURCE_DIR)/scripts @@ -18,6 +19,8 @@ dist: rm -rf $(SOURCE_DIR)/docs mv $(SOURCE_DIR) $(TARGET_DIR) + pod2text --loose rabbitmq-service.pod $(TARGET_DIR)/readme-service.txt + unix2dos $(TARGET_DIR)/readme-service.txt zip -r $(TARGET_ZIP).zip $(TARGET_DIR) rm -rf $(TARGET_DIR) diff --git a/packaging/windows/rabbitmq-service.pod b/packaging/windows/rabbitmq-service.pod new file mode 100644 index 0000000000..6a97c435d9 --- /dev/null +++ b/packaging/windows/rabbitmq-service.pod @@ -0,0 +1,138 @@ +=head1 NAME + +rabbitmq-service - manage RabbitMQ AMQP service + +=head1 SYNOPSIS + +rabbitmq-service.bat command + +=head1 DESCRIPTION + +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. + +Running B<rabbitmq-service> allows the RabbitMQ broker to be run as a +service on NT/2000/2003/XP/Vista® environments. The RabbitMQ broker +service can be started and stopped using the Windows® services +applet. + +By default the service will run in the authentication context of the +local system account. It is therefore necessary to synchronise Erlang +cookies between the local system account (typically +C<C:\WINDOWS\.erlang.cookie> and the account that will be used to +run B<rabbitmqctl>. + +=head1 COMMANDS + +=head2 help + +Display usage information. + +=head2 install + +Install the service. The service will not be started. +Subsequent invocations will update the service parameters if +relevant environment variables were modified. + +=head2 remove + +Remove the service. If the service is running then it will +automatically be stopped before being removed. No files will be +deleted as a consequence and B<rabbitmq-server> will remain operable. + +=head2 start + +Start the service. The service must have been correctly installed +beforehand. + +=head2 stop + +Stop the service. The service must be running for this command to +have any effect. + +=head2 disable + +Disable the service. This is the equivalent of setting the startup +type to B<Disabled> using the service control panel. + +=head2 enable + +Enable the service. This is the equivalent of setting the startup +type to B<Automatic> using the service control panel. + +=head1 ENVIRONMENT + +=head2 SERVICENAME + +Defaults to RabbitMQ. +This is the location of log and database directories. + +=head2 RABBITMQ_BASE + +Defaults to the application data directory of the current user. +This is the location of log and database directories. + +=head2 NODENAME + +Defaults to "rabbit". This can be useful if you want to run more +than one node per machine - B<NODENAME> should be unique per +erlang-node-and-machine combination. See clustering on a single +machine guide +at L<http://www.rabbitmq.com/clustering.html#single-machine> for +details. + +=head2 NODE_IP_ADDRESS + +Defaults to "0.0.0.0". This can be changed if you only want to bind +to one network interface. + +=head2 NODE_PORT + +Defaults to 5672. + +=head2 ERLANG_SERVICE_MANAGER_PATH + +Defaults to F<C:\Program Files\erl5.5.5\erts-5.5.5\bin>. This is +the installation location of the Erlang service manager. + +=head2 CLUSTER_CONFIG_FILE + +If this file is present it is used by the server to +auto-configure a RabbitMQ cluster. See the clustering guide +at L<http://www.rabbitmq.com/clustering.html> for details. + +=head2 CONSOLE_LOG + +Set this varable to B<new> or B<reuse> to have the console +output from the server redirected to a file named B<SERVICENAME>.debug +in the application data directory of the user that installed the service. +Under Vista this will be F<C:\Documents and Settings\User\AppData\username\SERVICENAME>. +Under previous versions of Windows this will be +F<C:\Documents and Settings\username\Application Data\SERVICENAME>. +If B<CONSOLE_LOG> is set to B<new> then a new file will be created +each time the service starts. If B<CONSOLE_LOG> is set to B<reuse> +then the file will be overwritten each time the service starts. +The default behaviour when B<CONSOLE_LOG> is not set or set to a +value other than B<new> or B<reuse> is to discard the server output. + +=head1 EXAMPLES + +Start a previously-installed RabbitMQ AMQP service: + + rabbitmq-service start + +=head1 AUTHOR + +Originally written by The RabbitMQ Team <info@lshift.net> + +=head1 COPYRIGHT + +This package, the RabbitMQ server is licensed under the MPL. + +If you have any questions regarding licensing, please contact us at +info@rabbitmq.com. + +=head1 REFERENCES + +RabbitMQ Web Site: http://www.rabbitmq.com |
