Commit 418381bf authored by Otto Kekäläinen's avatar Otto Kekäläinen Committed by Marko Mäkelä

MDEV-25090: Deb: Use libpmem-dev when available

Updating the debian/control file will automatically update the dependencies
in all CI environments that directly read the debian/control file, such
as Salsa-CI and buildbot.mariadb.org to some degree.
(https://github.com/MariaDB/mariadb.org-tools/issues/43)

On Debian/Ubuntu releases that don't have libpmem-dev available,
automatically omit it.

Debian/Ubuntu availability visible at:
- https://packages.debian.org/search?searchon=names&keywords=libpmem-dev
- https://packages.ubuntu.com/search?searchon=names&keywords=libpmem-dev

Also modify debian/rules to activate the use of PMEM, as it does not seem
to activate automatically.

The scope of this change is also Debian/Ubuntu only. No RPM or Windows or
Mac changes are included in this commit.

This commit does not update the external libmariadb or ColumnStore
CI pipelines, as those are maintained in different repositories.
parent 124b72cb
......@@ -62,6 +62,7 @@ addons:
- libnuma-dev
- libpam0g-dev
- libpcre2-dev
- libpmem-dev
- libreadline-gplv2-dev
- libsnappy-dev
- libssl-dev
......
......@@ -106,6 +106,14 @@ then
sed '/-DWITH_URING=yes/d' -i debian/rules
fi
# From Debian Buster/Ubuntu Focal onwards libpmem-dev is available
# Don't reference it when built in distro releases that lack it
if ! apt-cache madison libpmem-dev | grep 'libpmem-dev' >/dev/null 2>&1
then
sed '/libpmem-dev/d' -i debian/control
sed '/-DWITH_PMEM=yes/d' -i debian/rules
fi
# Adjust changelog, add new version
echo "Incrementing changelog and starting build scripts"
......
......@@ -32,6 +32,7 @@ Build-Depends: bison,
libnuma-dev [linux-any],
libpam0g-dev,
libpcre2-dev,
libpmem-dev [amd64 arm64 ppc64el],
libsnappy-dev,
libssl-dev,
libssl-dev:native,
......
......@@ -43,6 +43,7 @@ ifeq (32,$(DEB_HOST_ARCH_BITS))
CMAKEFLAGS += -DPLUGIN_ROCKSDB=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))
CMAKEFLAGS += -DSTACK_DIRECTION=-1
......@@ -52,6 +53,12 @@ ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
endif
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))
CMAKEFLAGS += -DWITH_PMEM=yes
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
......
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