From 00b2913ab519ade394bceecd11edeebe86ad004d Mon Sep 17 00:00:00 2001 From: Bruce Ashfield Date: Sat, 12 Oct 2024 03:28:40 +0000 Subject: rabbitmq-server: drop in favour of meta-erlang Signed-off-by: Bruce Ashfield --- .../rabbitmq/files/cleanup_install.patch | 14 -- .../rabbitmq/files/rabbitmq-server | 178 --------------------- .../rabbitmq/files/rabbitmq-server-setup | 26 --- .../rabbitmq/files/rabbitmq-server.service | 13 -- .../rabbitmq/files/remove-docs.patch | 17 -- .../rabbitmq/rabbitmq-server_3.2.4.bb | 85 ---------- 6 files changed, 333 deletions(-) delete mode 100644 meta-openstack/recipes-extended/rabbitmq/files/cleanup_install.patch delete mode 100644 meta-openstack/recipes-extended/rabbitmq/files/rabbitmq-server delete mode 100755 meta-openstack/recipes-extended/rabbitmq/files/rabbitmq-server-setup delete mode 100644 meta-openstack/recipes-extended/rabbitmq/files/rabbitmq-server.service delete mode 100644 meta-openstack/recipes-extended/rabbitmq/files/remove-docs.patch delete mode 100644 meta-openstack/recipes-extended/rabbitmq/rabbitmq-server_3.2.4.bb 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 @@ -Index: rabbitmq-server-3.2.4/Makefile -=================================================================== ---- rabbitmq-server-3.2.4.orig/Makefile -+++ rabbitmq-server-3.2.4/Makefile -@@ -326,7 +326,8 @@ - install: install_bin - - install_bin: all install_dirs -- cp -r ebin include LICENSE* INSTALL $(TARGET_DIR) -+ cp -r ebin include $(TARGET_DIR) -+ cp -r LICENSE* INSTALL $(DOC_INSTALL_DIR) - - chmod 0755 scripts/* - 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 @@ -#!/bin/sh -# -# rabbitmq-server RabbitMQ broker -# -# chkconfig: - 80 05 -# description: Enable AMQP service provided by RabbitMQ -# - -### BEGIN INIT INFO -# Provides: rabbitmq-server -# Required-Start: $remote_fs $network -# Required-Stop: $remote_fs $network -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Description: RabbitMQ broker -# Short-Description: Enable AMQP service provided by RabbitMQ broker -### END INIT INFO - -# Ensure that HOME is set, since the erlang ookie file must be written -# somewhere -export HOME=%ROOT_HOME% - -DAEMON=/usr/bin/rabbitmq-server -CONTROL=/usr/bin/rabbitmqctl -USER=root -ROTATE_SUFFIX= -INIT_LOG_DIR=/var/log/rabbitmq -PID_FILE=/var/run/rabbitmq/pid - -LOCK_FILE= - -test -x $DAEMON || exit 0 -test -x $CONTROL || exit 0 - -RETVAL=0 -set -e - -ensure_pid_dir () { - PID_DIR=`dirname ${PID_FILE}` - if [ ! -d ${PID_DIR} ] ; then - mkdir -p ${PID_DIR} - chown -R ${USER}:${USER} ${PID_DIR} - chmod 755 ${PID_DIR} - fi -} - -remove_pid () { - rm -f ${PID_FILE} - rmdir `dirname ${PID_FILE}` || : -} - -start_rabbitmq () { - status_rabbitmq quiet - if [ $RETVAL = 0 ] ; then - echo RabbitMQ is currently running - else - RETVAL=0 - ensure_pid_dir - set +e - RABBITMQ_PID_FILE=$PID_FILE start-stop-daemon --pidfile=$PID_FILE --exec $DAEMON --background --start - $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 - echo "`date` - rabbitmq successfully started" >> ${INIT_LOG_DIR}/startup_log - # only emit the event on boot - [ -n "$UPSTART_JOB" ] && initctl emit --no-wait rabbitmq-server-running || true - ;; - *) - remove_pid - echo FAILED - check ${INIT_LOG_DIR}/startup_\{log, _err\} - echo "`date` - rabbitmq failed to start" >> ${INIT_LOG_DIR}/startup_err - RETVAL=1 - ;; - esac - fi -} - -stop_rabbitmq () { - status_rabbitmq quiet - if [ $RETVAL = 0 ] ; then - set +e - start-stop-daemon --pidfile=$PID_FILE --stop - RETVAL=$? - set -e - if [ $RETVAL = 0 ] ; then - remove_pid - if [ -n "$LOCK_FILE" ] ; then - rm -f $LOCK_FILE - fi - echo "`date` - rabbitmq successfully stopped" >> ${INIT_LOG_DIR}/shutdown_log - else - echo FAILED - check ${INIT_LOG_DIR}/shutdown_log, _err - echo "`date` - rabbitmq failed to stop" >> ${INIT_LOG_DIR}/shutdown_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." - ;; - 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 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 @@ -#!/bin/sh -# -# rabbitmq-server-setup RabbitMQ broker setup -# -# description: To Enable AMQP server provided by RabbitMQ, -# this setup required before starting rabbitmq-server. -# -## - - -# Ensure that HOME is set, since the erlang cookie file must be written -# somewhere -export HOME=/home/root - -USER=root -ROTATE_SUFFIX= -INIT_LOG_DIR=/var/log/rabbitmq - -# setup log dir and files for rabbitmq server -if [ ! -d ${INIT_LOG_DIR} ]; then - mkdir ${INIT_LOG_DIR} - chmod 0755 ${INIT_LOG_DIR} - chown $USER:$USER ${INIT_LOG_DIR} - touch ${INIT_LOG_DIR}/startup_err - touch ${INIT_LOG_DIR}/startup_log -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 @@ -[Unit] -Description=RabbitMQ Messaging broker/server service -After=network.target - -[Service] -Type=simple -User=root -ExecStartPre=/usr/bin/rabbitmq-server-setup -ExecStart=/usr/bin/rabbitmq-server -ExecStop=/usr/bin/rabbitmqctl stop - -[Install] -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 @@ -Upstream-Status: Inappropriate [other] - -The package searches the web for xsl documents and this causes the build to fail. - -Index: rabbitmq-server-3.0.4/Makefile -=================================================================== ---- rabbitmq-server-3.0.4.orig/Makefile -+++ rabbitmq-server-3.0.4/Makefile -@@ -320,7 +320,7 @@ $(SOURCE_DIR)/%_usage.erl: - - docs_all: $(MANPAGES) $(WEB_MANPAGES) - --install: install_bin install_docs -+install: install_bin - - install_bin: all install_dirs - 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 @@ -DESCRIPTION = "High-performance AMQP-compliant message broker written in Erlang." -HOMEPAGE = "http://www.rabbitmq.com/" -LICENSE = "MPL-1.1" -LIC_FILES_CHKSUM = "file://LICENSE-MPL-RabbitMQ;md5=b651d0a6feaaf2bf5eb9d36b2495c510" -SECTION = "network" -PR = "r2" - -SRC_URI = "http://www.rabbitmq.com/releases/rabbitmq-server/v${PV}/${PN}-${PV}.tar.gz \ - file://rabbitmq-server \ - file://remove-docs.patch \ - file://cleanup_install.patch \ - file://rabbitmq-server.service \ - file://rabbitmq-server-setup \ - " - -SRC_URI[md5sum] = "09d1af64c005bc680d6790b90655d021" -SRC_URI[sha256sum] = "a930f92b362df2f292ec5f0281aa2011eb0c668faf6e24c4653a9fc53ec43b9f" - -DEPENDS = " \ - erlang-native \ - libxslt \ - python-simplejson \ - zip-native \ - unzip-native \ - libxslt-native \ - coreutils-native\ -" - -RDEPENDS:${PN} = "erlang erlang-modules" - -do_compile() { - oe_runmake -} - -do_install() { - RABBIT_LIB_DIR=${D}${libdir}/rabbitmq/lib/${PN}-${PV} - DOC_INSTALL_DIR="${D}${docdir}" - - sed -e "s:^RABBITMQ_HOME=.*:RABBITMQ_HOME=\"${libdir}/rabbitmq/lib/${PN}-${PV}\":g" \ - -i ${S}/scripts/rabbitmq-env - oe_runmake TARGET_DIR=${D} \ - SBIN_DIR=${D}/${bindir} \ - MAN_DIR=${D}/${mandir} \ - DOC_INSTALL_DIR=${DOC_INSTALL_DIR} install \ - - install -d ${D}${libdir}/rabbitmq/lib/${PN}-${PV} - - install -d ${D}${localstatedir}/log/${PN} - - install -d ${D}${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/rabbitmq-server ${D}${sysconfdir}/init.d/rabbitmq-server - - sed -e "s:%ROOT_HOME%:${ROOT_HOME}:" -i ${D}${sysconfdir}/init.d/rabbitmq-server - - mv ${D}/ebin ${RABBIT_LIB_DIR}/ebin - mv ${D}/include ${RABBIT_LIB_DIR}/include - mv ${D}/plugins ${RABBIT_LIB_DIR}/plugins - - install -d ${D}${systemd_unitdir}/system - install -m 0644 ${WORKDIR}/rabbitmq-server.service ${D}${systemd_unitdir}/system - - if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then - install -d ${D}${bindir} - install -m 0755 ${WORKDIR}/rabbitmq-server-setup ${D}${bindir} - fi -} - -inherit useradd update-rc.d systemd - -USERADD_PACKAGES = "${PN}" -GROUPADD_PARAM:${PN} = "--system rabbitmq" -USERADD_PARAM:${PN} = "--system --create-home --home /var/lib/rabbitmq \ - -g rabbitmq rabbitmq" - -INITSCRIPT_NAME = "rabbitmq-server" -INITSCRIPT_PARAMS = "defaults" - -SYSTEMD_SERVICE:${PN} = "rabbitmq-server.service" - -FILES:${PN} += " ${libdir}/rabbitmq/lib/${PN}-${PV}/* \ - ${localstatedir}/* \ - " - -FILES:${PN}-doc += "LICENSE* INSTALL" -INSANE_SKIP:${PN} = "unsafe-references-in-scripts" -- cgit v1.2.3-54-g00ecf