#917872 Ensure Mroonga plugin install/upgrade/uninstall

Package:
mariadb-plugin-mroonga
Source:
mariadb-10.6
Description:
Mroonga storage engine for MariaDB
Submitter:
Otto Kekäläinen
Date:
2025-12-08 19:19:04 UTC
Severity:
normal
Tags:
#917872#5
Date:
2018-12-31 08:50:44 UTC
From:
To:
The postinst of Mroong install is, and the postrm uninstalls it
correctly. There is however no code that would on a
postinst/preinst/upgrade scenario reinstall the plugin if the path has
changed (eg. as it does on in MariaDB 10.3 when the soname path
updates from libmariadb18 to libmaridb19).


*********************************************************************************
mariadb-10.3/debian$ cat mariadb-plugin-mroonga.postinst
#!/bin/sh

set -e

# Install Mroonga
# No user or password parameter is required with new MariaDB that
# has unix socket authentication support by default.
mysql < /usr/share/mysql/mroonga/install.sql || true
# Always exit with success instead of leaving dpkg in a broken state


#DEBHELPER#
*********************************************************************************
mariadb-10.3/debian$ cat mariadb-plugin-mroonga.prerm
#!/bin/sh

set -e

# Install Mroonga
# No user or password parameter is required with new MariaDB that
# has unix socket authentication support by default.
mysql < /usr/share/mysql/mroonga/uninstall.sql || true
# Always exit with success instead of leaving dpkg in a broken state


#DEBHELPER#
*********************************************************************************

#917872#10
Date:
2019-01-10 23:38:54 UTC
From:
To:
Just out of curiosity, what is the best way to detect
soname path updates in maintainer script?
If there is a similar package which treats this kind of issue, I want to know.

#917872#15
Date:
2019-01-11 20:02:24 UTC
From:
To:
Hello!

I don't know, unfortunately.

You can try if you find any examples via
https://codesearch.debian.net/ or discuss it on debian-devel@ mailing
list or on IRC. If your questions are MariaDB-specific you can ask
help on the MariaDB developers mailing list or Zulip chat.

#917872#20
Date:
2019-02-26 13:53:38 UTC
From:
To:
Hello Kentaro!

Do you have a chance to help out here?

Thanks! All help is appreciated.

pe 11. tammik. 2019 klo 22.02 Otto Kekäläinen (otto@debian.org) kirjoitti:

#917872#25
Date:
2019-04-19 08:04:46 UTC
From:
To:
Current status:

- mariadb-plugin-mroonga.postinst does the install
- mariadb-plugin-mroonga.prerm does the uninstalls
- both seem to run on upgrades


The current problem is that on upgrades mariadb-plugin-mroonga.prerm
runs at a time when the mysqld is not running, and thus fails. Since
there is no real need to unstall on an upgrade this does not matter,
but looks ugly:

....
Preparing to unpack .../7-mariadb-plugin-mroonga_10.3.14-1_amd64.deb ...
ERROR 2002 (HY000): Can't connect to local MySQL server through socket
'/var/run/mysqld/mysqld.sock' (2 "No such file or directory")
Unpacking mariadb-plugin-mroonga (1:10.3.14-1) over (10.1.37-0+deb9u1) ...
Preparing to unpack
.../8-mariadb-plugin-cracklib-password-check_10.3.14-1_amd64.deb ...
Unpacking mariadb-plugin-cracklib-password-check:amd64 (1:10.3.14-1)
over (10.1.37-0+deb9u1) ...
Preparing to unpack .../9-default-mysql-server_1.0.5_all.deb ...
Unpacking default-mysql-server (1.0.5) over (1.0.2) ...
....

#917872#32
Date:
2020-10-11 21:12:19 UTC
From:
To:
Hello!

If somebody wants to continue working on this newcomer friendly tagged
bug report, please submit Merge Requests at
https://salsa.debian.org/mariadb-team/mariadb-10.5
I promise to review them quickly.

#917872#37
Date:
2022-02-20 01:14:57 UTC
From:
To:
Hello!

If somebody wants to continue working on this[1] newcomer friendly tagged
bug report, please submit Merge Requests[2].

I promise to review them quickly.

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=917872
[2] https://salsa.debian.org/mariadb-team/mariadb-server/-/wikis/Contributing-to-MariaDB-packaging-in-Debian