Bug 277922 - Mk/bsd.default-versions.mk: Change default version of MySQL to MariaDB 10.11 (mysql=10.11m)
Summary: Mk/bsd.default-versions.mk: Change default version of MySQL to MariaDB 10.11 ...
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Ports Framework (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Port Management Team
URL: https://mariadb.com/kb/en/distributio...
Keywords:
Depends on: 277889 279253 279256
Blocks:
  Show dependency treegraph
 
Reported: 2024-03-24 14:33 UTC by Vladimir Druzenko
Modified: 2024-06-02 23:32 UTC (History)
14 users (show)

See Also:
vvd: exp-run?


Attachments
Change default version of MySQL to MariaDB 10.11 (2.21 KB, patch)
2024-03-25 20:21 UTC, Vladimir Druzenko
vvd: maintainer-approval?
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Druzenko freebsd_committer freebsd_triage 2024-03-24 14:33:17 UTC
Use MariaDB since FreeBSD 10 on all installations instead of MySQL: with exim+dovecot, Roundcube, Zoneminder, MediaWiki, WordPress, MODX without issues.
Also most Linux distros switched default MySQL to MariaDB many years ago.

I can prepare patch for Mk/bsd.default-versions.mk, Uses/mysql.mk and can to try for UPDATING.
Comment 1 Vladimir Druzenko freebsd_committer freebsd_triage 2024-03-25 20:21:53 UTC
Created attachment 249484 [details]
Change default version of MySQL to MariaDB 10.11
Comment 2 Florian Smeets freebsd_committer freebsd_triage 2024-03-25 20:32:05 UTC
I fully support this.

Add URL that lists all the distributions that including MariaDB and also lists those that have it as default "MySQL" flavor.

Add MariaDB maintainer to cc
Comment 3 Alexey Koscheev 2024-03-26 04:09:02 UTC
We use "vanilla" MySQL with thousands of databases. Current default version (MySQL 8.0) is adequate.
Comment 4 Antoine Brodin freebsd_committer freebsd_triage 2024-03-27 18:39:45 UTC
databases/p5-DBD-mysql fails to configure which blocks a lot of ports
Comment 6 Vladimir Druzenko freebsd_committer freebsd_triage 2024-05-03 15:06:03 UTC
(In reply to Antoine Brodin from comment #4)
This is fixed.
So we can continue now.

Can I ask for exp-run?
The maintainer did not object to this change for more than 1 month (is maintainer timeout work for portmgr@?).

(In reply to Alexey Koscheev from comment #3)
You can continue use it with DEFAULT_VERSIONS+=mysql=80 in /etc/make.conf.
But MariaDB is more relevant for default at least in open-source and free projects, IMHO.
Comment 7 Vladimir Druzenko freebsd_committer freebsd_triage 2024-05-03 15:08:45 UTC
(In reply to Vladimir Druzenko from comment #6)
Fastfix:
DEFAULT_VERSIONS+=mysql=8.0
Comment 8 Alexey Koscheev 2024-05-03 15:24:35 UTC
(In reply to Vladimir Druzenko from comment #6)
What about pkg users?
Comment 9 Vladimir Druzenko freebsd_committer freebsd_triage 2024-05-03 15:34:11 UTC
(In reply to Alexey Koscheev from comment #8)
They can do the same things that pkg users currently do to use MariaDB.
Comment 10 Alexey Koscheev 2024-05-03 17:24:28 UTC
(In reply to Vladimir Druzenko from comment #9)

Swan, Pike, and Crawfish
Comment 11 Antoine Brodin freebsd_committer freebsd_triage 2024-05-09 06:22:28 UTC
New failures:

https://pkg-status.freebsd.org/beefy22/data/140amd64-default-foo/2024-05-08_19h38m32s/logs/errors/p5-DBD-mysql-5.004.log
https://pkg-status.freebsd.org/beefy22/data/140amd64-default-foo/2024-05-08_19h38m32s/logs/errors/mysqltcl-3.052_2.log

New ignored:

databases/mroonga
databases/mysql-connector-c++
databases/qt6-base_sqldriver@mysql
mail/dspam
net-p2p/xbt

New skipped:

devel/qt6
Comment 12 Vladimir Druzenko freebsd_committer freebsd_triage 2024-05-09 07:15:10 UTC
bofh, databases/mroonga support MariaDB 10.11:
> we only support Mroonga with MariaDB 10.11 in this release.
https://mroonga.org/en/blog/2023/08/02/mroonga-13.05.html
Comment 13 Vladimir Druzenko freebsd_committer freebsd_triage 2024-05-09 07:20:04 UTC
(In reply to Antoine Brodin from comment #11)
https://pkg-status.freebsd.org/beefy22/data/140amd64-default-foo/2024-05-08_19h38m32s/logs/errors/mysqltcl-3.052_2.log

./generic/mysqltcl.c:914:7: error: use of undeclared identifier 'bool'
      bool reconnect = 1;
      ^
Look like isn't related.
Added maintainer tcltk@ to CC.
Comment 14 Vladimir Druzenko freebsd_committer freebsd_triage 2024-05-09 07:27:51 UTC
(In reply to Antoine Brodin from comment #11)
https://pkg-status.freebsd.org/beefy22/data/140amd64-default-foo/2024-05-08_19h38m32s/logs/errors/mysqltcl-3.052_2.log

How to add custom text to IGNORE message with "IGNORE_WITH_MYSQL=105m 106m 1011m" for databases/p5-DBD-mysql? Text is: "use databases/p5-DBD-mysql4 or databases/p5-DBD-MariaDB instead".
Added maintainer of databases/p5-DBD-mysql* to CC.
Comment 15 Vladimir Druzenko freebsd_committer freebsd_triage 2024-05-09 11:58:31 UTC
(In reply to Antoine Brodin from comment #11)
Patch for databases/qt6-base_sqldriver@mysql:
--- databases/qt6-base_sqldriver/Makefile.orig
+++ databases/qt6-base_sqldriver/Makefile
@@ -31,7 +31,7 @@ sqlite_CMAKE_ON=      QT_FEATURE_system_sqlite
 ${FLAVOR}_PLIST=       ${.CURDIR}/pkg-plist.${FLAVOR}

 .if ${FLAVOR:U} == mysql
-IGNORE_WITH_MYSQL=     105m 106m 1011m
+CMAKE_ARGS+=   -DMySQL_LIBRARY=${LOCALBASE}/lib/mysql/libmariadb.so
 .endif

 .include <bsd.port.mk>

Build without errors on 13.3-p2 amd64 poudriere and live system.
Comment 16 Jason E. Hale freebsd_committer freebsd_triage 2024-05-09 12:06:09 UTC
(In reply to Vladimir Druzenko from comment #15)
Looks like that would break build with MySQL, though.
Comment 17 Vladimir Druzenko freebsd_committer freebsd_triage 2024-05-09 12:34:28 UTC
(In reply to Jason E. Hale from comment #16)
MariDB installs symlink libmysqlclient.so => libmariadb.so.3:
Patch can be modified:
--- databases/qt6-base_sqldriver/Makefile.orig
+++ databases/qt6-base_sqldriver/Makefile
@@ -31,7 +31,7 @@ sqlite_CMAKE_ON=      QT_FEATURE_system_sqlite
 ${FLAVOR}_PLIST=       ${.CURDIR}/pkg-plist.${FLAVOR}

 .if ${FLAVOR:U} == mysql
-IGNORE_WITH_MYSQL=     105m 106m 1011m
+CMAKE_ARGS+=   -DMySQL_LIBRARY=${LOCALBASE}/lib/mysql/libmysqlclient.so
 .endif

 .include <bsd.port.mk>
Comment 18 Vladimir Druzenko freebsd_committer freebsd_triage 2024-05-10 09:18:49 UTC
(In reply to Vladimir Druzenko from comment #17)
Maybe better to patch MySQL/MariaDB detection in qt6:
devel/qt6-base/files/patch-cmake_FindMySQL.cmake:
--- cmake/FindMySQL.cmake.orig
+++ cmake/FindMySQL.cmake
@@ -44,6 +44,9 @@ if(NOT DEFINED MySQL_ROOT)
 endif()
 if(PkgConfig_FOUND AND NOT DEFINED MySQL_ROOT)
     pkg_check_modules(PC_MySQL QUIET "mysqlclient")
+    if(NOT DEFINED MySQL_ROOT)
+        pkg_check_modules(PC_MySQL QUIET "libmariadb")
+    endif()
     set(MySQL_include_dir_hints ${PC_MySQL_INCLUDEDIR})
     set(MySQL_library_hints ${PC_MySQL_LIBDIR})
     set(MySQL_library_hints_debug "")
Comment 19 Vladimir Druzenko freebsd_committer freebsd_triage 2024-05-10 16:32:25 UTC
(In reply to Vladimir Druzenko from comment #18)
devel/qt6-base/files/patch-cmake_FindMySQL.cmake:
--- cmake/FindMySQL.cmake.orig
+++ cmake/FindMySQL.cmake
@@ -43,7 +43,7 @@ if(NOT DEFINED MySQL_ROOT)
     find_package(PkgConfig QUIET)
 endif()
 if(PkgConfig_FOUND AND NOT DEFINED MySQL_ROOT)
-    pkg_check_modules(PC_MySQL QUIET "mysqlclient")
+    pkg_search_module(PC_MySQL libmariadb mysqlclient)
     set(MySQL_include_dir_hints ${PC_MySQL_INCLUDEDIR})
     set(MySQL_library_hints ${PC_MySQL_LIBDIR})
     set(MySQL_library_hints_debug "")
Comment 20 commit-hook freebsd_committer freebsd_triage 2024-05-21 07:19:46 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=cdd1752148745b583a6ffcc92955e994c07e0adb

commit cdd1752148745b583a6ffcc92955e994c07e0adb
Author:     Pietro Cerutti <gahr@FreeBSD.org>
AuthorDate: 2024-05-21 07:16:38 +0000
Commit:     Pietro Cerutti <gahr@FreeBSD.org>
CommitDate: 2024-05-21 07:18:58 +0000

    databases/mysqltcl: fix build with MariaDB

    PR:             277922 (exp-run)
    Reported by:    antoine

 databases/mysqltcl/Makefile                       |  2 +-
 databases/mysqltcl/files/patch-generic_mysqltcl.c | 12 ++++++++++--
 2 files changed, 11 insertions(+), 3 deletions(-)
Comment 21 Pietro Cerutti freebsd_committer freebsd_triage 2024-05-21 07:21:51 UTC
(In reply to Vladimir Druzenko from comment #13)

Fixed in https://cgit.freebsd.org/ports/commit/?id=cdd1752148745b583a6ffcc92955e994c07e0adb, thanks!
Comment 22 commit-hook freebsd_committer freebsd_triage 2024-05-25 01:56:18 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=359c8eed1862a08dbe0a9a67a62bb209c9471da9

commit 359c8eed1862a08dbe0a9a67a62bb209c9471da9
Author:     Jason E. Hale <jhale@FreeBSD.org>
AuthorDate: 2024-05-24 08:48:58 +0000
Commit:     Jason E. Hale <jhale@FreeBSD.org>
CommitDate: 2024-05-25 01:55:22 +0000

    Qt6: Update to 6.7.1

    As a patch release, Qt 6.7.1 does not introduce any new features but
    contains more than 400 bug fixes, security updates, and other
    improvements to the top of the Qt 6.7.0 release. See more information
    about the most important changes and bug fixes from Qt 6.7.1 release
    note.

    Enable building of databases/qt6-base_sqldriver@mysql with MariaDB. [1]

    Fix build of www/qt6-webengine with the SNDIO option enabled. [2]

    Announcement: https://www.qt.io/blog/qt-6.7.1-released
    Release note: https://code.qt.io/cgit/qt/qtreleasenotes.git/about/qt/6.7.1/release-note.md

    PR:             277922 [1], 279180 [2]
    Reported by:    vvd [1], Benjamin Takacs <nimaje+fbz@bureaucracy.de> [2]
    MFH:            2024Q2
    Security:       f5fa174d-19de-11ef-83d8-4ccc6adda413

 Mk/Uses/qt.mk                                      |    2 +-
 accessibility/qt6-speech/distinfo                  |    6 +-
 comms/qt6-connectivity/distinfo                    |    6 +-
 comms/qt6-sensors/distinfo                         |    6 +-
 comms/qt6-serialbus/distinfo                       |    6 +-
 comms/qt6-serialport/distinfo                      |    6 +-
 databases/qt6-base_sqldriver/Makefile              |    4 -
 databases/qt6-base_sqldriver/distinfo              |    6 +-
 devel/qt6-5compat/distinfo                         |    6 +-
 devel/qt6-base/Makefile                            |    3 -
 devel/qt6-base/distinfo                            |    8 +-
 .../files/patch-cmake_FindMySQL.cmake (new)        |   13 +
 .../files/patch-src_corelib_tools_qspan.h (gone)   |   15 -
 devel/qt6-base/pkg-plist                           |    6 +-
 devel/qt6-languageserver/distinfo                  |    6 +-
 devel/qt6-location/distinfo                        |    6 +-
 devel/qt6-positioning/distinfo                     |    6 +-
 devel/qt6-remoteobjects/distinfo                   |    6 +-
 devel/qt6-scxml/distinfo                           |    6 +-
 devel/qt6-tools/distinfo                           |    6 +-
 devel/qt6-translations/distinfo                    |    6 +-
 devel/qt6-translations/pkg-plist                   |   14 +
 graphics/qt6-3d/distinfo                           |    6 +-
 graphics/qt6-imageformats/Makefile                 |    1 -
 graphics/qt6-imageformats/distinfo                 |    6 +-
 graphics/qt6-lottie/distinfo                       |    6 +-
 graphics/qt6-quickeffectmaker/distinfo             |    6 +-
 graphics/qt6-svg/distinfo                          |    6 +-
 graphics/qt6-wayland/distinfo                      |    6 +-
 misc/qt6-doc/distinfo                              |    6 +-
 misc/qt6-doc/pkg-plist                             |   14 +
 misc/qt6-examples/distinfo                         |    6 +-
 misc/qt6-examples/pkg-plist                        |   82 +-
 multimedia/qt6-multimedia/Makefile                 |   37 +-
 multimedia/qt6-multimedia/distinfo                 |    8 +-
 .../files/patch-src_multimedia_configure.cmake     |   11 +-
 multimedia/qt6-multimedia/pkg-help (new)           |    2 +
 multimedia/qt6-multimedia/pkg-plist                |   49 +
 net/qt6-coap/distinfo                              |    6 +-
 net/qt6-networkauth/distinfo                       |    6 +-
 science/qt6-quick3dphysics/distinfo                |    6 +-
 www/qt6-httpserver/distinfo                        |    6 +-
 www/qt6-webchannel/distinfo                        |    6 +-
 www/qt6-webengine/distinfo                         |    6 +-
 .../files/patch-security-rollup (gone)             | 6091 --------------------
 ...arty_chromium_media_audio_sndio_sndio__input.cc |   10 +-
 ...rty_chromium_media_audio_sndio_sndio__output.cc |   12 +-
 ...ty_webrtc_pc_legacy__stats__collector.cc (gone) |  114 -
 www/qt6-websockets/distinfo                        |    6 +-
 www/qt6-webview/distinfo                           |    6 +-
 x11-toolkits/qt6-charts/distinfo                   |    6 +-
 x11-toolkits/qt6-datavis3d/distinfo                |    6 +-
 x11-toolkits/qt6-declarative/distinfo              |    6 +-
 x11-toolkits/qt6-declarative/pkg-plist             |    8 +-
 x11-toolkits/qt6-graphs/distinfo                   |    6 +-
 x11-toolkits/qt6-graphs/pkg-plist                  |   38 +-
 x11-toolkits/qt6-quick3d/distinfo                  |    6 +-
 x11-toolkits/qt6-quicktimeline/distinfo            |    6 +-
 x11-toolkits/qt6-shadertools/distinfo              |    6 +-
 x11-toolkits/qt6-virtualkeyboard/distinfo          |    6 +-
 60 files changed, 335 insertions(+), 6435 deletions(-)
Comment 23 commit-hook freebsd_committer freebsd_triage 2024-05-25 02:02:23 UTC
A commit in branch 2024Q2 references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=60f70de1dc864e0b1d9dae3c9a93e0b12c64fc50

commit 60f70de1dc864e0b1d9dae3c9a93e0b12c64fc50
Author:     Jason E. Hale <jhale@FreeBSD.org>
AuthorDate: 2024-05-24 08:48:58 +0000
Commit:     Jason E. Hale <jhale@FreeBSD.org>
CommitDate: 2024-05-25 02:00:43 +0000

    Qt6: Update to 6.7.1

    As a patch release, Qt 6.7.1 does not introduce any new features but
    contains more than 400 bug fixes, security updates, and other
    improvements to the top of the Qt 6.7.0 release. See more information
    about the most important changes and bug fixes from Qt 6.7.1 release
    note.

    Enable building of databases/qt6-base_sqldriver@mysql with MariaDB. [1]

    Fix build of www/qt6-webengine with the SNDIO option enabled. [2]

    Announcement: https://www.qt.io/blog/qt-6.7.1-released
    Release note: https://code.qt.io/cgit/qt/qtreleasenotes.git/about/qt/6.7.1/release-note.md

    PR:             277922 [1], 279180 [2]
    Reported by:    vvd [1], Benjamin Takacs <nimaje+fbz@bureaucracy.de> [2]
    MFH:            2024Q2
    Security:       f5fa174d-19de-11ef-83d8-4ccc6adda413

    (cherry picked from commit 359c8eed1862a08dbe0a9a67a62bb209c9471da9)

 Mk/Uses/qt.mk                                      |    2 +-
 accessibility/qt6-speech/distinfo                  |    6 +-
 comms/qt6-connectivity/distinfo                    |    6 +-
 comms/qt6-sensors/distinfo                         |    6 +-
 comms/qt6-serialbus/distinfo                       |    6 +-
 comms/qt6-serialport/distinfo                      |    6 +-
 databases/qt6-base_sqldriver/Makefile              |    4 -
 databases/qt6-base_sqldriver/distinfo              |    6 +-
 devel/qt6-5compat/distinfo                         |    6 +-
 devel/qt6-base/Makefile                            |    3 -
 devel/qt6-base/distinfo                            |    8 +-
 .../files/patch-cmake_FindMySQL.cmake (new)        |   13 +
 .../files/patch-src_corelib_tools_qspan.h (gone)   |   15 -
 devel/qt6-base/pkg-plist                           |    6 +-
 devel/qt6-languageserver/distinfo                  |    6 +-
 devel/qt6-location/distinfo                        |    6 +-
 devel/qt6-positioning/distinfo                     |    6 +-
 devel/qt6-remoteobjects/distinfo                   |    6 +-
 devel/qt6-scxml/distinfo                           |    6 +-
 devel/qt6-tools/distinfo                           |    6 +-
 devel/qt6-translations/distinfo                    |    6 +-
 devel/qt6-translations/pkg-plist                   |   14 +
 graphics/qt6-3d/distinfo                           |    6 +-
 graphics/qt6-imageformats/distinfo                 |    6 +-
 graphics/qt6-lottie/distinfo                       |    6 +-
 graphics/qt6-quickeffectmaker/distinfo             |    6 +-
 graphics/qt6-svg/distinfo                          |    6 +-
 graphics/qt6-wayland/distinfo                      |    6 +-
 misc/qt6-doc/distinfo                              |    6 +-
 misc/qt6-doc/pkg-plist                             |   14 +
 misc/qt6-examples/distinfo                         |    6 +-
 misc/qt6-examples/pkg-plist                        |   82 +-
 multimedia/qt6-multimedia/Makefile                 |   37 +-
 multimedia/qt6-multimedia/distinfo                 |    8 +-
 .../files/patch-src_multimedia_configure.cmake     |   11 +-
 multimedia/qt6-multimedia/pkg-help (new)           |    2 +
 multimedia/qt6-multimedia/pkg-plist                |   49 +
 net/qt6-coap/distinfo                              |    6 +-
 net/qt6-networkauth/distinfo                       |    6 +-
 science/qt6-quick3dphysics/distinfo                |    6 +-
 www/qt6-httpserver/distinfo                        |    6 +-
 www/qt6-webchannel/distinfo                        |    6 +-
 www/qt6-webengine/distinfo                         |    6 +-
 .../files/patch-security-rollup (gone)             | 6091 --------------------
 ...arty_chromium_media_audio_sndio_sndio__input.cc |   10 +-
 ...rty_chromium_media_audio_sndio_sndio__output.cc |   12 +-
 ...ty_webrtc_pc_legacy__stats__collector.cc (gone) |  114 -
 www/qt6-websockets/distinfo                        |    6 +-
 www/qt6-webview/distinfo                           |    6 +-
 x11-toolkits/qt6-charts/distinfo                   |    6 +-
 x11-toolkits/qt6-datavis3d/distinfo                |    6 +-
 x11-toolkits/qt6-declarative/distinfo              |    6 +-
 x11-toolkits/qt6-declarative/pkg-plist             |    8 +-
 x11-toolkits/qt6-graphs/distinfo                   |    6 +-
 x11-toolkits/qt6-graphs/pkg-plist                  |   38 +-
 x11-toolkits/qt6-quick3d/distinfo                  |    6 +-
 x11-toolkits/qt6-quicktimeline/distinfo            |    6 +-
 x11-toolkits/qt6-shadertools/distinfo              |    6 +-
 x11-toolkits/qt6-virtualkeyboard/distinfo          |    6 +-
 59 files changed, 335 insertions(+), 6434 deletions(-)
Comment 24 Vladimir Druzenko freebsd_committer freebsd_triage 2024-05-27 22:17:05 UTC
(In reply to Antoine Brodin from comment #11)
From this list left:

New ignored:
databases/mroonga
databases/mysql-connector-c++
net-p2p/xbt
Comment 26 Jochen Neumeister freebsd_committer freebsd_triage 2024-05-30 14:29:05 UTC
I think it's a pity that I, as a MySQL maintainer, am not asked about this.
I do not agree with this change and ask you not to implement it.
Comment 27 Oleksii Samorukov freebsd_committer freebsd_triage 2024-05-30 14:49:26 UTC
I would like to vote against this change. Let me add some details:

> Use MariaDB since FreeBSD 10 on all installations instead of MySQL: with exim+dovecot, Roundcube, Zoneminder, MediaWiki, WordPress, MODX without issues.

Amazing. But the same applies to MySQL 8.0, does it not? 

> Also most Linux distros switched default MySQL to MariaDB many years ago.

Very weak argument.

> I can prepare patch for Mk/bsd.default-versions.mk, Uses/mysql.mk and can to try for UPDATING.

Sorry, please, no. If someone is willing to use MariaDB, he is free to do so. 

> But MariaDB is more relevant for default at least in open-source and free projects, IMHO.

What are the criteria (behind "because I don't like Oracle")? Both projects are using OSS licenses, both have active communities and support, and both are behind commercial bodies, after all. There should be a strong reason to make such a switch. 

I also see downsides:

1. That would force migration from Oracle MySQL to MariaDB. Companies may have support contracts with one of the bodies already as well as tools/software compatible with only one of them (e.g. i am using XtraBackup from Percona)

2. Configuration is not 100% compatible. 

3. A lot of testing is required to do such switch in the complex environment. 

To me such change is only reasonable if upstream would die, or change license to non-OSS one or would officially be against FreeBSD port. None of these happened. So why we should make a problems for the users?
Comment 28 Christos Chatzaras 2024-06-02 21:21:33 UTC
I also oppose this change.
Comment 29 Christos Chatzaras 2024-06-02 21:44:47 UTC
Migrating from MySQL 8.0 to MariaDB 10.11 involves more than simply uninstalling MySQL and installing MariaDB using the same /var/db/mysql data directory. There are numerous incompatibilities between the two systems. For instance, MySQL 8.0 supports collations like utf8mb4_0900_ai_ci, which are not available in MariaDB. As a result, exporting databases in .sql format and importing them into MariaDB is impractical on a large scale. Additionally, there are differences in storage engines, authentication plugins, and optimizers, as well as query planners, all of which can lead to varying query performance and behavior.