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
Update test upgrade script for use with latest Fedora #3245
base: 11.2
Are you sure you want to change the base?
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it looks mostly ok, apart from my boost comment.
@@ -154,6 +154,8 @@ EOF | |||
[[ $latest_distro == 34 ]] && dnf install -y https://repo.almalinux.org/almalinux/9/AppStream/x86_64/os/Packages/boost-program-options-1.75.0-8.el9.x86_64.rpm \ | |||
https://vault.centos.org/centos/8/AppStream/x86_64/os/Packages/liburing-1.0.7-3.el8.x86_64.rpm | |||
[[ $latest_distro == 35 ]] && dnf install -y https://archives.fedoraproject.org/pub/archive/fedora/linux/updates/36/Everything/x86_64/Packages/b/boost-program-options-1.76.0-12.fc36.x86_64.rpm | |||
[[ $latest_distro -le 35 ]] && dnf install -y https://dl.fedoraproject.org/pub/fedora/linux/releases/39/Everything/x86_64/os/Packages/o/openssl1.1-1.1.1q-5.fc39.x86_64.rpm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this work for things like Fedora 32 as well then?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. e.g. the latest fedora version available for MariaDB 10.2 is Fedora 28. for 10.3 it's 31. Both work with this manual installation of OpenSSL 1.1.
I've also added a line that makes this script compatible with 10.1 which uses OpenSSL 1.0.2.
tests/upgrade_from/test_upgrade.sh
Outdated
@@ -154,6 +154,8 @@ EOF | |||
[[ $latest_distro == 34 ]] && dnf install -y https://repo.almalinux.org/almalinux/9/AppStream/x86_64/os/Packages/boost-program-options-1.75.0-8.el9.x86_64.rpm \ | |||
https://vault.centos.org/centos/8/AppStream/x86_64/os/Packages/liburing-1.0.7-3.el8.x86_64.rpm | |||
[[ $latest_distro == 35 ]] && dnf install -y https://archives.fedoraproject.org/pub/archive/fedora/linux/updates/36/Everything/x86_64/Packages/b/boost-program-options-1.76.0-12.fc36.x86_64.rpm | |||
[[ $latest_distro -le 35 ]] && dnf install -y https://dl.fedoraproject.org/pub/fedora/linux/releases/39/Everything/x86_64/os/Packages/o/openssl1.1-1.1.1q-5.fc39.x86_64.rpm | |||
[[ $latest_distro -ge 39 ]] && dnf install -y https://rpmfind.net/linux/fedora/linux/releases/39/Everything/x86_64/os/Packages/b/boost-program-options-1.81.0-8.fc39.x86_64.rpm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could definitely cause problems with later versions. Why not just do:
dnf install -y boost-program-options
It will be in the default repo. Unlike other lines in this file which are pulling from another repo on a single version match.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The issue I've found is that MariaDB 10.6+ appears to require boost-program-options-1.81.0 via galera-4, but Fedora 40 provides boost-program-options-1.83.0 and has stopped providing 1.81.0.
# cat /etc/fedora-release
Fedora release 39 (Thirty Nine)
# dnf --showduplicates list boost-program-options
Last metadata expiration check: 0:48:50 ago on Mon May 13 17:41:09 2024.
Available Packages
boost-program-options.i686 1.81.0-8.fc39 fedora
boost-program-options.x86_64 1.81.0-8.fc39 fedora
# cat /etc/fedora-release
Fedora release 40 (Forty)
# dnf --showduplicates list boost-program-options
Last metadata expiration check: 0:01:34 ago on Mon May 13 18:28:22 2024.
Available Packages
boost-program-options.i686 1.83.0-3.fc40 fedora
boost-program-options.x86_64 1.83.0-3.fc40 fedora
I've added a check that tries to install boost-program-options-1.81.0 from the default server first before looking for a version elsewhere.
tests/upgrade_from/test_upgrade.sh
Outdated
log Could not find RPMs | ||
exit 1 | ||
fi | ||
latest_distro=$(ls -1v /tmp/archive.mariadb.org/mariadb-$version/yum/fedora/ | tail -n 1) | ||
latest_distro=$(ls -1v /tmp/archive.mariadb.org/mariadb-$version/yum/fedora/ | grep -v 'index.html' | tail -n 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like this whole section would be better as a single curl | grep | sort | tail or something similar. But this probably works too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed. I've updated that to avoid downloading artifacts and checking them.
Fedora 40 introdced wget2 as the default wget program, which caused a break in the functionality of the test_upgrade.sh script. Modified the archive.mariadb.org check so that it uses a one-line `curl` check to identify the correct repository URL. Additionally added rpm sources for the boost-program-options and openssl 1.1 and 1.0.2. This is necessary when building older versions of MariaDB (e.g., 10.4) on newer linux distributions (e.g., Fedora 39) that do not always have access to all required dependencies. In the above example older MariaDB versions are not compatible with OpenSSL 3.0+, so require an older version. All new code of the whole pull request, including one or several files that are either new files or modified ones, are contributed under the BSD-new license. I am contributing on behalf of my employer Amazon Web Services.
a0bf4a6
to
7248444
Compare
Description
Fedora 40 introdced wget2 as the default wget program, which caused a
break in the functionality of the test_upgrade.sh script. Removing the
--spider
option and modifying the determination of the latestdistribution to test on fixes the issue. At the same time, added in
another source for the boost-program-options RPM when the fedora version
is 39.
Additionally added rpm sources for the boost-program-options and openssl 1.1. This is necessary when building older versions of MariaDB (e.g., 10.4) on newer linux distributions (e.g., Fedora 39) that do not always have access to all required dependencies. In the above example older MariaDB versions are not compatible with OpenSSL 3.0+, so require an older version.
Release Notes
None
How can this PR be tested?
Start a docker container using the fedora:40 image
Execute the upgrade script
Try the same for fedora:39
Basing the PR against the correct MariaDB version
PR quality check