mariadb/debian/salsa-ci.yml

766 lines
30 KiB
YAML
Raw Normal View History

---
# Include Salsa-CI as a base
include:
- https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/salsa-ci.yml
- https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/pipeline-jobs.yml
# Override Salsa-CI with MariaDB specific variations
variables:
DEB_BUILD_OPTIONS: "nocheck noautodbgsym"
RELEASE: bullseye
SALSA_CI_DISABLE_REPROTEST: 1
SALSA_CI_DISABLE_MISSING_BREAKS: 0
SALSA_CI_DISABLE_RC_BUGS: 1
SALSA_CI_DISABLE_BUILD_PACKAGE_ALL: 1
SALSA_CI_DISABLE_BUILD_PACKAGE_ANY: 1
GIT_SUBMODULE_STRATEGY: recursive
SALSA_CI_GBP_BUILDPACKAGE_ARGS: "--git-submodules" # did not apply to extract-sources
Misc Debian/Salsa-CI fixes (#2299) * Deb: Handle codename 'n/a' from Debian Sid properly and autobake-deb cleanup This fixes autobake-deb.sh builds on Sid which was visible as 4 failing build steps on Salsa-CI. - In Sid the LSBNAME might evaluate to 'n/a', so accept it as 'Sid' to fix builds that failed with error: Error - unknown release codename n/a - Refactor list to have Ubuntu versions first, then Debian, and as last the special case of Debian Sid - Fix minor syntax issues detected by Shellcheck Also remove useless DEB_HOST_ARCH_CPU check from debian/rules: * It was never in effect as the 'sed' in autobake-deb.sh cleared it anyway * The variable name was wrong and always empty * If variable would have been correct, logic was still reversed - Define 3h timeout as the default 1h timeout on Gitlab.com (and others) is usually not enough for initial (uncached) MariaDB builds. - Replace Buster to Bookworm/Sid upgrade testing with upgrade inside Buster testing as direct upgrades from Stretch to Bullseye and Buster to Bookworm are no longer possible due to: Bug#993755: libcrypt.so.1: cannot open shared object file when upgrading from Stretch to Sid (https://bugs.debian.org/993755) - Stop ignoring MariaDB.org 10.6 to this version upgrade testing failures to reveal bug MDEV-28640. Originally this step was failing as the uring dependencies in upstream builders lagged behind and there was nothing that needed work, only time time to resolve. Now there is an actual bug in packaging that should be visible as a CI failure. - Stop testing for 'service mysql status' on systems that upgraded from MySQL 8.0 to MariaDB.org vended 10.6. Due to some unidentified debian/control changes in 10.6 on upstream the upgrade is no longer compatible in a way that would maintain the init.d script with name 'mysql'. - Fix typos where mergers had changed occurrences of 10.5 to 10.6 while they intentionally need to be exactly 10.5, otherwise the meaning changes. - Align autopkgtest code with downstream official Debian packaging one. This is change is safe on a stable branch because is only affects builds and testing, not any actual usage of MariaDB 10.6. - Standardize on using capitalized 'YES' in CMake build options (instead of 'yes' or mixed case) - Add some comments to better document debian/rules - Fix typo in Lintian overrides Ubuntu bug: https://bugs.launchpad.net/ubuntu/+source/mariadb-10.6/+bug/1970634 MariaDB ticket: https://jira.mariadb.org/browse/MDEV-25633 When built with LTO on Ubuntu, MariaDB does not catch an exception when the uring initialization fails due to a low RLIMIT_MEMLOCK value. This commit amends the commit 0609b345554f9a148e165c497aadbe368e0900aa to be identical to the one done downstream in Debian: https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/8d20ca979cf422d3a507283b86c2547d78559179 This way both the inline comments and 'git blame' for this section will show properly why this is needed, and the fix is one that is fully tested on Debian and Ubuntu. Also having this section fully identical in upstream MariaDB and downstream Debian will make the packaging maintenance easier as 'diff` runs on this file will not flag this as a difference anymore. In MDEV-28640 the init script failed to stop/start the MariaDB server due to missing mysqladmin on the system. This was however very hard to spot from the console output. Add an explicit check for the binary the script depends on, and fail verbosely if the dependency is missing.
2022-11-11 08:51:34 +01:00
# Extend Salsa-CI build jobs to have longer timeout as the default GitLab
# timeout (1h) is often not enough
.build-package:
timeout: 3h
stages:
- provisioning
- build
- test
- upgrade in Bullseye
- upgrade from Buster
- upgrade extras
- test extras
- publish # Stage referenced by Salsa-CI template aptly stanza, so must exist even though not used
build:
extends: .build-package
script: &autobake-deb-steps
# Run Salsa-CI .build-before-script equivalent
- mkdir -p ${WORKING_DIR} ${CCACHE_WORK_DIR}
- mv ${CCACHE_WORK_DIR} ${CCACHE_TMP_DIR}
# Run Salsa-CI .build-script equivalent, with extra devscripts so autobake-deb.sh can run 'dch'
- export CCACHE_DIR=${CCACHE_TMP_DIR}
- apt-get update && eatmydata apt-get install --no-install-recommends -y ccache fakeroot build-essential devscripts lsb-release
- cd ${WORKING_DIR}/${SOURCE_DIR}
- eatmydata apt-get build-dep --no-install-recommends -y .
- update-ccache-symlinks; ccache -z # Zero out ccache counters
Deb: Misc ColumnStore Debian packaging improvements - Add 'libboost-all-dev' and 'libreadline-gplv2-dev' as they were was found to be a compulsory build dependency for columnstore plugin. - Add 'expect' as run-time dependencey for columnstore plugin as scripts use it: usr/bin/mcs_module_installer.sh: #!/usr/bin/expect usr/bin/remote_command.sh: #!/usr/bin/expect usr/bin/remote_command_verify.sh: #!/usr/bin/expect usr/bin/remote_scp_get.sh: #!/usr/bin/expect usr/bin/remote_scp_put.sh: #!/usr/bin/expect usr/bin/rsync.sh: #!/usr/bin/expect - Properly define depends on Python. No Python 2 support needs to be considered, Python 3 has been around long enough. Fixes Lintian errors E: mariadb-plugin-columnstore: python-script-but-no-python-dep usr/bin/mcs-loadbrm.py #!python E: mariadb-plugin-columnstore: python-script-but-no-python-dep usr/bin/mcs-start-storagemanager.py #!python - Partially revert undocumented and thus unjustified changes in commits d69a79da63287089efdc5f90a11ecd66ce55b471 and c0565666cfe6528b76bc53ce50d3690d13c92cf6. - Trigger ldconfig, otherwise Lintian complains: E: mariadb-plugin-columnstore: package-must-activate-ldconfig-trigger usr/lib/x86_64-linux-gnu/libwriteengineredistribute.so - Update postinst to be compatible with new server binary mariadbd name. - Properly detect systemd or fallback to sysv init in postrm script. - Only attempt to build ColumnStore on amd64 and i386. Test builds on Launchpad.net showed the CMake plugin configure step will prevent even attempts to build on other platforms. - Clean up and unify cmake build command in debian/rules. - Explicitly list files not installed. - Run 'wrap-and-sort -a -v'. - Truncate build logs on Salsa-CI to keep under 4 MB. This is now needed as the ColumnStore build is so verbose. See https://jira.mariadb.org/browse/MCOL-4111. - Update Travis-CI dependencies to match new debian/control.
2020-07-03 15:24:58 +02:00
- while true; do sleep 600; echo "10 minutes passed" >&2; done & # Progress keeper since build is long and silent
- debian/autobake-deb.sh |& tail -n 10000 # Keep Gitlab-CI output under 4 MB
- cd ${WORKING_DIR}
- rm -rf ${WORKING_DIR}/${SOURCE_DIR}
- du -shc ${WORKING_DIR}/* # Show total file size of artifacts. Must stay are under 100 MB.
- ccache -s # Show ccache stats to validate it worked
- mv ${CCACHE_TMP_DIR} ${CCACHE_WORK_DIR}
build i386:
extends: .build-package-i386
script:
- *autobake-deb-steps
build sid:
extends: .build-package
script:
- *autobake-deb-steps
variables:
RELEASE: sid
build buster-backports:
extends: .build-package
script:
# Increase default backports priority policy from '100' to '500' so it can actually be used
- |
cat << EOF > /etc/apt/preferences.d/enable-backports-to-satisfy-dependencies
Package: *
Pin: release n=buster-*
Pin-Priority: 500
EOF
- *autobake-deb-steps
variables:
RELEASE: buster-backports
# Build native deb without using autobake-deb.sh. This way we will detect
# if the debian/control file and other packaging is correct as-is for Debian Sid.
build native deb amd64:
extends: .build-package
build native deb i386:
extends: .build-package-i386
autopkgtest:
extends: .test-autopkgtest
artifacts:
reports:
junit: ${WORKING_DIR}/debci/artifacts/mysql-test-run-junit.xml
piuparts:
extends: .test-piuparts
stage: test extras
blhc:
extends: .test-blhc
stage: test extras
# Build log checker needs a .build file and thus only works on native build
needs:
- job: build native deb amd64
# In addition to Salsa-CI, also run these fully MariaDB specific build jobs
# Define snippets used to construct jobs
.test-prepare-container: &test-prepare-container |
cd ${WORKING_DIR} # Don't repeat this step, it's just cd ./debian/output
# Enable automatic restarts from maint scripts
sed -i "s/101/0/g" -i /usr/sbin/policy-rc.d
# Fake /sbin/runlevel to avoid warnings of "invoke-rc.d: could not determine current runlevel"
echo -e '#!/bin/sh\necho "N 5"' > /sbin/runlevel; chmod +x /sbin/runlevel
# Avoid the warnings of "debconf: unable to initialize frontend: Dialog"
echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
# Prime the apt cache so later apt commands can run
Deb: Sync Salsa-CI from Debian MariaDB 10.6 Compare to Debian packaging of MariaDB 1:10.6.11-2 release at commit https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/2934e8a795cbd1eba79e33b8d6c82ed2b0897128 and sync upstream everything that is relevant for upstream and safe to import on a stable 10.6 release. * Use OpenSSL 1.1 from Debian Snapshots https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/0040c272bf8a9a253fcd393b235b18cd5cdc9289 Related: https://jira.mariadb.org/browse/MDEV-30322 * Prefer using bullseye-backports in mosts tests over buster-bpo https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/daa827ecded9dc1f096ecb05242116173298d602 * Add new upgrade test for MySQL Community Cluster 8.0 https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/3c71bec9b7626d25a55e23b2e570b4e125d5d5df * Enable automatic datadir move also on upgrades from MySQL.com packages https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/4cbbcb7e56d9604a67230d11a68543d5a83960e3 * Update Breaks/Replaces https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/2cab13d05959fe8f6ea56b866df51f3bfe17dd3f * Normalize apt-get and curl commands https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/8754ea2578bd214d75a2a9e6a0f7b4b74c062b41 * Standardize on using capitalized 'ON' in CMake build options https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/938757a85aee44c727f3f6996677ef1126c2f5aa * Apply wrap-and-sort -av and other minor tweaks and inline documentation NOTE TO MERGERS: This commit is made on 10.6 branch and can be merged to all later branches (10.7, 10.8, ..., 11.0).
2023-01-06 06:56:14 +01:00
apt-get update -qq
.test-verify-initial: &test-verify-initial |
dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed
service mysql status || service mariadb status # Early MariaDB 10.5 only had 'mariadb'
mysql --skip-column-names -e "select @@version, @@version_comment" # Show version
mysql --table -e "SHOW DATABASES;" # List databases before upgrade
mysql --table -e "SELECT host,user,plugin,authentication_string FROM user;" mysql
mysql --table -e "SELECT * FROM plugin;" mysql
mysql --table -e "SHOW PLUGINS;" mysql
.test-enable-bullseye-repos: &test-enable-bullseye-repos
# Replace any old repos with just Sid
- echo 'deb http://deb.debian.org/debian bullseye main' > /etc/apt/sources.list
# Upgrade minimal stack first
Deb: Sync Salsa-CI from Debian MariaDB 10.6 Compare to Debian packaging of MariaDB 1:10.6.11-2 release at commit https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/2934e8a795cbd1eba79e33b8d6c82ed2b0897128 and sync upstream everything that is relevant for upstream and safe to import on a stable 10.6 release. * Use OpenSSL 1.1 from Debian Snapshots https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/0040c272bf8a9a253fcd393b235b18cd5cdc9289 Related: https://jira.mariadb.org/browse/MDEV-30322 * Prefer using bullseye-backports in mosts tests over buster-bpo https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/daa827ecded9dc1f096ecb05242116173298d602 * Add new upgrade test for MySQL Community Cluster 8.0 https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/3c71bec9b7626d25a55e23b2e570b4e125d5d5df * Enable automatic datadir move also on upgrades from MySQL.com packages https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/4cbbcb7e56d9604a67230d11a68543d5a83960e3 * Update Breaks/Replaces https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/2cab13d05959fe8f6ea56b866df51f3bfe17dd3f * Normalize apt-get and curl commands https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/8754ea2578bd214d75a2a9e6a0f7b4b74c062b41 * Standardize on using capitalized 'ON' in CMake build options https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/938757a85aee44c727f3f6996677ef1126c2f5aa * Apply wrap-and-sort -av and other minor tweaks and inline documentation NOTE TO MERGERS: This commit is made on 10.6 branch and can be merged to all later branches (10.7, 10.8, ..., 11.0).
2023-01-06 06:56:14 +01:00
- apt-get update -qq
- apt-get install -y apt
.test-enable-bullseye-backports-repos: &test-enable-bullseye-backports-repos |
# Enable bullseye-backports (assumes environment already Debian Bullseye)
echo 'deb http://deb.debian.org/debian bullseye-backports main' > /etc/apt/sources.list.d/bullseye-backports.list
# Increase default backports priority policy from '100' to '500' so it can actually be used
cat << EOF > /etc/apt/preferences.d/enable-backports-to-satisfy-dependencies
Package: *
Pin: release n=bullseye-*
Pin-Priority: 500
EOF
apt-get update -qq
Misc Debian/Salsa-CI fixes (#2299) * Deb: Handle codename 'n/a' from Debian Sid properly and autobake-deb cleanup This fixes autobake-deb.sh builds on Sid which was visible as 4 failing build steps on Salsa-CI. - In Sid the LSBNAME might evaluate to 'n/a', so accept it as 'Sid' to fix builds that failed with error: Error - unknown release codename n/a - Refactor list to have Ubuntu versions first, then Debian, and as last the special case of Debian Sid - Fix minor syntax issues detected by Shellcheck Also remove useless DEB_HOST_ARCH_CPU check from debian/rules: * It was never in effect as the 'sed' in autobake-deb.sh cleared it anyway * The variable name was wrong and always empty * If variable would have been correct, logic was still reversed - Define 3h timeout as the default 1h timeout on Gitlab.com (and others) is usually not enough for initial (uncached) MariaDB builds. - Replace Buster to Bookworm/Sid upgrade testing with upgrade inside Buster testing as direct upgrades from Stretch to Bullseye and Buster to Bookworm are no longer possible due to: Bug#993755: libcrypt.so.1: cannot open shared object file when upgrading from Stretch to Sid (https://bugs.debian.org/993755) - Stop ignoring MariaDB.org 10.6 to this version upgrade testing failures to reveal bug MDEV-28640. Originally this step was failing as the uring dependencies in upstream builders lagged behind and there was nothing that needed work, only time time to resolve. Now there is an actual bug in packaging that should be visible as a CI failure. - Stop testing for 'service mysql status' on systems that upgraded from MySQL 8.0 to MariaDB.org vended 10.6. Due to some unidentified debian/control changes in 10.6 on upstream the upgrade is no longer compatible in a way that would maintain the init.d script with name 'mysql'. - Fix typos where mergers had changed occurrences of 10.5 to 10.6 while they intentionally need to be exactly 10.5, otherwise the meaning changes. - Align autopkgtest code with downstream official Debian packaging one. This is change is safe on a stable branch because is only affects builds and testing, not any actual usage of MariaDB 10.6. - Standardize on using capitalized 'YES' in CMake build options (instead of 'yes' or mixed case) - Add some comments to better document debian/rules - Fix typo in Lintian overrides Ubuntu bug: https://bugs.launchpad.net/ubuntu/+source/mariadb-10.6/+bug/1970634 MariaDB ticket: https://jira.mariadb.org/browse/MDEV-25633 When built with LTO on Ubuntu, MariaDB does not catch an exception when the uring initialization fails due to a low RLIMIT_MEMLOCK value. This commit amends the commit 0609b345554f9a148e165c497aadbe368e0900aa to be identical to the one done downstream in Debian: https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/8d20ca979cf422d3a507283b86c2547d78559179 This way both the inline comments and 'git blame' for this section will show properly why this is needed, and the fix is one that is fully tested on Debian and Ubuntu. Also having this section fully identical in upstream MariaDB and downstream Debian will make the packaging maintenance easier as 'diff` runs on this file will not flag this as a difference anymore. In MDEV-28640 the init script failed to stop/start the MariaDB server due to missing mysqladmin on the system. This was however very hard to spot from the console output. Add an explicit check for the binary the script depends on, and fail verbosely if the dependency is missing.
2022-11-11 08:51:34 +01:00
.test-enable-buster-backports-repos: &test-enable-buster-backports-repos |
# Enable buster-backports (assumes environment already Debian Buster)
echo 'deb http://deb.debian.org/debian buster-backports main' > /etc/apt/sources.list.d/buster-backports.list
# Increase default backports priority policy from '100' to '500' so it can actually be used
cat << EOF > /etc/apt/preferences.d/enable-backports-to-satisfy-dependencies
Package: *
Pin: release n=buster-*
Pin-Priority: 500
EOF
Deb: Sync Salsa-CI from Debian MariaDB 10.6 Compare to Debian packaging of MariaDB 1:10.6.11-2 release at commit https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/2934e8a795cbd1eba79e33b8d6c82ed2b0897128 and sync upstream everything that is relevant for upstream and safe to import on a stable 10.6 release. * Use OpenSSL 1.1 from Debian Snapshots https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/0040c272bf8a9a253fcd393b235b18cd5cdc9289 Related: https://jira.mariadb.org/browse/MDEV-30322 * Prefer using bullseye-backports in mosts tests over buster-bpo https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/daa827ecded9dc1f096ecb05242116173298d602 * Add new upgrade test for MySQL Community Cluster 8.0 https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/3c71bec9b7626d25a55e23b2e570b4e125d5d5df * Enable automatic datadir move also on upgrades from MySQL.com packages https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/4cbbcb7e56d9604a67230d11a68543d5a83960e3 * Update Breaks/Replaces https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/2cab13d05959fe8f6ea56b866df51f3bfe17dd3f * Normalize apt-get and curl commands https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/8754ea2578bd214d75a2a9e6a0f7b4b74c062b41 * Standardize on using capitalized 'ON' in CMake build options https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/938757a85aee44c727f3f6996677ef1126c2f5aa * Apply wrap-and-sort -av and other minor tweaks and inline documentation NOTE TO MERGERS: This commit is made on 10.6 branch and can be merged to all later branches (10.7, 10.8, ..., 11.0).
2023-01-06 06:56:14 +01:00
apt-get update -qq
Misc Debian/Salsa-CI fixes (#2299) * Deb: Handle codename 'n/a' from Debian Sid properly and autobake-deb cleanup This fixes autobake-deb.sh builds on Sid which was visible as 4 failing build steps on Salsa-CI. - In Sid the LSBNAME might evaluate to 'n/a', so accept it as 'Sid' to fix builds that failed with error: Error - unknown release codename n/a - Refactor list to have Ubuntu versions first, then Debian, and as last the special case of Debian Sid - Fix minor syntax issues detected by Shellcheck Also remove useless DEB_HOST_ARCH_CPU check from debian/rules: * It was never in effect as the 'sed' in autobake-deb.sh cleared it anyway * The variable name was wrong and always empty * If variable would have been correct, logic was still reversed - Define 3h timeout as the default 1h timeout on Gitlab.com (and others) is usually not enough for initial (uncached) MariaDB builds. - Replace Buster to Bookworm/Sid upgrade testing with upgrade inside Buster testing as direct upgrades from Stretch to Bullseye and Buster to Bookworm are no longer possible due to: Bug#993755: libcrypt.so.1: cannot open shared object file when upgrading from Stretch to Sid (https://bugs.debian.org/993755) - Stop ignoring MariaDB.org 10.6 to this version upgrade testing failures to reveal bug MDEV-28640. Originally this step was failing as the uring dependencies in upstream builders lagged behind and there was nothing that needed work, only time time to resolve. Now there is an actual bug in packaging that should be visible as a CI failure. - Stop testing for 'service mysql status' on systems that upgraded from MySQL 8.0 to MariaDB.org vended 10.6. Due to some unidentified debian/control changes in 10.6 on upstream the upgrade is no longer compatible in a way that would maintain the init.d script with name 'mysql'. - Fix typos where mergers had changed occurrences of 10.5 to 10.6 while they intentionally need to be exactly 10.5, otherwise the meaning changes. - Align autopkgtest code with downstream official Debian packaging one. This is change is safe on a stable branch because is only affects builds and testing, not any actual usage of MariaDB 10.6. - Standardize on using capitalized 'YES' in CMake build options (instead of 'yes' or mixed case) - Add some comments to better document debian/rules - Fix typo in Lintian overrides Ubuntu bug: https://bugs.launchpad.net/ubuntu/+source/mariadb-10.6/+bug/1970634 MariaDB ticket: https://jira.mariadb.org/browse/MDEV-25633 When built with LTO on Ubuntu, MariaDB does not catch an exception when the uring initialization fails due to a low RLIMIT_MEMLOCK value. This commit amends the commit 0609b345554f9a148e165c497aadbe368e0900aa to be identical to the one done downstream in Debian: https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/8d20ca979cf422d3a507283b86c2547d78559179 This way both the inline comments and 'git blame' for this section will show properly why this is needed, and the fix is one that is fully tested on Debian and Ubuntu. Also having this section fully identical in upstream MariaDB and downstream Debian will make the packaging maintenance easier as 'diff` runs on this file will not flag this as a difference anymore. In MDEV-28640 the init script failed to stop/start the MariaDB server due to missing mysqladmin on the system. This was however very hard to spot from the console output. Add an explicit check for the binary the script depends on, and fail verbosely if the dependency is missing.
2022-11-11 08:51:34 +01:00
.test-install: &test-install |
# Install MariaDB built in this commit
apt-get install -y ./*.deb
# Verify installation of MariaDB built in this commit
dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed
mariadb --version # Client version
.test-verify-final: &test-verify-final |
mkdir -p debug # Ensure dir exists before using it
find /var/lib/mysql -ls > debug/var-lib-mysql.list || true # Ignore errors about "no such file or directory"
cp -ra /etc/mysql debug/etc-mysql
cp -ra /var/log/mysql debug/var-log-mysql
mariadb --skip-column-names -e "select @@version, @@version_comment" # Show version
mariadb --table -e "SHOW DATABASES;" # List databases
mariadb --table -e "SELECT host,user,plugin,authentication_string FROM user;" mysql
mariadb --table -e "SELECT * FROM plugin;" mysql
mariadb --table -e "SHOW PLUGINS;" mysql
# Test that InnoDB works and that command 'mysql' is also still usable
mysql -e "CREATE DATABASE test; USE test; CREATE TABLE t(a INT PRIMARY KEY) ENGINE=INNODB; INSERT INTO t VALUEs (1); SELECT * FROM t; DROP TABLE t; DROP DATABASE test;"
.test-verify-libs: &test-verify-libs
# Don't use a collapsed command as Gitlab-CI would hide each command from the output
- ldconfig -p | grep -e mariadb -e mysql
- pkg-config --list-all
- pkg-config --cflags --libs mysqlclient
- pkg-config --cflags --libs libmariadb
- pkg-config --cflags --libs mariadb
- apt-get install -y --no-install-recommends g++
- |
# Build a test binary that depends on libmysqlclient
cat > b933063.cpp <<EOF
#include <iostream>
#include <mysql/mysql.h>
#include <stdexcept>
int main()
{
MYSQL h;
if (!mysql_init(&h)
|| mysql_options(&h, MYSQL_READ_DEFAULT_GROUP, "")
// || mysql_options(&h, MYSQL_SET_CHARSET_NAME, "utf8mb4")
|| !mysql_real_connect(&h, "", "", NULL, "", 0, NULL, 0))
throw std::runtime_error(mysql_error(&h));
std::string q = "show variables like '%char%'";
if (mysql_real_query(&h, q.data(), q.size()))
throw std::runtime_error(mysql_error(&h));
MYSQL_RES* result = mysql_store_result(&h);
if (!result && mysql_errno(&h))
throw std::runtime_error(mysql_error(&h));
while (MYSQL_ROW row = mysql_fetch_row(result))
{
std::cout << row[0] << ": " << row[1] << "\n";
}
return 0;
}
EOF
apt-get install -y ./*.deb # Server must be installed for client to connect
echo "Testing -l mysqlclient"
g++ b933063.cpp -l mysqlclient && ./a.out | tee result
if grep --quiet latin result; then echo "ERROR: Charset latin found!"; exit 1; fi
echo "Testing -l mariadbclient"
g++ b933063.cpp -l mariadbclient && ./a.out | tee result
if grep --quiet latin result; then echo "ERROR: Charset latin found!"; exit 1; fi
.test-install-all-libs: &test-install-all-libs
- apt-get install -y ./libmariadb3_*.deb ./libmariadb-dev_*.deb ./libmariadb-dev-compat_*.deb ./libmariadbd19_*.deb ./libmariadbd-dev_*.deb ./mariadb-common_*.deb
fresh install:
stage: test
needs:
- job: build
image: debian:${RELEASE}
artifacts:
when: always
name: "$CI_BUILD_NAME"
paths:
- ${WORKING_DIR}/debug
script:
- *test-prepare-container
- *test-install
Misc Debian/Salsa-CI fixes (#2299) * Deb: Handle codename 'n/a' from Debian Sid properly and autobake-deb cleanup This fixes autobake-deb.sh builds on Sid which was visible as 4 failing build steps on Salsa-CI. - In Sid the LSBNAME might evaluate to 'n/a', so accept it as 'Sid' to fix builds that failed with error: Error - unknown release codename n/a - Refactor list to have Ubuntu versions first, then Debian, and as last the special case of Debian Sid - Fix minor syntax issues detected by Shellcheck Also remove useless DEB_HOST_ARCH_CPU check from debian/rules: * It was never in effect as the 'sed' in autobake-deb.sh cleared it anyway * The variable name was wrong and always empty * If variable would have been correct, logic was still reversed - Define 3h timeout as the default 1h timeout on Gitlab.com (and others) is usually not enough for initial (uncached) MariaDB builds. - Replace Buster to Bookworm/Sid upgrade testing with upgrade inside Buster testing as direct upgrades from Stretch to Bullseye and Buster to Bookworm are no longer possible due to: Bug#993755: libcrypt.so.1: cannot open shared object file when upgrading from Stretch to Sid (https://bugs.debian.org/993755) - Stop ignoring MariaDB.org 10.6 to this version upgrade testing failures to reveal bug MDEV-28640. Originally this step was failing as the uring dependencies in upstream builders lagged behind and there was nothing that needed work, only time time to resolve. Now there is an actual bug in packaging that should be visible as a CI failure. - Stop testing for 'service mysql status' on systems that upgraded from MySQL 8.0 to MariaDB.org vended 10.6. Due to some unidentified debian/control changes in 10.6 on upstream the upgrade is no longer compatible in a way that would maintain the init.d script with name 'mysql'. - Fix typos where mergers had changed occurrences of 10.5 to 10.6 while they intentionally need to be exactly 10.5, otherwise the meaning changes. - Align autopkgtest code with downstream official Debian packaging one. This is change is safe on a stable branch because is only affects builds and testing, not any actual usage of MariaDB 10.6. - Standardize on using capitalized 'YES' in CMake build options (instead of 'yes' or mixed case) - Add some comments to better document debian/rules - Fix typo in Lintian overrides Ubuntu bug: https://bugs.launchpad.net/ubuntu/+source/mariadb-10.6/+bug/1970634 MariaDB ticket: https://jira.mariadb.org/browse/MDEV-25633 When built with LTO on Ubuntu, MariaDB does not catch an exception when the uring initialization fails due to a low RLIMIT_MEMLOCK value. This commit amends the commit 0609b345554f9a148e165c497aadbe368e0900aa to be identical to the one done downstream in Debian: https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/8d20ca979cf422d3a507283b86c2547d78559179 This way both the inline comments and 'git blame' for this section will show properly why this is needed, and the fix is one that is fully tested on Debian and Ubuntu. Also having this section fully identical in upstream MariaDB and downstream Debian will make the packaging maintenance easier as 'diff` runs on this file will not flag this as a difference anymore. In MDEV-28640 the init script failed to stop/start the MariaDB server due to missing mysqladmin on the system. This was however very hard to spot from the console output. Add an explicit check for the binary the script depends on, and fail verbosely if the dependency is missing.
2022-11-11 08:51:34 +01:00
- service mariadb status # There is no init.d/mysql in MariaDB 10.5+
- *test-verify-final
variables:
GIT_STRATEGY: none
except:
variables:
- $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/
mariadb-10.5 Bullseye upgrade:
stage: upgrade in Bullseye
needs:
- job: build
image: debian:${RELEASE}
artifacts:
when: always
name: "$CI_BUILD_NAME"
paths:
- ${WORKING_DIR}/debug
script:
- *test-prepare-container
# Install everything MariaDB 10.5 currently in Debian Bullseye
Deb: Sync Salsa-CI from Debian MariaDB 10.6 Compare to Debian packaging of MariaDB 1:10.6.11-2 release at commit https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/2934e8a795cbd1eba79e33b8d6c82ed2b0897128 and sync upstream everything that is relevant for upstream and safe to import on a stable 10.6 release. * Use OpenSSL 1.1 from Debian Snapshots https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/0040c272bf8a9a253fcd393b235b18cd5cdc9289 Related: https://jira.mariadb.org/browse/MDEV-30322 * Prefer using bullseye-backports in mosts tests over buster-bpo https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/daa827ecded9dc1f096ecb05242116173298d602 * Add new upgrade test for MySQL Community Cluster 8.0 https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/3c71bec9b7626d25a55e23b2e570b4e125d5d5df * Enable automatic datadir move also on upgrades from MySQL.com packages https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/4cbbcb7e56d9604a67230d11a68543d5a83960e3 * Update Breaks/Replaces https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/2cab13d05959fe8f6ea56b866df51f3bfe17dd3f * Normalize apt-get and curl commands https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/8754ea2578bd214d75a2a9e6a0f7b4b74c062b41 * Standardize on using capitalized 'ON' in CMake build options https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/938757a85aee44c727f3f6996677ef1126c2f5aa * Apply wrap-and-sort -av and other minor tweaks and inline documentation NOTE TO MERGERS: This commit is made on 10.6 branch and can be merged to all later branches (10.7, 10.8, ..., 11.0).
2023-01-06 06:56:14 +01:00
- apt-get install -y 'default-mysql*' 'mariadb-*' 'libmariadb*'
- *test-verify-initial
- *test-install
Misc Debian/Salsa-CI fixes (#2299) * Deb: Handle codename 'n/a' from Debian Sid properly and autobake-deb cleanup This fixes autobake-deb.sh builds on Sid which was visible as 4 failing build steps on Salsa-CI. - In Sid the LSBNAME might evaluate to 'n/a', so accept it as 'Sid' to fix builds that failed with error: Error - unknown release codename n/a - Refactor list to have Ubuntu versions first, then Debian, and as last the special case of Debian Sid - Fix minor syntax issues detected by Shellcheck Also remove useless DEB_HOST_ARCH_CPU check from debian/rules: * It was never in effect as the 'sed' in autobake-deb.sh cleared it anyway * The variable name was wrong and always empty * If variable would have been correct, logic was still reversed - Define 3h timeout as the default 1h timeout on Gitlab.com (and others) is usually not enough for initial (uncached) MariaDB builds. - Replace Buster to Bookworm/Sid upgrade testing with upgrade inside Buster testing as direct upgrades from Stretch to Bullseye and Buster to Bookworm are no longer possible due to: Bug#993755: libcrypt.so.1: cannot open shared object file when upgrading from Stretch to Sid (https://bugs.debian.org/993755) - Stop ignoring MariaDB.org 10.6 to this version upgrade testing failures to reveal bug MDEV-28640. Originally this step was failing as the uring dependencies in upstream builders lagged behind and there was nothing that needed work, only time time to resolve. Now there is an actual bug in packaging that should be visible as a CI failure. - Stop testing for 'service mysql status' on systems that upgraded from MySQL 8.0 to MariaDB.org vended 10.6. Due to some unidentified debian/control changes in 10.6 on upstream the upgrade is no longer compatible in a way that would maintain the init.d script with name 'mysql'. - Fix typos where mergers had changed occurrences of 10.5 to 10.6 while they intentionally need to be exactly 10.5, otherwise the meaning changes. - Align autopkgtest code with downstream official Debian packaging one. This is change is safe on a stable branch because is only affects builds and testing, not any actual usage of MariaDB 10.6. - Standardize on using capitalized 'YES' in CMake build options (instead of 'yes' or mixed case) - Add some comments to better document debian/rules - Fix typo in Lintian overrides Ubuntu bug: https://bugs.launchpad.net/ubuntu/+source/mariadb-10.6/+bug/1970634 MariaDB ticket: https://jira.mariadb.org/browse/MDEV-25633 When built with LTO on Ubuntu, MariaDB does not catch an exception when the uring initialization fails due to a low RLIMIT_MEMLOCK value. This commit amends the commit 0609b345554f9a148e165c497aadbe368e0900aa to be identical to the one done downstream in Debian: https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/8d20ca979cf422d3a507283b86c2547d78559179 This way both the inline comments and 'git blame' for this section will show properly why this is needed, and the fix is one that is fully tested on Debian and Ubuntu. Also having this section fully identical in upstream MariaDB and downstream Debian will make the packaging maintenance easier as 'diff` runs on this file will not flag this as a difference anymore. In MDEV-28640 the init script failed to stop/start the MariaDB server due to missing mysqladmin on the system. This was however very hard to spot from the console output. Add an explicit check for the binary the script depends on, and fail verbosely if the dependency is missing.
2022-11-11 08:51:34 +01:00
- service mariadb status # There is no init.d/mysql in MariaDB 10.5+
- *test-verify-final
variables:
GIT_STRATEGY: none
except:
variables:
- $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/
Deb: Sync Salsa-CI from Debian MariaDB 10.6 Compare to Debian packaging of MariaDB 1:10.6.11-2 release at commit https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/2934e8a795cbd1eba79e33b8d6c82ed2b0897128 and sync upstream everything that is relevant for upstream and safe to import on a stable 10.6 release. * Use OpenSSL 1.1 from Debian Snapshots https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/0040c272bf8a9a253fcd393b235b18cd5cdc9289 Related: https://jira.mariadb.org/browse/MDEV-30322 * Prefer using bullseye-backports in mosts tests over buster-bpo https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/daa827ecded9dc1f096ecb05242116173298d602 * Add new upgrade test for MySQL Community Cluster 8.0 https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/3c71bec9b7626d25a55e23b2e570b4e125d5d5df * Enable automatic datadir move also on upgrades from MySQL.com packages https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/4cbbcb7e56d9604a67230d11a68543d5a83960e3 * Update Breaks/Replaces https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/2cab13d05959fe8f6ea56b866df51f3bfe17dd3f * Normalize apt-get and curl commands https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/8754ea2578bd214d75a2a9e6a0f7b4b74c062b41 * Standardize on using capitalized 'ON' in CMake build options https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/938757a85aee44c727f3f6996677ef1126c2f5aa * Apply wrap-and-sort -av and other minor tweaks and inline documentation NOTE TO MERGERS: This commit is made on 10.6 branch and can be merged to all later branches (10.7, 10.8, ..., 11.0).
2023-01-06 06:56:14 +01:00
mariadb-10.3 with Buster backports upgrade:
stage: upgrade extras
needs:
- job: build buster-backports
image: debian:buster
artifacts:
when: always
name: "$CI_BUILD_NAME"
paths:
- ${WORKING_DIR}/debug
script:
- *test-prepare-container
# Install everything MariaDB 10.3 currently in Debian Buster
Deb: Sync Salsa-CI from Debian MariaDB 10.6 Compare to Debian packaging of MariaDB 1:10.6.11-2 release at commit https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/2934e8a795cbd1eba79e33b8d6c82ed2b0897128 and sync upstream everything that is relevant for upstream and safe to import on a stable 10.6 release. * Use OpenSSL 1.1 from Debian Snapshots https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/0040c272bf8a9a253fcd393b235b18cd5cdc9289 Related: https://jira.mariadb.org/browse/MDEV-30322 * Prefer using bullseye-backports in mosts tests over buster-bpo https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/daa827ecded9dc1f096ecb05242116173298d602 * Add new upgrade test for MySQL Community Cluster 8.0 https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/3c71bec9b7626d25a55e23b2e570b4e125d5d5df * Enable automatic datadir move also on upgrades from MySQL.com packages https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/4cbbcb7e56d9604a67230d11a68543d5a83960e3 * Update Breaks/Replaces https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/2cab13d05959fe8f6ea56b866df51f3bfe17dd3f * Normalize apt-get and curl commands https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/8754ea2578bd214d75a2a9e6a0f7b4b74c062b41 * Standardize on using capitalized 'ON' in CMake build options https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/938757a85aee44c727f3f6996677ef1126c2f5aa * Apply wrap-and-sort -av and other minor tweaks and inline documentation NOTE TO MERGERS: This commit is made on 10.6 branch and can be merged to all later branches (10.7, 10.8, ..., 11.0).
2023-01-06 06:56:14 +01:00
- apt-get install -y 'default-mysql*' 'mariadb-*' 'libmariadb*'
# Verify installation of MariaDB from Buster
- *test-verify-initial
# Buster backports is needed for liburing1 (>= 0.7) and galera-4 (>= 26.4)
Deb: Sync Salsa-CI from Debian MariaDB 10.6 Compare to Debian packaging of MariaDB 1:10.6.11-2 release at commit https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/2934e8a795cbd1eba79e33b8d6c82ed2b0897128 and sync upstream everything that is relevant for upstream and safe to import on a stable 10.6 release. * Use OpenSSL 1.1 from Debian Snapshots https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/0040c272bf8a9a253fcd393b235b18cd5cdc9289 Related: https://jira.mariadb.org/browse/MDEV-30322 * Prefer using bullseye-backports in mosts tests over buster-bpo https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/daa827ecded9dc1f096ecb05242116173298d602 * Add new upgrade test for MySQL Community Cluster 8.0 https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/3c71bec9b7626d25a55e23b2e570b4e125d5d5df * Enable automatic datadir move also on upgrades from MySQL.com packages https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/4cbbcb7e56d9604a67230d11a68543d5a83960e3 * Update Breaks/Replaces https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/2cab13d05959fe8f6ea56b866df51f3bfe17dd3f * Normalize apt-get and curl commands https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/8754ea2578bd214d75a2a9e6a0f7b4b74c062b41 * Standardize on using capitalized 'ON' in CMake build options https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/938757a85aee44c727f3f6996677ef1126c2f5aa * Apply wrap-and-sort -av and other minor tweaks and inline documentation NOTE TO MERGERS: This commit is made on 10.6 branch and can be merged to all later branches (10.7, 10.8, ..., 11.0).
2023-01-06 06:56:14 +01:00
- *test-enable-buster-backports-repos
- *test-install
# mariadb-10.3 in Buster ships a /etc/init.d/mysql so it should continue to work
- service mysql status
- service mariadb status
- *test-verify-final
variables:
GIT_STRATEGY: none
except:
variables:
- $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/
mariadb-10.3 Buster upgrade:
stage: upgrade from Buster
needs:
Deb: Sync Salsa-CI from Debian MariaDB 10.6 Compare to Debian packaging of MariaDB 1:10.6.11-2 release at commit https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/2934e8a795cbd1eba79e33b8d6c82ed2b0897128 and sync upstream everything that is relevant for upstream and safe to import on a stable 10.6 release. * Use OpenSSL 1.1 from Debian Snapshots https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/0040c272bf8a9a253fcd393b235b18cd5cdc9289 Related: https://jira.mariadb.org/browse/MDEV-30322 * Prefer using bullseye-backports in mosts tests over buster-bpo https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/daa827ecded9dc1f096ecb05242116173298d602 * Add new upgrade test for MySQL Community Cluster 8.0 https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/3c71bec9b7626d25a55e23b2e570b4e125d5d5df * Enable automatic datadir move also on upgrades from MySQL.com packages https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/4cbbcb7e56d9604a67230d11a68543d5a83960e3 * Update Breaks/Replaces https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/2cab13d05959fe8f6ea56b866df51f3bfe17dd3f * Normalize apt-get and curl commands https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/8754ea2578bd214d75a2a9e6a0f7b4b74c062b41 * Standardize on using capitalized 'ON' in CMake build options https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/938757a85aee44c727f3f6996677ef1126c2f5aa * Apply wrap-and-sort -av and other minor tweaks and inline documentation NOTE TO MERGERS: This commit is made on 10.6 branch and can be merged to all later branches (10.7, 10.8, ..., 11.0).
2023-01-06 06:56:14 +01:00
- job: build
image: debian:buster
artifacts:
when: always
name: "$CI_BUILD_NAME"
paths:
- ${WORKING_DIR}/debug
script:
- *test-prepare-container
# Install everything MariaDB 10.3 currently in Debian Buster
- apt-get install -y 'default-mysql*' 'mariadb-*' 'libmariadb*'
# Verify installation of MariaDB from Buster
- *test-verify-initial
- *test-enable-bullseye-repos
- *test-install
Deb: Sync Salsa-CI from Debian MariaDB 10.6 Compare to Debian packaging of MariaDB 1:10.6.11-2 release at commit https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/2934e8a795cbd1eba79e33b8d6c82ed2b0897128 and sync upstream everything that is relevant for upstream and safe to import on a stable 10.6 release. * Use OpenSSL 1.1 from Debian Snapshots https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/0040c272bf8a9a253fcd393b235b18cd5cdc9289 Related: https://jira.mariadb.org/browse/MDEV-30322 * Prefer using bullseye-backports in mosts tests over buster-bpo https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/daa827ecded9dc1f096ecb05242116173298d602 * Add new upgrade test for MySQL Community Cluster 8.0 https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/3c71bec9b7626d25a55e23b2e570b4e125d5d5df * Enable automatic datadir move also on upgrades from MySQL.com packages https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/4cbbcb7e56d9604a67230d11a68543d5a83960e3 * Update Breaks/Replaces https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/2cab13d05959fe8f6ea56b866df51f3bfe17dd3f * Normalize apt-get and curl commands https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/8754ea2578bd214d75a2a9e6a0f7b4b74c062b41 * Standardize on using capitalized 'ON' in CMake build options https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/938757a85aee44c727f3f6996677ef1126c2f5aa * Apply wrap-and-sort -av and other minor tweaks and inline documentation NOTE TO MERGERS: This commit is made on 10.6 branch and can be merged to all later branches (10.7, 10.8, ..., 11.0).
2023-01-06 06:56:14 +01:00
# mariadb-10.3 in Buster ships a /etc/init.d/mysql so it should continue to work
- service mysql status
Deb: Sync Salsa-CI from Debian MariaDB 10.6 Compare to Debian packaging of MariaDB 1:10.6.11-2 release at commit https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/2934e8a795cbd1eba79e33b8d6c82ed2b0897128 and sync upstream everything that is relevant for upstream and safe to import on a stable 10.6 release. * Use OpenSSL 1.1 from Debian Snapshots https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/0040c272bf8a9a253fcd393b235b18cd5cdc9289 Related: https://jira.mariadb.org/browse/MDEV-30322 * Prefer using bullseye-backports in mosts tests over buster-bpo https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/daa827ecded9dc1f096ecb05242116173298d602 * Add new upgrade test for MySQL Community Cluster 8.0 https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/3c71bec9b7626d25a55e23b2e570b4e125d5d5df * Enable automatic datadir move also on upgrades from MySQL.com packages https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/4cbbcb7e56d9604a67230d11a68543d5a83960e3 * Update Breaks/Replaces https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/2cab13d05959fe8f6ea56b866df51f3bfe17dd3f * Normalize apt-get and curl commands https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/8754ea2578bd214d75a2a9e6a0f7b4b74c062b41 * Standardize on using capitalized 'ON' in CMake build options https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/938757a85aee44c727f3f6996677ef1126c2f5aa * Apply wrap-and-sort -av and other minor tweaks and inline documentation NOTE TO MERGERS: This commit is made on 10.6 branch and can be merged to all later branches (10.7, 10.8, ..., 11.0).
2023-01-06 06:56:14 +01:00
- service mariadb status
- *test-verify-final
variables:
GIT_STRATEGY: none
except:
variables:
- $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/
test basic features:
stage: test
needs:
- job: build
image: debian:${RELEASE}
artifacts:
when: always
name: "$CI_BUILD_NAME"
paths:
- ${WORKING_DIR}/debug
script:
- *test-prepare-container
- *test-install
Misc Debian/Salsa-CI fixes (#2299) * Deb: Handle codename 'n/a' from Debian Sid properly and autobake-deb cleanup This fixes autobake-deb.sh builds on Sid which was visible as 4 failing build steps on Salsa-CI. - In Sid the LSBNAME might evaluate to 'n/a', so accept it as 'Sid' to fix builds that failed with error: Error - unknown release codename n/a - Refactor list to have Ubuntu versions first, then Debian, and as last the special case of Debian Sid - Fix minor syntax issues detected by Shellcheck Also remove useless DEB_HOST_ARCH_CPU check from debian/rules: * It was never in effect as the 'sed' in autobake-deb.sh cleared it anyway * The variable name was wrong and always empty * If variable would have been correct, logic was still reversed - Define 3h timeout as the default 1h timeout on Gitlab.com (and others) is usually not enough for initial (uncached) MariaDB builds. - Replace Buster to Bookworm/Sid upgrade testing with upgrade inside Buster testing as direct upgrades from Stretch to Bullseye and Buster to Bookworm are no longer possible due to: Bug#993755: libcrypt.so.1: cannot open shared object file when upgrading from Stretch to Sid (https://bugs.debian.org/993755) - Stop ignoring MariaDB.org 10.6 to this version upgrade testing failures to reveal bug MDEV-28640. Originally this step was failing as the uring dependencies in upstream builders lagged behind and there was nothing that needed work, only time time to resolve. Now there is an actual bug in packaging that should be visible as a CI failure. - Stop testing for 'service mysql status' on systems that upgraded from MySQL 8.0 to MariaDB.org vended 10.6. Due to some unidentified debian/control changes in 10.6 on upstream the upgrade is no longer compatible in a way that would maintain the init.d script with name 'mysql'. - Fix typos where mergers had changed occurrences of 10.5 to 10.6 while they intentionally need to be exactly 10.5, otherwise the meaning changes. - Align autopkgtest code with downstream official Debian packaging one. This is change is safe on a stable branch because is only affects builds and testing, not any actual usage of MariaDB 10.6. - Standardize on using capitalized 'YES' in CMake build options (instead of 'yes' or mixed case) - Add some comments to better document debian/rules - Fix typo in Lintian overrides Ubuntu bug: https://bugs.launchpad.net/ubuntu/+source/mariadb-10.6/+bug/1970634 MariaDB ticket: https://jira.mariadb.org/browse/MDEV-25633 When built with LTO on Ubuntu, MariaDB does not catch an exception when the uring initialization fails due to a low RLIMIT_MEMLOCK value. This commit amends the commit 0609b345554f9a148e165c497aadbe368e0900aa to be identical to the one done downstream in Debian: https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/8d20ca979cf422d3a507283b86c2547d78559179 This way both the inline comments and 'git blame' for this section will show properly why this is needed, and the fix is one that is fully tested on Debian and Ubuntu. Also having this section fully identical in upstream MariaDB and downstream Debian will make the packaging maintenance easier as 'diff` runs on this file will not flag this as a difference anymore. In MDEV-28640 the init script failed to stop/start the MariaDB server due to missing mysqladmin on the system. This was however very hard to spot from the console output. Add an explicit check for the binary the script depends on, and fail verbosely if the dependency is missing.
2022-11-11 08:51:34 +01:00
- service mariadb status # There is no init.d/mysql in MariaDB 10.5+
- *test-verify-final
- |
# Print info about server
mariadb --skip-column-names -e "select @@version, @@version_comment"
mariadb --skip-column-names -e "select engine, support, transactions, savepoints from information_schema.engines order by engine" | sort
mariadb --skip-column-names -e "select plugin_name, plugin_status, plugin_type, plugin_library, plugin_license from information_schema.all_plugins order by plugin_name, plugin_library"
# Test various features
mariadb -e "CREATE DATABASE db"
mariadb -e "CREATE TABLE db.t_innodb(a1 SERIAL, c1 CHAR(8)) ENGINE=InnoDB; INSERT INTO db.t_innodb VALUES (1,'"'"'foo'"'"'),(2,'"'"'bar'"'"')"
mariadb -e "CREATE TABLE db.t_myisam(a2 SERIAL, c2 CHAR(8)) ENGINE=MyISAM; INSERT INTO db.t_myisam VALUES (1,'"'"'foo'"'"'),(2,'"'"'bar'"'"')"
mariadb -e "CREATE TABLE db.t_aria(a3 SERIAL, c3 CHAR(8)) ENGINE=Aria; INSERT INTO db.t_aria VALUES (1,'"'"'foo'"'"'),(2,'"'"'bar'"'"')"
mariadb -e "CREATE TABLE db.t_memory(a4 SERIAL, c4 CHAR(8)) ENGINE=MEMORY; INSERT INTO db.t_memory VALUES (1,'"'"'foo'"'"'),(2,'"'"'bar'"'"')"
mariadb -e "CREATE ALGORITHM=MERGE VIEW db.v_merge AS SELECT * FROM db.t_innodb, db.t_myisam, db.t_aria"
mariadb -e "CREATE ALGORITHM=TEMPTABLE VIEW db.v_temptable AS SELECT * FROM db.t_innodb, db.t_myisam, db.t_aria"
mariadb -e "CREATE PROCEDURE db.p() SELECT * FROM db.v_merge"
mariadb -e "CREATE FUNCTION db.f() RETURNS INT DETERMINISTIC RETURN 1"
# Test that the features still work (this step can be done e.g. after an upgrade)
mariadb -e "SHOW TABLES IN db"
mariadb -e "SELECT * FROM db.t_innodb; INSERT INTO db.t_innodb VALUES (3,'"'"'foo'"'"'),(4,'"'"'bar'"'"')"
mariadb -e "SELECT * FROM db.t_myisam; INSERT INTO db.t_myisam VALUES (3,'"'"'foo'"'"'),(4,'"'"'bar'"'"')"
mariadb -e "SELECT * FROM db.t_aria; INSERT INTO db.t_aria VALUES (3,'"'"'foo'"'"'),(4,'"'"'bar'"'"')"
mariadb -e "SELECT * FROM db.t_memory; INSERT INTO db.t_memory VALUES (3,'"'"'foo'"'"'),(4,'"'"'bar'"'"')"
mariadb -e "SELECT COUNT(*) FROM db.v_merge"
mariadb -e "SELECT COUNT(*) FROM db.v_temptable"
mariadb -e "CALL db.p()"
mariadb -e "SELECT db.f()"
- |
# Test TLS connections
dpkg -l | grep -i -e tls -e ssl
# Create user for TCP connection, must have password
mariadb -e "SET PASSWORD FOR 'mysql'@'localhost' = PASSWORD('asdf234');"
cat <<EOF > /root/.my.cnf
[client]
user=mysql
password=asdf234
protocol=tcp
EOF
export CERT_PATH=/usr/share/mysql/mysql-test/std_data
openssl verify -CAfile $CERT_PATH/cacert.pem $CERT_PATH/server-cert.pem
openssl x509 -subject -issuer -noout -in $CERT_PATH/cacert.pem
openssl x509 -subject -issuer -noout -in $CERT_PATH/server-cert.pem
cat <<EOF > /etc/mysql/mariadb.conf.d/tls.cnf
[client-server]
ssl = on
ssl-ca = $CERT_PATH/cacert.pem
ssl-cert = $CERT_PATH/server-cert.pem
ssl-key = $CERT_PATH/server-key.pem
[server]
require-secure-transport = on
[client]
ssl-verify-server-cert = on
EOF
service mariadb restart
mariadb -Bse 'STATUS' | tee result
# Ensure important values present, otherwise fail job
grep --quiet "localhost via TCP/IP" result
mariadb -Bse 'SHOW VARIABLES' | grep -e tls -e ssl | tee result
grep --quiet "have_ssl YES" result
grep --quiet TLSv1.3 result
mariadb -Bse 'SHOW SESSION STATUS' | grep -i -e tls -e ssl | tee result
grep --quiet TLSv1.3 result
variables:
GIT_STRATEGY: none
except:
variables:
- $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/
# Build a piece of software that was designed for libmysqlclient-dev but using the
# libmariadb-dev-compat layer. Should always end up using libmariadb.so.3 run-time.
build mariadbclient consumer Python-MySQLdb:
stage: test
needs:
- job: build
image: debian:${RELEASE}
script:
- *test-prepare-container
2022-12-17 00:01:52 +01:00
# Run each step separately to avoid an 800+ line chunk that lacks the
# commands themselves printed and Gitlab-CI cutting off the output
- apt-get install -y pkg-config ./libmariadb-dev*.deb ./libmariadb3_*.deb ./mariadb-common*.deb
- pkg-config --cflags --libs mysqlclient # See what MySQLdb builds with
- apt-get install -y python3-pip
- pip3 install mysqlclient # Compiles module against libmysqlclient
- apt-get purge -y libmariadb-dev # Not needed for run-time
- python3 -c "import MySQLdb; print(MySQLdb.get_client_info())"
variables:
GIT_STRATEGY: none
except:
variables:
- $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/
default-libmysqlclient-dev Bullseye upgrade:
stage: upgrade in Bullseye
needs:
- job: build
image: debian:${RELEASE}
artifacts:
when: always
name: "$CI_BUILD_NAME"
paths:
- ${WORKING_DIR}/debug
script:
- *test-prepare-container
- apt-get install -y pkg-config default-libmysqlclient-dev default-libmysqld-dev
- pkg-config --list-all
- *test-install-all-libs
- *test-verify-libs
except:
variables:
- $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/
Deb: Sync Salsa-CI from Debian MariaDB 10.6 Compare to Debian packaging of MariaDB 1:10.6.11-2 release at commit https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/2934e8a795cbd1eba79e33b8d6c82ed2b0897128 and sync upstream everything that is relevant for upstream and safe to import on a stable 10.6 release. * Use OpenSSL 1.1 from Debian Snapshots https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/0040c272bf8a9a253fcd393b235b18cd5cdc9289 Related: https://jira.mariadb.org/browse/MDEV-30322 * Prefer using bullseye-backports in mosts tests over buster-bpo https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/daa827ecded9dc1f096ecb05242116173298d602 * Add new upgrade test for MySQL Community Cluster 8.0 https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/3c71bec9b7626d25a55e23b2e570b4e125d5d5df * Enable automatic datadir move also on upgrades from MySQL.com packages https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/4cbbcb7e56d9604a67230d11a68543d5a83960e3 * Update Breaks/Replaces https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/2cab13d05959fe8f6ea56b866df51f3bfe17dd3f * Normalize apt-get and curl commands https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/8754ea2578bd214d75a2a9e6a0f7b4b74c062b41 * Standardize on using capitalized 'ON' in CMake build options https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/938757a85aee44c727f3f6996677ef1126c2f5aa * Apply wrap-and-sort -av and other minor tweaks and inline documentation NOTE TO MERGERS: This commit is made on 10.6 branch and can be merged to all later branches (10.7, 10.8, ..., 11.0).
2023-01-06 06:56:14 +01:00
default-libmysqlclient-dev Buster upgrade:
stage: upgrade from Buster
Deb: Sync Salsa-CI from Debian MariaDB 10.6 Compare to Debian packaging of MariaDB 1:10.6.11-2 release at commit https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/2934e8a795cbd1eba79e33b8d6c82ed2b0897128 and sync upstream everything that is relevant for upstream and safe to import on a stable 10.6 release. * Use OpenSSL 1.1 from Debian Snapshots https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/0040c272bf8a9a253fcd393b235b18cd5cdc9289 Related: https://jira.mariadb.org/browse/MDEV-30322 * Prefer using bullseye-backports in mosts tests over buster-bpo https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/daa827ecded9dc1f096ecb05242116173298d602 * Add new upgrade test for MySQL Community Cluster 8.0 https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/3c71bec9b7626d25a55e23b2e570b4e125d5d5df * Enable automatic datadir move also on upgrades from MySQL.com packages https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/4cbbcb7e56d9604a67230d11a68543d5a83960e3 * Update Breaks/Replaces https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/2cab13d05959fe8f6ea56b866df51f3bfe17dd3f * Normalize apt-get and curl commands https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/8754ea2578bd214d75a2a9e6a0f7b4b74c062b41 * Standardize on using capitalized 'ON' in CMake build options https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/938757a85aee44c727f3f6996677ef1126c2f5aa * Apply wrap-and-sort -av and other minor tweaks and inline documentation NOTE TO MERGERS: This commit is made on 10.6 branch and can be merged to all later branches (10.7, 10.8, ..., 11.0).
2023-01-06 06:56:14 +01:00
needs:
- job: build
image: debian:buster
artifacts:
when: always
name: "$CI_BUILD_NAME"
paths:
- ${WORKING_DIR}/debug
script:
- *test-prepare-container
- apt-get install -y pkg-config default-libmysqlclient-dev
- pkg-config --list-all
- *test-enable-bullseye-repos
Deb: Sync Salsa-CI from Debian MariaDB 10.6 Compare to Debian packaging of MariaDB 1:10.6.11-2 release at commit https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/2934e8a795cbd1eba79e33b8d6c82ed2b0897128 and sync upstream everything that is relevant for upstream and safe to import on a stable 10.6 release. * Use OpenSSL 1.1 from Debian Snapshots https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/0040c272bf8a9a253fcd393b235b18cd5cdc9289 Related: https://jira.mariadb.org/browse/MDEV-30322 * Prefer using bullseye-backports in mosts tests over buster-bpo https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/daa827ecded9dc1f096ecb05242116173298d602 * Add new upgrade test for MySQL Community Cluster 8.0 https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/3c71bec9b7626d25a55e23b2e570b4e125d5d5df * Enable automatic datadir move also on upgrades from MySQL.com packages https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/4cbbcb7e56d9604a67230d11a68543d5a83960e3 * Update Breaks/Replaces https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/2cab13d05959fe8f6ea56b866df51f3bfe17dd3f * Normalize apt-get and curl commands https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/8754ea2578bd214d75a2a9e6a0f7b4b74c062b41 * Standardize on using capitalized 'ON' in CMake build options https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/938757a85aee44c727f3f6996677ef1126c2f5aa * Apply wrap-and-sort -av and other minor tweaks and inline documentation NOTE TO MERGERS: This commit is made on 10.6 branch and can be merged to all later branches (10.7, 10.8, ..., 11.0).
2023-01-06 06:56:14 +01:00
- *test-install-all-libs
- *test-verify-libs
except:
variables:
- $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/
default-libmysqlclient-dev with Buster backports upgrade:
Misc Debian/Salsa-CI fixes (#2299) * Deb: Handle codename 'n/a' from Debian Sid properly and autobake-deb cleanup This fixes autobake-deb.sh builds on Sid which was visible as 4 failing build steps on Salsa-CI. - In Sid the LSBNAME might evaluate to 'n/a', so accept it as 'Sid' to fix builds that failed with error: Error - unknown release codename n/a - Refactor list to have Ubuntu versions first, then Debian, and as last the special case of Debian Sid - Fix minor syntax issues detected by Shellcheck Also remove useless DEB_HOST_ARCH_CPU check from debian/rules: * It was never in effect as the 'sed' in autobake-deb.sh cleared it anyway * The variable name was wrong and always empty * If variable would have been correct, logic was still reversed - Define 3h timeout as the default 1h timeout on Gitlab.com (and others) is usually not enough for initial (uncached) MariaDB builds. - Replace Buster to Bookworm/Sid upgrade testing with upgrade inside Buster testing as direct upgrades from Stretch to Bullseye and Buster to Bookworm are no longer possible due to: Bug#993755: libcrypt.so.1: cannot open shared object file when upgrading from Stretch to Sid (https://bugs.debian.org/993755) - Stop ignoring MariaDB.org 10.6 to this version upgrade testing failures to reveal bug MDEV-28640. Originally this step was failing as the uring dependencies in upstream builders lagged behind and there was nothing that needed work, only time time to resolve. Now there is an actual bug in packaging that should be visible as a CI failure. - Stop testing for 'service mysql status' on systems that upgraded from MySQL 8.0 to MariaDB.org vended 10.6. Due to some unidentified debian/control changes in 10.6 on upstream the upgrade is no longer compatible in a way that would maintain the init.d script with name 'mysql'. - Fix typos where mergers had changed occurrences of 10.5 to 10.6 while they intentionally need to be exactly 10.5, otherwise the meaning changes. - Align autopkgtest code with downstream official Debian packaging one. This is change is safe on a stable branch because is only affects builds and testing, not any actual usage of MariaDB 10.6. - Standardize on using capitalized 'YES' in CMake build options (instead of 'yes' or mixed case) - Add some comments to better document debian/rules - Fix typo in Lintian overrides Ubuntu bug: https://bugs.launchpad.net/ubuntu/+source/mariadb-10.6/+bug/1970634 MariaDB ticket: https://jira.mariadb.org/browse/MDEV-25633 When built with LTO on Ubuntu, MariaDB does not catch an exception when the uring initialization fails due to a low RLIMIT_MEMLOCK value. This commit amends the commit 0609b345554f9a148e165c497aadbe368e0900aa to be identical to the one done downstream in Debian: https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/8d20ca979cf422d3a507283b86c2547d78559179 This way both the inline comments and 'git blame' for this section will show properly why this is needed, and the fix is one that is fully tested on Debian and Ubuntu. Also having this section fully identical in upstream MariaDB and downstream Debian will make the packaging maintenance easier as 'diff` runs on this file will not flag this as a difference anymore. In MDEV-28640 the init script failed to stop/start the MariaDB server due to missing mysqladmin on the system. This was however very hard to spot from the console output. Add an explicit check for the binary the script depends on, and fail verbosely if the dependency is missing.
2022-11-11 08:51:34 +01:00
stage: upgrade extras
needs:
Misc Debian/Salsa-CI fixes (#2299) * Deb: Handle codename 'n/a' from Debian Sid properly and autobake-deb cleanup This fixes autobake-deb.sh builds on Sid which was visible as 4 failing build steps on Salsa-CI. - In Sid the LSBNAME might evaluate to 'n/a', so accept it as 'Sid' to fix builds that failed with error: Error - unknown release codename n/a - Refactor list to have Ubuntu versions first, then Debian, and as last the special case of Debian Sid - Fix minor syntax issues detected by Shellcheck Also remove useless DEB_HOST_ARCH_CPU check from debian/rules: * It was never in effect as the 'sed' in autobake-deb.sh cleared it anyway * The variable name was wrong and always empty * If variable would have been correct, logic was still reversed - Define 3h timeout as the default 1h timeout on Gitlab.com (and others) is usually not enough for initial (uncached) MariaDB builds. - Replace Buster to Bookworm/Sid upgrade testing with upgrade inside Buster testing as direct upgrades from Stretch to Bullseye and Buster to Bookworm are no longer possible due to: Bug#993755: libcrypt.so.1: cannot open shared object file when upgrading from Stretch to Sid (https://bugs.debian.org/993755) - Stop ignoring MariaDB.org 10.6 to this version upgrade testing failures to reveal bug MDEV-28640. Originally this step was failing as the uring dependencies in upstream builders lagged behind and there was nothing that needed work, only time time to resolve. Now there is an actual bug in packaging that should be visible as a CI failure. - Stop testing for 'service mysql status' on systems that upgraded from MySQL 8.0 to MariaDB.org vended 10.6. Due to some unidentified debian/control changes in 10.6 on upstream the upgrade is no longer compatible in a way that would maintain the init.d script with name 'mysql'. - Fix typos where mergers had changed occurrences of 10.5 to 10.6 while they intentionally need to be exactly 10.5, otherwise the meaning changes. - Align autopkgtest code with downstream official Debian packaging one. This is change is safe on a stable branch because is only affects builds and testing, not any actual usage of MariaDB 10.6. - Standardize on using capitalized 'YES' in CMake build options (instead of 'yes' or mixed case) - Add some comments to better document debian/rules - Fix typo in Lintian overrides Ubuntu bug: https://bugs.launchpad.net/ubuntu/+source/mariadb-10.6/+bug/1970634 MariaDB ticket: https://jira.mariadb.org/browse/MDEV-25633 When built with LTO on Ubuntu, MariaDB does not catch an exception when the uring initialization fails due to a low RLIMIT_MEMLOCK value. This commit amends the commit 0609b345554f9a148e165c497aadbe368e0900aa to be identical to the one done downstream in Debian: https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/8d20ca979cf422d3a507283b86c2547d78559179 This way both the inline comments and 'git blame' for this section will show properly why this is needed, and the fix is one that is fully tested on Debian and Ubuntu. Also having this section fully identical in upstream MariaDB and downstream Debian will make the packaging maintenance easier as 'diff` runs on this file will not flag this as a difference anymore. In MDEV-28640 the init script failed to stop/start the MariaDB server due to missing mysqladmin on the system. This was however very hard to spot from the console output. Add an explicit check for the binary the script depends on, and fail verbosely if the dependency is missing.
2022-11-11 08:51:34 +01:00
- job: build buster-backports
image: debian:buster
artifacts:
when: always
name: "$CI_BUILD_NAME"
paths:
- ${WORKING_DIR}/debug
script:
- *test-prepare-container
- apt-get install -y pkg-config default-libmysqlclient-dev
- pkg-config --list-all
Misc Debian/Salsa-CI fixes (#2299) * Deb: Handle codename 'n/a' from Debian Sid properly and autobake-deb cleanup This fixes autobake-deb.sh builds on Sid which was visible as 4 failing build steps on Salsa-CI. - In Sid the LSBNAME might evaluate to 'n/a', so accept it as 'Sid' to fix builds that failed with error: Error - unknown release codename n/a - Refactor list to have Ubuntu versions first, then Debian, and as last the special case of Debian Sid - Fix minor syntax issues detected by Shellcheck Also remove useless DEB_HOST_ARCH_CPU check from debian/rules: * It was never in effect as the 'sed' in autobake-deb.sh cleared it anyway * The variable name was wrong and always empty * If variable would have been correct, logic was still reversed - Define 3h timeout as the default 1h timeout on Gitlab.com (and others) is usually not enough for initial (uncached) MariaDB builds. - Replace Buster to Bookworm/Sid upgrade testing with upgrade inside Buster testing as direct upgrades from Stretch to Bullseye and Buster to Bookworm are no longer possible due to: Bug#993755: libcrypt.so.1: cannot open shared object file when upgrading from Stretch to Sid (https://bugs.debian.org/993755) - Stop ignoring MariaDB.org 10.6 to this version upgrade testing failures to reveal bug MDEV-28640. Originally this step was failing as the uring dependencies in upstream builders lagged behind and there was nothing that needed work, only time time to resolve. Now there is an actual bug in packaging that should be visible as a CI failure. - Stop testing for 'service mysql status' on systems that upgraded from MySQL 8.0 to MariaDB.org vended 10.6. Due to some unidentified debian/control changes in 10.6 on upstream the upgrade is no longer compatible in a way that would maintain the init.d script with name 'mysql'. - Fix typos where mergers had changed occurrences of 10.5 to 10.6 while they intentionally need to be exactly 10.5, otherwise the meaning changes. - Align autopkgtest code with downstream official Debian packaging one. This is change is safe on a stable branch because is only affects builds and testing, not any actual usage of MariaDB 10.6. - Standardize on using capitalized 'YES' in CMake build options (instead of 'yes' or mixed case) - Add some comments to better document debian/rules - Fix typo in Lintian overrides Ubuntu bug: https://bugs.launchpad.net/ubuntu/+source/mariadb-10.6/+bug/1970634 MariaDB ticket: https://jira.mariadb.org/browse/MDEV-25633 When built with LTO on Ubuntu, MariaDB does not catch an exception when the uring initialization fails due to a low RLIMIT_MEMLOCK value. This commit amends the commit 0609b345554f9a148e165c497aadbe368e0900aa to be identical to the one done downstream in Debian: https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/8d20ca979cf422d3a507283b86c2547d78559179 This way both the inline comments and 'git blame' for this section will show properly why this is needed, and the fix is one that is fully tested on Debian and Ubuntu. Also having this section fully identical in upstream MariaDB and downstream Debian will make the packaging maintenance easier as 'diff` runs on this file will not flag this as a difference anymore. In MDEV-28640 the init script failed to stop/start the MariaDB server due to missing mysqladmin on the system. This was however very hard to spot from the console output. Add an explicit check for the binary the script depends on, and fail verbosely if the dependency is missing.
2022-11-11 08:51:34 +01:00
- *test-enable-buster-backports-repos
- *test-install-all-libs
- *test-verify-libs
except:
variables:
- $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/
# Upgrading from MySQL 8.0 with datadir in place is not possible. Users need to do a data dump.
# The Debian maintainer scripts detect this situation and simply moves old datadir aside and start fresh.
Deb: Sync Salsa-CI from Debian MariaDB 10.6 Compare to Debian packaging of MariaDB 1:10.6.11-2 release at commit https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/2934e8a795cbd1eba79e33b8d6c82ed2b0897128 and sync upstream everything that is relevant for upstream and safe to import on a stable 10.6 release. * Use OpenSSL 1.1 from Debian Snapshots https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/0040c272bf8a9a253fcd393b235b18cd5cdc9289 Related: https://jira.mariadb.org/browse/MDEV-30322 * Prefer using bullseye-backports in mosts tests over buster-bpo https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/daa827ecded9dc1f096ecb05242116173298d602 * Add new upgrade test for MySQL Community Cluster 8.0 https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/3c71bec9b7626d25a55e23b2e570b4e125d5d5df * Enable automatic datadir move also on upgrades from MySQL.com packages https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/4cbbcb7e56d9604a67230d11a68543d5a83960e3 * Update Breaks/Replaces https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/2cab13d05959fe8f6ea56b866df51f3bfe17dd3f * Normalize apt-get and curl commands https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/8754ea2578bd214d75a2a9e6a0f7b4b74c062b41 * Standardize on using capitalized 'ON' in CMake build options https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/938757a85aee44c727f3f6996677ef1126c2f5aa * Apply wrap-and-sort -av and other minor tweaks and inline documentation NOTE TO MERGERS: This commit is made on 10.6 branch and can be merged to all later branches (10.7, 10.8, ..., 11.0).
2023-01-06 06:56:14 +01:00
#
# Testing on Focal binaries on Buster works. Using Jammy binaries on Bullseye
# does not work as libc in Jammy is too new.
mysql-8.0 from Ubuntu 22.04 upgrade:
stage: upgrade extras
needs:
- job: build
image: debian:${RELEASE}
artifacts:
when: always
name: "$CI_BUILD_NAME"
paths:
- ${WORKING_DIR}/debug
script:
- *test-prepare-container
# Add Ubuntu Focal archive keys and repository
- apt-get install --no-install-recommends --yes gpg gpg-agent dirmngr ca-certificates # Bare minimal (<4MB) for apt-key to work
- apt-key adv --recv-keys --keyserver hkps://keyserver.ubuntu.com:443 871920D1991BC93C 3B4FE6ACC0B21F32
- echo "deb http://archive.ubuntu.com/ubuntu/ focal main restricted" > /etc/apt/sources.list.d/ubuntu.list
Deb: Sync Salsa-CI from Debian MariaDB 10.6 Compare to Debian packaging of MariaDB 1:10.6.11-2 release at commit https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/2934e8a795cbd1eba79e33b8d6c82ed2b0897128 and sync upstream everything that is relevant for upstream and safe to import on a stable 10.6 release. * Use OpenSSL 1.1 from Debian Snapshots https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/0040c272bf8a9a253fcd393b235b18cd5cdc9289 Related: https://jira.mariadb.org/browse/MDEV-30322 * Prefer using bullseye-backports in mosts tests over buster-bpo https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/daa827ecded9dc1f096ecb05242116173298d602 * Add new upgrade test for MySQL Community Cluster 8.0 https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/3c71bec9b7626d25a55e23b2e570b4e125d5d5df * Enable automatic datadir move also on upgrades from MySQL.com packages https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/4cbbcb7e56d9604a67230d11a68543d5a83960e3 * Update Breaks/Replaces https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/2cab13d05959fe8f6ea56b866df51f3bfe17dd3f * Normalize apt-get and curl commands https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/8754ea2578bd214d75a2a9e6a0f7b4b74c062b41 * Standardize on using capitalized 'ON' in CMake build options https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/938757a85aee44c727f3f6996677ef1126c2f5aa * Apply wrap-and-sort -av and other minor tweaks and inline documentation NOTE TO MERGERS: This commit is made on 10.6 branch and can be merged to all later branches (10.7, 10.8, ..., 11.0).
2023-01-06 06:56:14 +01:00
- apt-get update -qq
# First install often fail due to bug in mysql-8.0
- apt-get install -y mysql-server 'libmysqlc*' || true
- sleep 10 && apt-get install -f
- *test-verify-initial
- *test-install
- service mysql status
- sleep 5 # Give the mysql_upgrade a bit of time to complete before querying the server
- *test-verify-final
variables:
GIT_STRATEGY: none
except:
variables:
- $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/
Deb: Sync Salsa-CI from Debian MariaDB 10.6 Compare to Debian packaging of MariaDB 1:10.6.11-2 release at commit https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/2934e8a795cbd1eba79e33b8d6c82ed2b0897128 and sync upstream everything that is relevant for upstream and safe to import on a stable 10.6 release. * Use OpenSSL 1.1 from Debian Snapshots https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/0040c272bf8a9a253fcd393b235b18cd5cdc9289 Related: https://jira.mariadb.org/browse/MDEV-30322 * Prefer using bullseye-backports in mosts tests over buster-bpo https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/daa827ecded9dc1f096ecb05242116173298d602 * Add new upgrade test for MySQL Community Cluster 8.0 https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/3c71bec9b7626d25a55e23b2e570b4e125d5d5df * Enable automatic datadir move also on upgrades from MySQL.com packages https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/4cbbcb7e56d9604a67230d11a68543d5a83960e3 * Update Breaks/Replaces https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/2cab13d05959fe8f6ea56b866df51f3bfe17dd3f * Normalize apt-get and curl commands https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/8754ea2578bd214d75a2a9e6a0f7b4b74c062b41 * Standardize on using capitalized 'ON' in CMake build options https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/938757a85aee44c727f3f6996677ef1126c2f5aa * Apply wrap-and-sort -av and other minor tweaks and inline documentation NOTE TO MERGERS: This commit is made on 10.6 branch and can be merged to all later branches (10.7, 10.8, ..., 11.0).
2023-01-06 06:56:14 +01:00
# Upgrading from MySQL 8.0 with datadir in place is not possible. Users need to do a data dump.
# The Debian maintainer scripts detect this situation and simply moves old datadir aside and start fresh.
mysql-community-cluster-8.0 from MySQL.com upgrade:
Deb: Sync Salsa-CI from Debian MariaDB 10.6 Compare to Debian packaging of MariaDB 1:10.6.11-2 release at commit https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/2934e8a795cbd1eba79e33b8d6c82ed2b0897128 and sync upstream everything that is relevant for upstream and safe to import on a stable 10.6 release. * Use OpenSSL 1.1 from Debian Snapshots https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/0040c272bf8a9a253fcd393b235b18cd5cdc9289 Related: https://jira.mariadb.org/browse/MDEV-30322 * Prefer using bullseye-backports in mosts tests over buster-bpo https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/daa827ecded9dc1f096ecb05242116173298d602 * Add new upgrade test for MySQL Community Cluster 8.0 https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/3c71bec9b7626d25a55e23b2e570b4e125d5d5df * Enable automatic datadir move also on upgrades from MySQL.com packages https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/4cbbcb7e56d9604a67230d11a68543d5a83960e3 * Update Breaks/Replaces https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/2cab13d05959fe8f6ea56b866df51f3bfe17dd3f * Normalize apt-get and curl commands https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/8754ea2578bd214d75a2a9e6a0f7b4b74c062b41 * Standardize on using capitalized 'ON' in CMake build options https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/938757a85aee44c727f3f6996677ef1126c2f5aa * Apply wrap-and-sort -av and other minor tweaks and inline documentation NOTE TO MERGERS: This commit is made on 10.6 branch and can be merged to all later branches (10.7, 10.8, ..., 11.0).
2023-01-06 06:56:14 +01:00
stage: upgrade extras
needs:
- job: build
image: debian:${RELEASE}
Deb: Sync Salsa-CI from Debian MariaDB 10.6 Compare to Debian packaging of MariaDB 1:10.6.11-2 release at commit https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/2934e8a795cbd1eba79e33b8d6c82ed2b0897128 and sync upstream everything that is relevant for upstream and safe to import on a stable 10.6 release. * Use OpenSSL 1.1 from Debian Snapshots https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/0040c272bf8a9a253fcd393b235b18cd5cdc9289 Related: https://jira.mariadb.org/browse/MDEV-30322 * Prefer using bullseye-backports in mosts tests over buster-bpo https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/daa827ecded9dc1f096ecb05242116173298d602 * Add new upgrade test for MySQL Community Cluster 8.0 https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/3c71bec9b7626d25a55e23b2e570b4e125d5d5df * Enable automatic datadir move also on upgrades from MySQL.com packages https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/4cbbcb7e56d9604a67230d11a68543d5a83960e3 * Update Breaks/Replaces https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/2cab13d05959fe8f6ea56b866df51f3bfe17dd3f * Normalize apt-get and curl commands https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/8754ea2578bd214d75a2a9e6a0f7b4b74c062b41 * Standardize on using capitalized 'ON' in CMake build options https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/938757a85aee44c727f3f6996677ef1126c2f5aa * Apply wrap-and-sort -av and other minor tweaks and inline documentation NOTE TO MERGERS: This commit is made on 10.6 branch and can be merged to all later branches (10.7, 10.8, ..., 11.0).
2023-01-06 06:56:14 +01:00
artifacts:
when: always
name: "$CI_BUILD_NAME"
paths:
- ${WORKING_DIR}/debug
script:
- *test-prepare-container
- apt-get install --no-install-recommends --yes ca-certificates curl systemctl
- curl -sS "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x859be8d7c586f538430b19c2467b942d3a79bd29" -o /etc/apt/trusted.gpg.d/mysql.asc
- echo "deb https://repo.mysql.com/apt/debian/ bullseye mysql-cluster-8.0" > /etc/apt/sources.list.d/mysql.list
- apt-get update -qq
- apt-get install -y mysql-cluster-community-server
- sed 's/ExecStartPre=+/ExecStartPre=/' -i /lib/systemd/system/mysql.service # Hack to make file compatible with systemctl shim
- systemctl start mysql
- dpkg -l | grep -iE 'maria|mysql|galera'
- systemctl status mysql; mysql -e 'SELECT VERSION()'
- systemctl stop mysql # Stop manually as maintainer scripts don't handle this with systemctl shim
- *test-install
# Ignore systemctl shim result as MariaDB systemd file is incompatible with it and yields:
# ERROR:systemctl:the ExecStartPre control process exited with error code
- systemctl status mysql || true
- mysql -e 'SELECT VERSION()' || true
- sleep 5 # Give the mysql_upgrade a bit of time to complete before querying the server
- *test-verify-final
variables:
GIT_STRATEGY: none
except:
variables:
- $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/
mariadb.org-10.6 to mariadb-10.6 upgrade:
stage: upgrade extras
needs:
- job: build
image: debian:${RELEASE}
artifacts:
when: always
name: "$CI_BUILD_NAME"
paths:
- ${WORKING_DIR}/debug
script:
- *test-prepare-container
Deb: Sync Salsa-CI from Debian MariaDB 10.6 Compare to Debian packaging of MariaDB 1:10.6.11-2 release at commit https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/2934e8a795cbd1eba79e33b8d6c82ed2b0897128 and sync upstream everything that is relevant for upstream and safe to import on a stable 10.6 release. * Use OpenSSL 1.1 from Debian Snapshots https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/0040c272bf8a9a253fcd393b235b18cd5cdc9289 Related: https://jira.mariadb.org/browse/MDEV-30322 * Prefer using bullseye-backports in mosts tests over buster-bpo https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/daa827ecded9dc1f096ecb05242116173298d602 * Add new upgrade test for MySQL Community Cluster 8.0 https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/3c71bec9b7626d25a55e23b2e570b4e125d5d5df * Enable automatic datadir move also on upgrades from MySQL.com packages https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/4cbbcb7e56d9604a67230d11a68543d5a83960e3 * Update Breaks/Replaces https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/2cab13d05959fe8f6ea56b866df51f3bfe17dd3f * Normalize apt-get and curl commands https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/8754ea2578bd214d75a2a9e6a0f7b4b74c062b41 * Standardize on using capitalized 'ON' in CMake build options https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/938757a85aee44c727f3f6996677ef1126c2f5aa * Apply wrap-and-sort -av and other minor tweaks and inline documentation NOTE TO MERGERS: This commit is made on 10.6 branch and can be merged to all later branches (10.7, 10.8, ..., 11.0).
2023-01-06 06:56:14 +01:00
- apt-get -qq install --no-install-recommends --yes ca-certificates curl
- curl -sS https://mariadb.org/mariadb_release_signing_key.asc -o /etc/apt/trusted.gpg.d/mariadb.asc
- echo "deb https://deb.mariadb.org/10.6/debian ${RELEASE} main" > /etc/apt/sources.list.d/mariadb.list
Deb: Sync Salsa-CI from Debian MariaDB 10.6 Compare to Debian packaging of MariaDB 1:10.6.11-2 release at commit https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/2934e8a795cbd1eba79e33b8d6c82ed2b0897128 and sync upstream everything that is relevant for upstream and safe to import on a stable 10.6 release. * Use OpenSSL 1.1 from Debian Snapshots https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/0040c272bf8a9a253fcd393b235b18cd5cdc9289 Related: https://jira.mariadb.org/browse/MDEV-30322 * Prefer using bullseye-backports in mosts tests over buster-bpo https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/daa827ecded9dc1f096ecb05242116173298d602 * Add new upgrade test for MySQL Community Cluster 8.0 https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/3c71bec9b7626d25a55e23b2e570b4e125d5d5df * Enable automatic datadir move also on upgrades from MySQL.com packages https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/4cbbcb7e56d9604a67230d11a68543d5a83960e3 * Update Breaks/Replaces https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/2cab13d05959fe8f6ea56b866df51f3bfe17dd3f * Normalize apt-get and curl commands https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/8754ea2578bd214d75a2a9e6a0f7b4b74c062b41 * Standardize on using capitalized 'ON' in CMake build options https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/938757a85aee44c727f3f6996677ef1126c2f5aa * Apply wrap-and-sort -av and other minor tweaks and inline documentation NOTE TO MERGERS: This commit is made on 10.6 branch and can be merged to all later branches (10.7, 10.8, ..., 11.0).
2023-01-06 06:56:14 +01:00
- apt-get update -qq
# Package libmariadbclient-dev from mariadb.org conflicts with libmariadb-dev in Sid, so cannot use wildcard that would include it
# Enable this line when there is a way to install them only from the mariadb.org repo
# - apt-get install -y 'mariadb*' libmariadb3 'libmariadb-*' 'libmariadbd*'
- apt-get install -y mariadb-server-10.6
- *test-verify-initial
# Install MariaDB built in this commit
# Force downgrades so our version installs on top of upstream revision, e.g. 1:10.5.5-1 vs 1:10.5.5+mariadb~sid
- apt-get install -y --allow-downgrades ./*.deb
# Verify installation of MariaDB built in this commit
- dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed
- mariadb --version # Client version
Misc Debian/Salsa-CI fixes (#2299) * Deb: Handle codename 'n/a' from Debian Sid properly and autobake-deb cleanup This fixes autobake-deb.sh builds on Sid which was visible as 4 failing build steps on Salsa-CI. - In Sid the LSBNAME might evaluate to 'n/a', so accept it as 'Sid' to fix builds that failed with error: Error - unknown release codename n/a - Refactor list to have Ubuntu versions first, then Debian, and as last the special case of Debian Sid - Fix minor syntax issues detected by Shellcheck Also remove useless DEB_HOST_ARCH_CPU check from debian/rules: * It was never in effect as the 'sed' in autobake-deb.sh cleared it anyway * The variable name was wrong and always empty * If variable would have been correct, logic was still reversed - Define 3h timeout as the default 1h timeout on Gitlab.com (and others) is usually not enough for initial (uncached) MariaDB builds. - Replace Buster to Bookworm/Sid upgrade testing with upgrade inside Buster testing as direct upgrades from Stretch to Bullseye and Buster to Bookworm are no longer possible due to: Bug#993755: libcrypt.so.1: cannot open shared object file when upgrading from Stretch to Sid (https://bugs.debian.org/993755) - Stop ignoring MariaDB.org 10.6 to this version upgrade testing failures to reveal bug MDEV-28640. Originally this step was failing as the uring dependencies in upstream builders lagged behind and there was nothing that needed work, only time time to resolve. Now there is an actual bug in packaging that should be visible as a CI failure. - Stop testing for 'service mysql status' on systems that upgraded from MySQL 8.0 to MariaDB.org vended 10.6. Due to some unidentified debian/control changes in 10.6 on upstream the upgrade is no longer compatible in a way that would maintain the init.d script with name 'mysql'. - Fix typos where mergers had changed occurrences of 10.5 to 10.6 while they intentionally need to be exactly 10.5, otherwise the meaning changes. - Align autopkgtest code with downstream official Debian packaging one. This is change is safe on a stable branch because is only affects builds and testing, not any actual usage of MariaDB 10.6. - Standardize on using capitalized 'YES' in CMake build options (instead of 'yes' or mixed case) - Add some comments to better document debian/rules - Fix typo in Lintian overrides Ubuntu bug: https://bugs.launchpad.net/ubuntu/+source/mariadb-10.6/+bug/1970634 MariaDB ticket: https://jira.mariadb.org/browse/MDEV-25633 When built with LTO on Ubuntu, MariaDB does not catch an exception when the uring initialization fails due to a low RLIMIT_MEMLOCK value. This commit amends the commit 0609b345554f9a148e165c497aadbe368e0900aa to be identical to the one done downstream in Debian: https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/8d20ca979cf422d3a507283b86c2547d78559179 This way both the inline comments and 'git blame' for this section will show properly why this is needed, and the fix is one that is fully tested on Debian and Ubuntu. Also having this section fully identical in upstream MariaDB and downstream Debian will make the packaging maintenance easier as 'diff` runs on this file will not flag this as a difference anymore. In MDEV-28640 the init script failed to stop/start the MariaDB server due to missing mysqladmin on the system. This was however very hard to spot from the console output. Add an explicit check for the binary the script depends on, and fail verbosely if the dependency is missing.
2022-11-11 08:51:34 +01:00
- service mariadb status # There is no init.d/mysql in MariaDB 10.5+
- *test-verify-final
variables:
GIT_STRATEGY: none
except:
variables:
- $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/
mariadb.org-10.5 to mariadb-10.6 upgrade:
stage: upgrade extras
needs:
- job: build
image: debian:${RELEASE}
artifacts:
when: always
name: "$CI_BUILD_NAME"
paths:
- ${WORKING_DIR}/debug
script:
- *test-prepare-container
Deb: Sync Salsa-CI from Debian MariaDB 10.6 Compare to Debian packaging of MariaDB 1:10.6.11-2 release at commit https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/2934e8a795cbd1eba79e33b8d6c82ed2b0897128 and sync upstream everything that is relevant for upstream and safe to import on a stable 10.6 release. * Use OpenSSL 1.1 from Debian Snapshots https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/0040c272bf8a9a253fcd393b235b18cd5cdc9289 Related: https://jira.mariadb.org/browse/MDEV-30322 * Prefer using bullseye-backports in mosts tests over buster-bpo https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/daa827ecded9dc1f096ecb05242116173298d602 * Add new upgrade test for MySQL Community Cluster 8.0 https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/3c71bec9b7626d25a55e23b2e570b4e125d5d5df * Enable automatic datadir move also on upgrades from MySQL.com packages https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/4cbbcb7e56d9604a67230d11a68543d5a83960e3 * Update Breaks/Replaces https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/2cab13d05959fe8f6ea56b866df51f3bfe17dd3f * Normalize apt-get and curl commands https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/8754ea2578bd214d75a2a9e6a0f7b4b74c062b41 * Standardize on using capitalized 'ON' in CMake build options https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/938757a85aee44c727f3f6996677ef1126c2f5aa * Apply wrap-and-sort -av and other minor tweaks and inline documentation NOTE TO MERGERS: This commit is made on 10.6 branch and can be merged to all later branches (10.7, 10.8, ..., 11.0).
2023-01-06 06:56:14 +01:00
- apt-get -qq install --no-install-recommends --yes ca-certificates curl
- curl -sS https://mariadb.org/mariadb_release_signing_key.asc -o /etc/apt/trusted.gpg.d/mariadb.asc
- echo "deb https://archive.mariadb.org/mariadb-10.5/repo/debian ${RELEASE} main" > /etc/apt/sources.list.d/mariadb.list
Deb: Sync Salsa-CI from Debian MariaDB 10.6 Compare to Debian packaging of MariaDB 1:10.6.11-2 release at commit https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/2934e8a795cbd1eba79e33b8d6c82ed2b0897128 and sync upstream everything that is relevant for upstream and safe to import on a stable 10.6 release. * Use OpenSSL 1.1 from Debian Snapshots https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/0040c272bf8a9a253fcd393b235b18cd5cdc9289 Related: https://jira.mariadb.org/browse/MDEV-30322 * Prefer using bullseye-backports in mosts tests over buster-bpo https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/daa827ecded9dc1f096ecb05242116173298d602 * Add new upgrade test for MySQL Community Cluster 8.0 https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/3c71bec9b7626d25a55e23b2e570b4e125d5d5df * Enable automatic datadir move also on upgrades from MySQL.com packages https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/4cbbcb7e56d9604a67230d11a68543d5a83960e3 * Update Breaks/Replaces https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/2cab13d05959fe8f6ea56b866df51f3bfe17dd3f * Normalize apt-get and curl commands https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/8754ea2578bd214d75a2a9e6a0f7b4b74c062b41 * Standardize on using capitalized 'ON' in CMake build options https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/938757a85aee44c727f3f6996677ef1126c2f5aa * Apply wrap-and-sort -av and other minor tweaks and inline documentation NOTE TO MERGERS: This commit is made on 10.6 branch and can be merged to all later branches (10.7, 10.8, ..., 11.0).
2023-01-06 06:56:14 +01:00
- apt-get update -qq
- apt-get install -y mariadb-server-10.5
- *test-verify-initial
# Install MariaDB built in this commit
# Verify installation of MariaDB built in this commit
- dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed
- mariadb --version # Client version
Misc Debian/Salsa-CI fixes (#2299) * Deb: Handle codename 'n/a' from Debian Sid properly and autobake-deb cleanup This fixes autobake-deb.sh builds on Sid which was visible as 4 failing build steps on Salsa-CI. - In Sid the LSBNAME might evaluate to 'n/a', so accept it as 'Sid' to fix builds that failed with error: Error - unknown release codename n/a - Refactor list to have Ubuntu versions first, then Debian, and as last the special case of Debian Sid - Fix minor syntax issues detected by Shellcheck Also remove useless DEB_HOST_ARCH_CPU check from debian/rules: * It was never in effect as the 'sed' in autobake-deb.sh cleared it anyway * The variable name was wrong and always empty * If variable would have been correct, logic was still reversed - Define 3h timeout as the default 1h timeout on Gitlab.com (and others) is usually not enough for initial (uncached) MariaDB builds. - Replace Buster to Bookworm/Sid upgrade testing with upgrade inside Buster testing as direct upgrades from Stretch to Bullseye and Buster to Bookworm are no longer possible due to: Bug#993755: libcrypt.so.1: cannot open shared object file when upgrading from Stretch to Sid (https://bugs.debian.org/993755) - Stop ignoring MariaDB.org 10.6 to this version upgrade testing failures to reveal bug MDEV-28640. Originally this step was failing as the uring dependencies in upstream builders lagged behind and there was nothing that needed work, only time time to resolve. Now there is an actual bug in packaging that should be visible as a CI failure. - Stop testing for 'service mysql status' on systems that upgraded from MySQL 8.0 to MariaDB.org vended 10.6. Due to some unidentified debian/control changes in 10.6 on upstream the upgrade is no longer compatible in a way that would maintain the init.d script with name 'mysql'. - Fix typos where mergers had changed occurrences of 10.5 to 10.6 while they intentionally need to be exactly 10.5, otherwise the meaning changes. - Align autopkgtest code with downstream official Debian packaging one. This is change is safe on a stable branch because is only affects builds and testing, not any actual usage of MariaDB 10.6. - Standardize on using capitalized 'YES' in CMake build options (instead of 'yes' or mixed case) - Add some comments to better document debian/rules - Fix typo in Lintian overrides Ubuntu bug: https://bugs.launchpad.net/ubuntu/+source/mariadb-10.6/+bug/1970634 MariaDB ticket: https://jira.mariadb.org/browse/MDEV-25633 When built with LTO on Ubuntu, MariaDB does not catch an exception when the uring initialization fails due to a low RLIMIT_MEMLOCK value. This commit amends the commit 0609b345554f9a148e165c497aadbe368e0900aa to be identical to the one done downstream in Debian: https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/8d20ca979cf422d3a507283b86c2547d78559179 This way both the inline comments and 'git blame' for this section will show properly why this is needed, and the fix is one that is fully tested on Debian and Ubuntu. Also having this section fully identical in upstream MariaDB and downstream Debian will make the packaging maintenance easier as 'diff` runs on this file will not flag this as a difference anymore. In MDEV-28640 the init script failed to stop/start the MariaDB server due to missing mysqladmin on the system. This was however very hard to spot from the console output. Add an explicit check for the binary the script depends on, and fail verbosely if the dependency is missing.
2022-11-11 08:51:34 +01:00
- service mariadb status # There is no init.d/mysql in MariaDB 10.5+
- *test-verify-final
variables:
GIT_STRATEGY: none
except:
variables:
- $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/
mariadb.org-10.4 to mariadb-10.6 with Buster backports upgrade:
stage: upgrade extras
needs:
- job: build buster-backports
image: debian:buster
artifacts:
when: always
name: "$CI_BUILD_NAME"
paths:
- ${WORKING_DIR}/debug
script:
- *test-prepare-container
- apt-get -qq install --no-install-recommends --yes ca-certificates curl
- curl -sS https://mariadb.org/mariadb_release_signing_key.asc -o /etc/apt/trusted.gpg.d/mariadb.asc
- echo "deb https://archive.mariadb.org/mariadb-10.4/repo/debian buster main" > /etc/apt/sources.list.d/mariadb.list
Deb: Sync Salsa-CI from Debian MariaDB 10.6 Compare to Debian packaging of MariaDB 1:10.6.11-2 release at commit https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/2934e8a795cbd1eba79e33b8d6c82ed2b0897128 and sync upstream everything that is relevant for upstream and safe to import on a stable 10.6 release. * Use OpenSSL 1.1 from Debian Snapshots https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/0040c272bf8a9a253fcd393b235b18cd5cdc9289 Related: https://jira.mariadb.org/browse/MDEV-30322 * Prefer using bullseye-backports in mosts tests over buster-bpo https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/daa827ecded9dc1f096ecb05242116173298d602 * Add new upgrade test for MySQL Community Cluster 8.0 https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/3c71bec9b7626d25a55e23b2e570b4e125d5d5df * Enable automatic datadir move also on upgrades from MySQL.com packages https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/4cbbcb7e56d9604a67230d11a68543d5a83960e3 * Update Breaks/Replaces https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/2cab13d05959fe8f6ea56b866df51f3bfe17dd3f * Normalize apt-get and curl commands https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/8754ea2578bd214d75a2a9e6a0f7b4b74c062b41 * Standardize on using capitalized 'ON' in CMake build options https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/938757a85aee44c727f3f6996677ef1126c2f5aa * Apply wrap-and-sort -av and other minor tweaks and inline documentation NOTE TO MERGERS: This commit is made on 10.6 branch and can be merged to all later branches (10.7, 10.8, ..., 11.0).
2023-01-06 06:56:14 +01:00
- apt-get update -qq
- apt-get install -y mariadb-server-10.4
# MariaDB.org version of 10.4 and early 10.5 do not install an init file, so
# it must be installed here manually
- cp /usr/share/mysql/mysql.init /etc/init.d/mysql; chmod +x /etc/init.d/mysql; service mysql start; sleep 5
- *test-verify-initial
# Buster backports is needed for liburing1 (>= 0.7) and galera-4 (>= 26.4)
- *test-enable-buster-backports-repos
- *test-install
- sleep 5 # Give the mysql_upgrade a bit of time to complete before querying the server
- service mysql status
- service mariadb status
- *test-verify-final
variables:
GIT_STRATEGY: none
except:
variables:
- $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/
mariadb.org-10.3 to mariadb-10.6 with Buster backports upgrade:
stage: upgrade extras
needs:
- job: build buster-backports
image: debian:buster
artifacts:
when: always
name: "$CI_BUILD_NAME"
paths:
- ${WORKING_DIR}/debug
script:
- *test-prepare-container
Deb: Sync Salsa-CI from Debian MariaDB 10.6 Compare to Debian packaging of MariaDB 1:10.6.11-2 release at commit https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/2934e8a795cbd1eba79e33b8d6c82ed2b0897128 and sync upstream everything that is relevant for upstream and safe to import on a stable 10.6 release. * Use OpenSSL 1.1 from Debian Snapshots https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/0040c272bf8a9a253fcd393b235b18cd5cdc9289 Related: https://jira.mariadb.org/browse/MDEV-30322 * Prefer using bullseye-backports in mosts tests over buster-bpo https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/daa827ecded9dc1f096ecb05242116173298d602 * Add new upgrade test for MySQL Community Cluster 8.0 https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/3c71bec9b7626d25a55e23b2e570b4e125d5d5df * Enable automatic datadir move also on upgrades from MySQL.com packages https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/4cbbcb7e56d9604a67230d11a68543d5a83960e3 * Update Breaks/Replaces https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/2cab13d05959fe8f6ea56b866df51f3bfe17dd3f * Normalize apt-get and curl commands https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/8754ea2578bd214d75a2a9e6a0f7b4b74c062b41 * Standardize on using capitalized 'ON' in CMake build options https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/938757a85aee44c727f3f6996677ef1126c2f5aa * Apply wrap-and-sort -av and other minor tweaks and inline documentation NOTE TO MERGERS: This commit is made on 10.6 branch and can be merged to all later branches (10.7, 10.8, ..., 11.0).
2023-01-06 06:56:14 +01:00
- apt-get -qq install --no-install-recommends --yes ca-certificates curl
- curl -sS https://mariadb.org/mariadb_release_signing_key.asc -o /etc/apt/trusted.gpg.d/mariadb.asc
- echo "deb https://archive.mariadb.org/mariadb-10.3/repo/debian buster main" > /etc/apt/sources.list.d/mariadb.list
Deb: Sync Salsa-CI from Debian MariaDB 10.6 Compare to Debian packaging of MariaDB 1:10.6.11-2 release at commit https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/2934e8a795cbd1eba79e33b8d6c82ed2b0897128 and sync upstream everything that is relevant for upstream and safe to import on a stable 10.6 release. * Use OpenSSL 1.1 from Debian Snapshots https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/0040c272bf8a9a253fcd393b235b18cd5cdc9289 Related: https://jira.mariadb.org/browse/MDEV-30322 * Prefer using bullseye-backports in mosts tests over buster-bpo https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/daa827ecded9dc1f096ecb05242116173298d602 * Add new upgrade test for MySQL Community Cluster 8.0 https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/3c71bec9b7626d25a55e23b2e570b4e125d5d5df * Enable automatic datadir move also on upgrades from MySQL.com packages https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/4cbbcb7e56d9604a67230d11a68543d5a83960e3 * Update Breaks/Replaces https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/2cab13d05959fe8f6ea56b866df51f3bfe17dd3f * Normalize apt-get and curl commands https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/8754ea2578bd214d75a2a9e6a0f7b4b74c062b41 * Standardize on using capitalized 'ON' in CMake build options https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/938757a85aee44c727f3f6996677ef1126c2f5aa * Apply wrap-and-sort -av and other minor tweaks and inline documentation NOTE TO MERGERS: This commit is made on 10.6 branch and can be merged to all later branches (10.7, 10.8, ..., 11.0).
2023-01-06 06:56:14 +01:00
- apt-get update -qq
- apt-get install -y mariadb-server-10.3
- *test-verify-initial
# Buster backports is needed for liburing1 (>= 0.7) and galera-4 (>= 26.4)
- *test-enable-buster-backports-repos
- *test-install
- service mysql status
# Give the mariadb-upgrade plenty of time to complete, otherwise next commands
# fail on non-existing mariadb.sys user
- sleep 15
- *test-verify-final
variables:
GIT_STRATEGY: none
except:
variables:
- $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/
# archive.mariadb.org has for 10.2 only Stretch, so we can't test upgrades to
# 10.6 with only Buster and Bullseye builds
mysql.com-5.7 upgrade:
stage: upgrade extras
needs:
- job: build
image: debian:${RELEASE}
artifacts:
when: always
name: "$CI_BUILD_NAME"
paths:
- ${WORKING_DIR}/debug
script:
- *test-prepare-container
- |
apt-get install --no-install-recommends --yes gpg gpg-agent dirmngr ca-certificates # Bare minimal (<4MB) for apt-key to work
apt-key adv --recv-keys --keyserver hkps://keyserver.ubuntu.com:443 467B942D3A79BD29
Deb: Sync Salsa-CI from Debian MariaDB 10.6 Compare to Debian packaging of MariaDB 1:10.6.11-2 release at commit https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/2934e8a795cbd1eba79e33b8d6c82ed2b0897128 and sync upstream everything that is relevant for upstream and safe to import on a stable 10.6 release. * Use OpenSSL 1.1 from Debian Snapshots https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/0040c272bf8a9a253fcd393b235b18cd5cdc9289 Related: https://jira.mariadb.org/browse/MDEV-30322 * Prefer using bullseye-backports in mosts tests over buster-bpo https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/daa827ecded9dc1f096ecb05242116173298d602 * Add new upgrade test for MySQL Community Cluster 8.0 https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/3c71bec9b7626d25a55e23b2e570b4e125d5d5df * Enable automatic datadir move also on upgrades from MySQL.com packages https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/4cbbcb7e56d9604a67230d11a68543d5a83960e3 * Update Breaks/Replaces https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/2cab13d05959fe8f6ea56b866df51f3bfe17dd3f * Normalize apt-get and curl commands https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/8754ea2578bd214d75a2a9e6a0f7b4b74c062b41 * Standardize on using capitalized 'ON' in CMake build options https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/938757a85aee44c727f3f6996677ef1126c2f5aa * Apply wrap-and-sort -av and other minor tweaks and inline documentation NOTE TO MERGERS: This commit is made on 10.6 branch and can be merged to all later branches (10.7, 10.8, ..., 11.0).
2023-01-06 06:56:14 +01:00
echo "deb https://repo.mysql.com/apt/debian/ bullseye mysql-5.7" > /etc/apt/sources.list.d/mysql.list
apt-get update -qq
apt-get install -y 'mysql*' 'libmysqlc*'
- *test-verify-initial
- *test-install
Deb: Sync Salsa-CI from Debian MariaDB 10.6 Compare to Debian packaging of MariaDB 1:10.6.11-2 release at commit https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/2934e8a795cbd1eba79e33b8d6c82ed2b0897128 and sync upstream everything that is relevant for upstream and safe to import on a stable 10.6 release. * Use OpenSSL 1.1 from Debian Snapshots https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/0040c272bf8a9a253fcd393b235b18cd5cdc9289 Related: https://jira.mariadb.org/browse/MDEV-30322 * Prefer using bullseye-backports in mosts tests over buster-bpo https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/daa827ecded9dc1f096ecb05242116173298d602 * Add new upgrade test for MySQL Community Cluster 8.0 https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/3c71bec9b7626d25a55e23b2e570b4e125d5d5df * Enable automatic datadir move also on upgrades from MySQL.com packages https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/4cbbcb7e56d9604a67230d11a68543d5a83960e3 * Update Breaks/Replaces https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/2cab13d05959fe8f6ea56b866df51f3bfe17dd3f * Normalize apt-get and curl commands https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/8754ea2578bd214d75a2a9e6a0f7b4b74c062b41 * Standardize on using capitalized 'ON' in CMake build options https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/938757a85aee44c727f3f6996677ef1126c2f5aa * Apply wrap-and-sort -av and other minor tweaks and inline documentation NOTE TO MERGERS: This commit is made on 10.6 branch and can be merged to all later branches (10.7, 10.8, ..., 11.0).
2023-01-06 06:56:14 +01:00
# Due to some (currently unknown) changes in MySQL 5.7 packaging or apt
# behaviour changes, a system with a previous installation of MySQL will
# on upgrades to MariaDB first fully remove MySQL, including the
# /etc/init.d/mysql file, so previous techniques in
# mariadb-server-10.6.postinst to maintain backwards compatibility with
# 'service mysql status' after installing MariaDB on top MySQL no longer
# works. Thus the step to test it now intentionally has a fallback to use
# the service name 'mariadb' instead, and the fallback is always used.
- sleep 5 # Give the mysql_upgrade a bit of time to complete before querying the server
- service mysql status || service mariadb status
- sleep 15 # Give the mysql_upgrade a bit of extra time to complete with MySQL 5.7 before querying the server
- *test-verify-final
variables:
GIT_STRATEGY: none
except:
variables:
- $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/
percona-xtradb-5.7 upgrade:
stage: upgrade extras
needs:
- job: build
image: debian:${RELEASE}
artifacts:
when: always
name: "$CI_BUILD_NAME"
paths:
- ${WORKING_DIR}/debug
script:
- *test-prepare-container
- |
apt-get install --no-install-recommends --yes gpg gpg-agent dirmngr ca-certificates # Bare minimal (<4MB) for apt-key to work
apt-key adv --recv-keys --keyserver hkps://keyserver.ubuntu.com:443 9334A25F8507EFA5
echo "deb https://repo.percona.com/apt/ ${RELEASE} main" > /etc/apt/sources.list.d/mysql.list
Deb: Sync Salsa-CI from Debian MariaDB 10.6 Compare to Debian packaging of MariaDB 1:10.6.11-2 release at commit https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/2934e8a795cbd1eba79e33b8d6c82ed2b0897128 and sync upstream everything that is relevant for upstream and safe to import on a stable 10.6 release. * Use OpenSSL 1.1 from Debian Snapshots https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/0040c272bf8a9a253fcd393b235b18cd5cdc9289 Related: https://jira.mariadb.org/browse/MDEV-30322 * Prefer using bullseye-backports in mosts tests over buster-bpo https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/daa827ecded9dc1f096ecb05242116173298d602 * Add new upgrade test for MySQL Community Cluster 8.0 https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/3c71bec9b7626d25a55e23b2e570b4e125d5d5df * Enable automatic datadir move also on upgrades from MySQL.com packages https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/4cbbcb7e56d9604a67230d11a68543d5a83960e3 * Update Breaks/Replaces https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/2cab13d05959fe8f6ea56b866df51f3bfe17dd3f * Normalize apt-get and curl commands https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/8754ea2578bd214d75a2a9e6a0f7b4b74c062b41 * Standardize on using capitalized 'ON' in CMake build options https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/938757a85aee44c727f3f6996677ef1126c2f5aa * Apply wrap-and-sort -av and other minor tweaks and inline documentation NOTE TO MERGERS: This commit is made on 10.6 branch and can be merged to all later branches (10.7, 10.8, ..., 11.0).
2023-01-06 06:56:14 +01:00
apt-get update -qq
apt-get install -y percona-xtradb-cluster-full-57 percona-xtrabackup-24 percona-toolkit pmm2-client
- service mysql status
- *test-verify-initial
- *test-install
- service mysql status
- sleep 15 # Give the mysql_upgrade a bit of extra time to complete with MySQL 5.7 before querying the server
- *test-verify-final
variables:
GIT_STRATEGY: none
except:
variables:
- $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/