-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MDEV-33631 Ubuntu/Debian MYSQL_SERVER_SUFFIX is version+suffix on Mar… #3116
MDEV-33631 Ubuntu/Debian MYSQL_SERVER_SUFFIX is version+suffix on Mar… #3116
Conversation
-DEB_VERSION_REVISION := $(shell echo $(DEB_VERSION) | sed -e 's/^.*-//')
+DEB_VERSION_REVISION := $(shell echo $(DEB_VERSION) | sed -e
's/^.*~/-1~/')
RELEASE := $(shell lsb_release -r -s) #
Can you please elaborate a bit, why is adding `-1~` to the result of
`SELECT VERSION()` desired? What is the benefit?
|
sed in PR not quite right yet. Goal is to take a native DEB_VERSION and an autobake.sh version and generate a suffix that doesn't include the full version. The current behaviour is:
Native (preserve existing behaviour): Desired suffix: 1~deb12u1 autobake: Desired Suffix: 1~ubu2204 (or does it need a "1" at all). Test of the best regex I have so far:
This is taking the leading 1 from the DEB_VERSION rather than the |
I can help with the regex but lets first specify the desired end goal.
The Debian string seems ok to me already. The additional '-1' is the Debian
revision that intentionally denotes it from upstream.
The upstream 1:10.6.18+maria~ubu2204 used in all mariadb.org releases and
repositories also seem ok to me. It has the upstream version and a '+maria'
to denote that it is a mariadb.org binary release, and it has ~ubu2204 to
show what distro the build was made for.
To my knowledge this pattern makes all upgrades behave correctly. If
somebody is running 1:10.6.18-1 or 1:10.6.18-0ubuntu.22.04 they will
correctly upgrade if they enable mariadb.org repos to 1:10.6.18+maria~ubu2204.
And later if they upgrade distro they will upgrade to 1:10.6.18+maria~ubu2310
as an example.
What is the desired behavior you are aiming for?
|
The version number in the package isn't something I want to interfere with, its just the MYSQL_SERVER_SUFFIX that is used to generate the string used by
Its a bit repetitive. I'm thinking A deb package would return be |
Agree, the desired end result for the version query would be:
You don't need the Debian/Ubuntu revision Just for reference about the Debian package version:
|
So on regex:
|
596dc80
to
1ba7599
Compare
I tested this in downstream Debian rules file:
The build log contain:
Also tested manually:
Not sure why build logs has dash in Anyway, your suggested new regex would work in Debian downstream equally well:
|
…iaDB packaged versions The debian/rules removed sufficient version information from the downstream version, however the mariadb upstream has a + separator from the suffix. While we are at it, remove the Debian/Ubuntu revision -1. Other revisions used: * Debian unstable (inherited to both Debian and Ubuntu if package unchanged): 1:10.11.6-2 * Ubuntu stable updates example: 1:10.11.6-0ubuntu0.23.10.2 * Debian stable updates example: 1:10.11.4-1~deb12u1 The result is compulation with: -DMYSQL_SERVER_SUFFIX="-1:10.4.34+maria~deb10" \ Compared to Debian: -DMYSQL_SERVER_SUFFIX="-1~deb12u1" \ The impact comes into play with SELECT VERSION(): 10.4.34-MariaDB-1:10.4.34+maria~deb10 A more abbreviated form of the following is much more human/machine parsable: 10.6.16-MariaDB~ubu2004 Reviewer: Otto Kekäläinen
1ba7599
to
2bc4049
Compare
Description
…iaDB packaged versions
The debian/rules removed sufficient version information from the downstream version, however the mariadb upstream has a + separator from the suffix.
The result is compilation with:
-DMYSQL_SERVER_SUFFIX="-1:10.4.34+maria~deb10" \
Compared to Debian:
-DMYSQL_SERVER_SUFFIX="-1~deb12u1" \
The impact comes into play with SELECT VERSION():
10.4.34-MariaDB-1:10.4.34+maria~deb10
A more abbreviated form of the following is much more human/machine parsable:
10.6.16-MariaDB-1~ubu2004
Release Notes
Removed duplicate version information in VERSION() for MariaDB debian/ubuntu packages.
How can this PR be tested?
TODO: modify the automated test suite to verify that the PR causes MariaDB to behave as intended.
Consult the documentation on "Writing good test cases".
If the changes are not amenable to automated testing, please explain why not and carefully describe how to test manually.
Basing the PR against the correct MariaDB version
PR quality check
Notablely I have assumed a Debian -1 suffix beginning.