diff -Nru libcloud-3.4.1/debian/changelog libcloud-3.4.1/debian/changelog --- libcloud-3.4.1/debian/changelog 2022-05-11 15:51:43.000000000 +0200 +++ libcloud-3.4.1/debian/changelog 2022-05-11 15:51:43.000000000 +0200 @@ -1,3 +1,9 @@ +libcloud (3.4.1-2ubuntu2) kinetic; urgency=medium + + * Fix autopkgtest failure on s390x (big-endian) (LP: #1973158) + + -- Olivier Gayot Wed, 11 May 2022 15:51:43 +0200 + libcloud (3.4.1-2ubuntu1) kinetic; urgency=medium * Disable test that requires access to the Internet. diff -Nru libcloud-3.4.1/debian/patches/df060de6ea325cba2b6411780728705252543bc3.patch libcloud-3.4.1/debian/patches/df060de6ea325cba2b6411780728705252543bc3.patch --- libcloud-3.4.1/debian/patches/df060de6ea325cba2b6411780728705252543bc3.patch 1970-01-01 01:00:00.000000000 +0100 +++ libcloud-3.4.1/debian/patches/df060de6ea325cba2b6411780728705252543bc3.patch 2022-05-11 15:51:43.000000000 +0200 @@ -0,0 +1,47 @@ +Description: test: fix test_ssh_client on big-endian architectures + The tests test_consume_*_chunk_contains_no_utf8_character are meant to + ensure support for non-UTF-8 characters. To do so, we use UTF-8 + characters and compare their binary representation after being fed to + paramiko. + + Unfortunately, UTF-32 is affected by endianness, resulting in failed + tests on big-endian architectures. + + Fixed by checking the endianness and comparing the UTF-32 characters to + their respective binary representation. +Author: Olivier Gayot +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/libcloud/+bug/1973158 +Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1010891 +Forwarded: https://github.com/apache/libcloud/pull/1693 +Applied-Upstream: https://github.com/apache/libcloud/commit/df060de6ea325cba2b6411780728705252543bc3 +Last-Update: 2022-05-12 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +Index: libcloud-3.4.1/libcloud/test/compute/test_ssh_client.py +=================================================================== +--- libcloud-3.4.1.orig/libcloud/test/compute/test_ssh_client.py 2022-05-12 12:36:47.037706112 +0200 ++++ libcloud-3.4.1/libcloud/test/compute/test_ssh_client.py 2022-05-12 12:37:34.529747766 +0200 +@@ -560,7 +560,10 @@ + chan.recv.side_effect = ['🤦'.encode('utf-32'), 'a', 'b'] + + stdout = client._consume_stdout(chan).getvalue() +- self.assertEqual('\x00\x00&\x01\x00ab', stdout) ++ if sys.byteorder == "little": ++ self.assertEqual("\x00\x00&\x01\x00ab", stdout) ++ else: ++ self.assertEqual("\x00\x00\x00\x01&ab", stdout) + self.assertEqual(len(stdout), 7) + + def test_consume_stderr_chunk_contains_non_utf8_character(self): +@@ -574,7 +577,10 @@ + chan.recv_stderr.side_effect = ['🤦'.encode('utf-32'), 'a', 'b'] + + stderr = client._consume_stderr(chan).getvalue() +- self.assertEqual('\x00\x00&\x01\x00ab', stderr) ++ if sys.byteorder == "little": ++ self.assertEqual("\x00\x00&\x01\x00ab", stderr) ++ else: ++ self.assertEqual("\x00\x00\x00\x01&ab", stderr) + self.assertEqual(len(stderr), 7) + + def test_keep_alive_and_compression(self): diff -Nru libcloud-3.4.1/debian/patches/series libcloud-3.4.1/debian/patches/series --- libcloud-3.4.1/debian/patches/series 2022-05-11 15:51:43.000000000 +0200 +++ libcloud-3.4.1/debian/patches/series 2022-05-11 15:51:43.000000000 +0200 @@ -3,3 +3,4 @@ 43b71091ebd159570302b695f0a244f4d0a7e497.patch 83bd562337abdda4b1ba6706999b13aa358bdd28.patch disable-online-test.patch +df060de6ea325cba2b6411780728705252543bc3.patch