summaryrefslogtreecommitdiffstats
path: root/debian/salsa-ci.yml
diff options
context:
space:
mode:
Diffstat (limited to 'debian/salsa-ci.yml')
-rw-r--r--debian/salsa-ci.yml395
1 files changed, 237 insertions, 158 deletions
diff --git a/debian/salsa-ci.yml b/debian/salsa-ci.yml
index d4ff17f8..92fc1186 100644
--- a/debian/salsa-ci.yml
+++ b/debian/salsa-ci.yml
@@ -6,11 +6,11 @@ include:
# Override Salsa-CI with MariaDB specific variations
variables:
- BUILT_PACKAGES: "libmariadb-dev libmariadb-dev-compat libmariadb3 libmariadbd19 libmariadbd-dev mariadb-common mariadb-client mariadb-server mariadb-backup mariadb-plugin-connect mariadb-plugin-s3 mariadb-plugin-rocksdb mariadb-plugin-oqgraph mariadb-plugin-mroonga mariadb-plugin-spider mariadb-plugin-cracklib-password-check mariadb-test mariadb-test-data"
+ BUILT_PACKAGES: "libmariadb-dev libmariadb-dev-compat libmariadb3 libmariadbd19 libmariadbd-dev mariadb-common mariadb-client-core mariadb-client mariadb-server-core mariadb-server mariadb-backup mariadb-plugin-connect mariadb-plugin-s3 mariadb-plugin-rocksdb mariadb-plugin-oqgraph mariadb-plugin-mroonga mariadb-plugin-spider mariadb-plugin-gssapi-server mariadb-plugin-gssapi-client mariadb-plugin-cracklib-password-check mariadb-plugin-hashicorp-key-management mariadb-plugin-provider-bzip2 mariadb-plugin-provider-lz4 mariadb-plugin-provider-lzma mariadb-plugin-provider-lzo mariadb-plugin-provider-snappy mariadb-test mariadb-test-data"
DEB_BUILD_OPTIONS: "nocheck noautodbgsym"
RELEASE: sid
# Reprotest works, but takes very long time and often fails due to timeouts.
- # Thus is is best kept disabled and only occasionally manually enabled to
+ # Thus is best kept disabled and only occasionally manually enabled to
# test that reproducibility works, along with atomic reprotest to directly
# pinpoint what aspect of the build is broken if not reproducible.
SALSA_CI_DISABLE_REPROTEST: 1
@@ -85,11 +85,6 @@ packaging-fix-checks:
variables:
- $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/
-build bullseye-backports:
- extends: .build-package
- variables:
- RELEASE: bullseye-backports
-
# Buster only has libfmt 6.1 but 7.0 is required, so backport build for Buster
# is not possible unless somebody packages libfmt7-dev for Buster.
@@ -149,66 +144,59 @@ blhc:
mysql --table -e "SHOW PLUGINS;" mysql
.test-enable-sid-repos: &test-enable-sid-repos
- # Apply usrmerge workaround for Stretch/Buster/Bullseye to Bookworm/Sid upgrades
- - echo 'this system will not be supported in the future' > /etc/unsupported-skip-usrmerge-conversion
# Replace any old repos with just Sid
- echo 'deb http://deb.debian.org/debian sid main' > /etc/apt/sources.list
# Upgrade minimal stack first
- apt-get update -qq
- # Next step will fail on https://bugs.debian.org/993755
+ # Complete upgrade of minimal stack
+ - apt-get install -qq --yes apt || export APT_STATUS="failed"
+ # Due to https://bugs.debian.org/993755 and #975077 upgrades from Buster or
+ # older to Bookworm or newer fails on:
# /usr/bin/perl: error while loading shared libraries: libcrypt.so.1: cannot
# open shared object file: No such file or directory
# dpkg: error processing package libc6:amd64 (--configure):
- - apt-get install -y apt || true
- # Apply workaround
- - cd $(mktemp -d) # Use temp dir where apt can download and unpack files
- - apt-get -y download libcrypt1
- - dpkg-deb -x libcrypt1_*.deb .
- - cp -ra lib/* /lib/ || true # libcryp1 < 1:4.4.36-3
- - cp -ra usr/lib/* /lib/ || true # libxcrypt 1:4.4.36-3+
- - cd - # Back to /builds/$USER/mariadb-server/debian/output
- - find /lib/*/libcrypt.* -ls # Show that new libcrypt is there
- - apt-get -y --fix-broken install
- # Complete upgrade of minimal stack
- - 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
+ # Therefore, run this extra workaround if first run of apt-get install failed:
+ - |
+ if [ "$APT_STATUS" = "failed" ]
+ then
+ cd $(mktemp -d) # Use temp dir where apt can download and unpack files
+ apt-get -y download libcrypt1
+ dpkg-deb -x libcrypt1_*.deb .
+ cp -ra usr/lib/* /lib/ || true # libcrypt 1:4.4.36-3+
+ cd - # Back to /builds/$USER/mariadb-server/debian/output
+ find /lib/*/libcrypt.* -ls # Show that new libcrypt is there
+ apt-get -qq --yes --fix-broken install
+ apt-get install -qq --yes apt
+ fi
.test-enable-artifacts-repo: &test-enable-artifacts-repo |
- apt-get install -y apt-utils
+ apt-get install -qq --yes apt-utils
apt-ftparchive packages . > Packages
echo "deb [trusted=yes] file:$(pwd) ./" > /etc/apt/sources.list.d/mariadb-local.list
- apt-get update
+ apt-get update -qq
.test-install-all: &test-install-all
- *test-enable-artifacts-repo
- - apt-get install -yq ${BUILT_PACKAGES}
+ - apt-get install -qq --simulate ${BUILT_PACKAGES}
+ - apt-get install -qq --yes ${BUILT_PACKAGES}
# Verify installation of MariaDB built in this commit
- mariadb --version
- dpkg -l | grep -iE 'maria|mysql|galera'
- find /etc -name '*mariadb*' -ls -or -name '*mysql*' -ls | sort -k 11
# Purge old versions if they exist
- - apt-get purge -y mariadb*10.?
+ - apt-get purge --yes mariadb*10.?
- find /etc -name '*mariadb*' -ls -or -name '*mysql*' -ls | sort -k 11
.test-full-upgrade: &test-full-upgrade
- *test-enable-artifacts-repo
- - apt-get full-upgrade -y
+ - apt-get full-upgrade -qq --simulate
+ - apt-get full-upgrade -qq --yes
# Verify installation of MariaDB built in this commit
- mariadb --version
- dpkg -l | grep -iE 'maria|mysql|galera'
- find /etc -name '*mariadb*' -ls -or -name '*mysql*' -ls | sort -k 11
# Purge old versions if they exist
- - apt-get purge -y mariadb*10.?
+ - apt-get purge --yes mariadb*10.?
- find /etc -name '*mariadb*' -ls -or -name '*mysql*' -ls | sort -k 11
# Purging the old server might stop the running server, so restart it just in case
- service mariadb restart
@@ -226,6 +214,7 @@ blhc:
# library tests don't have the mariadb client nor server, so don't check them
.test-verify-final: &test-verify-final |
+ dpkg -l | grep -e "mariadb-server.*10\.11"
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
@@ -244,7 +233,7 @@ blhc:
- pkg-config --cflags --libs mysqlclient
- pkg-config --cflags --libs libmariadb
- pkg-config --cflags --libs mariadb
- - apt-get install -y --no-install-recommends g++
+ - apt-get install -qq --yes --no-install-recommends g++
- |
# Build a test binary that depends on libmysqlclient
cat > b933063.cpp <<EOF
@@ -272,7 +261,7 @@ blhc:
return 0;
}
EOF
- apt-get install -y ./*.deb # Server must be installed for client to connect
+ apt-get install -qq --yes ./*.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
@@ -342,7 +331,7 @@ blhc:
- ${WORKING_DIR}/debug
before_script:
- *test-prepare-container
- - apt-get -qq install --no-install-recommends --yes ca-certificates curl
+ - apt-get install -qq --yes --no-install-recommends ca-certificates curl
- |
[[ -d /etc/apt/keyrings ]] || mkdir /etc/apt/keyrings
curl -sS https://mariadb.org/mariadb_release_signing_key.pgp -o /etc/apt/keyrings/mariadb-keyring.pgp
@@ -377,27 +366,27 @@ simple upgrade:
stage: upgrade MariaDB
script:
- *test-prepare-container
- - apt-get install -y 'default-mysql*' ${BUILT_PACKAGES}
+ - apt-get install -qq --yes 'default-mysql*' ${BUILT_PACKAGES}
- *test-full-upgrade
- service mariadb status # There is no init.d/mysql in MariaDB 10.5+
- *test-verify-final
-mariadb-10.5 with Bullseye backports upgrade:
+mariadb and Bookworm upgrade:
extends: .salsa-ci-template-for-mariadb
- stage: upgrade MariaDB
- needs:
- - job: build bullseye-backports
- image: debian:bullseye
+ stage: upgrade MariaDB and distro
+ image: debian:bookworm
script:
- *test-prepare-container
- # Install everything MariaDB currently in Debian Bullseye
- - apt-get install -y 'default-mysql*' 'mariadb-*' 'libmariadb*'
- # Verify installation of MariaDB from Bullseye
- - dpkg -l | grep -e "mariadb-server.*10.5"
+ # Install everything MariaDB currently in Debian Bookworm
+ - apt-get install -qq --yes 'default-mysql*' 'mariadb-*' 'libmariadb*'
+ # Verify installation of MariaDB from Bookworm
+ - dpkg -l | grep -e "mariadb-server.*10\.11"
- *test-verify-initial
- - *test-enable-bullseye-backports-repos
+ - *test-enable-sid-repos
+ # Ensure mariadbd will not crash on next shutdown for any reason
+ - service mariadb restart
- *test-full-upgrade
- - service mariadb status # There is no init.d/mysql in MariaDB 10.5+
+ - service mariadb status # There is no init.d/mysql in MariaDB 10.5+
- *test-verify-final
mariadb-10.6 and Bookworm-20230208 upgrade:
@@ -411,16 +400,42 @@ mariadb-10.6 and Bookworm-20230208 upgrade:
rm /etc/apt/sources.list.d/debian.sources
apt-get update -qq
# In February 2023 Bookworm snapshot this will install MariaDB 10.6
- - apt-get install -y mariadb-server
- - dpkg -l | grep -e "mariadb-server.*10.6"
+ - apt-get install -qq --yes mariadb-server
+ # Verify installation of MariaDB from (February 2023) Bookworm
+ - dpkg -l | grep -e "mariadb-server.*10\.6"
- *test-verify-initial
- *test-enable-sid-repos
# Ensure mariadbd will not crash on next shutdown for any reason
- service mariadb restart
- - *test-enable-artifacts-repo
- - apt-get install -y mariadb-server
- *test-full-upgrade
- service mariadb status # There is no init.d/mysql in MariaDB 10.5+
+ - apt-get purge --yes mariadb*10.?
+ - *test-verify-final
+
+mariadb-10.6 and Jammy upgrade:
+ extends: .salsa-ci-template-for-mariadb
+ stage: upgrade MariaDB and distro
+ image: ubuntu:jammy
+ script:
+ - *test-prepare-container
+ # Install everything MariaDB currently in Ubuntu Jammy
+ - apt-get install -qq --yes 'mariadb-*' 'libmariadb*'
+ # Verify installation of MariaDB from Jammy
+ - dpkg -l | grep -e "mariadb-server.*10\.6"
+ - *test-verify-initial
+ # Install Debian Sid signing keys as Ubuntu does not have them by default
+ - apt-get install -qq --yes --no-install-recommends curl
+ - curl -sSLO http://deb.debian.org/debian/pool/main/d/debian-archive-keyring/debian-archive-keyring_2023.4_all.deb
+ - apt-get install -qq --yes ./debian-archive-keyring_*
+ - *test-enable-sid-repos
+ # Ensure mariadbd will not crash on next shutdown for any reason
+ - service mariadb restart
+ - *test-enable-artifacts-repo
+ - apt-get install -qq --simulate mariadb-server
+ - apt-get install -qq --yes mariadb-server
+ # Due to usrmerge, full-upgrade from Jammy to Trixie or newer cannot work
+ - service mariadb status # There is no init.d/mysql in MariaDB 10.5+
+ - apt-get purge --yes mariadb*10.?
- *test-verify-final
mariadb-10.5 and Bullseye upgrade:
@@ -430,15 +445,19 @@ mariadb-10.5 and Bullseye upgrade:
script:
- *test-prepare-container
# Install everything MariaDB currently in Debian Bullseye
- - apt-get install -y 'default-mysql*' 'mariadb-*' 'libmariadb*'
+ - apt-get install -qq --yes 'default-mysql*' 'mariadb-*' 'libmariadb*'
# Verify installation of MariaDB from Bullseye
- - dpkg -l | grep -e "mariadb-server.*10.5"
+ - dpkg -l | grep -e "mariadb-server.*10\.5"
- *test-verify-initial
- *test-enable-sid-repos
# Ensure mariadbd will not crash on next shutdown for any reason
- service mariadb restart
- - *test-full-upgrade
+ - *test-enable-artifacts-repo
+ - apt-get install -qq --simulate mariadb-server
+ - apt-get install -qq --yes mariadb-server
+ # Due to usrmerge, full-upgrade from Bullseye to Trixie or newer cannot work
- service mariadb status # There is no init.d/mysql in MariaDB 10.5+
+ - apt-get purge --yes mariadb*10.?
- *test-verify-final
mariadb-10.3 and Buster upgrade:
@@ -448,17 +467,76 @@ mariadb-10.3 and Buster upgrade:
script:
- *test-prepare-container
# Install everything MariaDB currently in Debian Buster
- - apt-get install -y 'default-mysql*' 'mariadb-*' 'libmariadb*'
+ - apt-get install -qq --yes 'default-mysql*' 'mariadb-*' 'libmariadb*'
# Verify installation of MariaDB from Buster
- - dpkg -l | grep -e "mariadb-server.*10.3"
+ - dpkg -l | grep -e "mariadb-server.*10\.3"
- *test-verify-initial
- *test-enable-sid-repos
# Ensure mariadbd will not crash on next shutdown for any reason
- service mysql restart # in 10.3 service name is still 'mysql'
- - *test-full-upgrade
+ - *test-enable-artifacts-repo
+ - apt-get install -qq --simulate mariadb-server
+ - apt-get install -qq --yes mariadb-server
+ # Due to usrmerge, full-upgrade from Bullseye to Trixie or newer cannot work
+ - service mysql status
# mariadb-10.3 in Buster ships a /etc/init.d/mysql and it continues to exist
- # after upgrade, but is be removed on purge
- - service mysql status || service mariadb status
+ # after upgrade, and is removed only on purge
+ - apt-get purge --yes mariadb*10.?
+ - service mariadb 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
+
+mariadb-10.3 and Focal upgrade:
+ extends: .salsa-ci-template-for-mariadb
+ stage: upgrade MariaDB and distro
+ image: ubuntu:focal
+ script:
+ - *test-prepare-container
+ # Install everything MariaDB currently in Ubuntu Focal
+ - apt-get install -qq --yes 'mariadb-*' 'libmariadb*'
+ # Verify installation of MariaDB from Focal
+ - dpkg -l | grep -e "mariadb-server.*10\.3"
+ - *test-verify-initial
+ # Install Debian Sid signing keys as Ubuntu does not have them by default
+ - apt-get install -qq --yes --no-install-recommends curl
+ - curl -sSLO http://deb.debian.org/debian/pool/main/d/debian-archive-keyring/debian-archive-keyring_2023.4_all.deb
+ - apt-get install -qq --yes ./debian-archive-keyring_*
+ - *test-enable-sid-repos
+ # Ensure mariadbd will not crash on next shutdown for any reason
+ - service mysql restart # in 10.3 service name is still 'mysql'
+ - *test-enable-artifacts-repo
+ - apt-get install -qq --simulate mariadb-server
+ - apt-get install -qq --yes mariadb-server
+ # Due to usrmerge, full-upgrade from Focal to Trixie or newer cannot work
+ - service mysql status
+ # mariadb-10.3 in Focal ships a /etc/init.d/mysql and it continues to exist
+ # after upgrade, and is removed only on purge
+ - apt-get purge --yes mariadb*10.?
+ # Give the mariadb-upgrade plenty of time to complete, otherwise next commands
+ # fail on non-existing mariadb.sys user
+ - sleep 15
+ - *test-verify-final
+
+# Similar to the Cacti install test, check that MariaDB consumer Zoph upgrades
+default-mysql-server and Bookworm upgrade:
+ extends: .salsa-ci-template-for-mariadb
+ stage: upgrade MariaDB and distro
+ image: debian:bookworm
+ script:
+ - *test-prepare-container
+ # Install everything MariaDB currently in Debian Bookworm
+ - apt-get install -qq --yes default-mysql-server zoph
+ # Verify installation of MariaDB from Bookworm
+ - dpkg -l | grep -e "mariadb-server.*10\.11"
+ - *test-verify-initial
+ - *test-enable-sid-repos
+ - *test-enable-artifacts-repo
+ - apt-get install -qq --simulate default-mysql-server
+ - apt-get install -qq --yes default-mysql-server
+ - *test-full-upgrade
+ - service mariadb status # There is no init.d/mysql in MariaDB 10.5+
- *test-verify-final
# Similar to the Cacti install test, check that MariaDB consumer Zoph upgrades
@@ -469,14 +547,15 @@ default-mysql-server and Bullseye upgrade:
script:
- *test-prepare-container
# Install everything MariaDB currently in Debian Bullseye
- - apt-get install -y default-mysql-server zoph
+ - apt-get install -qq --yes default-mysql-server zoph
# Verify installation of MariaDB from Bullseye
+ - dpkg -l | grep -e "mariadb-server.*10\.5"
- *test-verify-initial
- *test-enable-sid-repos
- *test-enable-artifacts-repo
- # Start with partial upgrade
- - apt-get install -y default-mysql-server
- - *test-full-upgrade
+ - apt-get install -qq --simulate default-mysql-server
+ - apt-get install -qq --yes default-mysql-server
+ # Due to usrmerge, full-upgrade from Bullseye to Trixie or newer cannot work
- service mariadb status # There is no init.d/mysql in MariaDB 10.5+
- *test-verify-final
@@ -556,7 +635,7 @@ test consumer cacti:
script:
- *test-prepare-container
- *test-enable-artifacts-repo
- - apt-get install -y cacti
+ - apt-get install -qq --yes cacti
- mariadb -E -e "SHOW CREATE TABLE version;" cacti
# Build a piece of software that was designed for libmysqlclient-dev but using the
@@ -566,7 +645,7 @@ build mariadbclient consumer Python-MySQLdb:
script:
- *test-prepare-container
- *test-install-all-libs
- - apt-get install -y pkg-config python3-pip
+ - apt-get install -qq --yes pkg-config python3-pip
# See what MySQLdb will build with
- pkg-config --cflags --libs mysqlclient
# MySQLdb is also available in Debian as package python3-mysqldb, but
@@ -574,7 +653,7 @@ build mariadbclient consumer Python-MySQLdb:
# libmariadb-dev-compat on-the-fly.
# Python 3.11 needs `--break-system-packages` to proceed with this.
- pip3 install --break-system-packages mysqlclient # Compiles module against libmysqlclient
- - apt-get purge -y libmariadb-dev # Not needed for run-time
+ - apt-get purge --yes libmariadb-dev # Not needed for run-time
- python3 -c "import MySQLdb; print(MySQLdb.get_client_info())"
libmysql* to libmariadb* upgrade:
@@ -583,22 +662,22 @@ libmysql* to libmariadb* upgrade:
script:
- *test-prepare-container
# Install all libmysql* available in Debian unstable
- - apt-get install -y pkg-config libmysqlclient-dev
+ - apt-get install -qq --yes pkg-config libmysqlclient-dev
- pkg-config --list-all
- pkg-config --cflags mysqlclient # mysqlclient.pc from original package
- *test-enable-artifacts-repo
- - apt-get install -y libmariadb3
+ - apt-get install -qq --yes libmariadb3
- pkg-config --list-all
- - apt-get install -y libmariadb-dev
+ - apt-get install -qq --yes libmariadb-dev
- pkg-config --list-all
- - apt-get install -y libmariadb-dev-compat
+ - apt-get install -qq --yes libmariadb-dev-compat
- pkg-config --cflags mysqlclient # mysqlclient.pc from compat package
- pkg-config --list-all
- - apt-get install -y libmariadbd19
+ - apt-get install -qq --yes libmariadbd19
- pkg-config --list-all
- - apt-get install -y libmariadbd-dev
+ - apt-get install -qq --yes libmariadbd-dev
- pkg-config --list-all
- - apt-get install -y default-libmysqlclient-dev default-libmysqld-dev
+ - apt-get install -qq --yes default-libmysqlclient-dev default-libmysqld-dev
- *test-verify-libs
default-libmysqlclient-dev upgrade:
@@ -606,47 +685,47 @@ default-libmysqlclient-dev upgrade:
stage: upgrade MariaDB
script:
- *test-prepare-container
- - apt-get install -y pkg-config default-libmysqlclient-dev default-libmysqld-dev
+ - apt-get install -qq --yes pkg-config default-libmysqlclient-dev default-libmysqld-dev
- pkg-config --list-all
- *test-full-upgrade-libs
- *test-verify-libs
-default-libmysqlclient-dev and Bullseye upgrade:
+default-libmysqlclient-dev and Bookworm upgrade:
extends: .salsa-ci-template-for-mariadb
stage: upgrade MariaDB and distro
- image: debian:bullseye
+ image: debian:bookworm
script:
- *test-prepare-container
- - apt-get install -y pkg-config default-libmysqlclient-dev
+ - apt-get install -qq --yes pkg-config default-libmysqlclient-dev
- pkg-config --list-all
- *test-enable-sid-repos
- *test-full-upgrade-libs
- *test-verify-libs
-default-libmysqlclient-dev and Buster upgrade:
+default-libmysqlclient-dev and Bullseye upgrade:
extends: .salsa-ci-template-for-mariadb
stage: upgrade MariaDB and distro
- image: debian:buster
+ image: debian:bullseye
script:
- *test-prepare-container
- - apt-get install -y pkg-config default-libmysqlclient-dev
+ - apt-get install -qq --yes pkg-config default-libmysqlclient-dev
- pkg-config --list-all
- *test-enable-sid-repos
- - *test-full-upgrade-libs
+ # Due to usrmerge, full-upgrade from Bullseye to Trixie or newer cannot work
+ - *test-install-all-libs
- *test-verify-libs
-default-libmysqlclient-dev with Bullseye backports upgrade:
+default-libmysqlclient-dev and Buster upgrade:
extends: .salsa-ci-template-for-mariadb
- stage: upgrade MariaDB
- needs:
- - job: build bullseye-backports
- image: debian:bullseye
+ stage: upgrade MariaDB and distro
+ image: debian:buster
script:
- *test-prepare-container
- - apt-get install -y pkg-config default-libmysqlclient-dev
+ - apt-get install -qq --yes pkg-config default-libmysqlclient-dev
- pkg-config --list-all
- - *test-enable-bullseye-backports-repos
- - *test-full-upgrade-libs
+ - *test-enable-sid-repos
+ # Due to usrmerge, full-upgrade from Bullseye to Trixie or newer cannot work
+ - *test-install-all-libs
- *test-verify-libs
# Upgrading from MySQL 8.0 with datadir in place is not possible. Users need to do a data dump.
@@ -658,9 +737,9 @@ mysql-8.0 in Sid upgrade:
script:
- *test-prepare-container
# The postinst fails often if 'ps' is missing from system, so install procps
- - apt-get install -y procps mysql-server 'libmysqlc*'
+ - apt-get install -qq --yes procps mysql-server 'libmysqlc*'
# Ensure MySQL 8.0 package actually got installed
- - dpkg -l | grep -e "mysql-server.*8.0"
+ - dpkg -l | grep -e "mysql-server.*8\.0"
- *test-verify-initial
- *test-install-all
# Due to some (currently unknown) changes in MySQL 8.0 packaging or apt
@@ -677,58 +756,56 @@ mysql-8.0 in Sid upgrade:
# 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.
-#
-# 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 with Bullseye backports upgrade:
+mysql-8.0 in Ubuntu 23.10 upgrade:
extends: .salsa-ci-template-for-mariadb
stage: upgrade MariaDB variant
- needs:
- - job: build bullseye-backports
- image: debian:bullseye
+ image: ubuntu:mantic
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
- - apt-get update -qq
- # First install often fail due to bug in mysql-8.0
- - apt-get install -y mysql-server 'libmysqlc*' || true
+ - apt-get install -qq --yes mysql-server 'libmysqlc*'
# Ensure MySQL 8.0 package actually got installed
- - dpkg -l | grep -e "mysql-server.*8.0"
- - sleep 10 && apt-get install -f
- - *test-verify-initial
- # Enable backports to make galera-4 available
- - echo "deb http://deb.debian.org/debian bullseye-backports main" > /etc/apt/sources.list.d/backports.list && apt-get update -qq
- - *test-install-all
+ - dpkg -l | grep mysql
- service mysql status
- - sleep 5 # Give the mysql_upgrade a bit of time to complete before querying the server
+ - *test-verify-initial
+ # Install Debian Sid signing keys as Ubuntu does not have them by default
+ - apt-get install -qq --yes --no-install-recommends curl
+ - curl -sSLO http://deb.debian.org/debian/pool/main/d/debian-archive-keyring/debian-archive-keyring_2023.4_all.deb
+ - apt-get install -qq --yes ./debian-archive-keyring_*
+ - *test-enable-sid-repos
+ # Ensure mysqld will not crash on next shutdown for any reason
+ - service mysql restart
+ - *test-enable-artifacts-repo
+ - apt-get install -qq --simulate mariadb-server
+ - apt-get install -qq --yes mariadb-server
+ # Due to usrmerge, full-upgrade from Mantic to Trixie or newer may not work
+ - service mariadb status # There is no init.d/mysql in MariaDB 10.5+
+ # Remove everything MySQL except mysql-common which also MariaDB depends on
+ - apt-get purge --yes mysql-s* mysql-cl* libmysql*
- *test-verify-final
# 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 with Bullseye backports upgrade:
+mysql-community-cluster-8.0 from MySQL.com with Bookworm upgrade:
extends: .salsa-ci-template-for-mariadb
stage: upgrade MariaDB variant
- needs:
- - job: build bullseye-backports
- image: debian:bullseye
+ image: debian:bookworm
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=0xbca43417c3b485dd128ec6d4b7b3b788a8d3785c" -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
+ - |
+ apt-get install -qq --yes --no-install-recommends ca-certificates curl systemctl
+ curl -sS "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xbca43417c3b485dd128ec6d4b7b3b788a8d3785c" -o /etc/apt/trusted.gpg.d/mysql.asc
+ echo "deb https://repo.mysql.com/apt/debian/ bookworm mysql-cluster-8.0" > /etc/apt/sources.list.d/mysql.list
+ apt-get update -qq
+ - apt-get install -qq --yes 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
- # Enable backports to make galera-4 available
- - echo "deb http://deb.debian.org/debian bullseye-backports main" > /etc/apt/sources.list.d/backports.list && apt-get update -qq
- - *test-install-all
+ - *test-enable-sid-repos
+ - *test-enable-artifacts-repo
+ - apt-get install -qq --simulate mariadb-server
+ - apt-get install -qq --yes mariadb-server
# 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
@@ -742,11 +819,11 @@ mariadb.org-10.11 upgrade:
variables:
MARIADB_VERSION: "10.11"
script:
- - apt-get install -y mariadb-server
+ - apt-get install -qq --yes mariadb-server
- *test-verify-initial
# Install MariaDB built in this commit
# Force downgrades so our version installs on top of upstream revision, e.g. 1:11.10.1-1 vs 1:11.10.1+mariadb~sid
- - apt-get install -y --allow-downgrades ./*.deb
+ - apt-get install -qq --yes --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
@@ -760,7 +837,7 @@ mariadb.org-10.10 upgrade:
MARIADB_VERSION: "10.10"
script:
# this should not use Sid to begin with
- - apt-get install -y mariadb-server=1:10.10.2+maria~debunstable mariadb-client=1:10.10.2+maria~debunstable
+ - apt-get install -qq --yes mariadb-server=1:10.10.2+maria~debunstable mariadb-client=1:10.10.2+maria~debunstable
- *test-verify-initial
- *test-full-upgrade
- service mariadb status # There is no init.d/mysql in MariaDB 10.5+
@@ -773,7 +850,7 @@ mariadb.org-10.9 upgrade:
MARIADB_VERSION: "10.9"
script:
# this should not use Sid to begin with
- - apt-get install -y mariadb-server=1:10.9.4+maria~debunstable mariadb-client=1:10.9.4+maria~debunstable
+ - apt-get install -qq --yes mariadb-server=1:10.9.4+maria~debunstable mariadb-client=1:10.9.4+maria~debunstable
- *test-verify-initial
- *test-full-upgrade
- service mariadb status # There is no init.d/mysql in MariaDB 10.5+
@@ -785,7 +862,7 @@ mariadb.org-10.8 upgrade:
variables:
MARIADB_VERSION: "10.8"
script:
- - apt-get install -y mariadb-server-10.8
+ - apt-get install -qq --yes mariadb-server-10.8
- *test-verify-initial
- *test-install-all
- service mariadb status # There is no init.d/mysql in MariaDB 10.5+
@@ -797,7 +874,7 @@ mariadb.org-10.7 upgrade:
variables:
MARIADB_VERSION: "10.7"
script:
- - apt-get install -y mariadb-server-10.7
+ - apt-get install -qq --yes mariadb-server-10.7
- *test-verify-initial
- *test-install-all
- service mariadb status # There is no init.d/mysql in MariaDB 10.5+
@@ -811,8 +888,8 @@ mariadb.org-10.6 upgrade:
script:
# 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
+ # - apt-get install -qq --yes 'mariadb*' libmariadb3 'libmariadb-*' 'libmariadbd*'
+ - apt-get install -qq --yes mariadb-server-10.6
- *test-verify-initial
- *test-install-all
- service mariadb status # There is no init.d/mysql in MariaDB 10.5+
@@ -826,7 +903,7 @@ mariadb.org-10.5 upgrade:
MARIADB_VERSION: "10.5"
script:
- *test-install-openssl1-in-sid-for-backwards-compat
- - apt-get install -y mariadb-server-10.5
+ - apt-get install -qq --yes mariadb-server-10.5
- *test-verify-initial
- *test-install-all
- service mariadb status # There is no init.d/mysql in MariaDB 10.5+
@@ -841,7 +918,7 @@ mariadb.org-10.4 upgrade:
script:
- *test-install-readline-in-sid-for-backwards-compat
- *test-install-openssl1-in-sid-for-backwards-compat
- - apt-get install -y mariadb-server-10.4
+ - apt-get install -qq --yes 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
@@ -861,11 +938,11 @@ mariadb.org-10.3 upgrade:
script:
- *test-install-readline-in-sid-for-backwards-compat
- *test-install-openssl1-in-sid-for-backwards-compat
- - apt-get install -y mariadb-server-10.3
+ - apt-get install -qq --yes mariadb-server-10.3
- *test-verify-initial
- *test-install-all
# mariadb-10.3 in Buster ships a /etc/init.d/mysql and it continues to exist
- # after upgrade, but is be removed on purge
+ # after upgrade, and is removed only on purge
- service mysql status || service mariadb status
# Give the mariadb-upgrade plenty of time to complete, otherwise next commands
# fail on non-existing mariadb.sys user
@@ -881,7 +958,7 @@ mariadb.org-10.2 upgrade:
script:
- *test-install-readline-in-sid-for-backwards-compat
- *test-install-openssl1-in-sid-for-backwards-compat
- - apt-get install -y mariadb-server-10.2
+ - apt-get install -qq --yes mariadb-server-10.2
# Verify initial state before upgrade
- dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed
- service mysql status
@@ -893,13 +970,14 @@ mariadb.org-10.2 upgrade:
mysql --defaults-file=/etc/mysql/debian.cnf --table -e "SELECT * FROM mysql.plugin; SHOW PLUGINS;"
- *test-install-all
# mariadb-10.2 in ships a /etc/init.d/mysql and it continues to exist
- # after upgrade, but is be removed on purge
+ # after upgrade, and is removed only on purge
- service mysql status || service mariadb 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
+# Buster is the last Debian release Oracle MySQL 5.7 offers binaries for
mysql.com-5.7 with Buster upgrade:
extends: .salsa-ci-template-for-mariadb
stage: upgrade MariaDB variant
@@ -909,11 +987,11 @@ mysql.com-5.7 with Buster upgrade:
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-get install -qq --yes --no-install-recommends 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 B7B3B788A8D3785C
echo "deb https://repo.mysql.com/apt/debian/ buster mysql-5.7" > /etc/apt/sources.list.d/mysql.list
apt-get update -qq
- apt-get install -y 'mysql*' 'libmysqlc*'
+ - apt-get install -qq --yes 'mysql*' 'libmysqlc*'
# Ensure MySQL 5.7 package actually got installed
- dpkg -l | grep -e "mysql-server.*5.7"
- *test-verify-initial
@@ -932,25 +1010,26 @@ mysql.com-5.7 with Buster upgrade:
- sleep 15 # Give the mysql_upgrade a bit of extra time to complete with MySQL 5.7 before querying the server
- *test-verify-final
-percona-xtradb-5.7 with Bullseye backports upgrade:
+# Note: pmm2-client does not exist in the Bookworm repository anymore
+percona-xtradb-5.7 with Bookworm upgrade:
extends: .salsa-ci-template-for-mariadb
stage: upgrade MariaDB variant
- needs:
- - job: build bullseye-backports
- image: debian:bullseye
+ image: debian:bookworm
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/ bullseye main" > /etc/apt/sources.list.d/mysql.list
+ apt-get install -qq --yes --no-install-recommends ca-certificates curl systemctl
+ curl -sS "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x9334A25F8507EFA5" -o /etc/apt/trusted.gpg.d/percona.asc
+ echo "deb https://repo.percona.com/apt/ bookworm main" > /etc/apt/sources.list.d/percona.list
apt-get update -qq
- apt-get install -y percona-xtradb-cluster-full-57 percona-xtrabackup-24 percona-toolkit pmm2-client
+ - apt-get install -qq --yes percona-xtradb-cluster-full-57 percona-xtrabackup-24 percona-toolkit
+ # Ensure Percona 5.7 package actually got installed
+ - dpkg -l | grep -e "percona.*5\.7"
- service mysql status
- *test-verify-initial
- # Enable backports to make galera-4 available
- - echo "deb http://deb.debian.org/debian bullseye-backports main" >> /etc/apt/sources.list.d/backports.list && apt-get update -qq
+ - *test-enable-sid-repos
- *test-install-all
- - service mysql status
+ # Percona package owned /etc/init.d/mysql, so on removal and upgrade to MariaDB old service name can't be referenced anymore
+ - 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