The package FTBFS on armhf, hppa, powerpc and x32, but not on i386,
this suggests that the failure is related to 32-bit architectures
with 64-bit time.

When I look at the code, it's looking like it checks for different
errors based on the value of "sys.maxsize" when it should be
checking for different errors based on the size of time_t,

There also seems to be an attempt to skip the test on armhf
but that test is broken and ineffective at least on my system.

I've attatched a debdiff that removes the broken attempt to
skip the test, and makes the test look at the size of time_t
instead of sys.maxsize.

I've tested the package builds succesfully with this debdiff
on armhf, i386 and amd64.

Note: I used the ctypes module to get the size of time_t,
this functionality was only added in python 3.12, I don't
know if there are other ways that would support older
python versions.

On 07/03/2026 16:08, Paul Gevers wrote:
Source: cbor2
Version: 5.8.0-1
Severity: serious
Control: close -1 5.8.0-3
Tags: sid forky
User: [email protected]
Usertags: out-of-sync
X-Debbugs-CC: [email protected]
User: [email protected]
Usertags: armhf

Dear maintainer(s),

The Release Team considers packages that are out-of-sync between testing and 
unstable for more than 30 days as having a Release Critical bug in testing [1]. 
Your package src:cbor2 has been trying to migrate for 31 days [2], hence this 
bug report. The current output of the migration software for this package is 
copied to the bottom of this report and should list the reason why the package 
is blocked.

If a package is out of sync between unstable and testing for a longer period, 
this usually means that bugs in the package in testing cannot be fixed via 
unstable. Additionally, blocked packages can have impact on other packages, 
which makes preparing for the release more difficult. Finally, it often exposes 
issues with the package and/or its (reverse-)dependencies. We expect 
maintainers to fix issues that hamper the migration of their package in a 
timely manner.

This bug will trigger auto-removal when appropriate. As with all new bugs, 
there will be at least 30 days before the package is auto-removed.

This bug submission immediately closes the bug with the version in unstable, so 
if that version or a later version migrates, this bug will no longer affect 
testing. This bug is also tagged to only affect sid and forky, so it doesn't 
affect (old-)stable.

If you believe your package is unable to migrate to testing due to issues 
beyond your control, don't hesitate to contact the Release Team.

This bug report has been automatically generated and has only been sent 
manually. If you have any comments with regards to the content or the process, 
please reach out to me.

Paul

[1] https://lists.debian.org/debian-devel-announce/2023/06/msg00001.html
[2] https://qa.debian.org/excuses.php?package=cbor2

Current text from [2]:
Migration status for cbor2 (5.8.0-1 to 5.8.0-3): BLOCKED: Maybe temporary, 
maybe blocked but Britney is missing information (check below)
Issues preventing migration:
∙ ∙ Missing build on armhf
∙ ∙ Lintian check waiting for test results on armhf - info
∙ ∙ Reproducibility check deferred on armhf: missing builds
Additional info (not blocking):
∙ ∙ Piuparts tested OK - https://piuparts.debian.org/sid/source/c/cbor2.html
∙ ∙ Autopkgtest for cbor2/5.8.0-3: amd64: No tests, superficial or marked flaky 
♻ (reference ♻), arm64: No tests, superficial or marked flaky ♻ (reference ♻), 
i386: No tests, superficial or marked flaky ♻ (reference ♻), ppc64el: No tests, 
superficial or marked flaky ♻, riscv64: No tests, superficial or marked flaky 
♻, s390x: No tests, superficial or marked flaky ♻
∙ ∙ Reproduced on amd64
∙ ∙ Reproduced on arm64
∙ ∙ Reproduced on i386
∙ ∙ Reproduced on ppc64el
∙ ∙ 15 days old (needed 5 days)
diff -Nru cbor2-5.8.0/debian/changelog cbor2-5.8.0/debian/changelog
--- cbor2-5.8.0/debian/changelog        2026-02-20 07:57:10.000000000 +0000
+++ cbor2-5.8.0/debian/changelog        2026-03-08 20:13:50.000000000 +0000
@@ -1,3 +1,10 @@
+cbor2 (5.8.0-3.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix test on 32-bit architectures with 64-bit time.
+
+ -- Peter Michael Green <[email protected]>  Sun, 08 Mar 2026 20:13:50 +0000
+
 cbor2 (5.8.0-3) unstable; urgency=medium
 
   * mitigated a few tests, as they are failing on 2026-02-04, for
diff -Nru cbor2-5.8.0/debian/patches/fix-test-time64.patch 
cbor2-5.8.0/debian/patches/fix-test-time64.patch
--- cbor2-5.8.0/debian/patches/fix-test-time64.patch    1970-01-01 
00:00:00.000000000 +0000
+++ cbor2-5.8.0/debian/patches/fix-test-time64.patch    2026-03-08 
20:11:34.000000000 +0000
@@ -0,0 +1,30 @@
+Upstream determines the expected error based on whether sys.maxsize indicates
+a 32-bit system, but it seems the error is actually dependent on whether
+the system uses 32-bit or 64-bit time_t, so the tests were broken on 32-bit
+systems with 64-bit time.
+
+--- cbor2-5.8.0.orig/tests/test_decoder.py
++++ cbor2-5.8.0/tests/test_decoder.py
+@@ -5,6 +5,7 @@ import platform
+ import re
+ import struct
+ import sys
++import ctypes
+ from binascii import unhexlify
+ from datetime import date, datetime, timedelta, timezone
+ from decimal import Decimal
+@@ -516,12 +517,12 @@ def test_datetime_date_out_of_range(impl
+ 
+     if platform.system() == "Windows":
+         cause_exc_class = OSError
+-    elif sys.maxsize == 2147483647:
++    elif ctypes.sizeof(ctypes.c_time_t) == 4:
+         cause_exc_class = OverflowError
+     else:
+         cause_exc_class = ValueError
+ 
+-    assert isinstance(excinfo.value.__cause__, cause_exc_class)
++    assert isinstance(excinfo.value.__cause__, cause_exc_class)
+ 
+ 
+ def test_datetime_timezone(impl):
diff -Nru cbor2-5.8.0/debian/patches/mitigate_some_tests.patch 
cbor2-5.8.0/debian/patches/mitigate_some_tests.patch
--- cbor2-5.8.0/debian/patches/mitigate_some_tests.patch        2026-02-20 
07:57:10.000000000 +0000
+++ cbor2-5.8.0/debian/patches/mitigate_some_tests.patch        2026-03-08 
20:10:26.000000000 +0000
@@ -1,20 +1,3 @@
-Index: cbor2/tests/test_decoder.py
-===================================================================
---- cbor2.orig/tests/test_decoder.py
-+++ cbor2/tests/test_decoder.py
-@@ -521,7 +521,11 @@ def test_datetime_date_out_of_range(impl
-     else:
-         cause_exc_class = ValueError
- 
--    assert isinstance(excinfo.value.__cause__, cause_exc_class)
-+    # as of 2026-02-04, this test fails with armhf
-+    mitigation = platform.machine() == "armhf"
-+
-+    if not mitigation:
-+        assert isinstance(excinfo.value.__cause__, cause_exc_class)
- 
- 
- def test_datetime_timezone(impl):
 Index: cbor2/tests/test_encoder.py
 ===================================================================
 --- cbor2.orig/tests/test_encoder.py
diff -Nru cbor2-5.8.0/debian/patches/series cbor2-5.8.0/debian/patches/series
--- cbor2-5.8.0/debian/patches/series   2026-02-20 07:32:21.000000000 +0000
+++ cbor2-5.8.0/debian/patches/series   2026-03-08 20:07:19.000000000 +0000
@@ -1 +1,2 @@
 mitigate_some_tests.patch
+fix-test-time64.patch

Reply via email to