Commit 1b2ee693 authored by Daniel Black's avatar Daniel Black

MDEV-28153: Debian autobake- use absolute dependencies rather than a buildtime detection

Fixing the version of debian/ubuntu dependencies in 10.6
removes the apt-cache checking of libpmem and liburing
dependencies.

By arranging the checks earliest to latest, we unconditionally
change the dependences in earlier versions, and in later versions
we perform architecture checks to see if there is a dependency
on this architecture before removing/changing.

This takes from the architecture information on Ubuntu[1,2]
and Debian[3,4].

[1] https://packages.ubuntu.com/search?suite=all&arch=any&searchon=names&keywords=liburing-dev
[2] https://packages.ubuntu.com/search?suite=all&arch=any&searchon=names&keywords=libpmem-dev
[3] https://packages.debian.org/search?suite=all&section=all&arch=any&searchon=names&keywords=liburing-dev
[4] https://packages.debian.org/search?suite=all&section=all&arch=any&searchon=names&keywords=libpmem-dev
parent ec62f46a
...@@ -51,6 +51,19 @@ remove_rocksdb_tools() ...@@ -51,6 +51,19 @@ remove_rocksdb_tools()
fi fi
} }
replace_uring_with_aio()
{
sed 's/liburing-dev/libaio-dev/g' -i debian/control
sed -e '/-DIGNORE_AIO_CHECK=YES/d' \
-e '/-DWITH_URING=yes/d' -i debian/rules
}
disable_pmem()
{
sed '/libpmem-dev/d' -i debian/control
sed '/-DWITH_PMEM=yes/d' -i debian/rules
}
architecture=$(dpkg-architecture -q DEB_BUILD_ARCH) architecture=$(dpkg-architecture -q DEB_BUILD_ARCH)
CODENAME="$(lsb_release -sc)" CODENAME="$(lsb_release -sc)"
...@@ -60,12 +73,26 @@ case "${CODENAME}" in ...@@ -60,12 +73,26 @@ case "${CODENAME}" in
sed -e '/libzstd-dev/d' \ sed -e '/libzstd-dev/d' \
-e 's/libcurl4/libcurl3/g' -i debian/control -e 's/libcurl4/libcurl3/g' -i debian/control
remove_rocksdb_tools remove_rocksdb_tools
disable_pmem
;& ;&
buster) buster)
replace_uring_with_aio
if [ ! "$architecture" = amd64 ]
then
disable_pmem
fi
;& ;&
bullseye|bookworm) bullseye|bookworm)
# mariadb-plugin-rocksdb in control is 4 arches covered by the distro rocksdb-tools # mariadb-plugin-rocksdb in control is 4 arches covered by the distro rocksdb-tools
# so no removal is necessary. # so no removal is necessary.
if [[ ! "$architecture" =~ amd64|arm64|ppc64el ]]
then
disable_pmem
fi
if [[ ! "$architecture" =~ amd64|arm64|armel|armhf|i386|mips64el|mipsel|ppc64el|s390x ]]
then
replace_uring_with_aio
fi
;& ;&
sid) sid)
# should always be empty here. # should always be empty here.
...@@ -74,8 +101,10 @@ case "${CODENAME}" in ...@@ -74,8 +101,10 @@ case "${CODENAME}" in
# UBUNTU # UBUNTU
bionic) bionic)
remove_rocksdb_tools remove_rocksdb_tools
[ "$architecture" != amd64 ] && disable_pmem
;& ;&
focal) focal)
replace_uring_with_aio
;& ;&
impish|jammy) impish|jammy)
# mariadb-plugin-rocksdb s390x not supported by us (yet) # mariadb-plugin-rocksdb s390x not supported by us (yet)
...@@ -85,28 +114,20 @@ case "${CODENAME}" in ...@@ -85,28 +114,20 @@ case "${CODENAME}" in
then then
remove_rocksdb_tools remove_rocksdb_tools
fi fi
if [[ ! "$architecture" =~ amd64|arm64|ppc64el ]]
then
disable_pmem
fi
if [[ ! "$architecture" =~ amd64|arm64|armhf|ppc64el|s390x ]]
then
replace_uring_with_aio
fi
;; ;;
*) *)
echo "Error - unknown release codename $CODENAME" >&2 echo "Error - unknown release codename $CODENAME" >&2
exit 1 exit 1
esac esac
# From Debian Bullseye/Ubuntu Groovy, liburing replaces libaio
if ! apt-cache madison liburing-dev | grep 'liburing-dev' >/dev/null 2>&1
then
sed 's/liburing-dev/libaio-dev/g' -i debian/control
sed '/-DIGNORE_AIO_CHECK=YES/d' -i debian/rules
sed '/-DWITH_URING=yes/d' -i debian/rules
fi
# From Debian Buster/Ubuntu Focal onwards libpmem-dev is available
# Don't reference it when built in distro releases that lack it
if ! apt-cache madison libpmem-dev | grep 'libpmem-dev' >/dev/null 2>&1
then
sed '/libpmem-dev/d' -i debian/control
sed '/-DWITH_PMEM=yes/d' -i debian/rules
fi
# Adjust changelog, add new version # Adjust changelog, add new version
echo "Incrementing changelog and starting build scripts" echo "Incrementing changelog and starting build scripts"
......
...@@ -7,7 +7,7 @@ include: ...@@ -7,7 +7,7 @@ include:
# Override Salsa-CI with MariaDB specific variations # Override Salsa-CI with MariaDB specific variations
variables: variables:
DEB_BUILD_OPTIONS: "nocheck noautodbgsym" DEB_BUILD_OPTIONS: "nocheck noautodbgsym"
RELEASE: bullseye RELEASE: sid
SALSA_CI_DISABLE_REPROTEST: 1 SALSA_CI_DISABLE_REPROTEST: 1
SALSA_CI_DISABLE_MISSING_BREAKS: 0 SALSA_CI_DISABLE_MISSING_BREAKS: 0
SALSA_CI_DISABLE_RC_BUGS: 1 SALSA_CI_DISABLE_RC_BUGS: 1
...@@ -20,8 +20,8 @@ stages: ...@@ -20,8 +20,8 @@ stages:
- provisioning - provisioning
- build - build
- test - test
- upgrade in Bullseye - upgrade in Sid
- upgrade from Buster/Stretch - upgrade from Bullseye/Buster/Stretch
- upgrade extras - upgrade extras
- test extras - test extras
- publish # Stage referenced by Salsa-CI template aptly stanza, so must exist even though not used - publish # Stage referenced by Salsa-CI template aptly stanza, so must exist even though not used
...@@ -46,9 +46,10 @@ build: ...@@ -46,9 +46,10 @@ build:
- ccache -s # Show ccache stats to validate it worked - ccache -s # Show ccache stats to validate it worked
- mv ${CCACHE_TMP_DIR} ${CCACHE_WORK_DIR} - mv ${CCACHE_TMP_DIR} ${CCACHE_WORK_DIR}
# build jobs often needs more than default GitLab timeout (1h) build bullseye-backports:
.build-package: extends: .build-package
timeout: 3h variables:
RELEASE: bullseye-backports
build buster-backports: build buster-backports:
extends: .build-package extends: .build-package
...@@ -99,14 +100,14 @@ blhc: ...@@ -99,14 +100,14 @@ blhc:
dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed
service mysql status || service mariadb status # Early MariaDB 10.5 only had 'mariadb' 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 --skip-column-names -e "select @@version, @@version_comment" # Show version
mysql --table -e "SHOW DATABASES;" # List databases before upgrade 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 host,user,plugin,authentication_string FROM user;" mysql
mysql --table -e "SELECT * FROM plugin;" mysql mysql --table -e "SELECT * FROM plugin;" mysql
mysql --table -e "SHOW PLUGINS;" mysql mysql --table -e "SHOW PLUGINS;" mysql
.test-enable-bullseye-repos: &test-enable-bullseye-repos | .test-enable-sid-repos: &test-enable-sid-repos |
# Replace any old repos with just Bullseye # Replace any old repos with just Sid
echo "deb http://deb.debian.org/debian bullseye main" > /etc/apt/sources.list echo 'deb http://deb.debian.org/debian sid main' > /etc/apt/sources.list
# Upgrade minimal stack first # Upgrade minimal stack first
apt-get update apt-get update
apt-get install -y apt apt-get install -y apt
...@@ -124,7 +125,7 @@ blhc: ...@@ -124,7 +125,7 @@ blhc:
cp -ra /etc/mysql debug/etc-mysql cp -ra /etc/mysql debug/etc-mysql
cp -ra /var/log/mysql debug/var-log-mysql cp -ra /var/log/mysql debug/var-log-mysql
mariadb --skip-column-names -e "select @@version, @@version_comment" # Show version mariadb --skip-column-names -e "select @@version, @@version_comment" # Show version
mariadb --table -e "SHOW DATABASES;" # List databases mariadb --table -e 'SHOW DATABASES;' # List databases
mariadb --table -e "SELECT host,user,plugin,authentication_string FROM user;" mysql mariadb --table -e "SELECT host,user,plugin,authentication_string FROM user;" mysql
mariadb --table -e "SELECT * FROM plugin;" mysql mariadb --table -e "SELECT * FROM plugin;" mysql
mariadb --table -e "SHOW PLUGINS;" mysql mariadb --table -e "SHOW PLUGINS;" mysql
...@@ -261,7 +262,7 @@ mariadb-10.3 Buster to mariadb-10.6 upgrade: ...@@ -261,7 +262,7 @@ mariadb-10.3 Buster to mariadb-10.6 upgrade:
- apt-get install -y 'default-mysql*' 'mariadb-*' 'libmariadb*' - apt-get install -y 'default-mysql*' 'mariadb-*' 'libmariadb*'
# Verify installation of MariaDB from Buster # Verify installation of MariaDB from Buster
- *test-verify-initial - *test-verify-initial
- *test-enable-bullseye-repos - *test-enable-sid-repos
- *test-install - *test-install
- service mysql status - service mysql status
- *test-verify-final - *test-verify-final
...@@ -288,7 +289,8 @@ mariadb-10.1 Stretch to mariadb-10.6 upgrade: ...@@ -288,7 +289,8 @@ mariadb-10.1 Stretch to mariadb-10.6 upgrade:
- apt-get install -y 'default-mysql*' 'mariadb-*' 'libmariadbd*' 'libmariadbclient*' - apt-get install -y 'default-mysql*' 'mariadb-*' 'libmariadbd*' 'libmariadbclient*'
# Verify installation of MariaDB from Stretch # Verify installation of MariaDB from Stretch
- *test-verify-initial - *test-verify-initial
- *test-enable-bullseye-repos - apt-get remove -y manpages # Workaround for Bug#99375
- *test-enable-sid-repos
- *test-install - *test-install
- service mysql status - service mysql status
- *test-verify-final - *test-verify-final
...@@ -402,8 +404,41 @@ build mariadbclient consumer Python-MySQLdb: ...@@ -402,8 +404,41 @@ build mariadbclient consumer Python-MySQLdb:
variables: variables:
- $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/ - $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/
default-libmysqlclient-dev Bullseye upgrade: libmysql* to libmariadb* upgrade:
stage: upgrade in Bullseye stage: upgrade in Sid
needs:
- job: build
image: debian:${RELEASE}
artifacts:
when: always
name: "$CI_BUILD_NAME"
paths:
- ${WORKING_DIR}/debug
script:
- *test-prepare-container
# Install all libmysql* available in Debian unstable
- apt-get install -y pkg-config libmysqlclient-dev
- pkg-config --list-all
- pkg-config --cflags mysqlclient # mysqlclient.pc from original package
- apt-get install -y ./libmariadb3_*.deb ./mariadb-common_*.deb
- pkg-config --list-all
- apt-get install -y ./libmariadb-dev_*.deb
- pkg-config --list-all
- apt-get install -y ./libmariadb-dev-compat_*.deb
- pkg-config --cflags mysqlclient # mysqlclient.pc from compat package
- pkg-config --list-all
- apt-get install -y ./libmariadbd19_*.deb
- pkg-config --list-all
- apt-get install -y ./libmariadbd-dev_*.deb
- pkg-config --list-all
- apt-get install -y default-libmysqlclient-dev default-libmysqld-dev
- *test-verify-libs
except:
variables:
- $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/
default-libmysqlclient-dev Sid upgrade:
stage: upgrade in Sid
needs: needs:
- job: build - job: build
image: debian:${RELEASE} image: debian:${RELEASE}
...@@ -423,7 +458,7 @@ default-libmysqlclient-dev Bullseye upgrade: ...@@ -423,7 +458,7 @@ default-libmysqlclient-dev Bullseye upgrade:
- $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/ - $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/
default-libmysqlclient-dev Buster upgrade: default-libmysqlclient-dev Buster upgrade:
stage: upgrade from Buster/Stretch stage: upgrade from Bullseye/Buster/Stretch
needs: needs:
- job: build - job: build
image: debian:buster image: debian:buster
...@@ -436,7 +471,7 @@ default-libmysqlclient-dev Buster upgrade: ...@@ -436,7 +471,7 @@ default-libmysqlclient-dev Buster upgrade:
- *test-prepare-container - *test-prepare-container
- apt-get install -y pkg-config default-libmysqlclient-dev - apt-get install -y pkg-config default-libmysqlclient-dev
- pkg-config --list-all - pkg-config --list-all
- *test-enable-bullseye-repos - *test-enable-sid-repos
- *test-install-all-libs - *test-install-all-libs
- *test-verify-libs - *test-verify-libs
except: except:
...@@ -444,7 +479,7 @@ default-libmysqlclient-dev Buster upgrade: ...@@ -444,7 +479,7 @@ default-libmysqlclient-dev Buster upgrade:
- $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/ - $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/
default-libmysqlclient-dev Stretch upgrade: default-libmysqlclient-dev Stretch upgrade:
stage: upgrade from Buster/Stretch stage: upgrade from Bullseye/Buster/Stretch
needs: needs:
- job: build - job: build
image: debian:stretch image: debian:stretch
...@@ -457,7 +492,8 @@ default-libmysqlclient-dev Stretch upgrade: ...@@ -457,7 +492,8 @@ default-libmysqlclient-dev Stretch upgrade:
- *test-prepare-container - *test-prepare-container
- apt-get install -y pkg-config default-libmysqlclient-dev - apt-get install -y pkg-config default-libmysqlclient-dev
- pkg-config --list-all - pkg-config --list-all
- *test-enable-bullseye-repos - apt-get remove -y manpages # Workaround for Bug#99375
- *test-enable-sid-repos
- *test-install-all-libs - *test-install-all-libs
- *test-verify-libs - *test-verify-libs
except: except:
...@@ -465,7 +501,7 @@ default-libmysqlclient-dev Stretch upgrade: ...@@ -465,7 +501,7 @@ default-libmysqlclient-dev Stretch upgrade:
- $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/ - $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/
mariadb-connector-c Stretch upgrade: mariadb-connector-c Stretch upgrade:
stage: upgrade from Buster/Stretch stage: upgrade from Bullseye/Buster/Stretch
needs: needs:
- job: build - job: build
image: debian:stretch image: debian:stretch
...@@ -478,7 +514,8 @@ mariadb-connector-c Stretch upgrade: ...@@ -478,7 +514,8 @@ mariadb-connector-c Stretch upgrade:
- *test-prepare-container - *test-prepare-container
- apt-get install -y pkg-config libmariadb2 libmariadb-dev libmariadb-dev-compat - apt-get install -y pkg-config libmariadb2 libmariadb-dev libmariadb-dev-compat
- pkg-config --list-all - pkg-config --list-all
- *test-enable-bullseye-repos - apt-get remove -y manpages # Workaround for Bug#99375
- *test-enable-sid-repos
- *test-install-all-libs - *test-install-all-libs
- *test-verify-libs - *test-verify-libs
except: except:
...@@ -531,14 +568,14 @@ mysql-8.0 Focal to mariadb-10.6 upgrade: ...@@ -531,14 +568,14 @@ mysql-8.0 Focal to mariadb-10.6 upgrade:
# Add Ubuntu Focal archive keys and repository # 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-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 - 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 - echo 'deb http://archive.ubuntu.com/ubuntu/ focal main restricted' > /etc/apt/sources.list.d/ubuntu.list
- apt-get update - apt-get update
# First install often fail due to bug in mysql-8.0 # First install often fail due to bug in mysql-8.0
- apt-get install -y mysql-server 'libmysqlc*' || true - apt-get install -y mysql-server 'libmysqlc*' || true
- sleep 10 && apt-get install -f - sleep 10 && apt-get install -f
- *test-verify-initial - *test-verify-initial
# Enable backports to make galera-4 available # Enable backports to make galera-4 available
- echo "deb http://deb.debian.org/debian buster-backports main" > /etc/apt/sources.list.d/backports.list && apt-get update - echo 'deb http://deb.debian.org/debian buster-backports main' > /etc/apt/sources.list.d/backports.list && apt-get update
- *test-install - *test-install
- service mysql status - service mysql status
- sleep 5 # Give the mysql_upgrade a bit of time to complete before querying the server - sleep 5 # Give the mysql_upgrade a bit of time to complete before querying the server
...@@ -553,7 +590,7 @@ mariadb.org-10.5 to mariadb-10.6 upgrade: ...@@ -553,7 +590,7 @@ mariadb.org-10.5 to mariadb-10.6 upgrade:
stage: upgrade extras stage: upgrade extras
needs: needs:
- job: build - job: build
image: debian:${RELEASE} image: debian:sid
artifacts: artifacts:
when: always when: always
name: "$CI_BUILD_NAME" name: "$CI_BUILD_NAME"
...@@ -563,14 +600,14 @@ mariadb.org-10.5 to mariadb-10.6 upgrade: ...@@ -563,14 +600,14 @@ mariadb.org-10.5 to mariadb-10.6 upgrade:
- *test-prepare-container - *test-prepare-container
- apt install -y curl - apt install -y curl
- curl -sS https://mariadb.org/mariadb_release_signing_key.asc -o /etc/apt/trusted.gpg.d/mariadb.asc - curl -sS https://mariadb.org/mariadb_release_signing_key.asc -o /etc/apt/trusted.gpg.d/mariadb.asc
- echo "deb https://deb.mariadb.org/repo/10.5/debian ${RELEASE} main" > /etc/apt/sources.list.d/mariadb.list - echo 'deb http://mirror.one.com/mariadb/repo/10.5/debian sid main' > /etc/apt/sources.list.d/mariadb.list
- apt-get update - apt-get update
# The 10.5.9 release is missing mariadb-plugin-columnstore, define all other packages but it to avoid hitting the error: # The 10.5.9 release is missing mariadb-plugin-columnstore, define all other packages but it to avoid hitting the error:
# The following packages have unmet dependencies: # The following packages have unmet dependencies:
# mariadb-plugin-columnstore : Depends: mariadb-server-10.5 (= 1:10.5.8+maria~sid) but 1:10.5.9+maria~sid is to be installed # mariadb-plugin-columnstore : Depends: mariadb-server-10.5 (= 1:10.5.8+maria~sid) but 1:10.5.9+maria~sid is to be installed
- apt-get install -y libmariadb3 'libmariadb-*' 'libmariadbd*' 'mariadb-c*' 'mariadb-b*' 'mariadb-s*' 'mariadb-t*' 'mariadb-plugin-con*' 'mariadb-plugin-cr*' 'mariadb-plugin-g*' 'mariadb-plugin-m*' 'mariadb-plugin-o*' 'mariadb-plugin-s*' - apt-get install -y libmariadb3 'libmariadb-*' 'libmariadbd*' 'mariadb-c*' 'mariadb-b*' 'mariadb-s*' 'mariadb-t*' 'mariadb-plugin-con*' 'mariadb-plugin-cr*' 'mariadb-plugin-g*' 'mariadb-plugin-m*' 'mariadb-plugin-o*' 'mariadb-plugin-s*'
# Once 10.5.10 is out, revert back to: # Once 10.5.10 is out, revert back to:
# Package libmariadbclient-dev from mariadb.org conflicts with libmariadb-dev in Bullseye, so cannot use wildcard that would include it # Package libmariadbclient-dev from mariadb.org conflicts with libmariadb-dev in Sid, so cannot use wildcard that would include it
#- apt-get install -y 'mariadb*' libmariadb3 'libmariadb-*' 'libmariadbd*' #- apt-get install -y 'mariadb*' libmariadb3 'libmariadb-*' 'libmariadbd*'
- *test-verify-initial - *test-verify-initial
# Install MariaDB built in this commit # Install MariaDB built in this commit
...@@ -583,7 +620,6 @@ mariadb.org-10.5 to mariadb-10.6 upgrade: ...@@ -583,7 +620,6 @@ mariadb.org-10.5 to mariadb-10.6 upgrade:
- *test-verify-final - *test-verify-final
variables: variables:
GIT_STRATEGY: none GIT_STRATEGY: none
RELEASE: bullseye # Last Debian release that MariaDB.org publised 10.5 binaries for
except: except:
variables: variables:
- $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/ - $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/
...@@ -591,8 +627,8 @@ mariadb.org-10.5 to mariadb-10.6 upgrade: ...@@ -591,8 +627,8 @@ mariadb.org-10.5 to mariadb-10.6 upgrade:
mariadb.org-10.4 to mariadb-10.6 upgrade: mariadb.org-10.4 to mariadb-10.6 upgrade:
stage: upgrade extras stage: upgrade extras
needs: needs:
- job: build buster-backports - job: build
image: debian:${RELEASE} image: debian:sid
artifacts: artifacts:
when: always when: always
name: "$CI_BUILD_NAME" name: "$CI_BUILD_NAME"
...@@ -600,9 +636,9 @@ mariadb.org-10.4 to mariadb-10.6 upgrade: ...@@ -600,9 +636,9 @@ mariadb.org-10.4 to mariadb-10.6 upgrade:
- ${WORKING_DIR}/debug - ${WORKING_DIR}/debug
script: script:
- *test-prepare-container - *test-prepare-container
- apt install -y curl - apt install -y curl systemctl # systemctl shim needed on platforms that don't have systemd
- curl -sS https://mariadb.org/mariadb_release_signing_key.asc -o /etc/apt/trusted.gpg.d/mariadb.asc - curl -sS https://mariadb.org/mariadb_release_signing_key.asc -o /etc/apt/trusted.gpg.d/mariadb.asc
- echo "deb https://deb.mariadb.org/repo/10.4/debian ${RELEASE} main" > /etc/apt/sources.list.d/mariadb.list - echo 'deb http://mirror.one.com/mariadb/repo/10.4/debian sid main' > /etc/apt/sources.list.d/mariadb.list
- apt-get update - apt-get update
- apt-get install -y mariadb-server-10.4 - 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 # MariaDB.org version of 10.4 and early 10.5 do not install an init file, so
...@@ -616,7 +652,6 @@ mariadb.org-10.4 to mariadb-10.6 upgrade: ...@@ -616,7 +652,6 @@ mariadb.org-10.4 to mariadb-10.6 upgrade:
- *test-verify-final - *test-verify-final
variables: variables:
GIT_STRATEGY: none GIT_STRATEGY: none
RELEASE: buster # Last Debian release that MariaDB.org publised 10.4 binaries for
except: except:
variables: variables:
- $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/ - $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/
...@@ -624,8 +659,8 @@ mariadb.org-10.4 to mariadb-10.6 upgrade: ...@@ -624,8 +659,8 @@ mariadb.org-10.4 to mariadb-10.6 upgrade:
mariadb.org-10.3 to mariadb-10.6 upgrade: mariadb.org-10.3 to mariadb-10.6 upgrade:
stage: upgrade extras stage: upgrade extras
needs: needs:
- job: build buster-backports - job: build
image: debian:${RELEASE} image: debian:sid
artifacts: artifacts:
when: always when: always
name: "$CI_BUILD_NAME" name: "$CI_BUILD_NAME"
...@@ -635,21 +670,23 @@ mariadb.org-10.3 to mariadb-10.6 upgrade: ...@@ -635,21 +670,23 @@ mariadb.org-10.3 to mariadb-10.6 upgrade:
- *test-prepare-container - *test-prepare-container
- apt install -y curl - apt install -y curl
- curl -sS https://mariadb.org/mariadb_release_signing_key.asc -o /etc/apt/trusted.gpg.d/mariadb.asc - curl -sS https://mariadb.org/mariadb_release_signing_key.asc -o /etc/apt/trusted.gpg.d/mariadb.asc
- echo "deb https://deb.mariadb.org/repo/10.3/debian ${RELEASE} main" > /etc/apt/sources.list.d/mariadb.list - echo 'deb http://mirror.one.com/mariadb/repo/10.3/debian sid main' > /etc/apt/sources.list.d/mariadb.list
- apt-get update - apt-get update
- apt-get install -y mariadb-server-10.3 - apt-get install -y mariadb-server-10.3
- *test-verify-initial # Verify initial state before upgrade
# Enable backports to make galera-4 available - dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed
- echo "deb http://deb.debian.org/debian buster-backports main" >> /etc/apt/sources.list.d/backports.list && apt-get update - service mysql status
# prepending with --defaults-file=/etc/mysql/debian.cnf is needed in upstream 5.5–10.3
- mysql --defaults-file=/etc/mysql/debian.cnf --skip-column-names -e "SELECT @@version, @@version_comment"
- echo 'SHOW DATABASES;' | mysql --defaults-file=/etc/mysql/debian.cnf
- mysql --defaults-file=/etc/mysql/debian.cnf -e "SELECT Host,User,plugin,authentication_string FROM user;" mysql
- mysql --defaults-file=/etc/mysql/debian.cnf -e "SELECT * FROM plugin;" mysql
- *test-install - *test-install
- service mysql status - service mysql status
# Give the mariadb-upgrade plenty of time to complete, otherwise next commands - sleep 5 # Give the mysql_upgrade a bit of time to complete before querying the server
# fail on non-existing mariadb.sys user
- sleep 15
- *test-verify-final - *test-verify-final
variables: variables:
GIT_STRATEGY: none GIT_STRATEGY: none
RELEASE: buster # Last Debian release that MariaDB.org publised 10.3 binaries for
except: except:
variables: variables:
- $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/ - $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/
...@@ -657,8 +694,8 @@ mariadb.org-10.3 to mariadb-10.6 upgrade: ...@@ -657,8 +694,8 @@ mariadb.org-10.3 to mariadb-10.6 upgrade:
mariadb.org-10.2 to mariadb-10.6 upgrade: mariadb.org-10.2 to mariadb-10.6 upgrade:
stage: upgrade extras stage: upgrade extras
needs: needs:
- job: build stretch-backports - job: build
image: debian:${RELEASE} image: debian:sid
artifacts: artifacts:
when: always when: always
name: "$CI_BUILD_NAME" name: "$CI_BUILD_NAME"
...@@ -666,42 +703,25 @@ mariadb.org-10.2 to mariadb-10.6 upgrade: ...@@ -666,42 +703,25 @@ mariadb.org-10.2 to mariadb-10.6 upgrade:
- ${WORKING_DIR}/debug - ${WORKING_DIR}/debug
script: script:
- *test-prepare-container - *test-prepare-container
- apt install -y curl apt-transport-https - apt install -y curl
- curl -sS https://mariadb.org/mariadb_release_signing_key.asc -o /etc/apt/trusted.gpg.d/mariadb.asc - curl -sS https://mariadb.org/mariadb_release_signing_key.asc -o /etc/apt/trusted.gpg.d/mariadb.asc
- echo "deb https://deb.mariadb.org/repo/10.2/debian ${RELEASE} main" > /etc/apt/sources.list.d/mariadb.list - echo 'deb http://mirror.one.com/mariadb/repo/10.2/debian sid main' > /etc/apt/sources.list.d/mariadb.list
- apt-get update - apt-get update
- apt-get install -y mariadb-server-10.2 - apt-get install -y mariadb-server-10.2
# Verify initial state before upgrade # Verify initial state before upgrade
- dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed - dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed
- service mysql status - service mysql status
# prepending with --defaults-file=/etc/mysql/debian.cnf is needed in upstream 5.5–10.3 # prepending with --defaults-file=/etc/mysql/debian.cnf is needed in upstream 5.5–10.3
- | - mysql --defaults-file=/etc/mysql/debian.cnf --skip-column-names -e "SELECT @@version, @@version_comment"
mysql --defaults-file=/etc/mysql/debian.cnf --skip-column-names -e "SELECT @@version, @@version_comment" - echo 'SHOW DATABASES;' | mysql --defaults-file=/etc/mysql/debian.cnf
mysql --defaults-file=/etc/mysql/debian.cnf --table -e "SHOW DATABASES;" - mysql --defaults-file=/etc/mysql/debian.cnf -e "SELECT * FROM mysql.user; SHOW CREATE USER root@localhost"
mysql --defaults-file=/etc/mysql/debian.cnf --table -e "SELECT * FROM mysql.user; SHOW CREATE USER root@localhost;" - mysql --defaults-file=/etc/mysql/debian.cnf -e "SELECT * FROM mysql.plugin; SHOW PLUGINS"
mysql --defaults-file=/etc/mysql/debian.cnf --table -e "SELECT * FROM mysql.plugin; SHOW PLUGINS;"
# Enable backports to make libzstd1, rocksdb-tools
- echo "deb http://deb.debian.org/debian stretch-backports main" >> /etc/apt/sources.list.d/backports.list
# Enable backports to make galera-4 available
- echo "deb http://deb.debian.org/debian stretch-backports-sloppy main" >> /etc/apt/sources.list.d/backports.list && apt-get update
# 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=stretch-*
Pin-Priority: 500
EOF
# Remove plugin that requires libcurl4, not available in Debian Stretch
- rm mariadb-plugin-s3*.deb
- *test-install - *test-install
- service mysql status - service mysql status
# Give the mariadb-upgrade plenty of time to complete, otherwise next commands - sleep 5 # Give the mysql_upgrade a bit of time to complete before querying the server
# fail on non-existing mariadb.sys user
- sleep 15
- *test-verify-final - *test-verify-final
variables: variables:
GIT_STRATEGY: none GIT_STRATEGY: none
RELEASE: stretch # Last Debian release that MariaDB.org publised 10.2 binaries for
except: except:
variables: variables:
- $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/ - $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/
...@@ -720,16 +740,16 @@ mysql.com-5.7 to mariadb-10.6 upgrade: ...@@ -720,16 +740,16 @@ mysql.com-5.7 to mariadb-10.6 upgrade:
- *test-prepare-container - *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 --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 apt-key adv --recv-keys --keyserver hkps://keyserver.ubuntu.com:443 8C718D3B5072E1F5
echo "deb https://repo.mysql.com/apt/debian/ buster mysql-5.7" > /etc/apt/sources.list.d/mysql.list echo 'deb https://repo.mysql.com/apt/debian/ buster mysql-5.7' > /etc/apt/sources.list.d/mysql.list
apt-get update apt-get update
apt-get install -y 'mysql*' 'libmysqlc*' apt-get install -y 'mysql*' 'libmysqlc*'
- *test-verify-initial - *test-verify-initial
# Enable backports to make galera-4 available # Enable backports to make galera-4 available
- echo "deb http://deb.debian.org/debian buster-backports main" >> /etc/apt/sources.list.d/backports.list && apt-get update - echo 'deb http://deb.debian.org/debian buster-backports main' >> /etc/apt/sources.list.d/backports.list && apt-get update
- *test-install - *test-install
- service mysql status - service mysql status
- sleep 15 # Give the mysql_upgrade a bit of extra time to complete with MySQL 5.7 before querying the server - sleep 5 # Give the mysql_upgrade a bit of time to complete before querying the server
- *test-verify-final - *test-verify-final
variables: variables:
GIT_STRATEGY: none GIT_STRATEGY: none
...@@ -752,16 +772,16 @@ percona-xtradb-5.7 to mariadb-10.6 upgrade (MDEV-22679): ...@@ -752,16 +772,16 @@ percona-xtradb-5.7 to mariadb-10.6 upgrade (MDEV-22679):
- | - |
apt-get install --no-install-recommends --yes gpg gpg-agent dirmngr ca-certificates # Bare minimal (<4MB) for apt-key to work 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 apt-key adv --recv-keys --keyserver hkps://keyserver.ubuntu.com:443 9334A25F8507EFA5
echo "deb https://repo.percona.com/apt/ buster main" > /etc/apt/sources.list.d/mysql.list echo 'deb https://repo.percona.com/apt/ buster main' > /etc/apt/sources.list.d/mysql.list
apt-get update apt-get update
apt-get install -y percona-xtradb-cluster-full-57 percona-xtrabackup-24 percona-toolkit pmm2-client apt-get install -y percona-xtradb-cluster-full-57 percona-xtrabackup-24 percona-toolkit pmm2-client
- service mysql status - service mysql status
- *test-verify-initial - *test-verify-initial
# Enable backports to make galera-4 available # Enable backports to make galera-4 available
- echo "deb http://deb.debian.org/debian buster-backports main" >> /etc/apt/sources.list.d/backports.list && apt-get update - echo 'deb http://deb.debian.org/debian buster-backports main' >> /etc/apt/sources.list.d/backports.list && apt-get update
- *test-install - *test-install
- service mysql status - service mysql status
- sleep 15 # Give the mysql_upgrade a bit of extra time to complete with MySQL 5.7 before querying the server - sleep 5 # Give the mysql_upgrade a bit of time to complete before querying the server
- *test-verify-final - *test-verify-final
variables: variables:
GIT_STRATEGY: none GIT_STRATEGY: none
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment