diff -Nru kitty-0.26.5/debian/changelog kitty-0.26.5/debian/changelog --- kitty-0.26.5/debian/changelog 2023-01-30 20:32:11.000000000 +0100 +++ kitty-0.26.5/debian/changelog 2023-02-01 12:31:03.000000000 +0100 @@ -1,3 +1,9 @@ +kitty (0.26.5-3ubuntu2) lunar; urgency=medium + + * disable crypto test if RLIMIT_MEMLOCK is too low (LP: #2004435) + + -- Olivier Gayot Wed, 01 Feb 2023 12:31:03 +0100 + kitty (0.26.5-3ubuntu1) lunar; urgency=medium * Set empty TERM in test environment, required for build-time tests to diff -Nru kitty-0.26.5/debian/patches/conditionally-skip-crypto-test.patch kitty-0.26.5/debian/patches/conditionally-skip-crypto-test.patch --- kitty-0.26.5/debian/patches/conditionally-skip-crypto-test.patch 1970-01-01 01:00:00.000000000 +0100 +++ kitty-0.26.5/debian/patches/conditionally-skip-crypto-test.patch 2023-02-01 12:31:03.000000000 +0100 @@ -0,0 +1,38 @@ +Description: skip crypto test if RLIMIT_MEMLOCK is too low + When building on ppc64el in Ubuntu, RLIMIT_MEMLOCK is set to the same value as + the pagesize. This means only a single call to mlock() can succeed. + Since the crypto test makes multiple calls to mlock(), the test fails in the + described environment. + Make sure we skip the test if the RLIMIT_MEMLOCK is too low. +Author: Olivier Gayot +Bug: https://github.com/kovidgoyal/kitty/issues/5466 +Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1030238 +Bug-Ubuntu: https://bugs.launchpad.net/bugs/2004435 +Forwarded: https://github.com/kovidgoyal/kitty/issues/5466#issuecomment-1412004797 +Last-Update: 2023-02-01 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +Index: kitty-0.26.5/kitty_tests/crypto.py +=================================================================== +--- kitty-0.26.5.orig/kitty_tests/crypto.py 2023-02-01 13:17:33.662880021 +0100 ++++ kitty-0.26.5/kitty_tests/crypto.py 2023-02-01 13:25:53.667978172 +0100 +@@ -3,12 +3,19 @@ + + + import os ++import resource ++import unittest + + from . import BaseTest + + ++memlock_limit, _ = resource.getrlimit(resource.RLIMIT_MEMLOCK) ++pagesize = resource.getpagesize() ++ ++ + class TestCrypto(BaseTest): + ++ @unittest.skipIf(memlock_limit <= pagesize, "RLIMIT_MEMLOCK is too low") + def test_elliptic_curve_data_exchange(self): + from kitty.fast_data_types import ( + AES256GCMDecrypt, AES256GCMEncrypt, CryptoError, EllipticCurveKey diff -Nru kitty-0.26.5/debian/patches/series kitty-0.26.5/debian/patches/series --- kitty-0.26.5/debian/patches/series 2023-01-04 12:14:15.000000000 +0100 +++ kitty-0.26.5/debian/patches/series 2023-02-01 12:31:03.000000000 +0100 @@ -1,3 +1,4 @@ bash-integration-fix-clone-in-kitty-not-.patch define-singlekey-bitfields-according-to-.patch try-to-fix-tests-failing-on-python-3.11.patch +conditionally-skip-crypto-test.patch