diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-09-28 03:11:19 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-09-28 03:11:19 +0100 |
commit | 1bc9c3b9d5a8c51b67f6ea2f57bdd76ff5073097 (patch) | |
tree | 8ff3b237086572800bda4afb971fc61617aa941e /app-crypt/tpm2-tss | |
parent | 3ca7a521e79841f7247feb67780a70722c997d55 (diff) |
gentoo auto-resync : 28:09:2022 - 03:11:19
Diffstat (limited to 'app-crypt/tpm2-tss')
4 files changed, 158 insertions, 4 deletions
diff --git a/app-crypt/tpm2-tss/Manifest b/app-crypt/tpm2-tss/Manifest index cd81b1cf2a86..ae3705f938dd 100644 --- a/app-crypt/tpm2-tss/Manifest +++ b/app-crypt/tpm2-tss/Manifest @@ -1,7 +1,8 @@ AUX tpm2-tss-3.1.0-Dont-run-systemd-sysusers-in-Makefile.patch 1214 BLAKE2B 40f1005626205d440fabda7f88444b0eef344df8f6ead5716807bcbaf490e7b24afc12580ae25c506fcc45dfb4bac0789d9b897dfcaae943c6ba9795b2f4f1d8 SHA512 adbff50c66a22659b563344c216d60bb80951016c3d7180c07c0498c285c9099a60e5573ed0ce29c7732de28d4c390b8eac16bf695c739d0c614dd344f1bfb46 AUX tpm2-tss-3.2.0-Dont-run-systemd-sysusers-in-Makefile.patch 2556 BLAKE2B ea8799561378e718019ed2e3885a91f5b5a270f65eb22f11f952e4346fe066f40fc8ae21230d77c53f4a2ebee3d508342777f34e7e7aa6aa81fcd48fb766984e SHA512 ba555d93affd142c213cc023ddccdfbdfabc9aa05528005cca5bd51751f729c6b44111054443f7ed69c1316cf2986b1f84d5c470e918a1ac34f9c4760eb2e596 AUX tpm2-tss-3.2.0-slibtool.patch 3603 BLAKE2B f0a0047b316396dfa5800702b793bf5247d62be75704be42968b7719a87a25200b6870e14f87ccb45876b53600052b6716386493ddcbead87857093188608621 SHA512 8c20df4be8857dfcf030770e74f27dc14c31f4a5b6eb1a90c9dca6f0dd01987a7983478c0dfe9774669b9f8fc9ddace66d5d51f991582ba3689bcdcea64a1b86 +AUX tpm2-tss-3.2.0-test-fix-usage-of-FILE-in-unit-test-fapi-io.patch 4895 BLAKE2B cb6e4d4544bb78e4fb768b4943dc0ebd381e2a480528d824634f486343955ea29370a731f5bbec222f653a3194615b4cbf13749fa089b58e2ded29e6bcaf06b8 SHA512 1fae2396bcf7bf1af55d4a8e6aa522e8a86344252a3b642c16f84158a3e3eb98dd2d0e2e41c2f13fa25af9452dd1a252bed4af91896aa2efa23029aa0ed1bf2f DIST tpm2-tss-3.2.0.tar.gz 1629211 BLAKE2B a89aa4d89a50bdfb5a9652874d30e2138747bd022049f2be2d0b56e296329d0c41254033ec3a062dbd64fde54a62e952f54446c551e5788231827cd53fae045a SHA512 cabb411f074dfa94919ba914849aac77a0ac2f50622e28a1406cf575369148774748e0e2b7a7c566ec83561a96d4b883bac5a3b1763f4cf48668a0c5d68c0a23 -EBUILD tpm2-tss-3.2.0-r3.ebuild 2550 BLAKE2B 2a1ebf581d6dae840e235afd19131164bcad8a6103a9ab8420fa67e69bab676c7b210b2966a8fda0458ed369ee99deb7da5d7871dc85057daa3e3a3d197f6370 SHA512 a1df8e66d2ba7de7ce000c17c8e59a2c9449fecce5d4feade69f0b3f7f9bee4bf68f518784b574cb636d386a2690698cfc8620410eab3916c8f17315fb315e1c -EBUILD tpm2-tss-3.2.0-r4.ebuild 2606 BLAKE2B c95d09e279e467b40ce4df3fa024e3db1a5064132dad6930036a498ba3a25e84ee3e4070c39eb84cc15641137d66a64ad9d31e77bd836ea14063ec2e8ef63041 SHA512 14b29ef752b3e57652b7e61d58e0919709b46831590f9b5e196240eaa472a00e262fa54f9525700943c5beb569e1ea782036c5dac9ab716d3601321c2390084b +EBUILD tpm2-tss-3.2.0-r3.ebuild 2635 BLAKE2B 53e6ce0e7a7766c54246af2352209a55fd898a412a87ab086ac8f1eb1374eccc9b2ecbe2fc8db644706f734f783cb7982aecb8b3539dd02797cbc26474c8cd3d SHA512 f305ac53b44085835f5a437d556fa889bacf4ab0cff1962a9c7d37807fc8c88dcd2f6d4976dd8bd8c4c04673b1f146f390189c0a6035a4eb6c8d394c69fd1bb6 +EBUILD tpm2-tss-3.2.0-r4.ebuild 2768 BLAKE2B 161aa01998cbe9a96d0f0bad1d013dabbdb0205e73356982109efc51619a7d542ae0a7f83f89dacec0eed238c0002cdc766fabd14a4a57a3402e463149b6fe3a SHA512 3fcfd7ef31011174de12991a1efc16e5f9f3dbd9a525e11224bd691e0591eddf699d9c92399b96199dcc93dc529d7d68cc36f92d65c5342376fa696e7a4ac86d MISC metadata.xml 747 BLAKE2B 0462c5942012c444e13bf094be03e0cc142b3b5e3e613570506f84be45bb3019876f3f44454b078668c7e3cbd4a60819cd2ea57c588cab34bfe82f76f222bcf8 SHA512 dab6f379190e40b0321597f0c5fa03ee5731eb77e91dc5d82d2f57c896cf40a074598ba1dedd1575e4e23e1fc5ed306f83cb50992fca6cc2bc1a1db822765a7a diff --git a/app-crypt/tpm2-tss/files/tpm2-tss-3.2.0-test-fix-usage-of-FILE-in-unit-test-fapi-io.patch b/app-crypt/tpm2-tss/files/tpm2-tss-3.2.0-test-fix-usage-of-FILE-in-unit-test-fapi-io.patch new file mode 100644 index 000000000000..aff792a28263 --- /dev/null +++ b/app-crypt/tpm2-tss/files/tpm2-tss-3.2.0-test-fix-usage-of-FILE-in-unit-test-fapi-io.patch @@ -0,0 +1,146 @@ +https://github.com/tpm2-software/tpm2-tss/commit/bda22252507124bb8e466ac2f0c61d5ebed9027d +https://github.com/tpm2-software/tpm2-tss/pull/2423 +https://bugs.gentoo.org/833530 + +From bda22252507124bb8e466ac2f0c61d5ebed9027d Mon Sep 17 00:00:00 2001 +From: William Roberts <william.c.roberts@intel.com> +Date: Mon, 26 Sep 2022 15:16:15 -0500 +Subject: [PATCH] test: fix usage of FILE in unit test fapi-io + +The unit test had a static FILE structure used to pass to stdio FILE * +routines as a dummy value to indicate to use the __real_xxx variant of +the mocked function. This doesn't work when FILE is opaque as the +compiler cannot figure out how much storage space is needed for a FILE +struct. + +Fix this by passing a dummy pointer to a data type the compiler knows +about and casting it to FILE pointer. + +Fixes: #2419 + +Signed-off-by: William Roberts <william.c.roberts@intel.com> +--- + test/unit/fapi-io.c | 30 ++++++++++++++++-------------- + 1 file changed, 16 insertions(+), 14 deletions(-) + +diff --git a/test/unit/fapi-io.c b/test/unit/fapi-io.c +index dbadcb47..8a883a43 100644 +--- a/test/unit/fapi-io.c ++++ b/test/unit/fapi-io.c +@@ -38,7 +38,9 @@ + bool wrap_fcntl_test = false; + bool wrap_malloc_test = false; + bool wrap_read_test = false; +-FILE mock_stream; /**< stream will be used to activate wrapper.*/ ++char _mock_stream; /**< stream will be used to activate wrapper.*/ ++ ++#define MOCK_STREAM ((FILE *)(&_mock_stream)) + + /* + * Wrapper functions for file system io. +@@ -74,7 +76,7 @@ __real_fclose(FILE *stream, ...); + int + __wrap_fclose(FILE *stream, ...) + { +- if (stream != &mock_stream) { ++ if (stream != MOCK_STREAM) { + return __real_fclose(stream); + } + return mock_type(int); +@@ -86,7 +88,7 @@ __real_fseek(FILE *stream, long offset, int whence, ...); + int + __wrap_fseek(FILE *stream, long offset, int whence, ...) + { +- if (stream != &mock_stream) { ++ if (stream != MOCK_STREAM) { + return __real_fseek(stream, offset, whence); + } + return mock_type(int); +@@ -98,7 +100,7 @@ __real_ftell(FILE *stream, ...); + long + __wrap_ftell(FILE *stream, ...) + { +- if (stream != &mock_stream) { ++ if (stream != MOCK_STREAM) { + return __real_ftell(stream); + } + return mock_type(int); +@@ -135,7 +137,7 @@ __real_fileno(FILE *stream, ...); + int + __wrap_fileno(FILE *stream, ...) + { +- if (stream != &mock_stream) { ++ if (stream != MOCK_STREAM) { + return __real_fileno(stream); + } + return 1; +@@ -179,7 +181,7 @@ check_io_read_async(void **state) { + assert_int_equal(r, TSS2_FAPI_RC_IO_ERROR); + + wrap_fcntl_test = true; +- will_return(__wrap_fopen, &mock_stream); ++ will_return(__wrap_fopen, MOCK_STREAM); + will_return(__wrap_fcntl, -1); + will_return_always(__wrap_fclose, 0); + errno = EAGAIN; +@@ -187,8 +189,8 @@ check_io_read_async(void **state) { + r = ifapi_io_read_async(&io, "tss_unit_dummyf"); + assert_int_equal(r, TSS2_FAPI_RC_IO_ERROR); + +- will_return(__wrap_fopen, &mock_stream); +- will_return(__wrap_fopen, &mock_stream); ++ will_return(__wrap_fopen, MOCK_STREAM); ++ will_return(__wrap_fopen, MOCK_STREAM); + will_return(__wrap_fcntl, 0); + will_return(__wrap_fseek, 0); + will_return(__wrap_ftell, 1); +@@ -202,8 +204,8 @@ check_io_read_async(void **state) { + + wrap_malloc_test = false; + +- will_return(__wrap_fopen, &mock_stream); +- will_return(__wrap_fopen, &mock_stream); ++ will_return(__wrap_fopen, MOCK_STREAM); ++ will_return(__wrap_fopen, MOCK_STREAM); + will_return(__wrap_fcntl, 0); + will_return(__wrap_fseek, 0); + will_return(__wrap_ftell, 1); +@@ -236,7 +238,7 @@ check_io_read_finish(void **state) { + will_return_always(__wrap_fclose, 0); + io.char_buffer = &io_char_buffer[0]; + io.buffer_length = 10; +- io.stream = &mock_stream; ++ io.stream = MOCK_STREAM; + errno = EAGAIN; + r = ifapi_io_read_finish(&io, &buffer[0], &count); + assert_int_equal(r, TSS2_FAPI_RC_TRY_AGAIN); +@@ -298,7 +300,7 @@ check_io_write_async(void **state) { + assert_int_equal(r, TSS2_FAPI_RC_IO_ERROR); + + wrap_fcntl_test = true; +- will_return(__wrap_fopen, &mock_stream); ++ will_return(__wrap_fopen, MOCK_STREAM); + will_return(__wrap_fcntl, -1); + + errno = EAGAIN; +@@ -306,7 +308,7 @@ check_io_write_async(void **state) { + assert_int_equal(r, TSS2_FAPI_RC_IO_ERROR); + + io.char_rbuffer = NULL; +- will_return(__wrap_fopen, &mock_stream); ++ will_return(__wrap_fopen, MOCK_STREAM); + will_return(__wrap_fcntl, 0); + will_return(__wrap_fcntl, 0); + will_return(__wrap_fcntl, -1); +@@ -345,7 +347,7 @@ check_io_write_finish(void **state) { + will_return_always(__wrap_fclose, 0); + + wrap_write_test = true; +- io.stream = &mock_stream; ++ io.stream = MOCK_STREAM; + will_return(__wrap_write, -1); + errno = EAGAIN; + r = ifapi_io_write_finish(&io); +-- +2.35.1 + diff --git a/app-crypt/tpm2-tss/tpm2-tss-3.2.0-r3.ebuild b/app-crypt/tpm2-tss/tpm2-tss-3.2.0-r3.ebuild index 4de62a88379e..6b9f088e71d1 100644 --- a/app-crypt/tpm2-tss/tpm2-tss-3.2.0-r3.ebuild +++ b/app-crypt/tpm2-tss/tpm2-tss-3.2.0-r3.ebuild @@ -3,7 +3,7 @@ EAPI=7 -inherit autotools linux-info multilib-minimal tmpfiles udev +inherit autotools flag-o-matic linux-info multilib-minimal tmpfiles udev DESCRIPTION="TCG Trusted Platform Module 2.0 Software Stack" HOMEPAGE="https://github.com/tpm2-software/tpm2-tss" @@ -59,6 +59,9 @@ src_prepare() { } multilib_src_configure() { + # tests fail with LTO enabbled. See bug 865275 and 865279 + filter-lto + ECONF_SOURCE=${S} econf \ --localstatedir=/var \ $(multilib_native_use_enable doc doxygen-doc) \ diff --git a/app-crypt/tpm2-tss/tpm2-tss-3.2.0-r4.ebuild b/app-crypt/tpm2-tss/tpm2-tss-3.2.0-r4.ebuild index ff68e249a0e9..1e76e7ee9d5f 100644 --- a/app-crypt/tpm2-tss/tpm2-tss-3.2.0-r4.ebuild +++ b/app-crypt/tpm2-tss/tpm2-tss-3.2.0-r4.ebuild @@ -3,7 +3,7 @@ EAPI=7 -inherit autotools linux-info multilib-minimal tmpfiles udev +inherit autotools flag-o-matic linux-info multilib-minimal tmpfiles udev DESCRIPTION="TCG Trusted Platform Module 2.0 Software Stack" HOMEPAGE="https://github.com/tpm2-software/tpm2-tss" @@ -38,6 +38,7 @@ BDEPEND="sys-apps/acl PATCHES=( "${FILESDIR}/${PN}-3.2.0-Dont-run-systemd-sysusers-in-Makefile.patch" "${FILESDIR}/${PN}-3.2.0-slibtool.patch" # 858674 + "${FILESDIR}/${PN}-3.2.0-test-fix-usage-of-FILE-in-unit-test-fapi-io.patch" ) pkg_setup() { @@ -60,6 +61,9 @@ src_prepare() { } multilib_src_configure() { + # tests fail with LTO enabbled. See bug 865275 and 865279 + filter-lto + ECONF_SOURCE=${S} econf \ --localstatedir=/var \ $(multilib_native_use_enable doc doxygen-doc) \ |