Commit 6de482a6 authored by Daniel Black's avatar Daniel Black

MDEV-28011: debian autobake cleanup

Travis is dead to us so we don't need all the conditions around it.

Remove depends for no longer supported versions

Debian Jessies, and Ubuntu Trusty, Xenial, Wily are all eol
as far as we are concerned.

The dependancy on an apt cache when running autobake broke the
10.2 aarch64 packages (MDEV-28014). Lets reduce the risk here.
parent 114476f2
...@@ -9,31 +9,7 @@ set -e ...@@ -9,31 +9,7 @@ set -e
# On Buildbot, don't run the mysql-test-run test suite as part of build. # On Buildbot, don't run the mysql-test-run test suite as part of build.
# It takes a lot of time, and we will do a better test anyway in # It takes a lot of time, and we will do a better test anyway in
# Buildbot, running the test suite from installed .debs on a clean VM. # Buildbot, running the test suite from installed .debs on a clean VM.
# On Travis-CI we want to simulate the full build, including tests. export DEB_BUILD_OPTIONS="nocheck"
# Also on Travis-CI it is useful not to override the DEB_BUILD_OPTIONS
# at this stage at all.
if [[ ! $TRAVIS ]]
then
export DEB_BUILD_OPTIONS="nocheck"
fi
# Travis-CI optimizations
if [[ $TRAVIS ]]
then
# On Travis-CI, the log must stay under 4MB so make the build less verbose
sed -i -e '/Add support for verbose builds/,+2d' debian/rules
# Don't include test suite package on Travis-CI to make the build time shorter
sed '/Package: mariadb-test-data/,/^$/d' -i debian/control
sed '/Package: mariadb-test/,/^$/d' -i debian/control
sed '/Package: mariadb-plugin-tokudb/,/^$/d' -i debian/control
sed '/Package: mariadb-plugin-mroonga/,/^$/d' -i debian/control
sed '/Package: mariadb-plugin-spider/,/^$/d' -i debian/control
sed '/Package: mariadb-plugin-oqgraph/,/^$/d' -i debian/control
export MYSQL_COMPILER_LAUNCHER=ccache
sed 's|-DDEB|-DPLUGIN_TOKUDB=NO -DPLUGIN_MROONGA=NO -DPLUGIN_SPIDER=NO -DPLUGIN_OQGRAPH=NO -DPLUGIN_PERFSCHEMA=NO -WITH_EMBEDDED_SERVER=OFF -DDEB|' -i debian/rules
fi
# Look up distro-version specific stuff # Look up distro-version specific stuff
# #
...@@ -41,52 +17,8 @@ fi ...@@ -41,52 +17,8 @@ fi
# Debian policy and targetting Debian Sid. Then case-by-case run in autobake-deb.sh # Debian policy and targetting Debian Sid. Then case-by-case run in autobake-deb.sh
# tests for backwards compatibility and strip away parts on older builders. # tests for backwards compatibility and strip away parts on older builders.
# If iproute2 is not available (before Debian Jessie and Ubuntu Trusty) # Don't build rocksdb package on x86 32 bit.
# fall back to the old iproute package. if [[ $(arch) =~ i[346]86 ]]
if ! apt-cache madison iproute2 | grep 'iproute2 *|' >/dev/null 2>&1
then
sed 's/iproute2/iproute/' -i debian/control
fi
# If libcrack2 (>= 2.9.0) is not available (before Debian Jessie and Ubuntu Trusty)
# clean away the cracklib stanzas so the package can build without them.
if ! apt-cache madison libcrack2-dev | grep 'libcrack2-dev *| *2\.9' >/dev/null 2>&1
then
sed '/libcrack2-dev/d' -i debian/control
sed '/Package: mariadb-plugin-cracklib/,/^$/d' -i debian/control
fi
# If libpcre3-dev (>= 2:8.35-3.2~) is not available (before Debian Jessie or Ubuntu Wily)
# clean away the PCRE3 stanzas so the package can build without them.
# Update check when version 2:8.40 or newer is available.
if ! apt-cache madison libpcre3-dev | grep 'libpcre3-dev *| *2:8\.3[2-9]' >/dev/null 2>&1
then
sed '/libpcre3-dev/d' -i debian/control
fi
# If libsystemd-dev is not available (before Debian Jessie or Ubuntu Wily)
# clean away the systemd stanzas so the package can build without them.
if ! apt-cache madison libsystemd-dev | grep 'libsystemd-dev' >/dev/null 2>&1
then
sed '/dh-systemd/d' -i debian/control
sed '/libsystemd-dev/d' -i debian/control
sed 's/ --with systemd//' -i debian/rules
sed '/systemd/d' -i debian/rules
sed '/\.service/d' -i debian/rules
sed '/galera_new_cluster/d' -i debian/mariadb-server-10.2.install
sed '/galera_recovery/d' -i debian/mariadb-server-10.2.install
sed '/mariadb-service-convert/d' -i debian/mariadb-server-10.2.install
fi
# Convert gcc version to numberical value. Format is Mmmpp where M is Major
# version, mm is minor version and p is patch.
# -dumpfullversion & -dumpversion to make it uniform across old and new (>=7)
GCCVERSION=$(gcc -dumpfullversion -dumpversion | sed -e 's/\.\([0-9][0-9]\)/\1/g' \
-e 's/\.\([0-9]\)/0\1/g' \
-e 's/^[0-9]\{3,4\}$/&00/')
# Don't build rocksdb package if gcc version is less than 4.8 or we are running on
# x86 32 bit.
if [[ $GCCVERSION -lt 40800 ]] || [[ $(arch) =~ i[346]86 ]]
then then
sed '/Package: mariadb-plugin-rocksdb/,/^$/d' -i debian/control sed '/Package: mariadb-plugin-rocksdb/,/^$/d' -i debian/control
fi fi
...@@ -106,15 +38,6 @@ then ...@@ -106,15 +38,6 @@ then
sed '/Package: mariadb-plugin-cassandra/,/^$/d' -i debian/control sed '/Package: mariadb-plugin-cassandra/,/^$/d' -i debian/control
fi fi
# From Debian Stretch/Ubuntu Bionic onwards dh-systemd is just an empty
# transitional metapackage and the functionality was merged into debhelper.
# In Ubuntu Hirsute is was completely removed, so it can't be referenced anymore.
# Keep using it only on Debian Jessie and Ubuntu Xenial.
if apt-cache madison dh-systemd | grep 'dh-systemd' >/dev/null 2>&1
then
sed 's/debhelper (>= 9.20160709~),/debhelper (>= 9), dh-systemd,/' -i debian/control
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"
...@@ -133,13 +56,6 @@ dch -b -D ${CODENAME} -v "${EPOCH}${UPSTREAM}${PATCHLEVEL}~${CODENAME}" "Automat ...@@ -133,13 +56,6 @@ dch -b -D ${CODENAME} -v "${EPOCH}${UPSTREAM}${PATCHLEVEL}~${CODENAME}" "Automat
echo "Creating package version ${EPOCH}${UPSTREAM}${PATCHLEVEL}~${CODENAME} ... " echo "Creating package version ${EPOCH}${UPSTREAM}${PATCHLEVEL}~${CODENAME} ... "
# On Travis CI, use -b to build binary only packages as there is no need to
# waste time on generating the source package.
if [[ $TRAVIS ]]
then
BUILDPACKAGE_FLAGS="-b"
fi
# Build the package # Build the package
# Pass -I so that .git and other unnecessary temporary and source control files # Pass -I so that .git and other unnecessary temporary and source control files
# will be ignored by dpkg-source when creating the tar.gz source package. # will be ignored by dpkg-source when creating the tar.gz source package.
...@@ -148,17 +64,13 @@ fakeroot dpkg-buildpackage -us -uc -I $BUILDPACKAGE_FLAGS ...@@ -148,17 +64,13 @@ fakeroot dpkg-buildpackage -us -uc -I $BUILDPACKAGE_FLAGS
# If the step above fails due to missing dependencies, you can manually run # If the step above fails due to missing dependencies, you can manually run
# sudo mk-build-deps debian/control -r -i # sudo mk-build-deps debian/control -r -i
# Don't log package contents on Travis-CI to save time and log size echo "List package contents ..."
if [[ ! $TRAVIS ]] cd ..
then for package in `ls *.deb`
echo "List package contents ..." do
cd ..
for package in `ls *.deb`
do
echo $package | cut -d '_' -f 1 echo $package | cut -d '_' -f 1
dpkg-deb -c $package | awk '{print $1 " " $2 " " $6}' | sort -k 3 dpkg-deb -c $package | awk '{print $1 " " $2 " " $6}' | sort -k 3
echo "------------------------------------------------" echo "------------------------------------------------"
done done
fi
echo "Build complete" echo "Build complete"
...@@ -5,9 +5,8 @@ Maintainer: MariaDB Developers <maria-developers@lists.launchpad.net> ...@@ -5,9 +5,8 @@ Maintainer: MariaDB Developers <maria-developers@lists.launchpad.net>
Build-Depends: bison, Build-Depends: bison,
chrpath, chrpath,
cmake (>= 2.7), cmake (>= 2.7),
debhelper (>= 9.20160709~), debhelper (>= 10),
dh-apparmor, dh-apparmor,
dh-systemd,
dpatch, dpatch,
gdb, gdb,
libaio-dev [linux-any], libaio-dev [linux-any],
...@@ -353,7 +352,7 @@ Depends: bsdutils, ...@@ -353,7 +352,7 @@ Depends: bsdutils,
findutils, findutils,
galera-3 (>=25.3), galera-3 (>=25.3),
gawk, gawk,
iproute | iproute2, iproute2,
libdbi-perl, libdbi-perl,
lsb-base (>= 3.0-10), lsb-base (>= 3.0-10),
lsof, lsof,
......
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