[Debian-med-packaging] Bug#985410: bioawk FTCBFS -- execute maketab during build
Nilesh Patra
nilesh at debian.org
Wed Mar 17 17:01:37 GMT 2021
Package: bioawk
Version: 1.0-3
Severity: normal
Tags: patch
X-Debbugs-Cc: nilesh at debian.org, debian-cross at lists.debian.org
Dear Maintainer,
Since bioawk seems to execute maketab to generate proctab.c which is not allowed during cross build
it could be simply built with build compiler to generate proctab.c
Since maketab binary is not being installed, such a compilation would
not give any exec format problems. I compared the output of ./maketab
i.e. proctab.c across amd64, i386 and arm64 as well as skimmed through
the code. Compiling this particular file with build compiler does not
seem like a problem.
I'm attaching my patch along, and will commit to salsa if it looks good.
-- System Information:
Debian Release: bullseye/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Kernel: Linux 5.7.0-2-amd64 (SMP w/8 CPU threads)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
-------------- next part --------------
diff --git a/debian/changelog b/debian/changelog
index e2280a3..f74bbe9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+bioawk (1.0-4) UNRELEASED; urgency=medium
+
+ * d/p/cross.patch: Fix non-cross buildability
+ * Use dpkg buildtools to set CC and CC_FOR_BUILD
+
+ -- Nilesh Patra <nilesh at debian.org> Wed, 17 Mar 2021 22:23:42 +0530
+
bioawk (1.0-3) unstable; urgency=medium
* Change test dependency from swarm to
diff --git a/debian/patches/cross.patch b/debian/patches/cross.patch
new file mode 100644
index 0000000..1b56827
--- /dev/null
+++ b/debian/patches/cross.patch
@@ -0,0 +1,14 @@
+Description: Compile maketab with build compiler, since it executes during build time - the generated proctab.c does not seem to vary across arches
+Author: Nilesh Patra <nilesh at debian.org>
+Last-Update: 2021-03-17
+--- a/Makefile
++++ b/Makefile
+@@ -53,7 +53,7 @@
+ ./maketab >proctab.c
+
+ maketab: ytab.h maketab.c
+- $(CC) $(CFLAGS) $(CPPFLAGS) maketab.c -o maketab $(LDFLAGS)
++ $(CC_FOR_BUILD) $(CFLAGS) $(CPPFLAGS) maketab.c -o maketab $(LDFLAGS)
+
+ names:
+ @echo $(LISTING)
diff --git a/debian/patches/series b/debian/patches/series
index a17d1e6..dea1943 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
Makefile.patch
hardening.patch
+cross.patch
diff --git a/debian/rules b/debian/rules
index dd4dd7e..fd7fd8d 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,6 +1,8 @@
#!/usr/bin/make -f
export DH_VERBOSE = 1
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+DPKG_EXPORT_BUILDTOOLS = nonempty
+include /usr/share/dpkg/buildtools.mk
%:
dh $@
More information about the Debian-med-packaging
mailing list