diff options
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 @@ | |||
1 | Index: 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 | ||
21 | export HOME=%ROOT_HOME% | ||
22 | |||
23 | DAEMON=/usr/bin/rabbitmq-server | ||
24 | CONTROL=/usr/bin/rabbitmqctl | ||
25 | USER=root | ||
26 | ROTATE_SUFFIX= | ||
27 | INIT_LOG_DIR=/var/log/rabbitmq | ||
28 | PID_FILE=/var/run/rabbitmq/pid | ||
29 | |||
30 | LOCK_FILE= | ||
31 | |||
32 | test -x $DAEMON || exit 0 | ||
33 | test -x $CONTROL || exit 0 | ||
34 | |||
35 | RETVAL=0 | ||
36 | set -e | ||
37 | |||
38 | ensure_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 | |||
47 | remove_pid () { | ||
48 | rm -f ${PID_FILE} | ||
49 | rmdir `dirname ${PID_FILE}` || : | ||
50 | } | ||
51 | |||
52 | start_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 | |||
84 | stop_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 | |||
107 | status_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 | |||
120 | rotate_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 | |||
129 | restart_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 | |||
139 | restart_rabbitmq() { | ||
140 | stop_rabbitmq | ||
141 | start_rabbitmq | ||
142 | } | ||
143 | |||
144 | case "$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 | ;; | ||
176 | esac | ||
177 | |||
178 | exit $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 | ||
13 | export HOME=/home/root | ||
14 | |||
15 | USER=root | ||
16 | ROTATE_SUFFIX= | ||
17 | INIT_LOG_DIR=/var/log/rabbitmq | ||
18 | |||
19 | # setup log dir and files for rabbitmq server | ||
20 | if [ ! -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 | ||
26 | fi | ||
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] | ||
2 | Description=RabbitMQ Messaging broker/server service | ||
3 | After=network.target | ||
4 | |||
5 | [Service] | ||
6 | Type=simple | ||
7 | User=root | ||
8 | ExecStartPre=/usr/bin/rabbitmq-server-setup | ||
9 | ExecStart=/usr/bin/rabbitmq-server | ||
10 | ExecStop=/usr/bin/rabbitmqctl stop | ||
11 | |||
12 | [Install] | ||
13 | WantedBy=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 @@ | |||
1 | Upstream-Status: Inappropriate [other] | ||
2 | |||
3 | The package searches the web for xsl documents and this causes the build to fail. | ||
4 | |||
5 | Index: 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 @@ | |||
1 | DESCRIPTION = "High-performance AMQP-compliant message broker written in Erlang." | ||
2 | HOMEPAGE = "http://www.rabbitmq.com/" | ||
3 | LICENSE = "MPL-1.1" | ||
4 | LIC_FILES_CHKSUM = "file://LICENSE-MPL-RabbitMQ;md5=b651d0a6feaaf2bf5eb9d36b2495c510" | ||
5 | SECTION = "network" | ||
6 | PR = "r2" | ||
7 | |||
8 | SRC_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 | |||
16 | SRC_URI[md5sum] = "09d1af64c005bc680d6790b90655d021" | ||
17 | SRC_URI[sha256sum] = "a930f92b362df2f292ec5f0281aa2011eb0c668faf6e24c4653a9fc53ec43b9f" | ||
18 | |||
19 | DEPENDS = " \ | ||
20 | erlang-native \ | ||
21 | libxslt \ | ||
22 | python-simplejson \ | ||
23 | zip-native \ | ||
24 | unzip-native \ | ||
25 | libxslt-native \ | ||
26 | coreutils-native\ | ||
27 | " | ||
28 | |||
29 | RDEPENDS:${PN} = "erlang erlang-modules" | ||
30 | |||
31 | do_compile() { | ||
32 | oe_runmake | ||
33 | } | ||
34 | |||
35 | do_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 | |||
68 | inherit useradd update-rc.d systemd | ||
69 | |||
70 | USERADD_PACKAGES = "${PN}" | ||
71 | GROUPADD_PARAM:${PN} = "--system rabbitmq" | ||
72 | USERADD_PARAM:${PN} = "--system --create-home --home /var/lib/rabbitmq \ | ||
73 | -g rabbitmq rabbitmq" | ||
74 | |||
75 | INITSCRIPT_NAME = "rabbitmq-server" | ||
76 | INITSCRIPT_PARAMS = "defaults" | ||
77 | |||
78 | SYSTEMD_SERVICE:${PN} = "rabbitmq-server.service" | ||
79 | |||
80 | FILES:${PN} += " ${libdir}/rabbitmq/lib/${PN}-${PV}/* \ | ||
81 | ${localstatedir}/* \ | ||
82 | " | ||
83 | |||
84 | FILES:${PN}-doc += "LICENSE* INSTALL" | ||
85 | INSANE_SKIP:${PN} = "unsafe-references-in-scripts" | ||