From 586d0d5c863dacb7b8fd22bae4c482de7575af2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Cohen=20Arazi?= Date: Fri, 24 Oct 2025 15:49:40 -0300 Subject: [PATCH] Bug 41099: Make `koha-mysql` disable SSL if required MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Now that Debian 13 (and Ubuntu 25.04) set `ssl=on` by default, we should make the `koha-mysql` helper script disable it by default if not configured. This patch does that. To test: 0. Start a Debian 13 KTD e.g. with: $ KOHA_IMAGE=main-trixie ktd up 1. Run: $ ktd --shell k$ koha-mysql kohadev => SUCCESS: You get into the DB shell 2. Apply this patch 3. Run: k$ debian/scripts/koha-mysql kohadev => SUCCESS: It works as step 1! 4. Make sure you enable SSL in my.cnf: [client] ssl = on 5. Repeat 1 => FAIL: You get an error about SSL in the server being disabled 6. Repeat 4 => SUCCESS: The patch fixes it! 7. This steps imply we reproduced the issue, and it gets fixed, while keeping the current behavior. 8. Sign off :-D Signed-off-by: Tomás Cohen Arazi Signed-off-by: Victor Grousset/tuxayo --- debian/scripts/koha-mysql | 2 ++ 1 file changed, 2 insertions(+) diff --git a/debian/scripts/koha-mysql b/debian/scripts/koha-mysql index d59e13061c..4721c3d158 100755 --- a/debian/scripts/koha-mysql +++ b/debian/scripts/koha-mysql @@ -74,6 +74,8 @@ if [ "$mysqltls" = "yes" ]; then if [ -n "$mysqlkey" ] && [ "$mysqlkey" != "__DB_TLS_CLIENT_KEY__" ]; then set -- --ssl-key="$mysqlkey" "$@" fi +else + set -- --skip-ssl "$@" fi if [ "$mysqltz" != "" ]; then -- 2.51.1