From 67d9b903d66c929e2f04be8a22610ecab20504bf Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Tue, 15 Sep 2026 17:30:13 +0100 Subject: [PATCH] Bug 40901: (QA follow-up) Restore the RabbitMQ and memcached steps in koha-common.postinst The monolithic koha-common.postinst ended by enabling the rabbitmq_stomp plugin, restarting RabbitMQ and restarting memcached (Bug 35242). None of that survived the split: koha-core.postinst never had it and the new koha-common.postinst was an empty stub. A fresh "apt install koha-common" therefore left the STOMP plugin disabled, and upgrades stopped flushing memcached, which is exactly the stale-cache class of bug 35242 fixed. koha-common is the package that depends on rabbitmq-server and memcached, so the steps belong in its postinst. The copy in koha-full.postinst is dropped now that koha-full depends on koha-common. Co-Authored-By: Claude Fable 5.1 Signed-off-by: Martin Renvoize Signed-off-by: Pedro Amorim --- debian/koha-common.postinst | 15 +++++++++++++++ debian/koha-full.postinst | 3 --- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/debian/koha-common.postinst b/debian/koha-common.postinst index b7ec5041d5..5a67453fd5 100644 --- a/debian/koha-common.postinst +++ b/debian/koha-common.postinst @@ -4,4 +4,19 @@ set -e #DEBHELPER# +if [ "$1" = "configure" ]; then + # koha-common is the package that pulls in RabbitMQ and memcached, so + # it keeps the service-level steps the monolithic package used to run. + + # Koha's background jobs reach RabbitMQ over STOMP: make sure the plugin + # is enabled and the broker has picked it up. + if command -v rabbitmq-plugins >/dev/null 2>&1; then + rabbitmq-plugins enable rabbitmq_stomp + service rabbitmq-server restart || true + fi + + # Bug 35242: Force memcache restart after koha install/upgrade + service memcached restart || true +fi + exit 0 diff --git a/debian/koha-full.postinst b/debian/koha-full.postinst index 2e16772c8b..3467c1049c 100644 --- a/debian/koha-full.postinst +++ b/debian/koha-full.postinst @@ -5,7 +5,4 @@ set -e a2enmod mpm_itk rewrite cgi rewrite headers proxy_http service apache2 restart -rabbitmq-plugins enable rabbitmq_stomp -service rabbitmq-server restart - exit 0