osc copypac from project:Virtualization:Cloud:OpenStack package:rabbitmq-server revision:3
OBS-URL: https://build.opensuse.org/package/show/network:messaging:amqp/rabbitmq-server?expand=0&rev=1
This commit is contained in:
commit
5cd2afec8c
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.osc
|
16
no-nmap.patch
Normal file
16
no-nmap.patch
Normal file
@ -0,0 +1,16 @@
|
||||
Index: plugins-src/rabbitmq-auth-backend-ldap/package.mk
|
||||
===================================================================
|
||||
--- plugins-src/rabbitmq-auth-backend-ldap/package.mk.orig
|
||||
+++ plugins-src/rabbitmq-auth-backend-ldap/package.mk
|
||||
@@ -1,7 +1,7 @@
|
||||
RELEASABLE:=true
|
||||
DEPS:=rabbitmq-server rabbitmq-erlang-client eldap-wrapper
|
||||
|
||||
-ifeq ($(shell nmap -p 389 localhost | grep '389/tcp open' > /dev/null && echo true),true)
|
||||
-WITH_BROKER_TEST_COMMANDS:=eunit:test(rabbit_auth_backend_ldap_test,[verbose])
|
||||
-WITH_BROKER_TEST_CONFIG:=$(PACKAGE_DIR)/etc/rabbit-test
|
||||
-endif
|
||||
+# ifeq ($(shell nmap -p 389 localhost | grep '389/tcp open' > /dev/null && echo true),true)
|
||||
+# WITH_BROKER_TEST_COMMANDS:=eunit:test(rabbit_auth_backend_ldap_test,[verbose])
|
||||
+# WITH_BROKER_TEST_CONFIG:=$(PACKAGE_DIR)/etc/rabbit-test
|
||||
+# endif
|
12
no-remove-common.patch
Normal file
12
no-remove-common.patch
Normal file
@ -0,0 +1,12 @@
|
||||
Index: Makefile
|
||||
===================================================================
|
||||
--- Makefile.orig
|
||||
+++ Makefile
|
||||
@@ -110,7 +110,6 @@ plugins:
|
||||
mkdir -p $(PLUGINS_DIR)
|
||||
PLUGINS_SRC_DIR="" $(MAKE) -C "$(PLUGINS_SRC_DIR)" plugins-dist PLUGINS_DIST_DIR="$(CURDIR)/$(PLUGINS_DIR)" VERSION=$(VERSION)
|
||||
echo "Put your EZs here and use rabbitmq-plugins to enable them." > $(PLUGINS_DIR)/README
|
||||
- rm -f $(PLUGINS_DIR)/rabbit_common*.ez
|
||||
else
|
||||
plugins:
|
||||
# Not building plugins
|
29
rabbitmq-asroot-script-wrapper
Normal file
29
rabbitmq-asroot-script-wrapper
Normal file
@ -0,0 +1,29 @@
|
||||
#!/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) 2007-2011 VMware, Inc. All rights reserved.
|
||||
##
|
||||
|
||||
cd /var/lib/rabbitmq
|
||||
|
||||
SCRIPT=`basename $0`
|
||||
|
||||
if [ `id -u` = 0 ] ; then
|
||||
/usr/lib/rabbitmq/bin/${SCRIPT} "$@"
|
||||
else
|
||||
echo
|
||||
echo "Only root should run ${SCRIPT}"
|
||||
echo
|
||||
exit 1
|
||||
fi
|
42
rabbitmq-script-wrapper
Normal file
42
rabbitmq-script-wrapper
Normal file
@ -0,0 +1,42 @@
|
||||
#!/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) 2007-2011 VMware, Inc. All rights reserved.
|
||||
##
|
||||
|
||||
# Escape spaces and quotes, because shell is revolting.
|
||||
for arg in "$@" ; do
|
||||
# Escape quotes in parameters, so that they're passed through cleanly.
|
||||
arg=$(sed -e 's/"/\\"/g' <<-END
|
||||
$arg
|
||||
END
|
||||
)
|
||||
CMDLINE="${CMDLINE} \"${arg}\""
|
||||
done
|
||||
|
||||
cd /var/lib/rabbitmq
|
||||
|
||||
SCRIPT=`basename $0`
|
||||
|
||||
if [ `id -u` = 0 ] ; then
|
||||
su rabbitmq -s /bin/sh -c "/usr/lib/rabbitmq/bin/${SCRIPT} ${CMDLINE}"
|
||||
elif [ `id -u` = `id -u rabbitmq` ] ; then
|
||||
/usr/lib/rabbitmq/bin/${SCRIPT} "$@"
|
||||
else
|
||||
/usr/lib/rabbitmq/bin/${SCRIPT}
|
||||
echo
|
||||
echo "Only root or rabbitmq should run ${SCRIPT}"
|
||||
echo
|
||||
exit 1
|
||||
fi
|
3
rabbitmq-server-2.7.1.tar.gz
Normal file
3
rabbitmq-server-2.7.1.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:b0c6e7d235e6ae919e6cd708d0580a52b67d08615f5e171708c2f27742fc49ed
|
||||
size 2616386
|
84
rabbitmq-server.changes
Normal file
84
rabbitmq-server.changes
Normal file
@ -0,0 +1,84 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Jan 10 12:01:48 UTC 2012 - prusnak@opensuse.org
|
||||
|
||||
- updated to 2.7.1
|
||||
- don't use nmap during the build (no-nmap.patch)
|
||||
- don't use /var/lock/subsys in initscript
|
||||
- create /var/run/rabbitmq in initscript
|
||||
- import changes from Fedora package
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Oct 5 00:00:00 CEST 2009 - dpw@lshift.net
|
||||
|
||||
- New upstream release
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jun 17 00:00:00 CEST 2009 - matthias@lshift.net
|
||||
|
||||
- New upstream release
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue May 19 00:00:00 CEST 2009 - matthias@lshift.net
|
||||
|
||||
- Maintenance release for the 1.5.x series
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Apr 6 00:00:00 CEST 2009 - matthias@lshift.net
|
||||
|
||||
- Maintenance release for the 1.5.x series
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Feb 24 00:00:00 CET 2009 - tonyg@lshift.net
|
||||
|
||||
- Maintenance release for the 1.5.x series
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Feb 23 00:00:00 CET 2009 - tonyg@lshift.net
|
||||
|
||||
- Maintenance release for the 1.5.x series
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jan 19 00:00:00 CET 2009 - 0x6e6562@gmail.com
|
||||
|
||||
- Maintenance release for the 1.5.x series
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Dec 17 00:00:00 CET 2008 - matthias@lshift.net
|
||||
|
||||
- New upstream release
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jul 24 00:00:00 CEST 2008 - tonyg@lshift.net
|
||||
|
||||
- New upstream release
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Mar 3 00:00:00 CET 2008 - adrian@lshift.net
|
||||
|
||||
- New upstream release
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Sep 26 00:00:00 CEST 2007 - simon@lshift.net
|
||||
|
||||
- New upstream release
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Aug 29 00:00:00 CEST 2007 - simon@lshift.net
|
||||
|
||||
- New upstream release
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jul 30 00:00:00 CEST 2007 - simon@lshift.net
|
||||
|
||||
- New upstream release
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jun 12 00:00:00 CEST 2007 - hubert@lshift.net
|
||||
|
||||
- Building from source tarball, added starting script, stopping
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon May 21 00:00:00 CEST 2007 - hubert@lshift.net
|
||||
|
||||
- Initial build of server library of RabbitMQ package
|
||||
|
168
rabbitmq-server.init
Normal file
168
rabbitmq-server.init
Normal file
@ -0,0 +1,168 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# rabbitmq-server RabbitMQ broker
|
||||
#
|
||||
# chkconfig: - 80 05
|
||||
# description: Enable AMQP service provided by RabbitMQ
|
||||
#
|
||||
|
||||
### BEGIN INIT INFO
|
||||
# Provides: rabbitmq-server
|
||||
# Required-Start: $local_fs $network $remote_fs
|
||||
# Required-Stop: $local_fs $network $remote_fs
|
||||
# Default-Start: 3 5
|
||||
# Default-Stop: 0 1 2 4 6
|
||||
# Description: RabbitMQ broker
|
||||
# Short-Description: Enable AMQP service provided by RabbitMQ broker
|
||||
### END INIT INFO
|
||||
|
||||
PATH=/sbin:/usr/sbin:/bin:/usr/bin
|
||||
NAME=rabbitmq-server
|
||||
DAEMON=/usr/sbin/${NAME}
|
||||
CONTROL=/usr/sbin/rabbitmqctl
|
||||
DESC=rabbitmq-server
|
||||
USER=rabbitmq
|
||||
ROTATE_SUFFIX=
|
||||
INIT_LOG_DIR=/var/log/rabbitmq
|
||||
PID_FILE=/var/run/rabbitmq/pid
|
||||
|
||||
DEFAULTS_FILE=/etc/sysconfig/rabbitmq-server
|
||||
LOCK_FILE=/var/run/rabbitmq/lock
|
||||
|
||||
test -x $DAEMON || exit 0
|
||||
test -x $CONTROL || exit 0
|
||||
|
||||
# Include rabbitmq defaults if available
|
||||
if [ -f "$DEFAULTS_FILE" ] ; then
|
||||
. $DEFAULTS_FILE
|
||||
export RABBITMQ_MNESIA_BASE RABBITMQ_LOG_BASE \
|
||||
RABBITMQ_NODENAME RABBITMQ_NODE_IP_ADDRESS RABBITMQ_NODE_PORT \
|
||||
RABBITMQ_CLUSTER_CONFIG_FILE RABBITMQ_CONFIG_FILE
|
||||
fi
|
||||
|
||||
mkdir -p /var/run/rabbitmq
|
||||
|
||||
RETVAL=0
|
||||
set -e
|
||||
|
||||
start_rabbitmq () {
|
||||
status_rabbitmq quiet
|
||||
if [ $RETVAL = 0 ] ; then
|
||||
echo RabbitMQ is currently running
|
||||
else
|
||||
RETVAL=0
|
||||
set +e
|
||||
setsid sh -c "RABBITMQ_PID_FILE=$PID_FILE $DAEMON > \
|
||||
${INIT_LOG_DIR}/startup_log 2> ${INIT_LOG_DIR}/startup_err" &
|
||||
$CONTROL wait $PID_FILE >/dev/null 2>&1
|
||||
RETVAL=$?
|
||||
set -e
|
||||
case "$RETVAL" in
|
||||
0)
|
||||
echo SUCCESS
|
||||
if [ -n "$LOCK_FILE" ] ; then
|
||||
touch $LOCK_FILE
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
rm -f $PID_FILE
|
||||
echo FAILED - check ${INIT_LOG_DIR}/startup_\{log, _err\}
|
||||
RETVAL=1
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
}
|
||||
|
||||
stop_rabbitmq () {
|
||||
status_rabbitmq quiet
|
||||
if [ $RETVAL = 0 ] ; then
|
||||
set +e
|
||||
$CONTROL stop > ${INIT_LOG_DIR}/shutdown_log 2> ${INIT_LOG_DIR}/shutdown_err
|
||||
RETVAL=$?
|
||||
set -e
|
||||
if [ $RETVAL = 0 ] ; then
|
||||
rm -f $PID_FILE
|
||||
if [ -n "$LOCK_FILE" ] ; then
|
||||
rm -f $LOCK_FILE
|
||||
fi
|
||||
else
|
||||
echo FAILED - check ${INIT_LOG_DIR}/shutdown_log, _err
|
||||
fi
|
||||
else
|
||||
echo RabbitMQ is not running
|
||||
RETVAL=0
|
||||
fi
|
||||
}
|
||||
|
||||
status_rabbitmq() {
|
||||
set +e
|
||||
if [ "$1" != "quiet" ] ; then
|
||||
$CONTROL status 2>&1
|
||||
else
|
||||
$CONTROL status > /dev/null 2>&1
|
||||
fi
|
||||
if [ $? != 0 ] ; then
|
||||
RETVAL=3
|
||||
fi
|
||||
set -e
|
||||
}
|
||||
|
||||
rotate_logs_rabbitmq() {
|
||||
set +e
|
||||
$CONTROL rotate_logs ${ROTATE_SUFFIX}
|
||||
if [ $? != 0 ] ; then
|
||||
RETVAL=1
|
||||
fi
|
||||
set -e
|
||||
}
|
||||
|
||||
restart_running_rabbitmq () {
|
||||
status_rabbitmq quiet
|
||||
if [ $RETVAL = 0 ] ; then
|
||||
restart_rabbitmq
|
||||
else
|
||||
echo RabbitMQ is not runnning
|
||||
RETVAL=0
|
||||
fi
|
||||
}
|
||||
|
||||
restart_rabbitmq() {
|
||||
stop_rabbitmq
|
||||
start_rabbitmq
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
echo -n "Starting $DESC: "
|
||||
start_rabbitmq
|
||||
echo "$NAME."
|
||||
;;
|
||||
stop)
|
||||
echo -n "Stopping $DESC: "
|
||||
stop_rabbitmq
|
||||
echo "$NAME."
|
||||
;;
|
||||
status)
|
||||
status_rabbitmq
|
||||
;;
|
||||
rotate-logs)
|
||||
echo -n "Rotating log files for $DESC: "
|
||||
rotate_logs_rabbitmq
|
||||
;;
|
||||
force-reload|reload|restart)
|
||||
echo -n "Restarting $DESC: "
|
||||
restart_rabbitmq
|
||||
echo "$NAME."
|
||||
;;
|
||||
condrestart|try-restart)
|
||||
echo -n "Restarting $DESC: "
|
||||
restart_running_rabbitmq
|
||||
echo "$NAME."
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|status|rotate-logs|restart|condrestart|try-restart|reload|force-reload}" >&2
|
||||
RETVAL=1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit $RETVAL
|
12
rabbitmq-server.logrotate
Normal file
12
rabbitmq-server.logrotate
Normal file
@ -0,0 +1,12 @@
|
||||
/var/log/rabbitmq/*.log {
|
||||
weekly
|
||||
missingok
|
||||
rotate 20
|
||||
compress
|
||||
delaycompress
|
||||
notifempty
|
||||
sharedscripts
|
||||
postrotate
|
||||
/sbin/service rabbitmq-server rotate-logs > /dev/null
|
||||
endscript
|
||||
}
|
3
rabbitmq-server.rpmlintrc
Normal file
3
rabbitmq-server.rpmlintrc
Normal file
@ -0,0 +1,3 @@
|
||||
addFilter("rabbitmq-server.* no-binary")
|
||||
addFilter("non-standard-uid.*/var/lib/rabbitmq")
|
||||
addFilter("non-standard-uid.*/var/log/rabbitmq")
|
195
rabbitmq-server.spec
Normal file
195
rabbitmq-server.spec
Normal file
@ -0,0 +1,195 @@
|
||||
#
|
||||
# spec file for package rabbitmq-server
|
||||
#
|
||||
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
%define _rabbit_erllibdir %{_libdir}/rabbitmq/lib/rabbitmq_server-%{version}
|
||||
%define _rabbit_libdir %{_libdir}/rabbitmq
|
||||
|
||||
# norootforbuild
|
||||
|
||||
Name: rabbitmq-server
|
||||
Version: 2.7.1
|
||||
Release: 1
|
||||
License: MPL-1.1
|
||||
Summary: The RabbitMQ Server
|
||||
Url: http://www.rabbitmq.com/
|
||||
Group: System/Daemons
|
||||
Source: http://www.rabbitmq.com/releases/rabbitmq-server/v%{version}/%{name}-%{version}.tar.gz
|
||||
Source1: rabbitmq-server.init
|
||||
Source2: rabbitmq-script-wrapper
|
||||
Source3: rabbitmq-server.logrotate
|
||||
Source4: rabbitmq-asroot-script-wrapper
|
||||
Source5: rabbitmq-server.sysconfig
|
||||
Source6: rabbitmq-server.rpmlintrc
|
||||
Patch0: no-nmap.patch
|
||||
Patch1: no-remove-common.patch
|
||||
BuildRequires: erlang-src
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: libxslt
|
||||
BuildRequires: python
|
||||
BuildRequires: python-simplejson
|
||||
BuildRequires: unzip
|
||||
BuildRequires: xmlto
|
||||
BuildRequires: zip
|
||||
Requires: erlang
|
||||
Requires: logrotate
|
||||
Requires(pre): %fillup_prereq
|
||||
Requires(pre): %insserv_prereq
|
||||
Requires(pre): pwdutils
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
# Do not use noarch since the Erlang packaging does not really allow that
|
||||
#BuildArch: noarch
|
||||
|
||||
%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.
|
||||
|
||||
%package plugins
|
||||
License: MPL-1.1
|
||||
Summary: Plugins for the RabbitMQ server
|
||||
Group: System/Daemons
|
||||
Requires: rabbitmq-server = %{version}
|
||||
|
||||
%description plugins
|
||||
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.
|
||||
|
||||
This package includes some plugins for the RabbitMQ server
|
||||
|
||||
%package -n erlang-rabbitmq-client
|
||||
License: MPL-1.1
|
||||
Summary: RabbitMQ AMQP language bindings for Erlang
|
||||
Group: Development/Libraries/Other
|
||||
Requires: erlang
|
||||
|
||||
%description -n erlang-rabbitmq-client
|
||||
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.
|
||||
|
||||
This package includes the RabbitMQ AMQP language bindings for Erlang.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0
|
||||
%patch1
|
||||
|
||||
%build
|
||||
make all
|
||||
# %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
make install \
|
||||
TARGET_DIR=%{buildroot}%{_rabbit_erllibdir} \
|
||||
SBIN_DIR=%{buildroot}%{_rabbit_libdir}/bin \
|
||||
MAN_DIR=%{buildroot}%{_mandir}
|
||||
|
||||
# Install init scripts
|
||||
install -p -D -m 0755 %{SOURCE1} %{buildroot}%{_initddir}/rabbitmq-server
|
||||
mkdir -p %{buildroot}%{_sbindir}
|
||||
ln -sf %{_initddir}/rabbitmq-server %{buildroot}%{_sbindir}/rcrabbitmq-server
|
||||
mkdir -p %{buildroot}%{_localstatedir}/adm/fillup-templates/
|
||||
install -p -D -m 644 %{SOURCE5} %{buildroot}%{_localstatedir}/adm/fillup-templates/sysconfig.rabbitmq-server
|
||||
|
||||
# Install wrapper scripts
|
||||
%define _rabbit_wrapper %{_builddir}/`basename %{SOURCE2}`
|
||||
%define _rabbit_asroot_wrapper %{_builddir}/`basename %{SOURCE4}`
|
||||
cp %{SOURCE2} %{_rabbit_wrapper}
|
||||
sed -i 's|/usr/lib/|%{_libdir}/|' %{_rabbit_wrapper}
|
||||
cp %{SOURCE4} %{_rabbit_asroot_wrapper}
|
||||
sed -i 's|/usr/lib/|%{_libdir}/|' %{_rabbit_asroot_wrapper}
|
||||
install -p -D -m 0755 %{_rabbit_wrapper} %{buildroot}%{_sbindir}/rabbitmqctl
|
||||
install -p -D -m 0755 %{_rabbit_wrapper} %{buildroot}%{_sbindir}/rabbitmq-server
|
||||
install -p -D -m 0755 %{_rabbit_wrapper} %{buildroot}%{_sbindir}/rabbitmq-multi
|
||||
install -p -D -m 0755 %{_rabbit_asroot_wrapper} %{buildroot}%{_sbindir}/rabbitmq-activate-plugins
|
||||
install -p -D -m 0755 %{_rabbit_asroot_wrapper} %{buildroot}%{_sbindir}/rabbitmq-deactivate-plugins
|
||||
|
||||
# Copy all necessary lib files etc.
|
||||
install -p -D -m 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/logrotate.d/rabbitmq-server
|
||||
|
||||
# Install Erlang client
|
||||
mkdir -p %{buildroot}%{_libdir}/erlang/lib
|
||||
for i in amqp_client rabbit_common ; do
|
||||
unzip %{buildroot}%{_rabbit_erllibdir}/plugins/$i*.ez -d %{buildroot}%{_libdir}/erlang/lib
|
||||
done
|
||||
|
||||
# Create other necessary directories for RabbitMQ server
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/rabbitmq
|
||||
mkdir -p %{buildroot}%{_localstatedir}/lib/rabbitmq/mnesia
|
||||
mkdir -p %{buildroot}%{_localstatedir}/log/rabbitmq
|
||||
|
||||
# Build the list of files
|
||||
rm -f %{_builddir}/filelist.%{name}.rpm
|
||||
echo '%defattr(-,root,root, -)' >> %{_builddir}/filelist.%{name}.rpm
|
||||
(cd %{buildroot}; \
|
||||
find . -type f ! -regex '\.%{_sysconfdir}.*' \
|
||||
! -regex '\.\(%{_rabbit_erllibdir}\|%{_rabbit_libdir}\).*' \
|
||||
| sed -e 's/^\.//' >> %{_builddir}/filelist.%{name}.rpm)
|
||||
|
||||
# Create hardlinks for duplicate files
|
||||
%fdupes %{buildroot}
|
||||
|
||||
%clean
|
||||
rm -rf %{buildroot}
|
||||
|
||||
%pre
|
||||
getent group rabbitmq >/dev/null || groupadd -r rabbitmq
|
||||
getent passwd rabbitmq >/dev/null || useradd -r -g rabbitmq \
|
||||
-d %{_localstatedir}/lib/rabbitmq \
|
||||
-s /sbin/nologin \
|
||||
-c "user for RabbitMQ messaging server" rabbitmq
|
||||
exit 0
|
||||
|
||||
%post
|
||||
%fillup_and_insserv rabbitmq-server
|
||||
|
||||
%preun
|
||||
%stop_on_removal rabbitmq-server
|
||||
|
||||
%postun
|
||||
%restart_on_update rabbitmq-server
|
||||
%insserv_cleanup
|
||||
|
||||
%files -f ../filelist.%{name}.rpm
|
||||
%defattr(-,root,root,-)
|
||||
%attr(0750, rabbitmq, rabbitmq) %dir %{_localstatedir}/lib/rabbitmq
|
||||
%attr(0750, rabbitmq, rabbitmq) %dir %{_localstatedir}/log/rabbitmq
|
||||
%dir %{_sysconfdir}/rabbitmq
|
||||
%dir %{_rabbit_libdir}
|
||||
%{_rabbit_libdir}/bin
|
||||
%dir %{_rabbit_libdir}/lib
|
||||
%{_rabbit_erllibdir}
|
||||
%{_initddir}/rabbitmq-server
|
||||
%{_sbindir}/rcrabbitmq-server
|
||||
%config(noreplace) %{_sysconfdir}/logrotate.d/rabbitmq-server
|
||||
%doc LICENSE* README
|
||||
%dir %{_rabbit_erllibdir}/plugins
|
||||
%exclude %{_rabbit_erllibdir}/plugins/*
|
||||
%exclude %{_libdir}/erlang/lib/amqp_client*/*
|
||||
%exclude %{_libdir}/erlang/lib/rabbit_common*/*
|
||||
|
||||
%files plugins
|
||||
%defattr(-,root,root)
|
||||
%{_rabbit_erllibdir}/plugins/
|
||||
|
||||
%files -n erlang-rabbitmq-client
|
||||
%defattr(-,root,root)
|
||||
%{_libdir}/erlang/lib/amqp_client*/
|
||||
%{_libdir}/erlang/lib/rabbit_common*/
|
||||
|
||||
%changelog
|
75
rabbitmq-server.sysconfig
Normal file
75
rabbitmq-server.sysconfig
Normal file
@ -0,0 +1,75 @@
|
||||
## Type: integer
|
||||
## Default: 1
|
||||
#
|
||||
# Defines how many rabbitmq nodes to start
|
||||
#
|
||||
NODE_COUNT="1"
|
||||
|
||||
## Type: string
|
||||
## Default: ""
|
||||
#
|
||||
# Defines the suffix for logrotate
|
||||
#
|
||||
ROTATE_SUFFIX=""
|
||||
|
||||
## Type: string
|
||||
## Default: "/var/log/rabbitmq"
|
||||
#
|
||||
# Defines the location of the log files
|
||||
#
|
||||
INIT_LOG_DIR="/var/log/rabbitmq"
|
||||
|
||||
## Type: string
|
||||
## Default: "/var/lib/rabbitmq/mnesia"
|
||||
#
|
||||
# Set this to the directory where Mnesia database files should be placed.
|
||||
#
|
||||
RABBITMQ_MNESIA_BASE="/var/lib/rabbitmq/mnesia"
|
||||
|
||||
## Type: string
|
||||
## Default: "/var/log/rabbitmq"
|
||||
#
|
||||
# Log files generated by the server will be placed in this directory.
|
||||
#
|
||||
RABBITMQ_LOG_BASE="/var/log/rabbitmq"
|
||||
|
||||
## Type: string
|
||||
## Default: "rabbit"
|
||||
#
|
||||
# This can be useful if you want to run more than one node per machine -
|
||||
# RABBITMQ_NODENAME should be unique per erlang-node-and-machine
|
||||
# combination. See clustering on a single machine for more.
|
||||
#
|
||||
RABBITMQ_NODENAME="rabbit"
|
||||
|
||||
## Type: string
|
||||
## Default: "0.0.0.0"
|
||||
#
|
||||
# This can be changed if you only want to bind to one network interface.
|
||||
#
|
||||
RABBITMQ_NODE_IP_ADDRESS="0.0.0.0"
|
||||
|
||||
## Type: integer
|
||||
## Default: 5672
|
||||
#
|
||||
# This can be changed if you want to listen on a non-standard port.
|
||||
#
|
||||
RABBITMQ_NODE_PORT="5672"
|
||||
|
||||
## Type: string
|
||||
## Default: "/etc/rabbitmq/rabbitmq_cluster.config"
|
||||
#
|
||||
# If this file is present it is used by the server to auto-configure a
|
||||
# RabbitMQ cluster. See the clustering guide for details.
|
||||
#
|
||||
RABBITMQ_CLUSTER_CONFIG_FILE="/etc/rabbitmq/rabbitmq_cluster.config"
|
||||
|
||||
## Type: string
|
||||
## Default: "/etc/rabbitmq/rabbitmq"
|
||||
#
|
||||
# If this file is present it is used by the server to configure RabbitMQ
|
||||
# application components. Note that the .config extension is automatically
|
||||
# appended by the Erlang runtime. See the section on the configuration file
|
||||
# for details.
|
||||
#
|
||||
RABBITMQ_CONFIG_FILE="/etc/rabbitmq/rabbitmq"
|
Loading…
Reference in New Issue
Block a user