Skip to content

Commit 8ea0850

Browse files
committed
MDEV-28022: Debian stretch has zstd too old
zstd-1.1.3 is needed however stretch has only 1.1.2. Move to distro version based checks as checks against the apt-cache are unreliable if there is no cache.
1 parent 86c1bf1 commit 8ea0850

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

debian/autobake-deb.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,14 @@ GCCVERSION=$(gcc -dumpfullversion -dumpversion | sed -e 's/\.\([0-9][0-9]\)/\1/g
4242
# Debian policy and targeting Debian Sid. Then case-by-case run in autobake-deb.sh
4343
# tests for backwards compatibility and strip away parts on older builders.
4444

45+
CODENAME="$(lsb_release -sc)"
46+
case "${CODENAME}" in
47+
stretch)
48+
# MDEV-28022 libzstd-dev-1.1.3 minimum version
49+
sed -i -e '/libzstd-dev/d' debian/control
50+
;;
51+
esac
52+
4553
# If libcrack2 (>= 2.9.0) is not available (before Debian Jessie and Ubuntu Trusty)
4654
# clean away the cracklib stanzas so the package can build without them.
4755
if ! apt-cache madison libcrack2-dev | grep 'libcrack2-dev *| *2\.9' >/dev/null 2>&1
@@ -72,13 +80,6 @@ then
7280
sed '/mariadb-service-convert/d' -i debian/mariadb-server-10.3.install
7381
fi
7482

75-
# If libzstd-dev is not available (before Debian Stretch and Ubuntu Xenial)
76-
# remove the dependency from server and rocksdb so it can build properly
77-
if ! apt-cache madison libzstd-dev | grep 'libzstd-dev' >/dev/null 2>&1
78-
then
79-
sed '/libzstd-dev/d' -i debian/control
80-
fi
81-
8283
# The binaries should be fully hardened by default. However TokuDB compilation seems to fail on
8384
# Debian Jessie and older and on Ubuntu Xenial and older with the following error message:
8485
# /usr/bin/ld.bfd.real: /tmp/ccOIwjFo.ltrans0.ltrans.o: relocation R_X86_64_PC32 against symbol
@@ -139,7 +140,6 @@ source ./VERSION
139140
UPSTREAM="${MYSQL_VERSION_MAJOR}.${MYSQL_VERSION_MINOR}.${MYSQL_VERSION_PATCH}${MYSQL_VERSION_EXTRA}"
140141
PATCHLEVEL="+maria"
141142
LOGSTRING="MariaDB build"
142-
CODENAME="$(lsb_release -sc)"
143143
EPOCH="1:"
144144

145145
dch -b -D ${CODENAME} -v "${EPOCH}${UPSTREAM}${PATCHLEVEL}~${CODENAME}" "Automatic build with ${LOGSTRING}."

0 commit comments

Comments
 (0)