Skip to content
Permalink
Browse files
Merge 10.8 into 10.9
  • Loading branch information
dr-m committed Nov 21, 2022
2 parents 91a7e9e + 5b1eb87 commit b35a048
Show file tree
Hide file tree
Showing 104 changed files with 3,035 additions and 3,580 deletions.
@@ -26,9 +26,9 @@ then
sed '/Add support for verbose builds/,/^$/d' -i debian/rules
elif [ -d storage/columnstore/columnstore/debian ]
then
# ColumnStore is explicitly disabled in the native Debian build, so allow it
# ColumnStore is explicitly disabled in the native Debian build. Enable it
# now when build is triggered by autobake-deb.sh (MariaDB.org) and when the
# build is not running on Travis or Gitlab-CI
# build is not running on Gitlab-CI.
sed '/-DPLUGIN_COLUMNSTORE=NO/d' -i debian/rules
# Take the files and part of control from MCS directory
if [ ! -f debian/mariadb-plugin-columnstore.install ]
@@ -59,13 +59,13 @@ 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
-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
sed '/-DWITH_PMEM=YES/d' -i debian/rules
}

disable_libfmt()
@@ -76,15 +76,34 @@ disable_libfmt()

architecture=$(dpkg-architecture -q DEB_BUILD_ARCH)

# Parse release name and number from Linux standard base release
# Example:
# $ lsb_release -a
# No LSB modules are available.
# Distributor ID: Debian
# Description: Debian GNU/Linux bookworm/sid
# Release: n/a
# Codename: n/a
LSBID="$(lsb_release -si | tr '[:upper:]' '[:lower:]')"
LSBVERSION="$(lsb_release -sr | sed -e "s#\.##g")"
LSBNAME="$(lsb_release -sc)"

# If 'n/a', assume 'sid'
if [ "${LSBVERSION}" == "n/a" ] || [ "${LSBNAME}" == "n/a" ]
then
LSBVERSION="sid"
LSBNAME="sid"
fi

# If not known, use 'unknown' in .deb version identifier
if [ -z "${LSBID}" ]
then
LSBID="unknown"
fi
case "${LSBNAME}" in

case "${LSBNAME}"
in
# Debian
stretch)
# MDEV-16525 libzstd-dev-1.1.3 minimum version
sed -e '/libzstd-dev/d' \
@@ -113,10 +132,10 @@ case "${LSBNAME}" in
fi
;&
sid)
# should always be empty here.
# need to match here to avoid the default Error however
# The default packaging should always target Debian Sid, so in this case
# there is intentionally no customizations whatsoever.
;;
# UBUNTU
# Ubuntu
bionic)
remove_rocksdb_tools
[ "$architecture" != amd64 ] && disable_pmem
@@ -143,7 +162,7 @@ case "${LSBNAME}" in
fi
;;
*)
echo "Error - unknown release codename $LSBNAME" >&2
echo "Error: Unknown release '$LSBNAME'" >&2
exit 1
esac

@@ -162,7 +181,7 @@ LOGSTRING="MariaDB build"
EPOCH="1:"
VERSION="${EPOCH}${UPSTREAM}${PATCHLEVEL}~${LSBID:0:3}${LSBVERSION}"

dch -b -D ${LSBNAME} -v "${VERSION}" "Automatic build with ${LOGSTRING}." --controlmaint
dch -b -D "${LSBNAME}" -v "${VERSION}" "Automatic build with ${LOGSTRING}." --controlmaint

echo "Creating package version ${VERSION} ... "

@@ -21,9 +21,18 @@ test -x /usr/sbin/mariadbd || exit 0

. /lib/lsb/init-functions

SELF=$(cd $(dirname $0); pwd -P)/$(basename $0)

MYADMIN="/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf"
SELF=$(cd "$(dirname $0)"; pwd -P)/$(basename $0)

if [ -f /usr/bin/mariadb-admin ]
then
MYADMIN="/usr/bin/mariadb-admin --defaults-file=/etc/mysql/debian.cnf"
elif [ -f /usr/bin/mysqladmin ]
then
MYADMIN="/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf"
else
log_failure_msg "Command mariadb-admin/mysqladmin not found! This SysV init script depends on it."
exit -1
fi

# priority can be overridden and "-s" adds output to stderr
ERR_LOGGER="logger -p daemon.err -t /etc/init.d/mariadb -i"
@@ -5,7 +5,13 @@ export DEB_BUILD_HARDENING=1

# enable Debian Hardening
# see: https://wiki.debian.org/Hardening
export DEB_BUILD_MAINT_OPTIONS = hardening=+all optimize=-lto
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

# Disable LTO on Ubuntu, see LP: #1970634 and https://jira.mariadb.org/browse/MDEV-25633
ifeq ($(shell dpkg-vendor --derives-from Ubuntu && echo yes), yes)
export DEB_BUILD_MAINT_OPTIONS += optimize=-lto
endif

DPKG_EXPORT_BUILDFLAGS = 1
# Include all defaults, including buildflags.mk
include /usr/share/dpkg/default.mk
@@ -48,11 +54,6 @@ ifeq (32,$(DEB_HOST_ARCH_BITS))
CMAKEFLAGS += -DPLUGIN_ROCKSDB=NO
endif

# ColumnStore can build only on amd64 and arm64
ifneq (,$(filter $(DEB_HOST_ARCH_CPU),amd64 arm64))
CMAKEFLAGS += -DPLUGIN_COLUMNSTORE=NO
endif

# Cross building requires stack direction instruction
ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
ifneq (,$(filter $(DEB_HOST_ARCH_CPU),alpha amd64 arm arm64 i386 ia64 m68k mips64el mipsel powerpc ppc64 ppc64el riscv64 s390x sh4 sparc64))
@@ -66,7 +67,7 @@ endif
# Only attempt to build with PMEM on archs that have package libpmem-dev available
# See https://packages.debian.org/search?searchon=names&keywords=libpmem-dev
ifneq (,$(filter $(DEB_HOST_ARCH_CPU),amd64 arm64 ppc64el riscv64))
CMAKEFLAGS += -DWITH_PMEM=yes
CMAKEFLAGS += -DWITH_PMEM=YES
endif

# Add support for verbose builds
@@ -111,9 +112,9 @@ endif
-DBUILD_CONFIG=mysql_release \
-DCONC_DEFAULT_CHARSET=utf8mb4 \
-DPLUGIN_AWS_KEY_MANAGEMENT=NO \
-DPLUGIN_COLUMNSTORE=NO \
-DPLUGIN_COLUMNSTORE=NO \
-DIGNORE_AIO_CHECK=YES \
-DWITH_URING=yes \
-DWITH_URING=YES \
-DDEB=$(DEB_VENDOR)

# This is needed, otherwise 'make test' will run before binaries have been built
@@ -126,6 +127,7 @@ override_dh_auto_build:
override_dh_auto_test:
@echo "RULES.$@"
dh_testdir
# Ensure at least an empty file exists
touch mysql-test/unstable-tests
[ ! -f debian/unstable-tests.$(DEB_HOST_ARCH) ] || cat debian/unstable-tests.$(DEB_HOST_ARCH) >> mysql-test/unstable-tests
# Run testsuite
@@ -210,6 +212,7 @@ override_dh_installinit-arch:
dh_installinit --name=mariadb --no-start -- defaults 19 21
dh_systemd_start --restart-after-upgrade

# Use custom server version string variable
override_dh_gencontrol:
dh_gencontrol -- -Tdebian/substvars

@@ -16,6 +16,11 @@ variables:
GIT_SUBMODULE_STRATEGY: recursive
SALSA_CI_GBP_BUILDPACKAGE_ARGS: "--git-submodules" # did not apply to extract-sources

# 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
@@ -120,6 +125,17 @@ blhc:
apt-get update
apt-get install -y apt

.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
apt-get update

.test-install: &test-install |
# Install MariaDB built in this commit
apt-get install -y ./*.deb
@@ -450,8 +466,20 @@ mysql-8.0 Sid to mariadb upgrade:
- apt-get install -y procps mysql-server 'libmysqlc*'
- *test-verify-initial
- *test-install
- service mysql status
# The Debian version of MariaDB 10.6 still maintains compatibility and there
# running 'service mysql status' in Salsa-CI job 'mysql-8.0 Sid to
# mariadb-10.6 upgrade' still works.
#
# However, due to debian/control changes, the upstream MariaDB 10.6 when
# installed on a system with a previous installation of MySQL 8.0 will 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, and 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
- *test-verify-final
variables:
GIT_STRATEGY: none
@@ -624,7 +652,6 @@ mariadb.org-10.6 to mariadb upgrade:
except:
variables:
- $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/
allow_failure: true

mariadb.org-10.5 to mariadb upgrade:
stage: upgrade extras
@@ -63,7 +63,7 @@ very-long-line-length-in-source-file mysql-test/std_data/init_file_longline_3816
very-long-line-length-in-source-file scripts/fill_help_tables.sql *
very-long-line-length-in-source-file scripts/mysql_system_tables.sql *
very-long-line-length-in-source-file scripts/mysql_test_data_timezone.sql *
# Machine formated HTML
# Machine formatted HTML
very-long-line-length-in-source-file sql/share/charsets/languages.html *
very-long-line-length-in-source-file sql/share/errmsg-utf8.txt *
# Very long test string
@@ -10,6 +10,8 @@ echo "Running test 'testsuite'"
set -e

SKIP_TEST_LST="/tmp/skip-test.lst"
ARCH=$(dpkg --print-architecture)

WORKDIR=$(mktemp -d)
trap 'rm -rf $WORKDIR $SKIP_TEST_LST' 0 INT QUIT ABRT PIPE TERM
cd "$WORKDIR"
@@ -22,16 +24,15 @@ echo "using tmpdir: $WORKDIR/tmp"

echo "Setting up skip-tests-list"

touch $SKIP_TEST_LST
# Use unstable-tests list as base to skip all tests considered unstable
# or create an empty file if that upstream file does not exists on this branch
cp /usr/share/mysql/mysql-test/unstable-tests $SKIP_TEST_LST || touch $SKIP_TEST_LST

# Also use arch specific skiplists if such files exist
for filename in /usr/share/mysql/mysql-test/unstable-tests.*
do
# Check for case that no files matched and glob is returned
[ -e "$filename" ] || continue
# Append file to the main skip test list file
cat "$filename" >> $SKIP_TEST_LST
done
# Also use the arch specific skiplists if exist
if [ -f /usr/share/mysql/mysql-test/unstable-tests.$ARCH ]
then
cat /usr/share/mysql/mysql-test/unstable-tests.$ARCH >> $SKIP_TEST_LST
fi

# Skip tests that cannot run properly on ci.debian.net / autopkgtests.ubuntu.com
cat >> $SKIP_TEST_LST << EOF
@@ -48,7 +49,6 @@ main.mysqld--help : For unknown reason table-cache is 4000 instead of default 42
EOF
fi

ARCH=$(dpkg --print-architecture)
if [ "$ARCH" = "s390x" ]
then
echo "main.func_regexp_pcre : recursion fails on s390x https://bugs.launchpad.net/ubuntu/+source/mariadb-10.1/+bug/1723947" >> $SKIP_TEST_LST
@@ -57,6 +57,10 @@ then
echo "main.failed_auth_unixsocket : Test returns wrong exit code on armhf and i386 (but only in debci) https://jira.mariadb.org/browse/MDEV-23933" >> $SKIP_TEST_LST
fi

# Store skipped test list in artifacts so it can be viewed while debugging
# failed autopkgtest runs
cp -v $SKIP_TEST_LST $AUTOPKGTEST_ARTIFACTS

cd /usr/share/mysql/mysql-test
echo "starting mysql-test-tun.pl..."
eatmydata perl -I. ./mysql-test-run.pl --suite=main \
@@ -1,3 +1,4 @@
RESET MASTER;
CREATE TEMPORARY SEQUENCE seq_1;
XA START '3';
CREATE TEMPORARY TABLE tmp_1(c INT);
@@ -1,3 +1,4 @@
RESET MASTER;
#
# Verify that SET string values and character sets can be printed correctly
#
@@ -1,3 +1,4 @@
RESET MASTER;
#
# Verify that SET string values and character sets can be printed correctly
#
@@ -1,3 +1,4 @@
RESET MASTER;
#
# Verify that SET string values and character sets can be printed correctly
#
@@ -4,7 +4,7 @@
--source include/have_binlog_format_mixed.inc
--source include/have_innodb.inc


RESET MASTER; # clear binlogs
# MDEV-22420 DDL on temporary object is prohibited when XA is in prepare state

# Temporary sequnce may not be created within a transaction
@@ -20,6 +20,7 @@
--let $MYSQLD_DATADIR= `select @@datadir`
--let $binlog_file= $MYSQLD_DATADIR/master-bin.000001

RESET MASTER;
--echo #
--echo # Verify that SET string values and character sets can be printed correctly
--echo #
@@ -21,6 +21,7 @@
--let $MYSQLD_DATADIR= `select @@datadir`
--let $binlog_file= $MYSQLD_DATADIR/master-bin.000001

RESET MASTER;
--echo #
--echo # Verify that SET string values and character sets can be printed correctly
--echo #
@@ -21,6 +21,7 @@
--let $MYSQLD_DATADIR= `select @@datadir`
--let $binlog_file= $MYSQLD_DATADIR/master-bin.000001

RESET MASTER;
--echo #
--echo # Verify that SET string values and character sets can be printed correctly
--echo #

0 comments on commit b35a048

Please sign in to comment.