Control: tags 1001354 + pending Dear maintainer,
I've prepared an NMU for tarantool (versioned as 2.6.0-1.1) and uploaded it to DELAYED/14. Please feel free to tell me if I should cancel it. cu Adrian
diff -Nru tarantool-2.6.0/debian/changelog tarantool-2.6.0/debian/changelog --- tarantool-2.6.0/debian/changelog 2020-08-22 13:56:57.000000000 +0300 +++ tarantool-2.6.0/debian/changelog 2022-09-12 08:51:23.000000000 +0300 @@ -1,3 +1,11 @@ +tarantool (2.6.0-1.1) unstable; urgency=low + + * Non-maintainer upload. + * Backport upstream fix for FTBFS with glibc 2.34. (Closes: #1001354) + * Use the system libcurl/libyaml/libzstd instead of the bundled ones. + + -- Adrian Bunk <b...@debian.org> Mon, 12 Sep 2022 08:51:23 +0300 + tarantool (2.6.0-1) unstable; urgency=medium * New upstream version. diff -Nru tarantool-2.6.0/debian/control tarantool-2.6.0/debian/control --- tarantool-2.6.0/debian/control 2020-08-22 13:56:57.000000000 +0300 +++ tarantool-2.6.0/debian/control 2022-09-12 08:51:23.000000000 +0300 @@ -12,8 +12,9 @@ libssl-dev, libunwind-dev | libunwind8-dev | libunwind7-dev, libicu-dev, -# libcurl build dependencies - autoconf, automake, libtool, zlib1g-dev, + libcurl4-openssl-dev, + libyaml-dev, + libzstd-dev, Section: database Standards-Version: 3.9.8 Homepage: http://tarantool.org/ diff -Nru tarantool-2.6.0/debian/patches/0001-Move-xmalloc-to-trivia-util.h.patch tarantool-2.6.0/debian/patches/0001-Move-xmalloc-to-trivia-util.h.patch --- tarantool-2.6.0/debian/patches/0001-Move-xmalloc-to-trivia-util.h.patch 1970-01-01 02:00:00.000000000 +0200 +++ tarantool-2.6.0/debian/patches/0001-Move-xmalloc-to-trivia-util.h.patch 2022-09-12 08:51:23.000000000 +0300 @@ -0,0 +1,47 @@ +From 6cc09f9717ebb657e9136ad138aa7e0ba5093704 Mon Sep 17 00:00:00 2001 +From: Vladimir Davydov <vdavy...@tarantool.org> +Date: Mon, 27 Sep 2021 14:21:57 +0300 +Subject: Move xmalloc to trivia/util.h + +We want to use the xmalloc helper throughout the code, not only in +the core lib. Move its definition to trivia/util.h and use fprintf+exit +instead of say/panic in order not to create circular dependencies. +--- + src/trivia/util.h | 21 +++++++++++++++++++++ + 1 file changed, 21 insertions(+) + +diff --git a/src/trivia/util.h b/src/trivia/util.h +index da5a3705e..82c5911a4 100644 +--- a/src/trivia/util.h ++++ b/src/trivia/util.h +@@ -104,6 +104,27 @@ strnindex(const char **haystack, const char *needle, uint32_t len, uint32_t hmax + #define lengthof(array) (sizeof (array) / sizeof ((array)[0])) + #endif + ++/** ++ * An x* variant of a memory allocation function calls the original function ++ * and panics if it fails (i.e. it should never return NULL). ++ */ ++#define xalloc_impl(size, func, args...) \ ++ ({ \ ++ void *ret = func(args); \ ++ if (unlikely(ret == NULL)) { \ ++ fprintf(stderr, "Can't allocate %zu bytes at %s:%d", \ ++ (size_t)(size), __FILE__, __LINE__); \ ++ exit(EXIT_FAILURE); \ ++ } \ ++ ret; \ ++ }) ++ ++#define xmalloc(size) xalloc_impl((size), malloc, (size)) ++#define xcalloc(n, size) xalloc_impl((n) * (size), calloc, (n), (size)) ++#define xrealloc(ptr, size) xalloc_impl((size), realloc, (ptr), (size)) ++#define xstrdup(s) xalloc_impl(strlen((s)) + 1, strdup, (s)) ++#define xstrndup(s, n) xalloc_impl((n) + 1, strndup, (s), (n)) ++ + /** \cond public */ + + /** +-- +2.30.2 + diff -Nru tarantool-2.6.0/debian/patches/0002-build-fix-build-with-glibc-2.34.patch tarantool-2.6.0/debian/patches/0002-build-fix-build-with-glibc-2.34.patch --- tarantool-2.6.0/debian/patches/0002-build-fix-build-with-glibc-2.34.patch 1970-01-01 02:00:00.000000000 +0200 +++ tarantool-2.6.0/debian/patches/0002-build-fix-build-with-glibc-2.34.patch 2022-09-12 08:51:23.000000000 +0300 @@ -0,0 +1,74 @@ +From 481989f2d87dc919b576d4f2e44a15ff55da566e Mon Sep 17 00:00:00 2001 +From: Andrey Saranchin <andrey22102...@gmail.com> +Date: Tue, 14 Dec 2021 14:30:03 +0300 +Subject: build: fix build with glibc-2.34 + +Macros SIGSTKSZ used to be an integral constant but +in glibc-2.34 it turned into a runtime function so it +cannot be used as constant known size for arrays anymore. + +Beyond this, SIGSTKSZ is not enough for alt. signal stack size +when you use ASAN, so the size was increased. + +Closes #6686 +--- + .../gh-6686-build-with-glibc-2-34.md | 4 ++++ + test/unit/guard.cc | 19 ++++++++++++++----- + 2 files changed, 18 insertions(+), 5 deletions(-) + create mode 100644 changelogs/unreleased/gh-6686-build-with-glibc-2-34.md + +diff --git a/changelogs/unreleased/gh-6686-build-with-glibc-2-34.md b/changelogs/unreleased/gh-6686-build-with-glibc-2-34.md +new file mode 100644 +index 000000000..c200e336c +--- /dev/null ++++ b/changelogs/unreleased/gh-6686-build-with-glibc-2-34.md +@@ -0,0 +1,4 @@ ++## bugfix/build ++ ++* Fix build errors with glibc-2.34 (gh-6686). ++* Change size of alt. signal stack for ASAN needs. +diff --git a/test/unit/guard.cc b/test/unit/guard.cc +index a2953b829..4734dfb16 100644 +--- a/test/unit/guard.cc ++++ b/test/unit/guard.cc +@@ -28,16 +28,24 @@ stack_break_f(char *ptr) + return sum; + } + +-static char stack_buf[SIGSTKSZ]; +- + static int + main_f(va_list ap) + { + stack_t stack; +- stack.ss_sp = stack_buf; +- stack.ss_size = SIGSTKSZ; + stack.ss_flags = 0; +- sigaltstack(&stack, NULL); ++ /* ++ * It is said that SIGSTKSZ is not enough for one of llvm sanitizers ++ * (probably asan, because this test fails with segmentation fault if ++ * we use SIGSTKSZ as alternative signal stack size when we use it). ++ * https://github.com/llvm/llvm-project/blame/699231ab3c7dd8f028d868b103481fa901f3c721/compiler-rt/lib/sanitizer_common/sanitizer_posix_libcdep.cpp#L169 ++ */ ++ stack.ss_size = 4 * SIGSTKSZ; ++ stack.ss_sp = xmalloc(stack.ss_size); ++ if (sigaltstack(&stack, NULL) < 0) { ++ free(stack.ss_sp); ++ perror("sigaltstack"); ++ exit(EXIT_FAILURE); ++ } + struct sigaction sa; + sa.sa_handler = sigsegf_handler; + sigemptyset(&sa.sa_mask); +@@ -48,6 +56,7 @@ main_f(va_list ap) + int res = stack_break_f((char *)&stack); + + ev_break(loop(), EVBREAK_ALL); ++ free(stack.ss_sp); + return res; + } + +-- +2.30.2 + diff -Nru tarantool-2.6.0/debian/patches/series tarantool-2.6.0/debian/patches/series --- tarantool-2.6.0/debian/patches/series 1970-01-01 02:00:00.000000000 +0200 +++ tarantool-2.6.0/debian/patches/series 2022-09-12 08:51:23.000000000 +0300 @@ -0,0 +1,2 @@ +0001-Move-xmalloc-to-trivia-util.h.patch +0002-build-fix-build-with-glibc-2.34.patch diff -Nru tarantool-2.6.0/debian/rules tarantool-2.6.0/debian/rules --- tarantool-2.6.0/debian/rules 2020-08-22 13:56:57.000000000 +0300 +++ tarantool-2.6.0/debian/rules 2022-09-12 08:51:23.000000000 +0300 @@ -16,6 +16,9 @@ -DCMAKE_INSTALL_SYSCONFDIR=/etc \ -DCMAKE_INSTALL_LOCALSTATEDIR=/var \ -DENABLE_DIST=ON \ + -DENABLE_BUNDLED_LIBCURL=OFF \ + -DENABLE_BUNDLED_LIBYAML=OFF \ + -DENABLE_BUNDLED_ZSTD=OFF \ -DWITH_SYSVINIT=ON \ -DWITH_SYSTEMD=$(WITH_SYSTEMD)