Package: release.debian.org Severity: normal Tags: trixie X-Debbugs-Cc: [email protected] Control: affects -1 + src:xmodem User: [email protected] Usertags: pu
[ Reason ] Due to the latest lrzsz stable update xmodem started to FTBFS. [ Impact ] The package xmodem cannot be rebuilt in trixie. [ Tests ] The unit tests testing the cooperation with lrzsz fail currently and pass after this update. [ Risks ] None. The applied patch only fixes the tests but does not touch production code. [ Checklist ] [x] *all* changes are documented in the d/changelog [x] I reviewed all changes and I approve them [x] attach debdiff against the package in (old)stable [x] the issue is verified as fixed in unstable [ Changes ] Apply the same patch that was applied in unstable to fix the tests.
diff -Nru xmodem-0.4.7+dfsg/debian/changelog xmodem-0.4.7+dfsg/debian/changelog --- xmodem-0.4.7+dfsg/debian/changelog 2023-06-19 13:52:57.000000000 +0200 +++ xmodem-0.4.7+dfsg/debian/changelog 2026-11-20 20:10:08.000000000 +0100 @@ -1,3 +1,9 @@ +xmodem (0.4.7+dfsg-1+deb13u1) trixie; urgency=medium + + * Use relative path for rb receive tests (Closes: #1146280, #1154600) + + -- Bastian Germann <[email protected]> Fri, 20 Nov 2026 20:10:08 +0100 + xmodem (0.4.7+dfsg-1) unstable; urgency=medium * New upstream version 0.4.7+dfsg diff -Nru xmodem-0.4.7+dfsg/debian/patches/series xmodem-0.4.7+dfsg/debian/patches/series --- xmodem-0.4.7+dfsg/debian/patches/series 2023-06-19 13:52:15.000000000 +0200 +++ xmodem-0.4.7+dfsg/debian/patches/series 2026-11-20 20:09:50.000000000 +0100 @@ -1 +1,2 @@ Remove-docs-with-unclear-license.patch +Use-relative-path-for-rb-receive-tests.patch diff -Nru xmodem-0.4.7+dfsg/debian/patches/Use-relative-path-for-rb-receive-tests.patch xmodem-0.4.7+dfsg/debian/patches/Use-relative-path-for-rb-receive-tests.patch --- xmodem-0.4.7+dfsg/debian/patches/Use-relative-path-for-rb-receive-tests.patch 1970-01-01 01:00:00.000000000 +0100 +++ xmodem-0.4.7+dfsg/debian/patches/Use-relative-path-for-rb-receive-tests.patch 2026-08-31 09:28:09.000000000 +0200 @@ -0,0 +1,120 @@ +Origin: https://github.com/tehmaze/xmodem/pull/62 +From: Bastian Germann <[email protected]> +Date: Mon, 31 Aug 2026 08:15:49 +0200 +Subject: Use relative path for rb receive tests to fix Debian build + +Debian's lrzsz runs rb/lrb in restricted mode by default, and the +01-rz-reject-absolute-paths patch makes rb abort with a Security +Violation when given an absolute destination path. Pass rb a relative +filename inside a temp directory (via cwd) so the receive tests pass. + +Link: https://salsa.debian.org/debian/lrzsz/-/blob/debian/0.12.21rc-5/debian/patches/01-rz-reject-absolute-paths.diff +--- +--- a/test/functional/test_xmodem_using_lrzsz.py ++++ b/test/functional/test_xmodem_using_lrzsz.py +@@ -6,6 +6,7 @@ import select + import logging + import tempfile + import functools ++import shutil + import subprocess + + import pytest +@@ -73,11 +74,13 @@ def _send_callback(total_packets, success_count, error_count): + def test_xmodem_send_with_lrb(): + """ Using external program for receive, verify XMODEM.send(). """ + # Given, +- _, recv_filename = tempfile.mkstemp() ++ recv_dir = tempfile.mkdtemp() ++ recv_filename = 'recv.bin' + try: + proc = subprocess.Popen( + (recv_prog, '--xmodem', '--verbose', recv_filename), +- stdin=subprocess.PIPE, stdout=subprocess.PIPE, bufsize=0) ++ stdin=subprocess.PIPE, stdout=subprocess.PIPE, bufsize=0, ++ cwd=recv_dir) + + getc = functools.partial(_proc_getc, proc=proc) + putc = functools.partial(_proc_putc, proc=proc) +@@ -91,13 +94,13 @@ def test_xmodem_send_with_lrb(): + # Verify, + assert status is True + verify_binary_data(stream, padding=b'\xbb') +- verify_binary_data(open(recv_filename, 'rb'), padding=b'\xbb') ++ with open(os.path.join(recv_dir, recv_filename), 'rb') as recv: ++ verify_binary_data(recv, padding=b'\xbb') + proc.wait() + assert proc.returncode == 0 + + finally: +- if os.path.isfile(recv_filename): +- os.unlink(recv_filename) ++ shutil.rmtree(recv_dir, ignore_errors=True) + + + @pytest.mark.skipif(send_prog is None, reason=MISSING_LSB_MSG) +@@ -135,11 +138,13 @@ def test_xmodem_recv_with_lsb(): + def test_xmodem1k_send_with_lrb(): + """ Using external program for receive, verify XMODEM1k.send(). """ + # Given, +- _, recv_filename = tempfile.mkstemp() ++ recv_dir = tempfile.mkdtemp() ++ recv_filename = 'recv.bin' + try: + proc = subprocess.Popen( + (recv_prog, '--xmodem', '--verbose', recv_filename), +- stdin=subprocess.PIPE, stdout=subprocess.PIPE, bufsize=0) ++ stdin=subprocess.PIPE, stdout=subprocess.PIPE, bufsize=0, ++ cwd=recv_dir) + + getc = functools.partial(_proc_getc, proc=proc) + putc = functools.partial(_proc_putc, proc=proc) +@@ -153,12 +158,13 @@ def test_xmodem1k_send_with_lrb(): + # Verify, + assert status is True + verify_binary_data(stream, padding=b'\xbb') +- verify_binary_data(open(recv_filename, 'rb'), padding=b'\xbb') ++ with open(os.path.join(recv_dir, recv_filename), 'rb') as recv: ++ verify_binary_data(recv, padding=b'\xbb') + proc.wait() + assert proc.returncode == 0 + + finally: +- os.unlink(recv_filename) ++ shutil.rmtree(recv_dir, ignore_errors=True) + + + @pytest.mark.skipif(send_prog is None, reason=MISSING_LSB_MSG) +@@ -199,11 +205,13 @@ def test_xmodem_send_16bit_crc_with_lrb(): + Using external program for receive, verify XMODEM.send() with 16-bit CRC. + """ + # Given, +- _, recv_filename = tempfile.mkstemp() ++ recv_dir = tempfile.mkdtemp() ++ recv_filename = 'recv.bin' + try: + proc = subprocess.Popen( + (recv_prog, '--xmodem', '--verbose', '--with-crc', recv_filename), +- stdin=subprocess.PIPE, stdout=subprocess.PIPE, bufsize=0) ++ stdin=subprocess.PIPE, stdout=subprocess.PIPE, bufsize=0, ++ cwd=recv_dir) + + getc = functools.partial(_proc_getc, proc=proc) + putc = functools.partial(_proc_putc, proc=proc) +@@ -217,13 +225,13 @@ def test_xmodem_send_16bit_crc_with_lrb(): + # Verify, + assert status is True + verify_binary_data(stream, padding=b'\xbb') +- verify_binary_data(open(recv_filename, 'rb'), padding=b'\xbb') ++ with open(os.path.join(recv_dir, recv_filename), 'rb') as recv: ++ verify_binary_data(recv, padding=b'\xbb') + proc.wait() + assert proc.returncode == 0 + + finally: +- if os.path.isfile(recv_filename): +- os.unlink(recv_filename) ++ shutil.rmtree(recv_dir, ignore_errors=True) + + + def test_xmodem_recv_oldstyle_checksum_with_lrb():

