Package: libssh
Version: 0.9.0-1
Severity: minor
Tags: patch
User: [email protected]
Usertags: origin-ubuntu focal ubuntu-patch

Dear maintainers,

In Ubuntu, we are in the process of moving the i386 architecture to a
compatibility-only layer on amd64, and therefore we are also moving our
autopkgtest infrastructure to test i386 binaries in a cross-environment.

This requires changes to some tests so that they are cross-aware and can
do the right thing.

The libssh tests currently fail in this environment, because they are
build tests that do not invoke the toolchain in a cross-aware manner. 
I've verified that the attached patch lets the tests successfully build
(and run) i386 tests on an amd64 host.

(note that I changed the 'cc' call to 'gcc' since the first one doesn't
have a cross-arch variant but I could try to talk to the autopkgtest
maintainer to have that added if you prefer)

Note that upstream autopkgtest doesn't currently set DEB_HOST_ARCH so
this is a complete no-op in Debian for the moment.  Support for
cross-testing in autopkgtest is currently awaiting review at
https://salsa.debian.org/ci-team/autopkgtest/merge_requests/69 and once
landed, will still have no effect unless autopkgtest is invoked with a
'-a' option.  So this change should be safe to land in your package
despite this not being upstream in autopkgtest.

Thanks for considering,



diff -Nru libssh-0.9.0/debian/changelog libssh-0.9.0/debian/changelog
--- libssh-0.9.0/debian/changelog       2019-07-11 12:35:29.000000000 +0200
+++ libssh-0.9.0/debian/changelog       2019-12-10 17:38:42.000000000 +0100
@@ -1,3 +1,11 @@
+libssh (0.9.0-2) UNRELEASED; urgency=medium
+
+  * debian/tests/libssh-server:
+    - Use the correct compiler for proposed autopkgtest cross-testing
+      support. 
+
+ -- Sebastien Bacher <[email protected]>  Tue, 10 Dec 2019 17:37:16 +0100
+
 libssh (0.9.0-1) unstable; urgency=medium
 
   * New upstream release 
diff -Nru libssh-0.9.0/debian/tests/libssh-server 
libssh-0.9.0/debian/tests/libssh-server
--- libssh-0.9.0/debian/tests/libssh-server     2019-07-11 12:35:29.000000000 
+0200
+++ libssh-0.9.0/debian/tests/libssh-server     2019-12-10 17:36:53.000000000 
+0100
@@ -17,12 +17,18 @@
     done
 }
 
+if [ -n "${DEB_HOST_GNU_TYPE:-}" ]; then
+    CROSS_COMPILE="$DEB_HOST_GNU_TYPE-"
+else
+    CROSS_COMPILE=
+fi
+
 # change to debian/tests so that mock-sshd can find its keys
 cd $(dirname $(realpath $0))
 SSHD="$AUTOPKGTEST_TMP/mock-sshd"
 
 # build server
-cc -O0 -g -o "$SSHD" mock-sshd.c $(pkg-config --cflags --libs glib-2.0 libssh) 
-lutil
+${CROSS_COMPILE}gcc -O0 -g -o "$SSHD" mock-sshd.c $(${CROSS_COMPILE}pkg-config 
--cflags --libs glib-2.0 libssh) -lutil
 
 echo "====== password authentication ======"
 

Reply via email to