diff -Nru tpm2-tss-4.0.1/debian/changelog tpm2-tss-4.0.1/debian/changelog --- tpm2-tss-4.0.1/debian/changelog 2023-08-22 11:58:05.000000000 +0000 +++ tpm2-tss-4.0.1/debian/changelog 2023-10-02 07:42:09.000000000 +0000 @@ -1,3 +1,29 @@ +tpm2-tss (4.0.1-3ubuntu1) mantic; urgency=low + + * Merge from Debian unstable. Remaining changes: + - Disable lto, not yet ready upstream. + + -- Gianfranco Costamagna Mon, 02 Oct 2023 09:42:09 +0200 + +tpm2-tss (4.0.1-3) unstable; urgency=low + + [ Bastian Germann ] + * Prevent online request for docbookx.dtd + + [ Lukas Märdian ] + * Fix FTBFS due to big-endian conversion issues (LP: #2031020) + + Apply tcti libtpms fixes for s390x s390x + d/p/0001-tss2-tcti-tcti-libtpms-fix-test-failure-on-big-endia.patch + + Fix big-endian issue in tcti-spi-helper + d/p/fix-tcti-spi-helper-big-endian.patch + + Skip failing tests on big-endian, due to broken binary test input files + d/p/disable-tests-on-big-endian.patch + + [ Ying-Chun Liu (PaulLiu) ] + * Merge Ubuntu's changes. (Closes: #1040521) + + -- Ying-Chun Liu (PaulLiu) Sun, 01 Oct 2023 14:40:02 +0800 + tpm2-tss (4.0.1-2ubuntu2) mantic; urgency=medium * Fix FTBFS due to big-endian conversion issues (LP: #2031020) diff -Nru tpm2-tss-4.0.1/debian/control tpm2-tss-4.0.1/debian/control --- tpm2-tss-4.0.1/debian/control 2023-08-22 11:56:58.000000000 +0000 +++ tpm2-tss-4.0.1/debian/control 2023-10-01 06:30:35.000000000 +0000 @@ -9,6 +9,7 @@ autoconf, autoconf-archive, debhelper-compat (= 13), + docbook-xml, docbook-xsl, doxygen, libcmocka-dev (>= 1.0), diff -Nru tpm2-tss-4.0.1/debian/patches/0001-tss2-tcti-tcti-libtpms-fix-test-failure-on-big-endia.patch tpm2-tss-4.0.1/debian/patches/0001-tss2-tcti-tcti-libtpms-fix-test-failure-on-big-endia.patch --- tpm2-tss-4.0.1/debian/patches/0001-tss2-tcti-tcti-libtpms-fix-test-failure-on-big-endia.patch 2023-08-15 12:11:39.000000000 +0000 +++ tpm2-tss-4.0.1/debian/patches/0001-tss2-tcti-tcti-libtpms-fix-test-failure-on-big-endia.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,52 +0,0 @@ -From 9ae85535d6383a50731ad9e70c16b55622e126ae Mon Sep 17 00:00:00 2001 -From: "Ying-Chun Liu (PaulLiu)" -Date: Sun, 6 Aug 2023 05:24:02 +0800 -Subject: [PATCH] tss2-tcti: tcti-libtpms: fix test failure on big-endian - platform - -Due to tcti_libtpms->response_len and tcti_libtpms->response_buffer_len -are size_t. We cannot convert the (size_t *) to (uint32_t *) on big-endian -platforms. Thus we create temp uint32_t variables. Make the call and -then assign it back to size_t variables. - -This commit partially fix the test failure on big-endian platforms. - -Signed-off-by: Ying-Chun Liu (PaulLiu) ---- - src/tss2-tcti/tcti-libtpms.c | 11 +++++++++-- - 1 file changed, 9 insertions(+), 2 deletions(-) - -diff --git a/src/tss2-tcti/tcti-libtpms.c b/src/tss2-tcti/tcti-libtpms.c -index 922a4402..10ed913d 100644 ---- a/src/tss2-tcti/tcti-libtpms.c -+++ b/src/tss2-tcti/tcti-libtpms.c -@@ -370,6 +370,8 @@ tcti_libtpms_transmit( - tpm_header_t header; - TSS2_RC rc; - TPM_RESULT ret; -+ uint32_t resp_size; -+ uint32_t respbufsize; - - rc = tcti_common_transmit_checks(tcti_common, cmd_buf, TCTI_LIBTPMS_MAGIC); - if (rc != TSS2_RC_SUCCESS) { -@@ -386,11 +388,16 @@ tcti_libtpms_transmit( - } - - LOGBLOB_DEBUG(cmd_buf, size, "Sending command with TPM_CC 0x%" PRIx32, header.size); -+ resp_size = (uint32_t) tcti_libtpms->response_len; -+ respbufsize = (uint32_t) tcti_libtpms->response_buffer_len; - LIBTPMS_API_CALL(fail, tcti_libtpms, TPMLIB_Process, &tcti_libtpms->response_buffer, -- (uint32_t *) &tcti_libtpms->response_len, -- (uint32_t *) &tcti_libtpms->response_buffer_len, -+ (uint32_t *) &resp_size, -+ (uint32_t *) &respbufsize, - (uint8_t *) cmd_buf, - size); -+ tcti_libtpms->response_len = resp_size; -+ tcti_libtpms->response_buffer_len = respbufsize; -+ - rc = tcti_libtpms_store_state(tcti_libtpms); - if (rc != TSS2_RC_SUCCESS) { - LOG_ERROR("Failed to store state file"); --- -2.40.1 diff -Nru tpm2-tss-4.0.1/debian/patches/0004-tss2-tcti-tcti-libtpms-fix-test-failure-on-big-endia.patch tpm2-tss-4.0.1/debian/patches/0004-tss2-tcti-tcti-libtpms-fix-test-failure-on-big-endia.patch --- tpm2-tss-4.0.1/debian/patches/0004-tss2-tcti-tcti-libtpms-fix-test-failure-on-big-endia.patch 1970-01-01 00:00:00.000000000 +0000 +++ tpm2-tss-4.0.1/debian/patches/0004-tss2-tcti-tcti-libtpms-fix-test-failure-on-big-endia.patch 2023-10-01 06:40:02.000000000 +0000 @@ -0,0 +1,52 @@ +From 9ae85535d6383a50731ad9e70c16b55622e126ae Mon Sep 17 00:00:00 2001 +From: "Ying-Chun Liu (PaulLiu)" +Date: Sun, 6 Aug 2023 05:24:02 +0800 +Subject: [PATCH] tss2-tcti: tcti-libtpms: fix test failure on big-endian + platform + +Due to tcti_libtpms->response_len and tcti_libtpms->response_buffer_len +are size_t. We cannot convert the (size_t *) to (uint32_t *) on big-endian +platforms. Thus we create temp uint32_t variables. Make the call and +then assign it back to size_t variables. + +This commit partially fix the test failure on big-endian platforms. + +Signed-off-by: Ying-Chun Liu (PaulLiu) +--- + src/tss2-tcti/tcti-libtpms.c | 11 +++++++++-- + 1 file changed, 9 insertions(+), 2 deletions(-) + +diff --git a/src/tss2-tcti/tcti-libtpms.c b/src/tss2-tcti/tcti-libtpms.c +index 922a4402..10ed913d 100644 +--- a/src/tss2-tcti/tcti-libtpms.c ++++ b/src/tss2-tcti/tcti-libtpms.c +@@ -370,6 +370,8 @@ tcti_libtpms_transmit( + tpm_header_t header; + TSS2_RC rc; + TPM_RESULT ret; ++ uint32_t resp_size; ++ uint32_t respbufsize; + + rc = tcti_common_transmit_checks(tcti_common, cmd_buf, TCTI_LIBTPMS_MAGIC); + if (rc != TSS2_RC_SUCCESS) { +@@ -386,11 +388,16 @@ tcti_libtpms_transmit( + } + + LOGBLOB_DEBUG(cmd_buf, size, "Sending command with TPM_CC 0x%" PRIx32, header.size); ++ resp_size = (uint32_t) tcti_libtpms->response_len; ++ respbufsize = (uint32_t) tcti_libtpms->response_buffer_len; + LIBTPMS_API_CALL(fail, tcti_libtpms, TPMLIB_Process, &tcti_libtpms->response_buffer, +- (uint32_t *) &tcti_libtpms->response_len, +- (uint32_t *) &tcti_libtpms->response_buffer_len, ++ (uint32_t *) &resp_size, ++ (uint32_t *) &respbufsize, + (uint8_t *) cmd_buf, + size); ++ tcti_libtpms->response_len = resp_size; ++ tcti_libtpms->response_buffer_len = respbufsize; ++ + rc = tcti_libtpms_store_state(tcti_libtpms); + if (rc != TSS2_RC_SUCCESS) { + LOG_ERROR("Failed to store state file"); +-- +2.40.1 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 2023-08-22 11:57:23.000000000 +0000 +++ tpm2-tss-4.0.1/debian/patches/series 2023-10-02 07:42:09.000000000 +0000 @@ -1,6 +1,6 @@ 0001_disable_fapi_io_test.patch 0002-fix-version.patch 0003-test-unit-tcti-libtpms-fix-test-failed-at-32-bit-pla.patch -0001-tss2-tcti-tcti-libtpms-fix-test-failure-on-big-endia.patch +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