summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOtto Kekäläinen <otto@kekalainen.net>2021-03-10 09:51:42 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2021-03-17 13:23:18 +0200
commit418381bf99291b7faf24629426bb1c4a99cc943e (patch)
tree6aebbd08a650f9be08589c5387810536121a7401
parent124b72cb830fb85505eb46cfb19f639917c285f2 (diff)
downloadmariadb-git-418381bf99291b7faf24629426bb1c4a99cc943e.tar.gz
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.
-rw-r--r--.travis.yml1
-rwxr-xr-xdebian/autobake-deb.sh8
-rw-r--r--debian/control1
-rwxr-xr-xdebian/rules7
4 files changed, 17 insertions, 0 deletions
diff --git a/.travis.yml b/.travis.yml
index 7d7a9ecfeb2..f7f57b752d4 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -62,6 +62,7 @@ addons:
- libnuma-dev
- libpam0g-dev
- libpcre2-dev
+ - libpmem-dev
- libreadline-gplv2-dev
- libsnappy-dev
- libssl-dev
diff --git a/debian/autobake-deb.sh b/debian/autobake-deb.sh
index 3d2071e86e6..a5677c7fd8c 100755
--- a/debian/autobake-deb.sh
+++ b/debian/autobake-deb.sh
@@ -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"
diff --git a/debian/control b/debian/control
index 65130356b99..f3c3b2674f7 100644
--- a/debian/control
+++ b/debian/control
@@ -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,
diff --git a/debian/rules b/debian/rules
index c8d000c5bcb..a8bd26d43df 100755
--- a/debian/rules
+++ b/debian/rules
@@ -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