Commit ea568419 authored by Otto Kekäläinen's avatar Otto Kekäläinen

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.
parent ff36394c
...@@ -23,22 +23,25 @@ Build-Depends: bison, ...@@ -23,22 +23,25 @@ Build-Depends: bison,
libcrack2-dev (>= 2.9.0), libcrack2-dev (>= 2.9.0),
libcurl4-openssl-dev | libcurl4-dev, libcurl4-openssl-dev | libcurl4-dev,
libedit-dev, libedit-dev,
libedit-dev:native,
libjemalloc-dev [linux-any], libjemalloc-dev [linux-any],
libjudy-dev, libjudy-dev,
libkrb5-dev, libkrb5-dev,
liblz4-dev, liblz4-dev,
libncurses5-dev (>= 5.0-6~), libncurses5-dev (>= 5.0-6~),
libnuma-dev [!armhf], libncurses5-dev:native (>= 5.0-6~),
libnuma-dev [linux-any],
libpam0g-dev, libpam0g-dev,
libpcre2-dev, libpcre2-dev,
libreadline-gplv2-dev [i386 amd64], libreadline-gplv2-dev [i386 amd64],
libsnappy-dev, libsnappy-dev,
libssl-dev | libssl1.0-dev, libssl-dev,
libssl-dev:native,
libsystemd-dev [linux-any], libsystemd-dev [linux-any],
libxml2-dev, libxml2-dev,
libzstd-dev, libzstd-dev,
lsb-release, lsb-release,
perl, perl:any,
po-debconf, po-debconf,
psmisc, psmisc,
unixodbc-dev, unixodbc-dev,
...@@ -52,7 +55,6 @@ Vcs-Git: https://github.com/MariaDB/server.git ...@@ -52,7 +55,6 @@ Vcs-Git: https://github.com/MariaDB/server.git
Package: libmariadb-dev Package: libmariadb-dev
Architecture: any Architecture: any
Multi-Arch: same
Section: libdevel Section: libdevel
Depends: libmariadb3 (= ${binary:Version}), Depends: libmariadb3 (= ${binary:Version}),
zlib1g-dev, zlib1g-dev,
...@@ -188,7 +190,6 @@ Description: Virtual package to satisfy external libmysqlclient18 depends ...@@ -188,7 +190,6 @@ Description: Virtual package to satisfy external libmysqlclient18 depends
Package: libmariadbd19 Package: libmariadbd19
Architecture: any Architecture: any
Multi-Arch: same
Section: libs Section: libs
Depends: ${misc:Depends}, Depends: ${misc:Depends},
${shlibs:Depends} ${shlibs:Depends}
...@@ -204,7 +205,6 @@ Description: MariaDB embedded database, shared library ...@@ -204,7 +205,6 @@ Description: MariaDB embedded database, shared library
Package: libmariadbd-dev Package: libmariadbd-dev
Architecture: any Architecture: any
Multi-Arch: same
Section: libdevel Section: libdevel
Provides: libmysqld-dev Provides: libmysqld-dev
Pre-Depends: ${misc:Pre-Depends} Pre-Depends: ${misc:Pre-Depends}
......
...@@ -12,14 +12,16 @@ include /usr/share/dpkg/default.mk ...@@ -12,14 +12,16 @@ include /usr/share/dpkg/default.mk
CFLAGS+=$(CPPFLAGS) CFLAGS+=$(CPPFLAGS)
CXXFLAGS+=$(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 BUILDDIR := builddir
DEB_VERSION_REVISION := $(shell echo $(DEB_VERSION) | sed -e 's/^.*-//') DEB_VERSION_REVISION := $(shell echo $(DEB_VERSION) | sed -e 's/^.*-//')
RELEASE := $(shell lsb_release -r -s) # Use changelog based DEB_DISTRIBUTION instead? RELEASE := $(shell lsb_release -r -s) # Use changelog based DEB_DISTRIBUTION instead?
TMP:=$(CURDIR)/debian/tmp 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 # According to Debian Policy version 4.2.0 builds should be as verbose as
# possible unless 'terse' is specifically passed. # possible unless 'terse' is specifically passed.
ifeq (,$(filter terse,$(DEB_BUILD_OPTIONS))) ifeq (,$(filter terse,$(DEB_BUILD_OPTIONS)))
...@@ -36,18 +38,20 @@ else ...@@ -36,18 +38,20 @@ else
NUMJOBS = 1 NUMJOBS = 1
endif 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 # RocksDB cannot build on 32-bit platforms
ifeq (32,$(DEB_HOST_ARCH_BITS)) ifeq (32,$(DEB_HOST_ARCH_BITS))
CMAKEFLAGS += -DPLUGIN_ROCKSDB=NO CMAKEFLAGS += -DPLUGIN_ROCKSDB=NO
endif 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 # 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 # can be removed once upstream has made the code s390x compatible, see
# https://jira.mariadb.org/browse/MDEV-21705 and # https://jira.mariadb.org/browse/MDEV-21705 and
...@@ -81,12 +85,12 @@ endif ...@@ -81,12 +85,12 @@ endif
# Don't build ColumnStore as part of the native build, only build it when # 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. # triggered by autobake-deb.sh. Saves build time and disk space.
mkdir -p $(BUILDDIR) && cd $(BUILDDIR) && \ PATH=$${MYSQL_BUILD_PATH:-"/usr/lib/ccache:/usr/local/bin:/usr/bin:/bin"} \
sh -c 'PATH=$${MYSQL_BUILD_PATH:-"/usr/lib/ccache:/usr/local/bin:/usr/bin:/bin"} \ NO_UPDATE_BUILD_VERSION=1 \
CC=${CC} \ dh_auto_configure --builddirectory=$(BUILDDIR) -- \
CXX=${CXX} \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \
cmake -DCMAKE_INSTALL_PREFIX=/usr \
$(CMAKEFLAGS) \ $(CMAKEFLAGS) \
$(if $(filter $(DEB_BUILD_ARCH),$(DEB_HOST_ARCH)),,-DIMPORT_EXECUTABLES=$(CURDIR)/builddir-native/import_executables.cmake) \
-DCOMPILATION_COMMENT="mariadb.org binary distribution" \ -DCOMPILATION_COMMENT="mariadb.org binary distribution" \
-DMYSQL_SERVER_SUFFIX="-$(DEB_VERSION_REVISION)" \ -DMYSQL_SERVER_SUFFIX="-$(DEB_VERSION_REVISION)" \
-DSYSTEM_TYPE="debian-$(DEB_HOST_GNU_SYSTEM)" \ -DSYSTEM_TYPE="debian-$(DEB_HOST_GNU_SYSTEM)" \
...@@ -96,7 +100,7 @@ endif ...@@ -96,7 +100,7 @@ endif
-DPLUGIN_CASSANDRA=NO \ -DPLUGIN_CASSANDRA=NO \
-DPLUGIN_AWS_KEY_MANAGEMENT=NO \ -DPLUGIN_AWS_KEY_MANAGEMENT=NO \
-DPLUGIN_COLUMNSTORE=NO \ -DPLUGIN_COLUMNSTORE=NO \
-DDEB=$(DEB_VENDOR) ..' -DDEB=$(DEB_VENDOR)
# This is needed, otherwise 'make test' will run before binaries have been built # This is needed, otherwise 'make test' will run before binaries have been built
override_dh_auto_build: override_dh_auto_build:
......
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