Bug#833707: libtasn1-6 FTCBFS: runs help2man on host architecture binaries

Helmut Grohne helmut at subdivi.de
Mon Aug 8 04:32:59 UTC 2016


Source: libtasn1-6
Version: 4.9-2
Tags: patch
User: helmutg at debian.org
Usertags: rebootstrap

Hi Andreas,

Thanks for your libtasn1-6 maintenance. Even though the addition of
help2man improves our builds-from-source experience, it regresses the
ability to cross compile libtasn1-6, which is needed for bootstrapping
Debian from source.

help2man issues are always difficult, so my general advise is to avoid
it wherever possible. For libtasn1-6 I propose to simply run help2man on
the system binaries when cross compiling. I am attaching a patch for
this approach and verified that it cross builds correctly (using the
binaries from the system libtasn1-bin) and that native builds keep using
the fresh versions. The new dependency on libtasn1-bin is marked with a
<cross> profile to avoid dependency loops. Is that patch acceptable? Do
you have a better idea or preferred approach?

Helmut
-------------- next part --------------
diff --minimal -Nru libtasn1-6-4.9/debian/changelog libtasn1-6-4.9/debian/changelog
--- libtasn1-6-4.9/debian/changelog	2016-08-07 13:55:39.000000000 +0200
+++ libtasn1-6-4.9/debian/changelog	2016-08-08 06:12:31.000000000 +0200
@@ -1,3 +1,10 @@
+libtasn1-6 (4.9-3.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS due to help2man. Closes: #-1
+
+ -- Helmut Grohne <helmut at subdivi.de>  Mon, 08 Aug 2016 06:12:21 +0200
+
 libtasn1-6 (4.9-3) unstable; urgency=medium
 
   * Upload to unstable.
diff --minimal -Nru libtasn1-6-4.9/debian/control libtasn1-6-4.9/debian/control
--- libtasn1-6-4.9/debian/control	2016-08-07 13:55:14.000000000 +0200
+++ libtasn1-6-4.9/debian/control	2016-08-08 06:12:19.000000000 +0200
@@ -3,7 +3,7 @@
 Maintainer: Debian GnuTLS Maintainers <pkg-gnutls-maint at lists.alioth.debian.org>
 Uploaders: Andreas Metzler <ametzler at debian.org>, Eric Dorland <eric at debian.org>, James Westby <jw+debian at jameswestby.net>, Simon Josefsson <simon at josefsson.org>
 Build-Depends: debhelper (>= 9.20150628), bison, dh-autoreconf,
- help2man
+ help2man, libtasn1-bin <cross>
 Build-Depends-Indep: gtk-doc-tools, texinfo, texlive-latex-base
 Standards-Version: 3.9.8
 Priority: standard
diff --minimal -Nru libtasn1-6-4.9/debian/patches/30_ftcbfs_help2man.patch libtasn1-6-4.9/debian/patches/30_ftcbfs_help2man.patch
--- libtasn1-6-4.9/debian/patches/30_ftcbfs_help2man.patch	1970-01-01 01:00:00.000000000 +0100
+++ libtasn1-6-4.9/debian/patches/30_ftcbfs_help2man.patch	2016-08-08 06:25:55.000000000 +0200
@@ -0,0 +1,55 @@
+From: Helmut Grohne <helmut at subdivi.de>
+Last-Update: 2016-08-08
+Subject: run help2man on native binaries to fix cross compilation
+
+Index: libtasn1-6-4.9/configure.ac
+===================================================================
+--- libtasn1-6-4.9.orig/configure.ac
++++ libtasn1-6-4.9/configure.ac
+@@ -99,6 +99,8 @@
+   gl_WARN_ADD([-fdiagnostics-show-option])
+ fi
+ 
++AM_CONDITIONAL([CROSS_COMPILING],[test "${cross_compiling}" = yes])
++
+ AC_CONFIG_FILES([
+   Makefile
+   doc/Makefile
+Index: libtasn1-6-4.9/doc/Makefile.am
+===================================================================
+--- libtasn1-6-4.9.orig/doc/Makefile.am
++++ libtasn1-6-4.9/doc/Makefile.am
+@@ -34,21 +34,30 @@
+ dist_man_MANS = $(gdoc_MANS) asn1Parser.1 asn1Coding.1 asn1Decoding.1
+ 
+ HELP2MAN_OPTS = --info-page libtasn1
++if CROSS_COMPILING
++asn1ParserEXE = asn1Parser
++asn1CodingEXE = asn1Coding
++asn1DecodingEXE = asn1Decoding
++else
++asn1ParserEXE = $(top_builddir)/src/asn1Parser$(EXEEXT)
++asn1CodingEXE = $(top_builddir)/src/asn1Coding$(EXEEXT)
++asn1DecodingEXE = $(top_builddir)/src/asn1Decoding$(EXEEXT)
++endif
+ 
+ asn1Parser.1: $(top_srcdir)/src/asn1Parser.c $(top_srcdir)/configure.ac
+ 	$(HELP2MAN) $(HELP2MAN_OPTS) \
+ 		--name="ASN.1 syntax tree generator for libtasn1" \
+-		--output=$@ $(top_builddir)/src/asn1Parser$(EXEEXT)
++		--output=$@ $(asn1ParserEXE)
+ 
+ asn1Coding.1: $(top_srcdir)/src/asn1Coding.c $(top_srcdir)/configure.ac
+ 	$(HELP2MAN) $(HELP2MAN_OPTS) \
+ 		--name="ASN.1 DER encoder" \
+-		--output=$@ $(top_builddir)/src/asn1Coding$(EXEEXT)
++		--output=$@ $(asn1CodingEXE)
+ 
+ asn1Decoding.1: $(top_srcdir)/src/asn1Decoding.c $(top_srcdir)/configure.ac
+ 	$(HELP2MAN) $(HELP2MAN_OPTS) \
+ 		--name="ASN.1 DER decoder" \
+-		--output=$@ $(top_builddir)/src/asn1Decoding$(EXEEXT)
++		--output=$@ $(asn1DecodingEXE)
+ 
+ gdoc_MANS =
+ gdoc_MANS += man/asn1_get_length_der.3
diff --minimal -Nru libtasn1-6-4.9/debian/patches/series libtasn1-6-4.9/debian/patches/series
--- libtasn1-6-4.9/debian/patches/series	2016-08-07 13:55:14.000000000 +0200
+++ libtasn1-6-4.9/debian/patches/series	2016-08-08 06:12:37.000000000 +0200
@@ -1 +1,2 @@
 20_configure-don-t-add-Werror-to-build-flags.patch
+30_ftcbfs_help2man.patch


More information about the Pkg-gnutls-maint mailing list