Control: tags 1067418 + patch Dear maintainer,
I've prepared an NMU for tpm2-tss (versioned as 4.0.1-7.2). The diff is attached to this message. Cheers -- Sebastian Ramacher
diff -Nru tpm2-tss-4.0.1/debian/changelog tpm2-tss-4.0.1/debian/changelog --- tpm2-tss-4.0.1/debian/changelog 2024-02-29 19:28:02.000000000 +0100 +++ tpm2-tss-4.0.1/debian/changelog 2024-04-11 23:02:54.000000000 +0200 @@ -1,3 +1,11 @@ +tpm2-tss (4.0.1-7.2) unstable; urgency=medium + + * Non-maintainer upload. + * debian/patches: Apply upstream patch to skip tests which fail on 32-bit + with _FILE_BITS=64 (Closes: #1067418) + + -- Sebastian Ramacher <sramac...@debian.org> Thu, 11 Apr 2024 23:02:54 +0200 + tpm2-tss (4.0.1-7.1) unstable; urgency=medium * Non-maintainer upload. diff -Nru tpm2-tss-4.0.1/debian/patches/series tpm2-tss-4.0.1/debian/patches/series --- tpm2-tss-4.0.1/debian/patches/series 2024-01-25 14:46:19.000000000 +0100 +++ tpm2-tss-4.0.1/debian/patches/series 2024-04-11 23:02:01.000000000 +0200 @@ -4,3 +4,4 @@ 0004-tss2-tcti-tcti-libtpms-fix-test-failure-on-big-endia.patch fix-tcti-spi-helper-big-endian.patch disable-tests-on-big-endian.patch +skip-tests-which-fail-on-32-bit.patch diff -Nru tpm2-tss-4.0.1/debian/patches/skip-tests-which-fail-on-32-bit.patch tpm2-tss-4.0.1/debian/patches/skip-tests-which-fail-on-32-bit.patch --- tpm2-tss-4.0.1/debian/patches/skip-tests-which-fail-on-32-bit.patch 1970-01-01 01:00:00.000000000 +0100 +++ tpm2-tss-4.0.1/debian/patches/skip-tests-which-fail-on-32-bit.patch 2024-04-11 23:02:09.000000000 +0200 @@ -0,0 +1,120 @@ +From 932b1e78047ed0ddc09fcb06bff2e7cf96406976 Mon Sep 17 00:00:00 2001 +From: Juergen Repp <juergen_r...@web.de> +Date: Sun, 17 Mar 2024 10:43:19 +0100 +Subject: [PATCH] unit tests: skip tests which fail on 32-bit with + _FILE_BITS=64 + +Tests file the unit tests are compiled with _FILE_BITS is set to 64. +The tests work without problems if _FILE_BITS is not set. +Addresses: #2786 + +Signed-off-by: Juergen Repp <juergen_r...@web.de> +--- + MAINTAINERS.md | 2 +- + test/unit/fapi-io.c | 7 +++++++ + test/unit/tcti-device.c | 11 +++++++++++ + test/unit/tcti-libtpms.c | 8 ++++++++ + test/unit/tcti-pcap.c | 11 +++++++++++ + 5 files changed, 38 insertions(+), 1 deletion(-) + +--- a/test/unit/fapi-io.c ++++ b/test/unit/fapi-io.c +@@ -28,6 +28,7 @@ + #define LOGMODULE tests + #include "util/log.h" + ++#define EXIT_SKIP 77 + /* + * The unit tests will simulate error codes which can be returned by the + * system calls for file system IO. +@@ -364,6 +365,12 @@ + int + main(int argc, char *argv[]) + { ++#if _FILE_OFFSET_BITS == 64 ++ // Would produce cmocka error ++ LOG_WARNING("_FILE_OFFSET == 64 would produce cmocka errors."); ++ return EXIT_SKIP; ++#endif ++ + const struct CMUnitTest tests[] = { + }; + return cmocka_run_group_tests(tests, NULL, NULL); +--- a/test/unit/tcti-device.c ++++ b/test/unit/tcti-device.c +@@ -25,6 +25,11 @@ + #include "tss2-tcti/tcti-common.h" + #include "tss2-tcti/tcti-device.h" + ++#define LOGMODULE tests ++#include "util/log.h" ++ ++#define EXIT_SKIP 77 ++ + /* + * Size of the TPM2 buffer used in these tests. In some cases this will be + * the command sent (transmit tests) and in others it's used as the response +@@ -443,6 +448,12 @@ + int + main(int argc, char* argv[]) + { ++#if _FILE_OFFSET_BITS == 64 ++ // Would produce cmocka error ++ LOG_WARNING("_FILE_OFFSET == 64 would produce cmocka errors."); ++ return EXIT_SKIP; ++#endif ++ + const struct CMUnitTest tests[] = { + cmocka_unit_test (tcti_device_init_all_null_test), + cmocka_unit_test(tcti_device_init_size_test), +--- a/test/unit/tcti-libtpms.c ++++ b/test/unit/tcti-libtpms.c +@@ -28,6 +28,8 @@ + #define LOGMODULE test + #include "util/log.h" + ++#define EXIT_SKIP 77 ++ + #define LIBTPMS_DL_HANDLE 0x12345678 + #define STATEFILE_PATH "statefile.bin" + #define STATEFILE_FD 0xAABB +@@ -1612,6 +1614,12 @@ + main(int argc, + char *argv[]) + { ++#if _FILE_OFFSET_BITS == 64 ++ // Would produce cmocka error ++ LOG_WARNING("_FILE_OFFSET == 64 would produce cmocka errors."); ++ return EXIT_SKIP; ++#endif ++ + const struct CMUnitTest tests[] = { + cmocka_unit_test(tcti_libtpms_init_all_null_test), + cmocka_unit_test(tcti_libtpms_init_dlopen_fail_test), +--- a/test/unit/tcti-pcap.c ++++ b/test/unit/tcti-pcap.c +@@ -27,6 +27,11 @@ + #include "tss2-tcti/tcti-common.h" + #include "tss2-tcti/tcti-pcap.h" + ++#define LOGMODULE tests ++#include "util/log.h" ++ ++#define EXIT_SKIP 77 ++ + #if (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) + #define _LE32TOH(a,b,c,d) d,c,b,a + #define _LE16TOH(a,b) b,a +@@ -726,6 +731,12 @@ + main (int argc, + char *argv[]) + { ++#if _FILE_OFFSET_BITS == 64 ++ // Would produce cmocka error ++ LOG_WARNING("_FILE_OFFSET == 64 would produce cmocka errors."); ++ return EXIT_SKIP; ++#endif ++ + const struct CMUnitTest tests[] = { + cmocka_unit_test (tcti_pcap_init_context_and_size_null_test), + cmocka_unit_test (tcti_pcap_init_size_test),