summaryrefslogtreecommitdiff
path: root/packaging
diff options
context:
space:
mode:
Diffstat (limited to 'packaging')
-rw-r--r--packaging/Makefile3
-rw-r--r--packaging/RPMS/Fedora/Makefile4
-rw-r--r--packaging/RPMS/Fedora/init.d4
-rw-r--r--packaging/RPMS/Fedora/rabbitmq-server-preserve-db.sh28
-rw-r--r--packaging/RPMS/Fedora/rabbitmq-server.spec41
-rw-r--r--packaging/RPMS/Fedora/rabbitmqctl_wrapper9
-rwxr-xr-xpackaging/checks.sh45
-rw-r--r--packaging/debs/Debian/Makefile1
-rw-r--r--packaging/debs/Debian/debian/control4
-rw-r--r--packaging/debs/Debian/debian/copyright22
-rw-r--r--packaging/debs/Debian/debian/dirs1
-rw-r--r--packaging/debs/Debian/debian/init.d4
-rw-r--r--packaging/debs/Debian/debian/postinst22
-rw-r--r--packaging/debs/Debian/debian/rabbitmqctl_wrapper9
-rw-r--r--packaging/debs/Debian/debian/rules9
-rw-r--r--packaging/debs/Debian/debian/templates16
-rw-r--r--packaging/windows/Makefile3
-rw-r--r--packaging/windows/rabbitmq-service.pod131
18 files changed, 268 insertions, 88 deletions
diff --git a/packaging/Makefile b/packaging/Makefile
deleted file mode 100644
index 44a9b328e8..0000000000
--- a/packaging/Makefile
+++ /dev/null
@@ -1,3 +0,0 @@
-check_tools:
- @sh ./checks.sh
- @echo All the needed tools seem to be installed, great!
diff --git a/packaging/RPMS/Fedora/Makefile b/packaging/RPMS/Fedora/Makefile
index 33032f118f..2c028e702b 100644
--- a/packaging/RPMS/Fedora/Makefile
+++ b/packaging/RPMS/Fedora/Makefile
@@ -18,9 +18,11 @@ prepare:
cp init.d SOURCES/rabbitmq-server.init
cp rabbitmqctl_wrapper SOURCES/rabbitmq-server.wrapper
cp rabbitmq-server.logrotate SOURCES/rabbitmq-server.logrotate
+ cp rabbitmq-server-preserve-db.sh SOURCES
server: prepare
- rpmbuild -ba SPECS/rabbitmq-server.spec $(DEFINES) --target noarch
+ rpmbuild -ba SPECS/rabbitmq-server.spec $(DEFINES) --target i386
+ rpmbuild -ba SPECS/rabbitmq-server.spec $(DEFINES) --target x86_64
clean:
rm -rf SOURCES SPECS RPMS SRPMS BUILD tmp
diff --git a/packaging/RPMS/Fedora/init.d b/packaging/RPMS/Fedora/init.d
index 397beeaa22..27f150f997 100644
--- a/packaging/RPMS/Fedora/init.d
+++ b/packaging/RPMS/Fedora/init.d
@@ -18,7 +18,7 @@
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON_NAME=rabbitmq-multi
-DAEMON=/usr/sbin/$DAEMON_NAME
+DAEMON=/usr/lib/rabbitmq/bin/$DAEMON_NAME
NAME=rabbitmq-server
DESC=rabbitmq-server
USER=rabbitmq
@@ -64,7 +64,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/RPMS/Fedora/rabbitmq-server-preserve-db.sh b/packaging/RPMS/Fedora/rabbitmq-server-preserve-db.sh
new file mode 100644
index 0000000000..e885b6b80f
--- /dev/null
+++ b/packaging/RPMS/Fedora/rabbitmq-server-preserve-db.sh
@@ -0,0 +1,28 @@
+#!/bin/bash
+
+if [ "$1x" = "x" ]; then
+ echo "You haven't specified the initial location of the RabbitMQ database"
+ exit 1
+fi
+
+if [ ! -d "$1" ]; then
+ echo "The directory containing the RabbitMQ database doesn't exist"
+ exit 1
+fi
+
+echo
+echo "The RabbitMQ database schema has changed."
+echo "If your RabbitMQ database contains important data,"
+echo "such as user accounts, durable exchanges and queues,"
+echo "or persistent messages, then we recommend you contact"
+echo "support@rabbitmq.com for assistance with the upgrade."
+echo "The current RabbitMQ database will be moved to the"
+echo "directory: "
+
+CURRENT_MNESIA_DIR=$1
+DATE=`date +'%d_%m_%Y'`
+TMP_OLD_MNESIA_DIR=$CURRENT_MNESIA_DIR.$$.${DATE}
+mv "$CURRENT_MNESIA_DIR" "$TMP_OLD_MNESIA_DIR"
+
+echo "$TMP_OLD_MNESIA_DIR"
+echo \ No newline at end of file
diff --git a/packaging/RPMS/Fedora/rabbitmq-server.spec b/packaging/RPMS/Fedora/rabbitmq-server.spec
index 214f6918fd..fbee9ef3d7 100644
--- a/packaging/RPMS/Fedora/rabbitmq-server.spec
+++ b/packaging/RPMS/Fedora/rabbitmq-server.spec
@@ -7,15 +7,16 @@ Source: http://www.rabbitmq.com/releases/rabbitmq-server/v%{version}/%{name}-%{v
Source1: rabbitmq-server.init
Source2: rabbitmq-server.wrapper
Source3: rabbitmq-server.logrotate
+Source4: rabbitmq-server-preserve-db.sh
URL: http://www.rabbitmq.com/
Vendor: LShift Ltd., Cohesive Financial Technologies LLC., Rabbit Technlogies Ltd.
%if 0%{?debian}
%else
-BuildRequires: python, python-json
+BuildRequires: erlang, python-simplejson
%endif
Requires: erlang, logrotate
Packager: Hubert Plociniczak <hubert@lshift.net>
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-%{_arch}-root
Summary: The RabbitMQ server
Requires(post): chkconfig
Requires(pre): chkconfig initscripts
@@ -25,10 +26,16 @@ 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.
+%ifarch x86_64
+ %define _defaultlibdir /usr/lib64
+%else
+ %define _defaultlibdir /usr/lib
+%endif
-%define _erllibdir %(erl -noshell -eval "io:format('~s~n', [code:lib_dir()]), halt().")
-%define _maindir %{buildroot}%{_erllibdir}/rabbitmq_server-%{version}
+%define _erllibdir %{_defaultlibdir}/erlang/lib
+%define _rabbitbindir %{_defaultlibdir}/rabbitmq/bin
+%define _maindir %{buildroot}%{_erllibdir}/rabbitmq_server-%{version}
%pre
if [ $1 -gt 1 ]; then
@@ -47,9 +54,8 @@ make
rm -rf %{buildroot}
make install TARGET_DIR=%{_maindir} \
- SBIN_DIR=%{buildroot}%{_sbindir} \
+ SBIN_DIR=%{buildroot}%{_rabbitbindir} \
MAN_DIR=%{buildroot}%{_mandir}
- VERSION=%{version}
mkdir -p %{buildroot}/var/lib/rabbitmq/mnesia
mkdir -p %{buildroot}/var/log/rabbitmq
@@ -59,14 +65,14 @@ mkdir -p %{buildroot}/etc/rc.d/init.d/
install -m 0755 %SOURCE1 %{buildroot}/etc/rc.d/init.d/rabbitmq-server
chmod 0755 %{buildroot}/etc/rc.d/init.d/rabbitmq-server
-mv %{buildroot}/usr/sbin/rabbitmqctl %{buildroot}/usr/sbin/rabbitmqctl_real
-install -m 0755 %SOURCE2 %{buildroot}/usr/sbin/rabbitmqctl
-
-cp %{buildroot}%{_mandir}/man1/rabbitmqctl.1.gz %{buildroot}%{_mandir}/man1/rabbitmqctl_real.1.gz
+mkdir -p %{buildroot}%{_sbindir}
+install -m 0755 %SOURCE2 %{buildroot}%{_sbindir}/rabbitmqctl
mkdir -p %{buildroot}/etc/logrotate.d
install %SOURCE3 %{buildroot}/etc/logrotate.d/rabbitmq-server
+rm %{_maindir}/LICENSE %{_maindir}/LICENSE-MPL-RabbitMQ %{_maindir}/INSTALL
+
%post
# create rabbitmq group
if ! getent group rabbitmq >/dev/null; then
@@ -82,6 +88,11 @@ fi
chown -R rabbitmq:rabbitmq /var/lib/rabbitmq
chown -R rabbitmq:rabbitmq /var/log/rabbitmq
+su rabbitmq -s /bin/sh -c %{_rabbitbindir}/rabbitmq-mnesia-current
+if [ $? = 1 ]; then
+ /bin/sh %SOURCE4 /var/lib/rabbitmq/mnesia
+fi
+
/sbin/chkconfig --add %{name}
/sbin/service rabbitmq-server start
@@ -98,18 +109,16 @@ fi
%files
%defattr(-,root,root,-)
%{_erllibdir}/rabbitmq_server-%{version}/
+%{_rabbitbindir}/
%{_mandir}/man1/rabbitmq-multi.1.gz
%{_mandir}/man1/rabbitmq-server.1.gz
%{_mandir}/man1/rabbitmqctl.1.gz
-%{_mandir}/man1/rabbitmqctl_real.1.gz
-%{_sbindir}/rabbitmq-multi
-%{_sbindir}/rabbitmq-server
%{_sbindir}/rabbitmqctl
-%{_sbindir}/rabbitmqctl_real
-/var/lib/rabbitmq/
-/var/log/rabbitmq/
+%dir /var/lib/rabbitmq
+%dir /var/log/rabbitmq
/etc/rc.d/init.d/rabbitmq-server
%config(noreplace) /etc/logrotate.d/rabbitmq-server
+%doc LICENSE LICENSE-MPL-RabbitMQ INSTALL
%clean
rm -rf %{buildroot}
diff --git a/packaging/RPMS/Fedora/rabbitmqctl_wrapper b/packaging/RPMS/Fedora/rabbitmqctl_wrapper
index c484bb27ea..6b387d2997 100644
--- a/packaging/RPMS/Fedora/rabbitmqctl_wrapper
+++ b/packaging/RPMS/Fedora/rabbitmqctl_wrapper
@@ -10,5 +10,10 @@ 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/checks.sh b/packaging/checks.sh
deleted file mode 100755
index 63e88701f3..0000000000
--- a/packaging/checks.sh
+++ /dev/null
@@ -1,45 +0,0 @@
-#! /bin/sh
-
-# We check for the presence of the tools necessary to build a release on a
-# Debian based OS.
-
-TOOLS_STOP=0
-
-checker () {
- if [ ! `which $1` ]
- then
- echo "$1 is missing, please install it"
- TOOLS_STOP=1
- NEW_NAME=`echo $1 | sed -e 's/-/_/g'`
- eval "$NEW_NAME=1"
- else
- echo "$1 found"
- fi
-};
-
-echo ~~~~~~~~~~~~ Looking for mandatory programs ~~~~~~~~~~~~
-
-for i in cdbs-edit-patch reprepro rpm elinks wget zip gpg rsync
-do
- checker $i
-done
-echo ~~~~~~~~~~~~~~~~~~~~~~~~~~ DONE ~~~~~~~~~~~~~~~~~~~~~~~
-
-if [ 1 = $TOOLS_STOP ]
-then
- [ $cdbs_edit_patch ] && cdbs_edit_patch="cdbs "
- [ $reprepro ] && reprepro="reprepro "
- [ $rpm ] && rpm="rpm "
- [ $elinks ] && elinks="elinks "
- [ $wget ] && wget="wget "
- [ $zip ] && zip="zip "
- [ $gpg ] && gpg="gpg "
- [ $rsync ] && rsync="rsync "
-
- echo
- echo We suggest you run the command
- echo "apt-get install ${cdbs_edit_patch}${reprepro}${rpm}${elinks}${wget}${zip}${gpg}${rsync}"
- echo
-fi
-
-exit $TOOLS_STOP
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?
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..c762826fa8
--- /dev/null
+++ b/packaging/windows/rabbitmq-service.pod
@@ -0,0 +1,131 @@
+=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
+
+The RabbitMQ Team <info@rabbitmq.com>
+
+=head1 REFERENCES
+
+RabbitMQ Web Site: http://www.rabbitmq.com