summaryrefslogtreecommitdiff
path: root/packaging
diff options
context:
space:
mode:
Diffstat (limited to 'packaging')
-rw-r--r--packaging/Makefile3
-rw-r--r--packaging/RPMS/Fedora/Makefile31
-rw-r--r--packaging/RPMS/Fedora/rabbitmq-server.logrotate2
-rw-r--r--packaging/RPMS/Fedora/rabbitmq-server.spec32
-rwxr-xr-xpackaging/checks.sh45
-rw-r--r--packaging/debs/Debian/Makefile5
-rw-r--r--packaging/debs/Debian/debian/control2
-rw-r--r--packaging/debs/Debian/debian/rabbitmq-server.logrotate2
-rw-r--r--packaging/windows/rabbitmq-service.pod14
9 files changed, 49 insertions, 87 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 6cc3579bab..33032f118f 100644
--- a/packaging/RPMS/Fedora/Makefile
+++ b/packaging/RPMS/Fedora/Makefile
@@ -4,32 +4,23 @@ VERSION=0.0.0
SOURCE_TARBALL_DIR=../../../dist
TARBALL=$(SOURCE_TARBALL_DIR)/rabbitmq-server-$(VERSION).tar.gz
TOP_DIR=$(shell pwd)
-RPM_VERSION=$(shell echo $(VERSION) | tr - _)
-DEFINES=--define '_topdir $(TOP_DIR)' --define '_tmppath $(TOP_DIR)/tmp' --define 'main_version $(VERSION)' --define 'rpm_version $(RPM_VERSION)'
+DEFINES=--define '_topdir $(TOP_DIR)' --define '_tmppath $(TOP_DIR)/tmp' --define 'debian 1'
rpms: clean server
#Create proper environment for making rpms
prepare:
- mkdir -p $(TOP_DIR)/BUILD
- mkdir -p $(TOP_DIR)/SOURCES
- mkdir -p $(TOP_DIR)/SPECS
- mkdir -p $(TOP_DIR)/SRPMS
- mkdir -p $(TOP_DIR)/RPMS
- mkdir -p $(TOP_DIR)/tmp
- cp $(TOP_DIR)/$(TARBALL) $(TOP_DIR)/SOURCES
- cp $(TOP_DIR)/rabbitmq-server.spec $(TOP_DIR)/SPECS
- cp $(TOP_DIR)/init.d $(TOP_DIR)/BUILD
- cp $(TOP_DIR)/rabbitmqctl_wrapper $(TOP_DIR)/BUILD
- cp $(TOP_DIR)/rabbitmq-server.logrotate $(TOP_DIR)/BUILD
+ mkdir -p BUILD SOURCES SPECS SRPMS RPMS tmp
+ cp $(TOP_DIR)/$(TARBALL) SOURCES
+ cp rabbitmq-server.spec SPECS
+ sed -i 's/%%VERSION%%/$(VERSION)/' SPECS/rabbitmq-server.spec
+
+ cp init.d SOURCES/rabbitmq-server.init
+ cp rabbitmqctl_wrapper SOURCES/rabbitmq-server.wrapper
+ cp rabbitmq-server.logrotate SOURCES/rabbitmq-server.logrotate
server: prepare
- rpmbuild -ba $(TOP_DIR)/SPECS/rabbitmq-server.spec $(DEFINES) --target noarch
+ rpmbuild -ba SPECS/rabbitmq-server.spec $(DEFINES) --target noarch
clean:
- rm -rf $(TOP_DIR)/SOURCES/
- rm -rf $(TOP_DIR)/SPECS/
- rm -rf $(TOP_DIR)/RPMS/
- rm -rf $(TOP_DIR)/SRPMS/
- rm -rf $(TOP_DIR)/BUILD/
- rm -rf $(TOP_DIR)/tmp/
+ rm -rf SOURCES SPECS RPMS SRPMS BUILD tmp
diff --git a/packaging/RPMS/Fedora/rabbitmq-server.logrotate b/packaging/RPMS/Fedora/rabbitmq-server.logrotate
index 64cd01a185..ab87e4a5c6 100644
--- a/packaging/RPMS/Fedora/rabbitmq-server.logrotate
+++ b/packaging/RPMS/Fedora/rabbitmq-server.logrotate
@@ -9,4 +9,4 @@
postrotate
/sbin/service rabbitmq-server rotate-logs
endscript
-} \ No newline at end of file
+}
diff --git a/packaging/RPMS/Fedora/rabbitmq-server.spec b/packaging/RPMS/Fedora/rabbitmq-server.spec
index 08694c096c..214f6918fd 100644
--- a/packaging/RPMS/Fedora/rabbitmq-server.spec
+++ b/packaging/RPMS/Fedora/rabbitmq-server.spec
@@ -1,14 +1,21 @@
Name: rabbitmq-server
-Version: %{rpm_version}
+Version: %%VERSION%%
Release: 1
License: MPLv1.1
Group: Development/Libraries
-Source: http://www.rabbitmq.com/releases/rabbitmq-server/v%{main_version}/%{name}-%{main_version}.tar.gz
+Source: http://www.rabbitmq.com/releases/rabbitmq-server/v%{version}/%{name}-%{version}.tar.gz
+Source1: rabbitmq-server.init
+Source2: rabbitmq-server.wrapper
+Source3: rabbitmq-server.logrotate
URL: http://www.rabbitmq.com/
Vendor: LShift Ltd., Cohesive Financial Technologies LLC., Rabbit Technlogies Ltd.
+%if 0%{?debian}
+%else
+BuildRequires: python, python-json
+%endif
Requires: erlang, logrotate
Packager: Hubert Plociniczak <hubert@lshift.net>
-BuildRoot: %{_tmppath}/%{name}-%{main_version}-%{release}-root
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
Summary: The RabbitMQ server
Requires(post): chkconfig
Requires(pre): chkconfig initscripts
@@ -19,10 +26,8 @@ performance enterprise messaging. The RabbitMQ server is a robust and
scalable implementation of an AMQP broker.
-%define _mandir /usr/share/man
-%define _sbindir /usr/sbin
-%define _libdir %(erl -noshell -eval "io:format('~s~n', [code:lib_dir()]), halt().")
-%define _maindir %{buildroot}%{_libdir}/rabbitmq_server-%{main_version}
+%define _erllibdir %(erl -noshell -eval "io:format('~s~n', [code:lib_dir()]), halt().")
+%define _maindir %{buildroot}%{_erllibdir}/rabbitmq_server-%{version}
%pre
@@ -33,7 +38,7 @@ if [ $1 -gt 1 ]; then
fi
%prep
-%setup -n %{name}-%{main_version}
+%setup -n %{name}-%{version}
%build
make
@@ -44,24 +49,23 @@ rm -rf %{buildroot}
make install TARGET_DIR=%{_maindir} \
SBIN_DIR=%{buildroot}%{_sbindir} \
MAN_DIR=%{buildroot}%{_mandir}
- VERSION=%{main_version}
+ VERSION=%{version}
mkdir -p %{buildroot}/var/lib/rabbitmq/mnesia
mkdir -p %{buildroot}/var/log/rabbitmq
mkdir -p %{buildroot}/etc/rc.d/init.d/
#Copy all necessary lib files etc.
-cp ../init.d %{buildroot}/etc/rc.d/init.d/rabbitmq-server
+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
-cp ../rabbitmqctl_wrapper %{buildroot}/usr/sbin/rabbitmqctl
-chmod 0755 %{buildroot}/usr/sbin/rabbitmqctl
+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}/etc/logrotate.d
-cp ../rabbitmq-server.logrotate %{buildroot}/etc/logrotate.d/rabbitmq-server
+install %SOURCE3 %{buildroot}/etc/logrotate.d/rabbitmq-server
%post
# create rabbitmq group
@@ -93,7 +97,7 @@ fi
%files
%defattr(-,root,root,-)
-%{_libdir}/rabbitmq_server-%{main_version}/
+%{_erllibdir}/rabbitmq_server-%{version}/
%{_mandir}/man1/rabbitmq-multi.1.gz
%{_mandir}/man1/rabbitmq-server.1.gz
%{_mandir}/man1/rabbitmqctl.1.gz
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 dd74c31ea1..9479feb001 100644
--- a/packaging/debs/Debian/Makefile
+++ b/packaging/debs/Debian/Makefile
@@ -1,5 +1,6 @@
TARBALL_DIR=../../../dist
TARBALL=$(shell (cd $(TARBALL_DIR); echo rabbitmq-server-[0-9]*.tar.gz))
+DEBIAN_ORIG_TARBALL=$(shell echo $(TARBALL) | sed -e 's:\(.*\)-\(.*\)\(\.tar\.gz\):\1_\2\.orig\3:g')
VERSION=$(shell echo $(TARBALL) | sed -e 's:rabbitmq-server-\(.*\)\.tar\.gz:\1:g')
UNPACKED_DIR=rabbitmq-server-$(VERSION)
PACKAGENAME=rabbitmq-server
@@ -15,8 +16,8 @@ all:
@echo 'Please choose a target from the Makefile.'
package: clean
- make -C ../.. check_tools
- tar -zxvf $(TARBALL_DIR)/$(TARBALL)
+ cp $(TARBALL_DIR)/$(TARBALL) $(DEBIAN_ORIG_TARBALL)
+ tar -zxvf $(DEBIAN_ORIG_TARBALL)
cp -r debian $(UNPACKED_DIR)
chmod a+x $(UNPACKED_DIR)/debian/rules
UNOFFICIAL_RELEASE=$(UNOFFICIAL_RELEASE) VERSION=$(VERSION) ./check-changelog.sh rabbitmq-server $(UNPACKED_DIR)
diff --git a/packaging/debs/Debian/debian/control b/packaging/debs/Debian/debian/control
index bc691bc7b6..749791a4bd 100644
--- a/packaging/debs/Debian/debian/control
+++ b/packaging/debs/Debian/debian/control
@@ -2,7 +2,7 @@ Source: rabbitmq-server
Section: net
Priority: extra
Maintainer: Tony Garnock-Jones <tonyg@rabbitmq.com>
-Build-Depends: cdbs, debhelper (>= 5), erlang-base | erlang-base-hipe, erlang-nox, erlang-dev, erlang-src, make, python
+Build-Depends: cdbs, debhelper (>= 5), erlang-nox, erlang-dev, python-json
Standards-Version: 3.7.2
Package: rabbitmq-server
diff --git a/packaging/debs/Debian/debian/rabbitmq-server.logrotate b/packaging/debs/Debian/debian/rabbitmq-server.logrotate
index 247635d19a..bfd6b8da0b 100644
--- a/packaging/debs/Debian/debian/rabbitmq-server.logrotate
+++ b/packaging/debs/Debian/debian/rabbitmq-server.logrotate
@@ -9,4 +9,4 @@
postrotate
/etc/init.d/rabbitmq-server rotate-logs
endscript
-} \ No newline at end of file
+}
diff --git a/packaging/windows/rabbitmq-service.pod b/packaging/windows/rabbitmq-service.pod
index b87e4bafc3..d2ee48f9ac 100644
--- a/packaging/windows/rabbitmq-service.pod
+++ b/packaging/windows/rabbitmq-service.pod
@@ -102,6 +102,20 @@ 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: