summaryrefslogtreecommitdiff
path: root/packaging
diff options
context:
space:
mode:
authorSteve Powell <steve@rabbitmq.com>2012-02-10 16:37:55 +0000
committerSteve Powell <steve@rabbitmq.com>2012-02-10 16:37:55 +0000
commit58a773012a85353dd35e1f6491ff1be1a452394a (patch)
tree2f4888e3bbd910599786664b20957dfb497ebf8a /packaging
parent7c3efce46cfb6e07d71b41ad835b1b525a335dee (diff)
parentd3e191670d8b16a4db798c8f94ac055d9ce5d177 (diff)
downloadrabbitmq-server-58a773012a85353dd35e1f6491ff1be1a452394a.tar.gz
Merge in 24739 (I need this fix).
Diffstat (limited to 'packaging')
-rw-r--r--packaging/RPMS/Fedora/Makefile21
-rw-r--r--packaging/debs/Debian/Makefile15
-rw-r--r--packaging/generic-unix/Makefile3
-rw-r--r--packaging/generic-unix/rabbitmq-sys34
-rw-r--r--packaging/macports/Makefile5
-rw-r--r--packaging/macports/Portfile.in14
-rwxr-xr-xpackaging/macports/make-port-diff.sh3
-rw-r--r--packaging/windows/Makefile2
8 files changed, 67 insertions, 30 deletions
diff --git a/packaging/RPMS/Fedora/Makefile b/packaging/RPMS/Fedora/Makefile
index c67d8fd6..2031de4d 100644
--- a/packaging/RPMS/Fedora/Makefile
+++ b/packaging/RPMS/Fedora/Makefile
@@ -26,20 +26,23 @@ prepare:
mkdir -p BUILD SOURCES SPECS SRPMS RPMS tmp
cp $(TARBALL_DIR)/$(TARBALL) SOURCES
cp rabbitmq-server.spec SPECS
- sed -i 's|%%VERSION%%|$(VERSION)|;s|%%REQUIRES%%|$(REQUIRES)|' \
- SPECS/rabbitmq-server.spec
+ sed -e 's|%%VERSION%%|$(VERSION)|;s|%%REQUIRES%%|$(REQUIRES)|' \
+ SPECS/rabbitmq-server.spec >SPECS/rabbitmq-server.spec.tmp \
+ && mv SPECS/rabbitmq-server.spec.tmp SPECS/rabbitmq-server.spec
cp ${COMMON_DIR}/* SOURCES/
- sed -i \
- -e 's|^LOCK_FILE=.*$$|LOCK_FILE=/var/lock/subsys/$$NAME|' \
- SOURCES/rabbitmq-server.init
+ sed -e 's|^LOCK_FILE=.*$$|LOCK_FILE=/var/lock/subsys/$$NAME|' \
+ SOURCES/rabbitmq-server.init >SOURCES/rabbitmq-server.init.tmp \
+ && mv SOURCES/rabbitmq-server.init.tmp SOURCES/rabbitmq-server.init
ifeq "$(RPM_OS)" "fedora"
# Fedora says that only vital services should have Default-Start
- sed -i -e '/^# Default-Start:/d;/^# Default-Stop:/d' \
- SOURCES/rabbitmq-server.init
+ sed -e '/^# Default-Start:/d;/^# Default-Stop:/d' \
+ SOURCES/rabbitmq-server.init >SOURCES/rabbitmq-server.init.tmp \
+ && mv SOURCES/rabbitmq-server.init.tmp SOURCES/rabbitmq-server.init
endif
- sed -i -e 's|@SU_RABBITMQ_SH_C@|su rabbitmq -s /bin/sh -c|' \
- SOURCES/rabbitmq-script-wrapper
+ sed -e 's|@SU_RABBITMQ_SH_C@|su rabbitmq -s /bin/sh -c|' \
+ SOURCES/rabbitmq-script-wrapper >SOURCES/rabbitmq-script-wrapper.tmp \
+ && mv SOURCES/rabbitmq-script-wrapper.tmp SOURCES/rabbitmq-script-wrapper
cp rabbitmq-server.logrotate SOURCES/rabbitmq-server.logrotate
server: prepare
diff --git a/packaging/debs/Debian/Makefile b/packaging/debs/Debian/Makefile
index 79e9c1dd..de9cf400 100644
--- a/packaging/debs/Debian/Makefile
+++ b/packaging/debs/Debian/Makefile
@@ -24,13 +24,14 @@ package: clean
cp $(COMMON_DIR)/* $(UNPACKED_DIR)/debian/
# Debian and descendants differ from most other distros in that
# runlevel 2 should start network services.
- sed -i \
- -e 's|^LOCK_FILE=.*$$|LOCK_FILE=|' \
- -e 's|^\(# Default-Start:\).*$$|\1 2 3 4 5|' \
- -e 's|^\(# Default-Stop:\).*$$|\1 0 1 6|' \
- $(UNPACKED_DIR)/debian/rabbitmq-server.init
- sed -i -e 's|@SU_RABBITMQ_SH_C@|su rabbitmq -s /bin/sh -c|' \
- $(UNPACKED_DIR)/debian/rabbitmq-script-wrapper
+ sed -e 's|^LOCK_FILE=.*$$|LOCK_FILE=|' \
+ -e 's|^\(# Default-Start:\).*$$|\1 2 3 4 5|' \
+ -e 's|^\(# Default-Stop:\).*$$|\1 0 1 6|' \
+ $(UNPACKED_DIR)/debian/rabbitmq-server.init >$(UNPACKED_DIR)/debian/rabbitmq-server.init.tmp \
+ && mv $(UNPACKED_DIR)/debian/rabbitmq-server.init.tmp $(UNPACKED_DIR)/debian/rabbitmq-server.init
+ sed -e 's|@SU_RABBITMQ_SH_C@|su rabbitmq -s /bin/sh -c|' \
+ $(UNPACKED_DIR)/debian/rabbitmq-script-wrapper >$(UNPACKED_DIR)/debian/rabbitmq-script-wrapper.tmp \
+ && mv $(UNPACKED_DIR)/debian/rabbitmq-script-wrapper.tmp $(UNPACKED_DIR)/debian/rabbitmq-script-wrapper
chmod a+x $(UNPACKED_DIR)/debian/rules
echo "This package was debianized by Tony Garnock-Jones <tonyg@rabbitmq.com> on\nWed, 3 Jan 2007 15:43:44 +0000.\n\nIt was downloaded from http://www.rabbitmq.com/\n\n" > $(UNPACKED_DIR)/debian/copyright
cat $(UNPACKED_DIR)/LICENSE >> $(UNPACKED_DIR)/debian/copyright
diff --git a/packaging/generic-unix/Makefile b/packaging/generic-unix/Makefile
index b5c342aa..dac28b84 100644
--- a/packaging/generic-unix/Makefile
+++ b/packaging/generic-unix/Makefile
@@ -12,6 +12,9 @@ dist:
MAN_DIR=`pwd`/$(TARGET_DIR)/share/man \
install
+ cp -f rabbitmq-sys $(TARGET_DIR)/sbin
+ chmod 0755 $(TARGET_DIR)/sbin/rabbitmq-sys
+
tar -zcf $(TARGET_TARBALL).tar.gz $(TARGET_DIR)
rm -rf $(SOURCE_DIR) $(TARGET_DIR)
diff --git a/packaging/generic-unix/rabbitmq-sys b/packaging/generic-unix/rabbitmq-sys
new file mode 100644
index 00000000..3151c979
--- /dev/null
+++ b/packaging/generic-unix/rabbitmq-sys
@@ -0,0 +1,34 @@
+#!/bin/sh
+## The contents of this file are subject to the Mozilla Public License
+## Version 1.1 (the "License"); you may not use this file except in
+## compliance with the License. You may obtain a copy of the License
+## at http://www.mozilla.org/MPL/
+##
+## Software distributed under the License is distributed on an "AS IS"
+## basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+## the License for the specific language governing rights and
+## limitations under the License.
+##
+## The Original Code is RabbitMQ.
+##
+## The Initial Developer of the Original Code is VMware, Inc.
+## Copyright (c) 2012 VMware, Inc. All rights reserved.
+##
+
+### generic-unix ###
+### next line potentially updated in package install steps, do not alter
+SYS_PREFIX=${RABBITMQ_HOME}
+
+## Set system default values
+SERVER_ERL_ARGS="+K true +A30 +P 1048576 \
+-kernel inet_default_connect_options [{nodelay,true}]"
+
+CONFIG_FILE=${SYS_PREFIX}/etc/rabbitmq/rabbitmq
+LOG_BASE=${SYS_PREFIX}/var/log/rabbitmq
+MNESIA_BASE=${SYS_PREFIX}/var/lib/rabbitmq/mnesia
+ENABLED_PLUGINS_FILE=${SYS_PREFIX}/etc/rabbitmq/enabled_plugins
+
+OLD_CONF_ENV_FILE=${CONFIG_FILE}.conf
+CONF_ENV_FILE=${CONFIG_FILE}-env.conf
+
+PLUGINS_DIR="${RABBITMQ_HOME}/plugins"
diff --git a/packaging/macports/Makefile b/packaging/macports/Makefile
index 47da02dc..897fc183 100644
--- a/packaging/macports/Makefile
+++ b/packaging/macports/Makefile
@@ -38,9 +38,8 @@ $(DEST)/Portfile: Portfile.in
# needs vars such as HOME to be set. So we have to set them
# explicitly.
macports: dirs $(DEST)/Portfile
- cp $(COMMON_DIR)/rabbitmq-script-wrapper $(DEST)/files
- sed -i -e 's|@SU_RABBITMQ_SH_C@|SHELL=/bin/sh HOME=/var/lib/rabbitmq USER=rabbitmq LOGNAME=rabbitmq PATH="$$(eval `PATH=MACPORTS_PREFIX/bin /usr/libexec/path_helper -s`; echo $$PATH)" su -m rabbitmq -c|' \
- $(DEST)/files/rabbitmq-script-wrapper
+ sed -e 's|@SU_RABBITMQ_SH_C@|SHELL=/bin/sh HOME=/var/lib/rabbitmq USER=rabbitmq LOGNAME=rabbitmq PATH="$$(eval `PATH=@MACPORTS_PREFIX@/bin /usr/libexec/path_helper -s`; echo $$PATH)" su -m rabbitmq -c|' \
+ $(COMMON_DIR)/rabbitmq-script-wrapper >$(DEST)/files/rabbitmq-script-wrapper
cp patch-org.macports.rabbitmq-server.plist.diff $(DEST)/files
if [ -n "$(MACPORTS_USERHOST)" ] ; then \
tar cf - -C $(MACPORTS_DIR) . | ssh $(SSH_OPTS) $(MACPORTS_USERHOST) ' \
diff --git a/packaging/macports/Portfile.in b/packaging/macports/Portfile.in
index 08207205..a57d6dad 100644
--- a/packaging/macports/Portfile.in
+++ b/packaging/macports/Portfile.in
@@ -89,18 +89,14 @@ post-destroot {
xinstall -d -g [existsgroup ${servergroup}] -m 775 ${destroot}${serverhome}
xinstall -d -g [existsgroup ${servergroup}] -m 775 ${destroot}${mnesiadbdir}
- reinplace -E "s:(/etc/rabbitmq/rabbitmq):${prefix}\\1:g" \
- ${realsbin}/rabbitmq-env
- foreach var {CONFIG_FILE LOG_BASE MNESIA_BASE ENABLED_PLUGINS_FILE} {
- reinplace -E "s:^($var)=/:\\1=${prefix}/:" \
- ${realsbin}/rabbitmq-server \
- ${realsbin}/rabbitmqctl \
- ${realsbin}/rabbitmq-plugins
- }
+ reinplace -E "s:^SYS_PREFIX=\${RABBITMQ_HOME}$:SYS_PREFIX=${prefix}:" \
+ ${realsbin}/rabbitmq-sys
+ reinplace -E "s:^SYS_PREFIX=$:SYS_PREFIX=${prefix}:" \
+ ${realsbin}/rabbitmq-sys
xinstall -m 555 ${filespath}/rabbitmq-script-wrapper \
${wrappersbin}/rabbitmq-server
- reinplace -E "s:MACPORTS_PREFIX/bin:${prefix}/bin:g" \
+ reinplace -E "s:@MACPORTS_PREFIX@:${prefix}:g" \
${wrappersbin}/rabbitmq-server
reinplace -E "s:/usr/lib/rabbitmq/bin/:${prefix}/lib/rabbitmq/bin/:g" \
${wrappersbin}/rabbitmq-server
diff --git a/packaging/macports/make-port-diff.sh b/packaging/macports/make-port-diff.sh
index 3eb1b9f5..0583b41b 100755
--- a/packaging/macports/make-port-diff.sh
+++ b/packaging/macports/make-port-diff.sh
@@ -15,7 +15,8 @@ cd $dir/macports
svn checkout http://svn.macports.org/repository/macports/trunk/dports/net/rabbitmq-server/ 2>&1 >/dev/null
# Clear out the svn $id tag
-sed -i -e 's|^# \$.*$|# $Id$|' rabbitmq-server/Portfile
+sed -e 's|^# \$.*$|# $Id$|' rabbitmq-server/Portfile >rabbitmq-server/Portfile.tmp \
+ && mv rabbitmq-server/Portfile.tmp rabbitmq-server/Portfile
# Get the files from the rabbitmq.com macports repo
cd ../rabbitmq
diff --git a/packaging/windows/Makefile b/packaging/windows/Makefile
index 828cf000..8e0ab074 100644
--- a/packaging/windows/Makefile
+++ b/packaging/windows/Makefile
@@ -25,7 +25,7 @@ dist:
xmlto -o . xhtml-nochunks ../../docs/rabbitmq-service.xml
elinks -dump -no-references -no-numbering rabbitmq-service.html \
> $(TARGET_DIR)/readme-service.txt
- todos $(TARGET_DIR)/readme-service.txt
+ todos $(TARGET_DIR)/readme-service.txt || unix2dos $(TARGET_DIR)/readme-service.txt
rm -rf $(TARGET_DIR)/plugins-src
zip -q -r $(TARGET_ZIP).zip $(TARGET_DIR)
rm -rf $(TARGET_DIR) rabbitmq-service.html