From 731493689314a2870423ffebca51d49988f8f5c4 Mon Sep 17 00:00:00 2001 From: Robin Sheat Date: Fri, 22 May 2015 13:48:13 +1200 Subject: [PATCH] Bug 14106: patch existing zebra configs with new modulePath This patches the zebra configuration of existing Koha installations so that their modulePath will work on newer Debian (and presumably Ubuntu) releases. Testing: * Install a package built with this patch onto a system with instances created by an older Koha version. * Check that the files in /etc/koha/sites/*/zebra-*.cfg have the new modulePath: directive rather than the old one. --- debian/koha-common.postinst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/debian/koha-common.postinst b/debian/koha-common.postinst index 86c9404..94d479d 100644 --- a/debian/koha-common.postinst +++ b/debian/koha-common.postinst @@ -131,6 +131,13 @@ EOF fi fi +# Bug 14106 - fix the modulePath of existing koha instances so that it'll +# continue to work. This will only patch the files if the exact original string +# that we're fixing them from is there, so we just run it every time. Maybe +# in many years time we can get rid of this, when no one will be running +# Koha < 3.20. +perl -p -i -e 's{^modulePath: /usr/lib/idzebra-2.0/modules$}{modulePath: /usr/lib/idzebra-2.0/modules:/usr/lib/x86_64-linux-gnu/idzebra-2.0/modules:/usr/lib/i386-linux-gnu/idzebra-2.0/modules:/usr/lib/aarch64-linux-gnu/idzebra-2.0/modules:/usr/lib/arm-linux-gnueabi/idzebra-2.0/modules:/usr/lib/arm-linux-gnueabihf/idzebra-2.0/modules:/usr/lib/mips-linux-gnu/idzebra-2.0/modules:/usr/lib/mipsel-linux-gnu/idzebra-2.0/modules:/usr/lib/powerpc-linux-gnu/idzebra-2.0/modules:/usr/lib/powerpc64le-linux-gnu/idzebra-2.0/modules:/usr/lib/s390x-linux-gnu/idzebra-2.0/modules}' $( find /etc/koha/sites -name zebra-authorities.cfg -or -name zebra-authorities-dom.cfg -or -name zebra-biblios.cfg -or -name zebra-biblios-dom.cfg ) + db_stop exit 0 -- 2.1.0