diff -Nru ruby-tty-screen-0.8.1/debian/changelog ruby-tty-screen-0.8.1/debian/changelog --- ruby-tty-screen-0.8.1/debian/changelog 2021-10-21 19:12:06.000000000 +0000 +++ ruby-tty-screen-0.8.1/debian/changelog 2022-06-03 21:20:32.000000000 +0000 @@ -1,3 +1,16 @@ +ruby-tty-screen (0.8.1-2) unstable; urgency=medium + + * Team upload + + [ Simon Chopin ] + * d/p/test-endianness.patch: cherry-picked to fix autopkgtests on big-endian + architectures, e.g. s390x (Closes: #1012204, LP: #1976464) + + [ Cédric Boutillier ] + * Bump Standards-Version to 4.6.1 (no changes needed) + + -- Cédric Boutillier Fri, 03 Jun 2022 23:20:32 +0200 + ruby-tty-screen (0.8.1-1) unstable; urgency=low * Team upload. diff -Nru ruby-tty-screen-0.8.1/debian/control ruby-tty-screen-0.8.1/debian/control --- ruby-tty-screen-0.8.1/debian/control 2021-10-21 19:12:06.000000000 +0000 +++ ruby-tty-screen-0.8.1/debian/control 2022-06-03 21:20:32.000000000 +0000 @@ -7,7 +7,7 @@ gem2deb (>= 1), rake, ruby-rspec, -Standards-Version: 4.6.0 +Standards-Version: 4.6.1 Vcs-Git: https://salsa.debian.org/ruby-team/ruby-tty-screen.git Vcs-Browser: https://salsa.debian.org/ruby-team/ruby-tty-screen Homepage: https://ttytoolkit.org diff -Nru ruby-tty-screen-0.8.1/debian/patches/series ruby-tty-screen-0.8.1/debian/patches/series --- ruby-tty-screen-0.8.1/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 +++ ruby-tty-screen-0.8.1/debian/patches/series 2022-06-03 21:20:32.000000000 +0000 @@ -0,0 +1 @@ +test-endianness.patch diff -Nru ruby-tty-screen-0.8.1/debian/patches/test-endianness.patch ruby-tty-screen-0.8.1/debian/patches/test-endianness.patch --- ruby-tty-screen-0.8.1/debian/patches/test-endianness.patch 1970-01-01 00:00:00.000000000 +0000 +++ ruby-tty-screen-0.8.1/debian/patches/test-endianness.patch 2022-06-03 21:20:32.000000000 +0000 @@ -0,0 +1,59 @@ +From dba351b178ae06b56985cc77a291918a0fc4aff4 Mon Sep 17 00:00:00 2001 +From: Piotr Murach +Date: Mon, 16 Aug 2021 22:13:27 +0200 +Origin: upstream, https://github.com/piotrmurach/tty-screen/commit/dba351b178ae06b56985cc77a291918a0fc4aff4 +Applied-upstream: on master branch, presumably part of upcoming 0.8.2 +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/ruby-tty-screen/+bug/1976464 +Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1012204 +Subject: [PATCH] Fix ioctl call test to stub terminal size encoding for + big-endian systems + +Fixes #13 +--- + CHANGELOG.md | 6 ++++++ + spec/unit/screen_spec.rb | 8 +++++++- + 2 files changed, 13 insertions(+), 1 deletion(-) + +diff --git a/CHANGELOG.md b/CHANGELOG.md +index 91dd6ab..0f369bd 100644 +--- a/CHANGELOG.md ++++ b/CHANGELOG.md +@@ -1,5 +1,10 @@ + # Change log + ++## [v0.8.2] - unreleased ++ ++### Fixed ++* Fix ioctl call test to stub terminal size encoding for big-endian systems ++ + ## [v0.8.1] - 2020-07-17 + + ### Fixed +@@ -136,6 +141,7 @@ + ### Fixed + * Fix bug with screen detection from_io_console by @luxflux + ++[v0.8.2]: https://github.com/piotrmurach/tty-screen/compare/v0.8.1...v0.8.2 + [v0.8.1]: https://github.com/piotrmurach/tty-screen/compare/v0.8.0...v0.8.1 + [v0.8.0]: https://github.com/piotrmurach/tty-screen/compare/v0.7.1...v0.8.0 + [v0.7.1]: https://github.com/piotrmurach/tty-screen/compare/v0.7.0...v0.7.1 +diff --git a/spec/unit/screen_spec.rb b/spec/unit/screen_spec.rb +index 3666a3c..de78ff3 100644 +--- a/spec/unit/screen_spec.rb ++++ b/spec/unit/screen_spec.rb +@@ -6,8 +6,14 @@ def winsize + [100, 200] + end + ++ def big_endian? ++ [1].pack("S") == [1].pack("n") ++ end ++ + def ioctl(control, buf) +- buf.replace("3\x00\xD3\x00\xF2\x04\xCA\x02\x00") ++ little_endian = "3\x00\xD3\x00\xF2\x04\xCA\x02\x00" ++ big_endian = "\x003\x00\xD3\x04\xF2\x02\xCA" ++ buf.replace(big_endian? ? big_endian : little_endian) + 0 + end + end