summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@gmail.com>2024-10-12 03:28:40 +0000
committerBruce Ashfield <bruce.ashfield@gmail.com>2024-10-12 03:28:40 +0000
commit00b2913ab519ade394bceecd11edeebe86ad004d (patch)
treeb5bf442dbcd33d568ac0a27f1258745babdef67d
parentb53ad3d7308ad2e85496fce8af27a59ec076f958 (diff)
downloadmeta-cloud-services-styhead.tar.gz
rabbitmq-server: drop in favour of meta-erlangHEADstyheadmaster
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
-rw-r--r--meta-openstack/recipes-extended/rabbitmq/files/cleanup_install.patch14
-rw-r--r--meta-openstack/recipes-extended/rabbitmq/files/rabbitmq-server178
-rwxr-xr-xmeta-openstack/recipes-extended/rabbitmq/files/rabbitmq-server-setup26
-rw-r--r--meta-openstack/recipes-extended/rabbitmq/files/rabbitmq-server.service13
-rw-r--r--meta-openstack/recipes-extended/rabbitmq/files/remove-docs.patch17
-rw-r--r--meta-openstack/recipes-extended/rabbitmq/rabbitmq-server_3.2.4.bb85
6 files changed, 0 insertions, 333 deletions
diff --git a/meta-openstack/recipes-extended/rabbitmq/files/cleanup_install.patch b/meta-openstack/recipes-extended/rabbitmq/files/cleanup_install.patch
deleted file mode 100644
index 19aa2c2..0000000
--- a/meta-openstack/recipes-extended/rabbitmq/files/cleanup_install.patch
+++ /dev/null
@@ -1,14 +0,0 @@
1Index: rabbitmq-server-3.2.4/Makefile
2===================================================================
3--- rabbitmq-server-3.2.4.orig/Makefile
4+++ rabbitmq-server-3.2.4/Makefile
5@@ -326,7 +326,8 @@
6 install: install_bin
7
8 install_bin: all install_dirs
9- cp -r ebin include LICENSE* INSTALL $(TARGET_DIR)
10+ cp -r ebin include $(TARGET_DIR)
11+ cp -r LICENSE* INSTALL $(DOC_INSTALL_DIR)
12
13 chmod 0755 scripts/*
14 for script in rabbitmq-env rabbitmq-server rabbitmqctl rabbitmq-plugins rabbitmq-defaults; do \
diff --git a/meta-openstack/recipes-extended/rabbitmq/files/rabbitmq-server b/meta-openstack/recipes-extended/rabbitmq/files/rabbitmq-server
deleted file mode 100644
index 4a32990..0000000
--- a/meta-openstack/recipes-extended/rabbitmq/files/rabbitmq-server
+++ /dev/null
@@ -1,178 +0,0 @@
1#!/bin/sh
2#
3# rabbitmq-server RabbitMQ broker
4#
5# chkconfig: - 80 05
6# description: Enable AMQP service provided by RabbitMQ
7#
8
9### BEGIN INIT INFO
10# Provides: rabbitmq-server
11# Required-Start: $remote_fs $network
12# Required-Stop: $remote_fs $network
13# Default-Start: 2 3 4 5
14# Default-Stop: 0 1 6
15# Description: RabbitMQ broker
16# Short-Description: Enable AMQP service provided by RabbitMQ broker
17### END INIT INFO
18
19# Ensure that HOME is set, since the erlang ookie file must be written
20# somewhere
21export HOME=%ROOT_HOME%
22
23DAEMON=/usr/bin/rabbitmq-server
24CONTROL=/usr/bin/rabbitmqctl
25USER=root
26ROTATE_SUFFIX=
27INIT_LOG_DIR=/var/log/rabbitmq
28PID_FILE=/var/run/rabbitmq/pid
29
30LOCK_FILE=
31
32test -x $DAEMON || exit 0
33test -x $CONTROL || exit 0
34
35RETVAL=0
36set -e
37
38ensure_pid_dir () {
39 PID_DIR=`dirname ${PID_FILE}`
40 if [ ! -d ${PID_DIR} ] ; then
41 mkdir -p ${PID_DIR}
42 chown -R ${USER}:${USER} ${PID_DIR}
43 chmod 755 ${PID_DIR}
44 fi
45}
46
47remove_pid () {
48 rm -f ${PID_FILE}
49 rmdir `dirname ${PID_FILE}` || :
50}
51
52start_rabbitmq () {
53 status_rabbitmq quiet
54 if [ $RETVAL = 0 ] ; then
55 echo RabbitMQ is currently running
56 else
57 RETVAL=0
58 ensure_pid_dir
59 set +e
60 RABBITMQ_PID_FILE=$PID_FILE start-stop-daemon --pidfile=$PID_FILE --exec $DAEMON --background --start
61 $CONTROL wait $PID_FILE >/dev/null 2>&1
62 RETVAL=$?
63 set -e
64 case "$RETVAL" in
65 0)
66 echo SUCCESS
67 if [ -n "$LOCK_FILE" ] ; then
68 touch $LOCK_FILE
69 fi
70 echo "`date` - rabbitmq successfully started" >> ${INIT_LOG_DIR}/startup_log
71 # only emit the event on boot
72 [ -n "$UPSTART_JOB" ] && initctl emit --no-wait rabbitmq-server-running || true
73 ;;
74 *)
75 remove_pid
76 echo FAILED - check ${INIT_LOG_DIR}/startup_\{log, _err\}
77 echo "`date` - rabbitmq failed to start" >> ${INIT_LOG_DIR}/startup_err
78 RETVAL=1
79 ;;
80 esac
81 fi
82}
83
84stop_rabbitmq () {
85 status_rabbitmq quiet
86 if [ $RETVAL = 0 ] ; then
87 set +e
88 start-stop-daemon --pidfile=$PID_FILE --stop
89 RETVAL=$?
90 set -e
91 if [ $RETVAL = 0 ] ; then
92 remove_pid
93 if [ -n "$LOCK_FILE" ] ; then
94 rm -f $LOCK_FILE
95 fi
96 echo "`date` - rabbitmq successfully stopped" >> ${INIT_LOG_DIR}/shutdown_log
97 else
98 echo FAILED - check ${INIT_LOG_DIR}/shutdown_log, _err
99 echo "`date` - rabbitmq failed to stop" >> ${INIT_LOG_DIR}/shutdown_err
100 fi
101 else
102 echo RabbitMQ is not running
103 RETVAL=0
104 fi
105}
106
107status_rabbitmq() {
108 set +e
109 if [ "$1" != "quiet" ] ; then
110 $CONTROL status 2>&1
111 else
112 $CONTROL status > /dev/null 2>&1
113 fi
114 if [ $? != 0 ] ; then
115 RETVAL=3
116 fi
117 set -e
118}
119
120rotate_logs_rabbitmq() {
121 set +e
122 $CONTROL rotate_logs ${ROTATE_SUFFIX}
123 if [ $? != 0 ] ; then
124 RETVAL=1
125 fi
126 set -e
127}
128
129restart_running_rabbitmq () {
130 status_rabbitmq quiet
131 if [ $RETVAL = 0 ] ; then
132 restart_rabbitmq
133 else
134 echo RabbitMQ is not runnning
135 RETVAL=0
136 fi
137}
138
139restart_rabbitmq() {
140 stop_rabbitmq
141 start_rabbitmq
142}
143
144case "$1" in
145 start)
146 echo -n "Starting $DESC: "
147 start_rabbitmq
148 echo "$NAME."
149 ;;
150 stop)
151 echo -n "Stopping $DESC: "
152 stop_rabbitmq
153 echo "$NAME."
154 ;;
155 status)
156 status_rabbitmq
157 ;;
158 rotate-logs)
159 echo -n "Rotating log files for $DESC: "
160 rotate_logs_rabbitmq
161 ;;
162 force-reload|reload|restart)
163 echo -n "Restarting $DESC: "
164 restart_rabbitmq
165 echo "$NAME."
166 ;;
167 try-restart)
168 echo -n "Restarting $DESC: "
169 restart_running_rabbitmq
170 echo "$NAME."
171 ;;
172 *)
173 echo "Usage: $0 {start|stop|status|rotate-logs|restart|condrestart|try-restart|reload|force-reload}" >&2
174 RETVAL=1
175 ;;
176esac
177
178exit $RETVAL
diff --git a/meta-openstack/recipes-extended/rabbitmq/files/rabbitmq-server-setup b/meta-openstack/recipes-extended/rabbitmq/files/rabbitmq-server-setup
deleted file mode 100755
index 343c775..0000000
--- a/meta-openstack/recipes-extended/rabbitmq/files/rabbitmq-server-setup
+++ /dev/null
@@ -1,26 +0,0 @@
1#!/bin/sh
2#
3# rabbitmq-server-setup RabbitMQ broker setup
4#
5# description: To Enable AMQP server provided by RabbitMQ,
6# this setup required before starting rabbitmq-server.
7#
8##
9
10
11# Ensure that HOME is set, since the erlang cookie file must be written
12# somewhere
13export HOME=/home/root
14
15USER=root
16ROTATE_SUFFIX=
17INIT_LOG_DIR=/var/log/rabbitmq
18
19# setup log dir and files for rabbitmq server
20if [ ! -d ${INIT_LOG_DIR} ]; then
21 mkdir ${INIT_LOG_DIR}
22 chmod 0755 ${INIT_LOG_DIR}
23 chown $USER:$USER ${INIT_LOG_DIR}
24 touch ${INIT_LOG_DIR}/startup_err
25 touch ${INIT_LOG_DIR}/startup_log
26fi
diff --git a/meta-openstack/recipes-extended/rabbitmq/files/rabbitmq-server.service b/meta-openstack/recipes-extended/rabbitmq/files/rabbitmq-server.service
deleted file mode 100644
index 414ea50..0000000
--- a/meta-openstack/recipes-extended/rabbitmq/files/rabbitmq-server.service
+++ /dev/null
@@ -1,13 +0,0 @@
1[Unit]
2Description=RabbitMQ Messaging broker/server service
3After=network.target
4
5[Service]
6Type=simple
7User=root
8ExecStartPre=/usr/bin/rabbitmq-server-setup
9ExecStart=/usr/bin/rabbitmq-server
10ExecStop=/usr/bin/rabbitmqctl stop
11
12[Install]
13WantedBy=multi-user.target
diff --git a/meta-openstack/recipes-extended/rabbitmq/files/remove-docs.patch b/meta-openstack/recipes-extended/rabbitmq/files/remove-docs.patch
deleted file mode 100644
index 7b3d7b7..0000000
--- a/meta-openstack/recipes-extended/rabbitmq/files/remove-docs.patch
+++ /dev/null
@@ -1,17 +0,0 @@
1Upstream-Status: Inappropriate [other]
2
3The package searches the web for xsl documents and this causes the build to fail.
4
5Index: rabbitmq-server-3.0.4/Makefile
6===================================================================
7--- rabbitmq-server-3.0.4.orig/Makefile
8+++ rabbitmq-server-3.0.4/Makefile
9@@ -320,7 +320,7 @@ $(SOURCE_DIR)/%_usage.erl:
10
11 docs_all: $(MANPAGES) $(WEB_MANPAGES)
12
13-install: install_bin install_docs
14+install: install_bin
15
16 install_bin: all install_dirs
17 cp -r ebin include LICENSE* INSTALL $(TARGET_DIR)
diff --git a/meta-openstack/recipes-extended/rabbitmq/rabbitmq-server_3.2.4.bb b/meta-openstack/recipes-extended/rabbitmq/rabbitmq-server_3.2.4.bb
deleted file mode 100644
index 7816003..0000000
--- a/meta-openstack/recipes-extended/rabbitmq/rabbitmq-server_3.2.4.bb
+++ /dev/null
@@ -1,85 +0,0 @@
1DESCRIPTION = "High-performance AMQP-compliant message broker written in Erlang."
2HOMEPAGE = "http://www.rabbitmq.com/"
3LICENSE = "MPL-1.1"
4LIC_FILES_CHKSUM = "file://LICENSE-MPL-RabbitMQ;md5=b651d0a6feaaf2bf5eb9d36b2495c510"
5SECTION = "network"
6PR = "r2"
7
8SRC_URI = "http://www.rabbitmq.com/releases/rabbitmq-server/v${PV}/${PN}-${PV}.tar.gz \
9 file://rabbitmq-server \
10 file://remove-docs.patch \
11 file://cleanup_install.patch \
12 file://rabbitmq-server.service \
13 file://rabbitmq-server-setup \
14 "
15
16SRC_URI[md5sum] = "09d1af64c005bc680d6790b90655d021"
17SRC_URI[sha256sum] = "a930f92b362df2f292ec5f0281aa2011eb0c668faf6e24c4653a9fc53ec43b9f"
18
19DEPENDS = " \
20 erlang-native \
21 libxslt \
22 python-simplejson \
23 zip-native \
24 unzip-native \
25 libxslt-native \
26 coreutils-native\
27"
28
29RDEPENDS:${PN} = "erlang erlang-modules"
30
31do_compile() {
32 oe_runmake
33}
34
35do_install() {
36 RABBIT_LIB_DIR=${D}${libdir}/rabbitmq/lib/${PN}-${PV}
37 DOC_INSTALL_DIR="${D}${docdir}"
38
39 sed -e "s:^RABBITMQ_HOME=.*:RABBITMQ_HOME=\"${libdir}/rabbitmq/lib/${PN}-${PV}\":g" \
40 -i ${S}/scripts/rabbitmq-env
41 oe_runmake TARGET_DIR=${D} \
42 SBIN_DIR=${D}/${bindir} \
43 MAN_DIR=${D}/${mandir} \
44 DOC_INSTALL_DIR=${DOC_INSTALL_DIR} install \
45
46 install -d ${D}${libdir}/rabbitmq/lib/${PN}-${PV}
47
48 install -d ${D}${localstatedir}/log/${PN}
49
50 install -d ${D}${sysconfdir}/init.d
51 install -m 0755 ${WORKDIR}/rabbitmq-server ${D}${sysconfdir}/init.d/rabbitmq-server
52
53 sed -e "s:%ROOT_HOME%:${ROOT_HOME}:" -i ${D}${sysconfdir}/init.d/rabbitmq-server
54
55 mv ${D}/ebin ${RABBIT_LIB_DIR}/ebin
56 mv ${D}/include ${RABBIT_LIB_DIR}/include
57 mv ${D}/plugins ${RABBIT_LIB_DIR}/plugins
58
59 install -d ${D}${systemd_unitdir}/system
60 install -m 0644 ${WORKDIR}/rabbitmq-server.service ${D}${systemd_unitdir}/system
61
62 if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
63 install -d ${D}${bindir}
64 install -m 0755 ${WORKDIR}/rabbitmq-server-setup ${D}${bindir}
65 fi
66}
67
68inherit useradd update-rc.d systemd
69
70USERADD_PACKAGES = "${PN}"
71GROUPADD_PARAM:${PN} = "--system rabbitmq"
72USERADD_PARAM:${PN} = "--system --create-home --home /var/lib/rabbitmq \
73 -g rabbitmq rabbitmq"
74
75INITSCRIPT_NAME = "rabbitmq-server"
76INITSCRIPT_PARAMS = "defaults"
77
78SYSTEMD_SERVICE:${PN} = "rabbitmq-server.service"
79
80FILES:${PN} += " ${libdir}/rabbitmq/lib/${PN}-${PV}/* \
81 ${localstatedir}/* \
82 "
83
84FILES:${PN}-doc += "LICENSE* INSTALL"
85INSANE_SKIP:${PN} = "unsafe-references-in-scripts"