summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOtto Kekäläinen <otto@kekalainen.net>2020-12-25 17:41:03 +0200
committerOtto Kekäläinen <otto@kekalainen.net>2021-01-03 21:14:32 +0200
commitea56841997995283f04e85e957c8d7f3159c85b0 (patch)
tree1aa45fb943ef87c3d74e985e6e08bf41b21dd6ad
parentff36394ccc4b75efa1763b2b4b22562b90e4ccf4 (diff)
downloadmariadb-git-ea56841997995283f04e85e957c8d7f3159c85b0.tar.gz
Deb: Make dependencies and debian/rules cross-compile compatible
Also clean away impossible/unnecessary "Multi-Arch: same" stanzas. Mostly upstreamed from https://salsa.debian.org/mariadb-team/mariadb-10.5/-/commit/f0ba31e1565feaca9c2a6f2534e55bfc29af7021 Omitted 'libzstd-dev (>= 1.3.3)' as the version requirement would need stretch-backports to be available on buildbot.askmonty.org builders and they are not yet.
-rw-r--r--debian/control12
-rwxr-xr-xdebian/rules36
2 files changed, 26 insertions, 22 deletions
diff --git a/debian/control b/debian/control
index 4bd68939f00..3035598dd3c 100644
--- a/debian/control
+++ b/debian/control
@@ -23,22 +23,25 @@ Build-Depends: bison,
libcrack2-dev (>= 2.9.0),
libcurl4-openssl-dev | libcurl4-dev,
libedit-dev,
+ libedit-dev:native,
libjemalloc-dev [linux-any],
libjudy-dev,
libkrb5-dev,
liblz4-dev,
libncurses5-dev (>= 5.0-6~),
- libnuma-dev [!armhf],
+ libncurses5-dev:native (>= 5.0-6~),
+ libnuma-dev [linux-any],
libpam0g-dev,
libpcre2-dev,
libreadline-gplv2-dev [i386 amd64],
libsnappy-dev,
- libssl-dev | libssl1.0-dev,
+ libssl-dev,
+ libssl-dev:native,
libsystemd-dev [linux-any],
libxml2-dev,
libzstd-dev,
lsb-release,
- perl,
+ perl:any,
po-debconf,
psmisc,
unixodbc-dev,
@@ -52,7 +55,6 @@ Vcs-Git: https://github.com/MariaDB/server.git
Package: libmariadb-dev
Architecture: any
-Multi-Arch: same
Section: libdevel
Depends: libmariadb3 (= ${binary:Version}),
zlib1g-dev,
@@ -188,7 +190,6 @@ Description: Virtual package to satisfy external libmysqlclient18 depends
Package: libmariadbd19
Architecture: any
-Multi-Arch: same
Section: libs
Depends: ${misc:Depends},
${shlibs:Depends}
@@ -204,7 +205,6 @@ Description: MariaDB embedded database, shared library
Package: libmariadbd-dev
Architecture: any
-Multi-Arch: same
Section: libdevel
Provides: libmysqld-dev
Pre-Depends: ${misc:Pre-Depends}
diff --git a/debian/rules b/debian/rules
index 920b6097d0a..a2bd0531805 100755
--- a/debian/rules
+++ b/debian/rules
@@ -12,14 +12,16 @@ include /usr/share/dpkg/default.mk
CFLAGS+=$(CPPFLAGS)
CXXFLAGS+=$(CPPFLAGS)
+# Only do a strict symbol checking on Linux
+ifneq (,$(filter linux,$(DEB_HOST_ARCH_OS)))
+ DPKG_GENSYMBOLS_CHECK_LEVEL := 4
+endif
+
BUILDDIR := builddir
DEB_VERSION_REVISION := $(shell echo $(DEB_VERSION) | sed -e 's/^.*-//')
RELEASE := $(shell lsb_release -r -s) # Use changelog based DEB_DISTRIBUTION instead?
TMP:=$(CURDIR)/debian/tmp
-CC := $(DEB_HOST_GNU_TYPE)-gcc
-CXX := $(DEB_HOST_GNU_TYPE)-g++
-
# According to Debian Policy version 4.2.0 builds should be as verbose as
# possible unless 'terse' is specifically passed.
ifeq (,$(filter terse,$(DEB_BUILD_OPTIONS)))
@@ -36,18 +38,20 @@ else
NUMJOBS = 1
endif
-# Ignore test suite exit code on unstable platforms
-ifeq ($(DEB_HOST_ARCH),$(filter $(DEB_HOST_ARCH),mips mipsel mips64el alpha powerpc sh4 hurd-i386 sparc64 kfreebsd-i386 kfreebsd-amd64))
- TESTSUITE_FAIL_CMD:=true
-else
- TESTSUITE_FAIL_CMD:=exit 1
-endif
-
# RocksDB cannot build on 32-bit platforms
ifeq (32,$(DEB_HOST_ARCH_BITS))
CMAKEFLAGS += -DPLUGIN_ROCKSDB=NO
endif
+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))
+ CMAKEFLAGS += -DSTACK_DIRECTION=-1
+ endif
+ ifneq (,$(filter $(DEB_HOST_ARCH_CPU),hppa))
+ CMAKEFLAGS += -DSTACK_DIRECTION=1
+ endif
+endif
+
# Add extra flag to avoid WolfSSL code crashing the entire mariadbd on s390x. This
# can be removed once upstream has made the code s390x compatible, see
# https://jira.mariadb.org/browse/MDEV-21705 and
@@ -81,12 +85,12 @@ endif
# Don't build ColumnStore as part of the native build, only build it when
# triggered by autobake-deb.sh. Saves build time and disk space.
- mkdir -p $(BUILDDIR) && cd $(BUILDDIR) && \
- sh -c 'PATH=$${MYSQL_BUILD_PATH:-"/usr/lib/ccache:/usr/local/bin:/usr/bin:/bin"} \
- CC=${CC} \
- CXX=${CXX} \
- cmake -DCMAKE_INSTALL_PREFIX=/usr \
+ PATH=$${MYSQL_BUILD_PATH:-"/usr/lib/ccache:/usr/local/bin:/usr/bin:/bin"} \
+ NO_UPDATE_BUILD_VERSION=1 \
+ dh_auto_configure --builddirectory=$(BUILDDIR) -- \
+ -DCMAKE_BUILD_TYPE=RelWithDebInfo \
$(CMAKEFLAGS) \
+ $(if $(filter $(DEB_BUILD_ARCH),$(DEB_HOST_ARCH)),,-DIMPORT_EXECUTABLES=$(CURDIR)/builddir-native/import_executables.cmake) \
-DCOMPILATION_COMMENT="mariadb.org binary distribution" \
-DMYSQL_SERVER_SUFFIX="-$(DEB_VERSION_REVISION)" \
-DSYSTEM_TYPE="debian-$(DEB_HOST_GNU_SYSTEM)" \
@@ -96,7 +100,7 @@ endif
-DPLUGIN_CASSANDRA=NO \
-DPLUGIN_AWS_KEY_MANAGEMENT=NO \
-DPLUGIN_COLUMNSTORE=NO \
- -DDEB=$(DEB_VENDOR) ..'
+ -DDEB=$(DEB_VENDOR)
# This is needed, otherwise 'make test' will run before binaries have been built
override_dh_auto_build: