Source: heimdal
Version: 7.8.git20221117.28daf24+dfsg-1
Tags: patch
User: debian-cr...@lists.debian.org
Usertags: cross-satisfiability ftcbfs

Thank you for applying my earlier patch aimed at reducing heimdal's
Build-Depends. At this time, there is one remaining dependency that
prevents cross compilation and it is python3. Note that python3 is used
as a code generator, so rather than a host architecture python3 a build
architecture python3 is needed. To achieve that, it should be annotated
:native or :any. Once that has changed, one can actually attempt a cross
build. That attempt quickly ends due to not finding ncurses, because it
didn't do a cross build. The relevant --build and --host flags are
missing from configure. Is there a reason for not using
dh_auto_configure? It would automatically pass them as needed. Once
added, the build progresses quite far until it fails finding
asn1_compile. The build system is clever enough to recognize that it
cannot run the built asn1_compile and tries running the system copy
instead, which isn't there. Unfortunately, asn1_compile does not reside
in a Multi-Arch: foreign package and thus is not readily available. I
propose splitting it out of heimdal-multidev into a heimdal-multidev-bin
package that contains architecture-independent tools. Once done, we can
depend on it (for cross compilation only to avoid a recursive
depdendency in native builds). Are you ok with such a split? We have
quite some prior art for this if you look for other packages matching
the pattern "*-bin", especially in the qt/kde ecosystem. I'm attaching a
patch for your convenience.

Helmut
diff --minimal -Nru heimdal-7.8.git20221117.28daf24+dfsg/debian/changelog 
heimdal-7.8.git20221117.28daf24+dfsg/debian/changelog
--- heimdal-7.8.git20221117.28daf24+dfsg/debian/changelog       2022-12-10 
06:29:20.000000000 +0100
+++ heimdal-7.8.git20221117.28daf24+dfsg/debian/changelog       2022-12-13 
07:40:05.000000000 +0100
@@ -1,3 +1,14 @@
+heimdal (7.8.git20221117.28daf24+dfsg-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Improve cross building: (Closes: #-1)
+    + Annotate python3 dependency with :native, used as code generator.
+    + Pass --build and --host to configure.
+    + Split asn1_compile to a Multi-Arch: foreign package and depend on it
+      for cross compilation.
+
+ -- Helmut Grohne <hel...@subdivi.de>  Tue, 13 Dec 2022 07:40:05 +0100
+
 heimdal (7.8.git20221117.28daf24+dfsg-1) unstable; urgency=medium
 
   * New upstream release.
diff --minimal -Nru heimdal-7.8.git20221117.28daf24+dfsg/debian/control 
heimdal-7.8.git20221117.28daf24+dfsg/debian/control
--- heimdal-7.8.git20221117.28daf24+dfsg/debian/control 2022-12-10 
06:00:37.000000000 +0100
+++ heimdal-7.8.git20221117.28daf24+dfsg/debian/control 2022-12-13 
07:40:05.000000000 +0100
@@ -9,6 +9,7 @@
                comerr-dev (>= 1.41.11),
                debhelper (>= 10),
                flex,
+               heimdal-multidev-bin <cross>,
                libcap-ng-dev [linux-any],
                libdb-dev,
                libedit-dev,
@@ -18,7 +19,7 @@
                libsqlite3-dev,
                netbase,
                pkg-config,
-               python3,
+               python3:native,
                texinfo,
                unzip,
 Vcs-Browser: https://salsa.debian.org/debian/heimdal
@@ -69,6 +70,7 @@
 Multi-Arch: no
 Conflicts: heimdal-clients (<< 0.4e-7), kerberos4kth-dev
 Depends: comerr-dev,
+         heimdal-multidev-bin (= ${binary:Version}),
          libasn1-8-heimdal (= ${binary:Version}),
          libgssapi3-heimdal (= ${binary:Version}),
          libhcrypto5-heimdal (= ${binary:Version}),
@@ -97,6 +99,21 @@
  build  against both Heimdal Kerberos and MIT Kerberos, then the
  multidev package should be used.
 
+Package: heimdal-multidev-bin
+Section: devel
+Architecture: any
+Multi-Arch: foreign
+Depends: ${misc:Depends}, ${shlibs:Depends}
+Breaks: heimdal-multidev (<< 7.8.git20221117.28daf24+dfsg-1.1~)
+Replaces: heimdal-multidev (<< 7.8.git20221117.28daf24+dfsg-1.1~)
+Description: Heimdal Kerberos - Multi-implementation Development Programs
+ Heimdal is a free implementation of Kerberos 5 that aims to be
+ compatible with MIT Kerberos.
+ .
+ This package provides executables needed for the versions of the Heimdal
+ development files that can be installed along-side MIT Kerberos development
+ files. Please use heimdal-multidev instead of using this package directly.
+
 Package: heimdal-dev
 Depends: heimdal-multidev (= ${binary:Version}), ${misc:Depends}
 Section: devel
diff --minimal -Nru 
heimdal-7.8.git20221117.28daf24+dfsg/debian/heimdal-multidev-bin.install 
heimdal-7.8.git20221117.28daf24+dfsg/debian/heimdal-multidev-bin.install
--- heimdal-7.8.git20221117.28daf24+dfsg/debian/heimdal-multidev-bin.install    
1970-01-01 01:00:00.000000000 +0100
+++ heimdal-7.8.git20221117.28daf24+dfsg/debian/heimdal-multidev-bin.install    
2022-12-13 07:40:05.000000000 +0100
@@ -0,0 +1,2 @@
+usr/sbin/heimdal/asn1_compile usr/bin
+usr/sbin/heimdal/asn1_print usr/bin
diff --minimal -Nru 
heimdal-7.8.git20221117.28daf24+dfsg/debian/heimdal-multidev.install 
heimdal-7.8.git20221117.28daf24+dfsg/debian/heimdal-multidev.install
--- heimdal-7.8.git20221117.28daf24+dfsg/debian/heimdal-multidev.install        
2022-11-20 00:21:31.000000000 +0100
+++ heimdal-7.8.git20221117.28daf24+dfsg/debian/heimdal-multidev.install        
2022-12-13 07:40:05.000000000 +0100
@@ -1,7 +1,5 @@
 usr/bin/krb5-config
 usr/share/man/man1/krb5-config.1
-usr/sbin/heimdal/asn1_compile usr/bin
-usr/sbin/heimdal/asn1_print usr/bin
 usr/sbin/heimdal/slc usr/bin
 usr/include/* usr/include/heimdal
 usr/lib/*/pkgconfig/heimdal-gssapi.pc
diff --minimal -Nru heimdal-7.8.git20221117.28daf24+dfsg/debian/rules 
heimdal-7.8.git20221117.28daf24+dfsg/debian/rules
--- heimdal-7.8.git20221117.28daf24+dfsg/debian/rules   2022-12-10 
06:00:37.000000000 +0100
+++ heimdal-7.8.git20221117.28daf24+dfsg/debian/rules   2022-12-13 
07:40:05.000000000 +0100
@@ -1,6 +1,6 @@
 #!/usr/bin/make -f
 
-DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
+include /usr/share/dpkg/architecture.mk
 export DEB_BUILD_MAINT_OPTIONS=hardening=+all
 
 %:
@@ -36,6 +36,8 @@
 
 override_dh_auto_configure:
        ./configure $(shell dpkg-buildflags --export=configure) \
+         --build=$(DEB_BUILD_GNU_TYPE) \
+         --host=$(DEB_HOST_GNU_TYPE) \
          --disable-silent-rules \
          --libexecdir="\$${prefix}/sbin" \
          --enable-shared \

Reply via email to