diff options
| author | Tony Garnock-Jones <tonyg@lshift.net> | 2008-12-09 17:52:10 +0000 |
|---|---|---|
| committer | Tony Garnock-Jones <tonyg@lshift.net> | 2008-12-09 17:52:10 +0000 |
| commit | d890b2e56d75761d80f6e83e705f22c122a6295d (patch) | |
| tree | 37fc91be7259ffd5599773865fccefe85e37c579 /packaging/debs | |
| parent | c9e6ec25f539ac69051adb8292d64b92d3110d72 (diff) | |
| parent | db47c2b2979ba25a59c28045ee5abeff2f88648c (diff) | |
| download | rabbitmq-server-git-d890b2e56d75761d80f6e83e705f22c122a6295d.tar.gz | |
merged default into bug18381
Diffstat (limited to 'packaging/debs')
| -rw-r--r-- | packaging/debs/Debian/Makefile | 1 | ||||
| -rw-r--r-- | packaging/debs/Debian/debian/control | 4 | ||||
| -rw-r--r-- | packaging/debs/Debian/debian/copyright | 22 | ||||
| -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 |
9 files changed, 69 insertions, 19 deletions
diff --git a/packaging/debs/Debian/Makefile b/packaging/debs/Debian/Makefile index 3e74cb5231..9479feb001 100644 --- a/packaging/debs/Debian/Makefile +++ b/packaging/debs/Debian/Makefile @@ -16,7 +16,6 @@ all: @echo 'Please choose a target from the Makefile.' package: clean - make -C ../.. check_tools cp $(TARBALL_DIR)/$(TARBALL) $(DEBIAN_ORIG_TARBALL) tar -zxvf $(DEBIAN_ORIG_TARBALL) cp -r debian $(UNPACKED_DIR) 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/copyright b/packaging/debs/Debian/debian/copyright index 9f9f8672bc..f9a2b6515a 100644 --- a/packaging/debs/Debian/debian/copyright +++ b/packaging/debs/Debian/debian/copyright @@ -5,7 +5,7 @@ It was downloaded from http://www.rabbitmq.com/ Upstream Author: The RabbitMQ team <info@rabbitmq.com> -Copyright: 2006-2008 Rabbit Technologies Ltd. +Copyright: 2006-2009 Rabbit Technologies Ltd. License: The RabbitMQ server is licensed under the MPL. @@ -461,13 +461,19 @@ EXHIBIT A -Mozilla Public License. The Original Code is RabbitMQ. - The Initial Developers of the Original Code are LShift Ltd., - Cohesive Financial Technologies LLC., and Rabbit Technologies Ltd. + The Initial Developers of the Original Code are LShift Ltd, + Cohesive Financial Technologies LLC, and Rabbit Technologies Ltd. - Portions created by LShift Ltd., Cohesive Financial Technologies - LLC., and Rabbit Technologies Ltd. are Copyright (C) 2007-2008 - LShift Ltd., Cohesive Financial Technologies LLC., and Rabbit - Technologies Ltd.; + Portions created before 22-Nov-2008 00:00:00 GMT by LShift Ltd, + Cohesive Financial Technologies LLC, or Rabbit Technologies Ltd + are Copyright (C) 2007-2008 LShift Ltd, Cohesive Financial + Technologies LLC, and Rabbit Technologies Ltd. + + Portions created by LShift Ltd are Copyright (C) 2007-2009 LShift + Ltd. Portions created by Cohesive Financial Technologies LLC are + Copyright (C) 2007-2009 Cohesive Financial Technologies + LLC. Portions created by Rabbit Technologies Ltd are Copyright + (C) 2007-2009 Rabbit Technologies Ltd. All Rights Reserved. @@ -485,7 +491,7 @@ EXHIBIT A -Mozilla Public License. If you have any questions regarding licensing, please contact us at info@rabbitmq.com. -The Debian packaging is (C) 2007-2008, Rabbit Technologies Ltd. <info@rabbitmq.com> +The Debian packaging is (C) 2007-2009, Rabbit Technologies Ltd. <info@rabbitmq.com> and is licensed under the MPL 1.1, see above. 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..d53a6ca9c6 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 [ `id -u` = 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? |
