Bug#1110855: trixie-pu: package rabbitmq-server/4.0.5-6
Package: release.debian.org
Severity: normal
Tags: trixie
X-Debbugs-Cc: rabbitmq-server@packages.debian.org
Control: affects -1 + src:rabbitmq-server
User: release.debian.org@packages.debian.org
Usertags: pu
Hi,
[ Reason ]
I'd like to upgrade rabbitmq-server to 4.0.5-6+deb13u1 to add
the patch included in this BTS entry:
https://bugs.debian.org/1110519
which fixes rabbitmq-server version reporting.
[ Impact ]
Without this patch, rabbitmqctl version reports 0.0.0, as well
as for all plugins listed with "rabbitmq-plugins list".
[ Tests ]
Manually tested it worked.
[ Risks ]
No much risk, it does work now...
[ Checklist ]
[x] *all* changes are documented in the d/changelog
[x] I reviewed all changes and I approve them
[x] attach debdiff against the package in (old)stable
[x] the issue is verified as fixed in unstable
[ Changes ]
The debdiff also contains new autopkgtest, which were added to
Sid earlier. That's not really relevant, though I think it is a good
thing to add to the Stable release. If you need only the diff to the
change I need to add, it's there:
https://bugs.debian.org/cgi-bin/bugreport.cgi?att=1;bug=1110519;filename=0001-Fix-plugin-versions-by-exporting-PROJECT_VERSION.patch;msg=5
Please allow me to upload rabbitmq-server 4.0.5-6+deb13u1 to p-u.
Cheers,
Thomas Goirand (zigo)
diff -Nru rabbitmq-server-4.0.5/debian/changelog rabbitmq-server-4.0.5/debian/changelog
--- rabbitmq-server-4.0.5/debian/changelog 2025-06-26 10:36:03.000000000 +0200
+++ rabbitmq-server-4.0.5/debian/changelog 2025-08-11 14:31:10.000000000 +0200
@@ -1,3 +1,14 @@
+rabbitmq-server (4.0.5-6+deb13u1) trixie; urgency=medium
+
+ * Fix rabbitmq-server broken plugin versions by applying patch from the BTS.
+ Thanks to Stefan Bühler <stefan.buehler@tik.uni-stuttgart.de> for it
+ (Closes: #1110519).
+
+ [ Andreas Hasenack ]
+ * Add many autopkgtest.
+
+ -- Thomas Goirand <zigo@debian.org> Mon, 11 Aug 2025 14:31:10 +0200
+
rabbitmq-server (4.0.5-6) unstable; urgency=medium
* Add elixir-1.18-compat.patch to fix json output of rabbitmctl
diff -Nru rabbitmq-server-4.0.5/debian/rules rabbitmq-server-4.0.5/debian/rules
--- rabbitmq-server-4.0.5/debian/rules 2025-06-26 10:36:03.000000000 +0200
+++ rabbitmq-server-4.0.5/debian/rules 2025-08-11 14:31:10.000000000 +0200
@@ -2,7 +2,7 @@
# -*- makefile -*-
DEB_DESTDIR=debian/rabbitmq-server
-VERSION = $(shell dpkg-parsechangelog -SVersion | sed -e 's/^[[:digit:]]*://' -e 's/[-].*//' -e 's/~/.0/' -e 's/+dfsg1//' | head -n 1)
+export PROJECT_VERSION=$(shell dpkg-parsechangelog -SVersion | sed -e 's/^[[:digit:]]*://' -e 's/[-].*//' -e 's/~/.0/' -e 's/+dfsg1//' | head -n 1)
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
@@ -24,7 +24,7 @@
override_dh_auto_install: PREFIX = /usr
override_dh_auto_install: RMQ_ROOTDIR = $(PREFIX)/lib/rabbitmq
-override_dh_auto_install: RMQ_ERLAPP_DIR = $(RMQ_ROOTDIR)/lib/rabbitmq_server-$(VERSION)
+override_dh_auto_install: RMQ_ERLAPP_DIR = $(RMQ_ROOTDIR)/lib/rabbitmq_server-$(PROJECT_VERSION)
override_dh_auto_install:
dh_auto_install
#dh_auto_install -- DESTDIR=$(DEB_DESTDIR) PREFIX=/usr MAN_DIR=$(DEB_DESTDIR)/usr/share/man
@@ -59,7 +59,7 @@
override_dh_install:
dh_install
- sed -i s/%%VSN%%/$(VERSION)/ $(CURDIR)/debian/rabbitmq-server/usr/bin/rabbitmqadmin
+ sed -i s/%%VSN%%/$(PROJECT_VERSION)/ $(CURDIR)/debian/rabbitmq-server/usr/bin/rabbitmqadmin
override_dh_auto_clean:
rm -f plugins-src/rabbitmq-server plugins/README
diff -Nru rabbitmq-server-4.0.5/debian/salsa-ci.yml rabbitmq-server-4.0.5/debian/salsa-ci.yml
--- rabbitmq-server-4.0.5/debian/salsa-ci.yml 1970-01-01 01:00:00.000000000 +0100
+++ rabbitmq-server-4.0.5/debian/salsa-ci.yml 2025-08-11 14:31:10.000000000 +0200
@@ -0,0 +1,3 @@
+---
+include:
+ - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/recipes/debian.yml
diff -Nru rabbitmq-server-4.0.5/debian/tests/control rabbitmq-server-4.0.5/debian/tests/control
--- rabbitmq-server-4.0.5/debian/tests/control 2025-06-26 10:36:03.000000000 +0200
+++ rabbitmq-server-4.0.5/debian/tests/control 2025-08-11 14:31:10.000000000 +0200
@@ -1,2 +1,22 @@
Tests: smoke-test
Restrictions: superficial, isolation-container
+
+Tests: hello-world
+Restrictions: isolation-container, needs-root, allow-stderr
+Depends: rabbitmq-server,
+ python3-pika
+
+Tests: work-queue
+Restrictions: isolation-container, needs-root, allow-stderr
+Depends: rabbitmq-server,
+ python3-pika
+
+Tests: publish-subscribe
+Restrictions: isolation-container, needs-root, allow-stderr
+Depends: rabbitmq-server,
+ python3-pika
+
+Tests: rpc
+Restrictions: isolation-container, needs-root, allow-stderr
+Depends: rabbitmq-server,
+ python3-pika
diff -Nru rabbitmq-server-4.0.5/debian/tests/hello-world rabbitmq-server-4.0.5/debian/tests/hello-world
--- rabbitmq-server-4.0.5/debian/tests/hello-world 1970-01-01 01:00:00.000000000 +0100
+++ rabbitmq-server-4.0.5/debian/tests/hello-world 2025-08-11 14:31:10.000000000 +0200
@@ -0,0 +1,99 @@
+#!/bin/sh
+
+# Reset rabbitmq
+rabbitmqctl stop_app
+rabbitmqctl reset
+rabbitmqctl start_app
+
+cat <<EOF >send.py
+#!/usr/bin/env python3
+import pika
+
+connection = pika.BlockingConnection(pika.ConnectionParameters('localhost'))
+channel = connection.channel()
+
+channel.queue_declare(queue='hello')
+
+channel.basic_publish(exchange='',
+ routing_key='hello',
+ body='Hello World!')
+print(" [x] Sent 'Hello World!'")
+EOF
+
+cat <<EOF >receive.py
+#!/usr/bin/env python3
+import pika, sys, os
+
+def main():
+ connection = pika.BlockingConnection(pika.ConnectionParameters(host='localhost'))
+ channel = connection.channel()
+
+ channel.queue_declare(queue='hello')
+
+ def callback(ch, method, properties, body):
+ print(f" [x] Received {body}")
+
+ channel.basic_consume(queue='hello', on_message_callback=callback, auto_ack=True)
+
+ print(' [*] Waiting for messages. To exit press CTRL+C')
+ channel.start_consuming()
+
+if __name__ == '__main__':
+ try:
+ main()
+ except KeyboardInterrupt:
+ print('Interrupted')
+ try:
+ sys.exit(0)
+ except SystemExit:
+ os._exit(0)
+EOF
+
+echo "sending the message now"
+python3 send.py
+
+# `rabbitmqctl list_queues` should look like
+# Timeout: 60.0 seconds ...
+# Listing queues for vhost / ...
+# name messages
+# hello 1
+#
+# Check that the hello queue exists and that there is 1 message
+rabbitmqctl list_queues # print for debugging
+if rabbitmqctl list_queues | grep hello | awk '{print $2}' | grep -q "^1$"; then
+ echo "The 'hello' queue exists with a single message."
+else
+ if [ $? -eq 1 ]; then
+ echo "Error: 'hello' queue not found."
+ exit 1
+ else
+ echo "Error: An unknown error occurred."
+ exit 1
+ fi
+fi
+
+# should see
+# [*] Waiting for messages. To exit press CTRL+C
+# [x] Received b'Hello World!'
+timeout 3s python3 receive.py
+
+# now the hello queue should still exist, but have no messages like so:
+# # rabbitmqctl list_queues
+# Timeout: 60.0 seconds ...
+# Listing queues for vhost / ...
+# name messages
+# hello 0
+#
+# Check that the hello queue exists and that there is no message
+rabbitmqctl list_queues # print for debugging
+if rabbitmqctl list_queues | grep hello | awk '{print $2}' | grep -q "^0$"; then
+ echo "The 'hello' queue exists with no messages."
+else
+ if [ $? -eq 1 ]; then
+ echo "Error: 'hello' queue not found."
+ exit 1
+ else
+ echo "Error: An unknown error occurred."
+ exit 1
+ fi
+fi
diff -Nru rabbitmq-server-4.0.5/debian/tests/publish-subscribe rabbitmq-server-4.0.5/debian/tests/publish-subscribe
--- rabbitmq-server-4.0.5/debian/tests/publish-subscribe 1970-01-01 01:00:00.000000000 +0100
+++ rabbitmq-server-4.0.5/debian/tests/publish-subscribe 2025-08-11 14:31:10.000000000 +0200
@@ -0,0 +1,52 @@
+#!/bin/sh
+
+set -e
+
+# Reset rabbitmq
+rabbitmqctl stop_app
+rabbitmqctl reset
+rabbitmqctl start_app
+
+cat << EOF > receive_logs.py
+#!/usr/bin/env python3
+import pika
+
+connection = pika.BlockingConnection(
+ pika.ConnectionParameters(host='localhost'))
+channel = connection.channel()
+
+channel.exchange_declare(exchange='logs', exchange_type='fanout')
+
+result = channel.queue_declare(queue='', exclusive=True)
+queue_name = result.method.queue
+
+channel.queue_bind(exchange='logs', queue=queue_name)
+
+print(' [*] Waiting for logs. To exit press CTRL+C')
+
+def callback(ch, method, properties, body):
+ print(f" [x] {body}")
+
+channel.basic_consume(
+ queue=queue_name, on_message_callback=callback, auto_ack=True)
+
+channel.start_consuming()
+EOF
+
+# create 2 consumers
+python3 receive_logs.py &
+python3 receive_logs.py &
+
+# the consumers are listed in the bindings.
+# # rabbitmqctl list_bindings | grep logs
+# logs exchange amq.gen-9cej1xIy-VQLf6d3UXvU1w queue amq.gen-9cej1xIy-VQLf6d3UXvU1w []
+# logs exchange amq.gen-H-ky4z3jFxa5UxpigJAD0g queue amq.gen-H-ky4z3jFxa5UxpigJAD0g []
+rabbitmqctl list_bindings # print for debug
+# Check that JSON formatter works as well
+rabbitmqctl list_bindings --formatter json
+if [ $(rabbitmqctl list_bindings | grep "logs" | awk '{print $1}' | wc -l) -eq 2 ]; then
+ echo "The number of consumers is 2."
+else
+ echo "The number of consumers is not 2."
+ exit 1
+fi
diff -Nru rabbitmq-server-4.0.5/debian/tests/rpc rabbitmq-server-4.0.5/debian/tests/rpc
--- rabbitmq-server-4.0.5/debian/tests/rpc 1970-01-01 01:00:00.000000000 +0100
+++ rabbitmq-server-4.0.5/debian/tests/rpc 2025-08-11 14:31:10.000000000 +0200
@@ -0,0 +1,119 @@
+#!/bin/sh
+
+# Reset rabbitmq
+rabbitmqctl stop_app
+rabbitmqctl reset
+rabbitmqctl start_app
+
+cat << EOF > rpc_server.py
+#!/usr/bin/env python
+import pika
+
+connection = pika.BlockingConnection(
+ pika.ConnectionParameters(host='localhost'))
+
+channel = connection.channel()
+
+channel.queue_declare(queue='rpc_queue')
+
+def fib(n):
+ if n == 0:
+ return 0
+ elif n == 1:
+ return 1
+ else:
+ return fib(n - 1) + fib(n - 2)
+
+def on_request(ch, method, props, body):
+ n = int(body)
+
+ print(f" [.] fib({n})")
+ response = fib(n)
+
+ ch.basic_publish(exchange='',
+ routing_key=props.reply_to,
+ properties=pika.BasicProperties(correlation_id = \
+ props.correlation_id),
+ body=str(response))
+ ch.basic_ack(delivery_tag=method.delivery_tag)
+
+channel.basic_qos(prefetch_count=1)
+channel.basic_consume(queue='rpc_queue', on_message_callback=on_request)
+
+print(" [x] Awaiting RPC requests")
+channel.start_consuming()
+EOF
+
+cat << EOF > rpc_client.py
+#!/usr/bin/env python3
+import pika
+import uuid
+
+
+class FibonacciRpcClient(object):
+
+ def __init__(self):
+ self.connection = pika.BlockingConnection(
+ pika.ConnectionParameters(host='localhost'))
+
+ self.channel = self.connection.channel()
+
+ result = self.channel.queue_declare(queue='', exclusive=True)
+ self.callback_queue = result.method.queue
+
+ self.channel.basic_consume(
+ queue=self.callback_queue,
+ on_message_callback=self.on_response,
+ auto_ack=True)
+
+ self.response = None
+ self.corr_id = None
+
+ def on_response(self, ch, method, props, body):
+ if self.corr_id == props.correlation_id:
+ self.response = body
+
+ def call(self, n):
+ self.response = None
+ self.corr_id = str(uuid.uuid4())
+ self.channel.basic_publish(
+ exchange='',
+ routing_key='rpc_queue',
+ properties=pika.BasicProperties(
+ reply_to=self.callback_queue,
+ correlation_id=self.corr_id,
+ ),
+ body=str(n))
+ while self.response is None:
+ self.connection.process_data_events(time_limit=None)
+ return int(self.response)
+
+
+fibonacci_rpc = FibonacciRpcClient()
+
+print(" [x] Requesting fib(30)")
+response = fibonacci_rpc.call(30)
+print(f" [.] Got {response}")
+EOF
+
+# Start the RPC server
+python3 rpc_server.py &
+
+# Give the server some time to start
+sleep 2
+
+# Run a client to initiate a job for the fibonacci sequence
+client_result=$(python3 rpc_client.py)
+
+# $client_results should look like:
+# [x] Requesting fib(30)
+# [.] fib(30)
+# [.] Got 832040
+
+echo $client_result
+if echo $client_result | grep -q "Got 832040"; then
+ echo "client ran succesffuly"
+else
+ echo "ERROR, something went wrong."
+ exit 1
+fi
diff -Nru rabbitmq-server-4.0.5/debian/tests/smoke-test rabbitmq-server-4.0.5/debian/tests/smoke-test
--- rabbitmq-server-4.0.5/debian/tests/smoke-test 2025-06-26 10:36:03.000000000 +0200
+++ rabbitmq-server-4.0.5/debian/tests/smoke-test 2025-08-11 14:31:10.000000000 +0200
@@ -1,7 +1,3 @@
#!/bin/sh
-exec 2>&1
-
-set -exu
-
systemctl is-active rabbitmq-server.service
diff -Nru rabbitmq-server-4.0.5/debian/tests/work-queue rabbitmq-server-4.0.5/debian/tests/work-queue
--- rabbitmq-server-4.0.5/debian/tests/work-queue 1970-01-01 01:00:00.000000000 +0100
+++ rabbitmq-server-4.0.5/debian/tests/work-queue 2025-08-11 14:31:10.000000000 +0200
@@ -0,0 +1,117 @@
+#!/bin/sh
+
+# Reset rabbitmq
+rabbitmqctl stop_app
+rabbitmqctl reset
+rabbitmqctl start_app
+
+cat << EOF > new_task.py
+#!/usr/bin/env python3
+import pika
+import sys
+
+connection = pika.BlockingConnection(
+ pika.ConnectionParameters(host='localhost'))
+channel = connection.channel()
+
+channel.queue_declare(queue='task_queue', durable=True)
+
+message = ' '.join(sys.argv[1:]) or "Hello World!"
+channel.basic_publish(
+ exchange='',
+ routing_key='task_queue',
+ body=message,
+ properties=pika.BasicProperties(delivery_mode=2) # Set delivery mode to persistent (2)
+ )
+print(f" [x] Sent {message}")
+connection.close()
+EOF
+
+cat << EOF > worker.py
+#!/usr/bin/env python3
+import pika
+import time
+
+connection = pika.BlockingConnection(
+ pika.ConnectionParameters(host='localhost'))
+channel = connection.channel()
+
+channel.queue_declare(queue='task_queue', durable=True)
+print(' [*] Waiting for messages. To exit press CTRL+C')
+
+
+def callback(ch, method, properties, body):
+ print(f" [x] Received {body.decode()}")
+ time.sleep(body.count(b'.'))
+ print(" [x] Done")
+ ch.basic_ack(delivery_tag=method.delivery_tag)
+
+
+channel.basic_qos(prefetch_count=1)
+channel.basic_consume(queue='task_queue', on_message_callback=callback)
+
+channel.start_consuming()
+EOF
+
+
+# Create 5 queues messages
+python3 new_task.py First message.
+python3 new_task.py Second message..
+python3 new_task.py Third message...
+python3 new_task.py Fourth message....
+python3 new_task.py Fifth message.....
+
+# check the queued messages, we shoudl have 5 such as:
+# # rabbitmqctl list_queues name messages_ready messages_unacknowledged
+# Timeout: 60.0 seconds ...
+# Listing queues for vhost / ...
+# name messages_ready messages_unacknowledged
+# hello 0 0
+# task_queue 5 0
+#
+# Check that the task queue exists and that there is 5 messages
+echo "Expected:"
+echo "task_queue 5 0"
+echo "Actual:"
+tqueue=$(rabbitmqctl list_queues name messages_ready messages_unacknowledged | grep task_queue)
+echo $tqueue
+if echo $tqueue | awk '{print $2}' | grep -q "^5$"; then
+ echo "The 'task_queue' queue exists with 5 message."
+else
+ echo "Error: error checking the task_queue"
+ exit 1
+fi
+
+# Now create 2 workers
+python3 worker.py &
+python3 worker.py &
+
+# let the workers do their job
+sleep 13
+
+# Now there should be no messages_ready and no messages_unacknowledged such as:
+# # rabbitmqctl list_queues name messages_ready messages_unacknowledged
+# Timeout: 60.0 seconds ...
+# Listing queues for vhost / ...
+# name messages_ready messages_unacknowledged
+# hello 0 0
+# task_queue 0 0
+echo "Expected:"
+echo "task_queue 0 0"
+echo "Actual:"
+tqueue=$(rabbitmqctl list_queues name messages_ready messages_unacknowledged | grep task_queue)
+echo $tqueue
+if echo $tqueue | grep task_queue | awk '{print $2}' | grep -q "^0"; then
+ echo "The 'task_queue' queue exists with 0 messages_ready."
+else
+ echo "Error: checking the task_queue messages_ready"
+ exit 1
+fi
+
+if echo $tqueue | awk '{print $3}' | grep -q "^0"; then
+ echo "The 'task_queue' queue exists with 0 messages_unacknowledged."
+else
+ echo "Error: checking the task_queue messages_unacknowledged"
+ exit 1
+fi
+
Reply to: