[Pkg-samba-maint] Bug#1030593: tdb FTCBFS: performs run checks

Helmut Grohne helmut at subdivi.de
Sun Feb 5 11:34:35 GMT 2023


Source: tdb
Version: 1.4.8-2
Tags: patch
User: debian-cross at lists.debian.org
Usertags: ftcbfs

Thank you for having made tdb cross buildable in the presence of
qemu-user-static! I'd like to get it going without as well as that's
what cross builders usually do. The distinction here is that you'd pass
the cross profile for "normal" cross builds (those without qemu) and
skip this profile for ones supported by qemu. Thus, when the cross
profile is present, a --cross-answers file is passed. I've also slightly
updated the build system to avoid unnecessary checks. Consider applying
the attached patch.

Helmut
-------------- next part --------------
diff --minimal -Nru tdb-1.4.8/debian/changelog tdb-1.4.8/debian/changelog
--- tdb-1.4.8/debian/changelog	2023-02-04 15:12:31.000000000 +0100
+++ tdb-1.4.8/debian/changelog	2023-02-05 09:50:36.000000000 +0100
@@ -1,3 +1,10 @@
+tdb (1.4.8-2.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: Avoid run checks. (Closes: #-1)
+
+ -- Helmut Grohne <helmut at subdivi.de>  Sun, 05 Feb 2023 09:50:36 +0100
+
 tdb (1.4.8-2) unstable; urgency=medium
 
   * d/rules: build for all installed py3versions
diff --minimal -Nru tdb-1.4.8/debian/clean tdb-1.4.8/debian/clean
--- tdb-1.4.8/debian/clean	1970-01-01 01:00:00.000000000 +0100
+++ tdb-1.4.8/debian/clean	2023-02-05 09:50:36.000000000 +0100
@@ -0,0 +1 @@
+debian/cross_answers.txt
diff --minimal -Nru tdb-1.4.8/debian/patches/cross.patch tdb-1.4.8/debian/patches/cross.patch
--- tdb-1.4.8/debian/patches/cross.patch	1970-01-01 01:00:00.000000000 +0100
+++ tdb-1.4.8/debian/patches/cross.patch	2023-02-05 09:50:36.000000000 +0100
@@ -0,0 +1,22 @@
+--- tdb-1.4.8.orig/buildtools/wafsamba/wscript
++++ tdb-1.4.8/buildtools/wafsamba/wscript
+@@ -373,7 +373,7 @@
+     conf.CHECK_CODE('printf("hello world")',
+                     define='HAVE_SIMPLE_C_PROG',
+                     mandatory=True,
+-                    execute=True,
++                    execute=not conf.env.CROSS_COMPILE,
+                     headers='stdio.h',
+                     msg='Checking simple C program')
+ 
+--- tdb-1.4.8.orig/buildtools/wafsamba/samba_conftests.py
++++ tdb-1.4.8/buildtools/wafsamba/samba_conftests.py
+@@ -440,7 +440,7 @@
+ def CHECK_UNAME(conf):
+     '''setup SYSTEM_UNAME_* defines'''
+     ret = True
+-    for v in "sysname machine release version".split():
++    for v in "sysname".split():
+         if not conf.CHECK_CODE('''
+                                int printf(const char *format, ...);
+                                struct utsname n;
diff --minimal -Nru tdb-1.4.8/debian/patches/series tdb-1.4.8/debian/patches/series
--- tdb-1.4.8/debian/patches/series	2022-09-09 12:37:55.000000000 +0200
+++ tdb-1.4.8/debian/patches/series	2023-02-05 09:50:36.000000000 +0100
@@ -1,2 +1,3 @@
 30_tdb_logging_func.diff
 40_test_transaction_expand_non_fatal.diff
+cross.patch
diff --minimal -Nru tdb-1.4.8/debian/rules tdb-1.4.8/debian/rules
--- tdb-1.4.8/debian/rules	2023-01-27 21:07:11.000000000 +0100
+++ tdb-1.4.8/debian/rules	2023-02-05 09:50:36.000000000 +0100
@@ -31,6 +31,32 @@
 : %:
 	dh $@
 
+debian/cross_answers.txt:
+	:> $@
+ifeq ($(DEB_HOST_ARCH_OS),linux)
+	echo "Checking uname sysname type: 'Linux'" >> $@
+endif
+ifeq ($(DEB_HOST_ARCH_BITS),32)
+	echo "Checking getconf LFS_CFLAGS: -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES" >> $@
+	echo "Checking for large file support without additional flags: NO" >> $@
+	echo "Checking for -D_FILE_OFFSET_BITS=64: OK" >> $@
+	echo "Checking for -D_LARGE_FILES: OK" >> $@
+else
+	echo "Checking getconf LFS_CFLAGS:" >> $@
+	echo "Checking for large file support without additional flags: OK" >> $@
+endif
+ifeq ($(DEB_HOST_ARCH_LIBC),gnu)
+	echo "Checking for working strptime: OK" >> $@
+	echo "Checking for C99 vsnprintf: OK" >> $@
+	echo "Checking for HAVE_SECURE_MKSTEMP: OK" >> $@
+	echo "Checking for HAVE_SHARED_MMAP: OK" >> $@
+	echo "Checking for HAVE_MREMAP: OK" >> $@
+	echo "Checking for HAVE_INCOHERENT_MMAP: NO" >> $@
+	echo "rpath library support: OK" >> $@
+	echo "-Wl,--version-script support: OK" >> $@
+	echo "Checking correct behavior of strtoll: NO" >> $@
+endif
+
 # Build in bld/pyNN/ subdirs (named after python version),
 # Since wafsamba can't build things in a named subdir,
 # we have to copy (link) whole source dir into each build subdir.
@@ -40,7 +66,7 @@
 py-targets = $(patsubst %, bld/%/$(strip $1), ${PY3VERSIONS})
 
 override_dh_auto_configure: $(call py-targets, stamp-config)
-$(call py-targets, stamp-config): %/stamp-config:
+$(call py-targets, stamp-config): %/stamp-config: $(if $(filter cross,$(DEB_BUILD_PROFILES)),debian/cross_answers.txt)
 	@echo "=== running configure in $* ==="
 	mkdir -p $*
 	cp -al $$(ls -1 | egrep -v '^(bld|debian)$$') $*
@@ -53,6 +79,7 @@
 		--libdir=/usr/lib/${DEB_HOST_MULTIARCH} \
 		--disable-rpath --disable-rpath-install \
 		--bundled-libraries=NONE \
+		$(if $(filter cross,$(DEB_BUILD_PROFILES)),--cross-compile --cross-answers=$(CURDIR)/debian/cross_answers.txt) \
 
 	touch $@
 


More information about the Pkg-samba-maint mailing list