F40 Change Proposal: F40 MariaDB MySQL repackaging (Self-Contained)

F40 MariaDB & MySQL repackaging

This is a proposed Change for Fedora Linux.
This document represents a proposed Change. As part of the Changes process, proposals are publicly announced in order to receive community feedback. This proposal will only be implemented if approved by the Fedora Engineering Steering Committee.

:link: Summary

A bigger set of smaller changes which I want to extend visibility for:

  • Drop builds for i686 architecture
  • Rename package ‘community-mysql’ to ‘mysql’ and Stop providing ‘mysql’ symbols by package ‘mariadb’
  • Drop cross-installation functionality
  • Switch to the versioned layout of MariaDB and MySQL packages
  • Introduce MariaDB 10.11 and MySQL 8.1
  • Change the default MariaDB version in Fedora from 10.5 to 10.11

:link: Owner[edit]

:link: Detailed Description

Most (if not all) of the changes I propose here doesn’t probably need such a formal process as Fedora Change is. What I want is primarily to increase the visibility of the changes, and preserve those information in a permanent document, allowing both users and maintainers to find this page both now, and in the future.

The changes described here are something I mostly need to be done, as a maintainer. They are my informed decisions backed up by the expertise I’ve gained over the many years I maintain these packages. I believe in the community discussion to focus primarily the technical aspects of the changes to help me to implement them correctly, bug-free, rather than whether to apply these changes at all.

Moreover, the changes here are described in a specific order. The order is based on how each task logically follow other. In case some of the changes would be found problematic, it might be dropped from the proposal (with all changes that directly relies on it)

Drop builds for i686 architecture:

Both MariaDB and MySQL databases are huge pieces of software, taking hours to compile and test, taking up noticeable amount of system resources on our builders and any attached system (e.g. repositories). At the same time, I can hardly imagine anyone running those databases in production on i686 nowadays.
Nothing, expect the ‘mariadb’ and ‘community-mysql’ packages, which provide the DB servers and client application. Drop of the other packages from the stack is not part of this proposal. So for now, packages like ‘mariadb-connector-c’ (which provides the client library ‘libmariadb.so’) and the ODBC or JAVA connectors will keep to build and ship their i686 variants.
However the DB servers themselves are IMO expendable.

On top of the resources saved, I also keep finding bugs and issues, that are exclusive for the i686 architecture. They are more often than not in the tooling around, rather than the package itself, but it keeps needlessly devouring my time and energy anyway.

Last but not least, all maintainers are currently encouraged to drop i686 support, starting from leaf packages.
https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval

So I have to make sure the MariaDB and MySQL are leaf package on i686 architecture, so I can drop their i686 variants too.
I’ve started the process by fixing 2241091 – [Tracker] Packages that require the MariaDB client library should use mariadb-connector-c

I use the following code to find out which packages requires which provides:

#!/bin/bash mkdir -p RESULTS for REPO in “rawhide” “rpmfusion-free” “rpmfusion-nonfree” ; do for PROVIDE in “mariadb” “mariadb-devel” “mariadb-connector-c” “mariadb-connector-c-devel” “pkgconfig(mariadb)” “pkgconfig(libmariadb)” “mysql” “mysql-devel” “community-mysql” “community-mysql-devel” “pkgconfig(mysql)” ; do echo -e “\n\nREPO: $REPO ; PROVIDE: $PROVIDE”; dnf -q --repo=“$REPO” --repo=“$REPO”-source repoquery --whatrequires “$PROVIDE” --alldeps | tee “./RESULTS/$REPO-$PROVIDE” done done

It show that other than the last few occurrences described in the bugzilla above, all is ready.

Rename package ‘community-mysql’ to ‘mysql’
and Stop providing ‘mysql’ symbols by package ‘mariadb’:

When MariaDB was introduced to Fedora, it seemed like it eventually replaces MySQL and therefore the packages were designed so that ‘mysql’ names were provided by MariaDB, and MySQL was renamed to community-mysql.

The both projects were drop-in replacements at that time, so that design helped the smooth transition. Since then, a lot changed. First, those two databases developed different sets of features. The last “major major” version of MariaDB marked as a drop-in replacement is MariaDB 5.5. From MariaDB 10.0, it is usually still easy to upgrade from one to another.

Since MySQL 8.0 and circa MariaDB 10.5, the differences grew significantly and so it does not make sense anymore to provide ‘mysql’ names (= ‘mysql’ RPM Provides: ) by MariaDB package(s).

Moreover, the package name ‘community-mysql’ is Fedora specific. Oracle upstream uses ‘mysql-community’, Debian, RHEL and CentOS Stream use ‘mysql’. From my experience I can say users usually search for ‘mysql’ name. To keep the naming convention closer to Fedora-related clones, the proposal is to rename the MySQL packages from ‘community-mysql’ to ‘mysql’.

This change will save me, the maintainer, noticeable amount of time and energy when cherry-picking commits and patches from Fedora to CentOS Stream and RHEL.
And the more energy I save downstream, the more I can put into Fedora and upstream.

This change was being prepared to be proposed back for Fedora 37, but was left unfinished due to capacity reasons: Changes/MariaDB MySQL Renaming - Fedora Project Wiki

Drop cross-installation functionality:

In Fedora, it is currently possible, on the packaging level, to cross install server of one DB with client of another.
Specifically, you can install MariaDB server with MySQL client or MySQL server with MariaDB client.

I introduced this functionality to try it out, in hope of delivering a handy enhancement for the users.
Sadly, the drawbacks out-weights the positives. This behavior became a generator of elusive bugs I was never able to resolve.
E.g.: 2026933 – MariaDB client profile conflicts with server profile

Moreover, as the MariaDB and MySQL projects diverged significantly (see the above point), it stopped to make sense around the time the MariaDB stopped to be drop-in replacement for MySQL.

AFAIK, Fedora is the only distribution I know of, which ever allowed such installation combination.
I though it would be interesting, I tried it, I found out, now I want to end the experiment.

This change should not affect any other packages from the stack (‘mariadb-connector-c’, the ODBC, Python or JAVA connectors, …) as they implement the API on their own and don’t rely on the client application.

Switch to the versioned layout of MariaDB and MySQL packages:

I used the modularity heavily, as a package maintainer.
It allowed me to ship alternative versions of MariaDB that I or the users wanted. During chnages of the default major version of MariaDB in Fedora, they served as a handy way for anyone to use them way before the change is implemented, or after it when the haven’t adapted their systems to the new default version. I’ve regularly selected the versions I maintain in CentOS Stream and RHEL - those which received the most care - and supported them fro the longest time as Fedora modules.

With Modularity retired Changes/RetireModularity - Fedora Project Wiki this ability has been lost.

When researching alternative approaches, only one seem to cover the same goals without too much of additional fuss.
That is the “Multiple packages with the same base name”:

I want to change the packaging structure so the result will look as follows:

  • The unversioned name (‘mariadb’) will become a meta-package
    • It will point to the one versioned variant which I choose to be the default one for the given Fedora release
    • It will provide all of the unversioned names for the versioned variant that is default for the given Fedora release, to minimize the changes visible to the users
  • All other versions will have their own versioned package (e.g “mariadb10.5” “mariadb10.11”) and will conflict with each other

This will allow for:

  • users to keep using the unversioned names they are used to
  • maintainer to change the default version for a given Fedora release on a single, centralized place
  • users to enjoy all of the features of the modularity I offered them, in a simpler way
  • maintainer to add new versions quickly, without any need of changing the default version (other than adding new conflicts)

Note: I specifically don’t want the packages to be parallel installable. I only want them to be parallel available. That’s why I didn’t choose “Alternatives” as the solution: Alternatives :: Fedora Docs

Introduce MariaDB 10.11 and MySQL 8.1:

I would like to introduce MariaDB 10.11 and MySQL 8.1 into the Fedora.

Based on the previous point, it should be achieved without any user disturbance, as I won’t change what is the default version in the distribution, I will just add an alternative for the users to choose from.

Proof of concept (needs additional work) for MariaDB 10.11 here:
https://koji.fedoraproject.org/koji/taskinfo?taskID=102927697
https://src.fedoraproject.org/fork/mschorm/rpms/mariadb/commits/10.11-LTS

Change the default MariaDB version in Fedora from 10.5 to 10.11:

To keep being the leading edge distribution, I propose to update the default version of MariaDB in Fedora to the latest upstream LTS version, the MariaDB 10.11.

I have received a feedback on several occasions from various users that they would love to see this version in Fedora. Since I made a working proof of concept, I am confident that I will introduce the new version in time.

The MariaDB 10.6 LTS release has been skipped (was only available as a module) in Fedora, due to strategic reasons. At the time of early days of MariaDB 10.5 and 10.6, the MariaDB upstream changed their strategy of delivering the new releases. They switched to predictable quarterly releases, with new “major major” release every quarter. With this change, all releases are short-term releases with a support for only a single year. Some of the releases are made LTS, mostly based on the community feedback, discussion and demand. This all was new and unclear at the beginning, so we selected 10.5 LTS to be the main version maintained through Fedora, CentOS Stream and RHEL, so users from all three operating systems would contribute via reports to the health of the release and all those user’s MariaDB would receive the same care. When the 10.6 was announced to become LTS, we didn’t rush for it, both due to capacity reasons and to keep the bigger user-base advantage. We didn’t know how long it would take for the next LTS to be announced.

Now, when the situation is clear, and the 10.11 was announced as the LTS, I believe it is appropriate to upgrade to this version in Fedora (and work is being started downstream to again keep the bigger user-base advantage).

If the previous two changes are accepted and implemented, this change will be only a matter of updating the ‘mariadb’ meta-package to point to the ‘mariadb10.11’ as the Fedora default, instead of the ‘mariadb10.5’

:link: Feedback

(05/10/2023) Added clarification regarding other packages from the stack, namely connectors for C, ODBC and JAVA
(05/10/2023) Added clarification that by “mysql names” I mean “‘mysql’ RPM Provides:
(05/10/2023) Added explanation for the specific order of the changes in this document

:link: Benefit to Fedora

Drop builds for i686 architecture

  • Maintainer regaining time and energy, when I stop dealing with i686 specific bugs
  • Fedora infrastructure regaining the system resources needed to be put into hours long compilations, storage, etc.
  • Also ‘BuildRequires:’ regarding MariaDB and MySQL will get fixed across the packages

Rename package ‘community-mysql’ to ‘mysql’ and Stop providing ‘mysql’ symbols by package ‘mariadb’

  • Aligning with other distributions
  • Recognizing the differences between MariaDB and MySQL that grew over time
  • Maintainer regaining some time and energy from downstream work

Drop cross-installation functionality

  • Elusive bugs caused by this will vanish, maintainer doesn’t need to deal with them
  • Recognizing the differences between MariaDB and MySQL that grew over time

Switch to the versioned layout of MariaDB and MySQL packages

  • Allows to regain all of the functionality lost after Modularity retirement
    • Helps maintainer to avoid the painful decision which single version of the DB to pack into Fedora
    • Helps with upgrades of the default version - users may choose to upgrade earlier, or later

Introduce MariaDB 10.11 and MySQL 8.1

  • New stuff that users wait for, yay \o/ !

Change the default MariaDB version in Fedora from 10.5 to 10.11

  • Update to a latest upstream LTS version, awaited by the users

:link: Scope[edit]

  • Proposal owners:

    • request several repositories to be created
    • may need to go through a package review process several times (unfortunately)
  • Other developers:

    • ~6 remaining package(r)s to accept the PRs regarding usage of correct “BuildRequires:” or fix their packages in other way accordingly, in order to accomplish the i686 drop.
  • Release engineering: #Releng issue number

    • shouldn’t be needed ?
  • Policies and guidelines: N/A (not needed for this Change)

    • Should the Guidelines be in conflict with a reasonable approach I propose regarding the versioned packages, lowering their MUST to SHOULD in certain cases or getting FeSCo exception.
  • Trademark approval: N/A (not needed for this Change)

  • Alignment with Community Initiatives:

:link: Upgrade/compatibility impact

Drop builds for i686 architecture

  • Users relying on i686 build of the database servers don’t have any upgrade path

Rename package ‘community-mysql’ to ‘mysql’ and Stop providing ‘mysql’ symbols by package ‘mariadb’

  • The package ‘mariadb’ will no longer be installed preferably instead of package ‘mysql’ when doing “dnf install mysql” (and other sub-packages)

Drop cross-installation functionality

  • Users relying on this atypical setup don’t have any clear upgrade path
    • Such cases should only happen on development setups, which is solvable with containers or similar semi-isolation

Switch to the versioned layout of MariaDB and MySQL packages

  • Nothing I can think of

Introduce MariaDB 10.11 and MySQL 8.1

  • Nothing I can think of

Change the default MariaDB version in Fedora from 10.5 to 10.11

:link: How To Test

Drop builds for i686 architecture

  • i686 builds doesn’t exist anymore

Rename package ‘community-mysql’ to ‘mysql’ and Stop providing ‘mysql’ symbols by package ‘mariadb’

  • The package ‘mariadb’ will no longer be installed preferably instead of package ‘mysql’ when doing “dnf install mysql” (and other sub-packages)
  • Using names ‘mariadb’ and ‘community-mysql’ leads to the same results as before

Drop cross-installation functionality

  • Cross-installation not allowed anymore

Switch to the versioned layout of MariaDB and MySQL packages

  • Test updates, upgrades, re-installs, etc.
    • Users should get the same functional results as before with the same names as before, while having differently named packages present on the system

Introduce MariaDB 10.11 and MySQL 8.1

  • Test upgrades / downgrades between versions

Change the default MariaDB version in Fedora from 10.5 to 10.11

  • Test upgrades / downgrades between versions

:link: User Experience

Drop builds for i686 architecture

  • i686 functionality lost (server only)

Rename package ‘community-mysql’ to ‘mysql’ and Stop providing ‘mysql’ symbols by package ‘mariadb’

  • The package ‘mariadb’ will no longer be installed preferably instead of package ‘mysql’ when doing “dnf install mysql” (and other sub-packages)
    • Otherwise should not be noticeable to the user

Drop cross-installation functionality

  • Cross-installation functionality lost

Switch to the versioned layout of MariaDB and MySQL packages

  • Users should get the same functional results as before with the same names as before, while having differently named packages present on the system
  • Functionality lost by Modularity retirement recovered

Introduce MariaDB 10.11 and MySQL 8.1

  • New stuff that users wait for, yay \o/ !

Change the default MariaDB version in Fedora from 10.5 to 10.11

:link: Dependencies

Only the i686 removal should be blocked by other packages.
All other packages should keep working as they do.

:link: Contingency Plan

Drop builds for i686 architecture

  • I’ll try in F41 again

Rename package ‘community-mysql’ to ‘mysql’ and Stop providing ‘mysql’ symbols by package ‘mariadb’

  • Revert

Drop cross-installation functionality

  • Revert

Switch to the versioned layout of MariaDB and MySQL packages

  • Revert

Introduce MariaDB 10.11 and MySQL 8.1

  • I’ll try in F41 again

Change the default MariaDB version in Fedora from 10.5 to 10.11

  • Revert to the MariaDB 10.5 as the system default, but keep MariaDB 10.11 parallel available in the repository. Fix issues and try in F41 again.

:link: Documentation

Let this document and the linked resources be the documentation.

:link: Release Notes

Will be added later in the process, according to the changes applied

Thank you for the detailed and comprehensive proposal. The plan looks great.

I think it’s entirely reasonable to use the Change Process here. This is much more than a normal package upgrade, and with many itsy bitsy details to figure out, this document and discussion should help to get the details right.

This would work, but please note that python which has a long experience with parallel versions uses a slightly different scheme. The “main” python srpm creates an unversioned python binary rpm. Currently on F39: python3.12-3.12.0-1.fc39.src.rpmpython3-3.12.0-1.fc39.x86_64. Non-main python srpms create a versioned python binary rpm. E.g. currently on F39: python3.8-3.8.18-1.fc39.src.rpmpython3.8-3.8.18-1.fc39.x86_64. A metapackage creates an unnecessary level of indirection.

(Though if you have a strong preference for the proposed approach, it is also fine. So the comment above is more of a suggestion. Such details are entirely within maintainer discretion.)

Versioned packaged do not need to go through review process.
E.g.Package Review Guidelines :: Fedora Docs says:

Contributors and reviewers MUST follow the Package Review Process, with the following exceptions:
[…]

  • The package is being created so that multiple versions of the same package can coexist in the distribution […]
1 Like

This change proposal has now been submitted to FESCo and this topic will be closed.

Ticket Link.

More information on the Changes Policy can be found by visiting our docs page.

Using my new-found powers for good, and after a good suggestion from a friend who has been involved in the Fedora project for a long, long time, ( :grin:) I will leave the topics open until their respective deadlines - see F40 schedule for exact dates.

I will use the date for the System-Wide changes to close topics related to this type of change, and same for changes tagged as Self-Contained.

Sorry for the noise and I hope this works out quite well for us :slight_smile:
Aoife

1 Like

@zbyszek What happens when python3.13 is introduced? Does the python3.12 package need to be modified so it no longer provides the unversioned python?

That will be a f41 time frame testing issue.
As with all python upgrades in fedora the python SIG will build all packages with a python dependancy against 3.13 and work to get any issues found resolved.
(They have already started in this work for f41 and python 3.13)

Both python3.12 and python3.13 have a conditional in them that decides whether “this is the main Python”. The conditional is controlled by python-srpm-macros. When we flip the macro, we rebuild both Pythons (and ship them from a giant side tag).

@churchyard Ok, that’s very clever. I’ve wanted to do something similar with the llvm packages, but could never quite get it to work. I may give that a try.