diff options
Diffstat (limited to 'app-crypt/tpm2-tools')
-rw-r--r-- | app-crypt/tpm2-tools/Manifest | 3 | ||||
-rw-r--r-- | app-crypt/tpm2-tools/files/tpm2-tools-5.6-test-eventlog.sh-Fix-accidental-deletions.patch | 68 | ||||
-rw-r--r-- | app-crypt/tpm2-tools/tpm2-tools-5.6-r1.ebuild | 4 |
3 files changed, 73 insertions, 2 deletions
diff --git a/app-crypt/tpm2-tools/Manifest b/app-crypt/tpm2-tools/Manifest index ff0955b57b54..7b0c6ee84cc9 100644 --- a/app-crypt/tpm2-tools/Manifest +++ b/app-crypt/tpm2-tools/Manifest @@ -1,9 +1,10 @@ AUX tpm2-tools-5.6-Makefile-am-Dont-require-pandoc-for-tests.patch 408 BLAKE2B a0d042d7a1beeba1b671c130179f416aa53c1d59a66787fde69bbf9c9a6ce1d8e8aa4f074e2c2304160bcd3725287e78671c62d9a5ef348fb172bbad17e4fd8a SHA512 c9e3035a413540a373fb8de4bb5f0f18347c836ed338bc2d2dacbdfc0274aa5087786b894ca2d484038dd90499e97618039ac88743fb5e466e4b42fa522dc99e AUX tpm2-tools-5.6-bashism.patch 1802 BLAKE2B 28bf27329d0fbb314c3bc297788e6ae5615c53f74c7a11784e0200ad39f6ec5e887aa7341130b4d9136b6639147cbd11546dbbc1552bb59e565debd4594595f8 SHA512 784d06e6933e108409994b21b5d55c498a800e5a693889c6ab06378c2babbb7bb6ea18d0bae9fa3fee13ca961d6ff21ebe363962bd998f5c42950c8f820fe2d9 AUX tpm2-tools-5.6-test-eventlog-fix-check-eventlog.sh-if-efivar.h-exis.patch 4136 BLAKE2B c7531d8425ac1df9610c8371a3a01a4cf68c224ca5bf2d8d5f68187c6013ab16d8c16ad261c53319caae04769421398bbbaa0710d95b202c43f62722b631f1d6 SHA512 8f3c38417d546beb8cf7e3410a5d91af59893eb7b08ee0060c5c5363f316490ae904a456009a2643e95e4db3fefc85795884fc91c2fb492e8911d92c97e6aba5 +AUX tpm2-tools-5.6-test-eventlog.sh-Fix-accidental-deletions.patch 2805 BLAKE2B f8d1f063fef10c3a8d2324a70b4ee6efc99a4a4a08ce79db822169a65319d4fc50dc6a62036d74a1da43d09a008d33d09fd1efcb2c109e5e67ffed9e56b36412 SHA512 c01d78bf67ecc57a6f594739a20ec6e4c0e78ef2c062e7f82594d17cec86b907b0c2aacbb44be119a7d2b2a01f3d0931ad558d2e775ba1d75eac2ddeb1570b8c DIST tpm2-tools-5.5.tar.gz 1241390 BLAKE2B 2225f9e0835988351f84ed06f914616e25fd65bacaa93b51d0bb04185314efb9a6f60eb3539b250f54b2c2ba590f1b76594df3e625e45c8d37e38d13371bea26 SHA512 24f72a3e9840d531d900e96771a863baae1c71a76fcad0fda8020dff06acd8e3b65b86401ace21f034766403caf9ae97ce710ff6013bb7ed25657a6ecf325470 DIST tpm2-tools-5.6-tpm2_eventlog-Create-raw-and-pretty-print-format-for.patch.xz 47916 BLAKE2B 1bbc84f58ad46507417c89be1b4ce2450fb33cf3abe8f080c23890d96be85379f135ef1dbf4b580e1a386fa6d5ebc4fbaab351b5238bbf1011bb97b0f49a847b SHA512 3db0daa39a8dc756d7cb25e3673149dc3eeafd7410f2c6537464431b501e3704a886d9b7a9acd71440d6d419649dd471fd6f9247d593c89a30b05774a8d1b3de DIST tpm2-tools-5.6.tar.gz 1266731 BLAKE2B fe88722c26d62128cd6dfbdd8ef2568656a75fe27b1443fed28387d0db1f50b7d0651819d34dfa98acde785b4cfb4e7c11420b110bb5333ed2bb6b67cdd4fc70 SHA512 14216f29ed3ecca5fbe356ed3744c8b6b25a62ff11b2aed596d11101328c8bfd29a02f6ca5a218f9a4477a5e9648c50f0ae96e71de0b4ff5ea1f98ebeeb73cd7 EBUILD tpm2-tools-5.5.ebuild 1643 BLAKE2B 5029ad3299b8db9d0005866660db88884833619fade7131a6b4b7b42f1ce62a2fe8eb94ad175b889bd2d9c2b6d4bf5d91d2455bd0ea0a9ad8e0c59565c73b1e2 SHA512 195dc492373400638ec7baa5c191e7eeea646523f296ff16422ae56d7347e5e6fdea12d199e8d32bc700790f9a206b5e84b0e52348f67b4ad681e6889cf1703e -EBUILD tpm2-tools-5.6-r1.ebuild 2136 BLAKE2B 9e38fb753afab5ef0051974999e02b8278ee58b56f85f47af710528a5f152941d2a271b044353bc42311457b194911dfe694de68f36e26982e444badff16a041 SHA512 e13b283a2d49273ec813d5d114f3e70db4c4461d6b36980791a8b0f66f734114edc840a3903e28009d831eb5dd7d4fbddf85fb8525304797e0cc2d7099f2f673 +EBUILD tpm2-tools-5.6-r1.ebuild 2230 BLAKE2B 29bd871f43e77ad687efdaf30866929b0c78b7013e2fb3aec8ffe6aee30bb184efee7b96a3e0cd487bd4c6510494f7b8df91ddecfc43c53b711cdbc45f69271f SHA512 ddc4b86bf59291e6fdbb0b443435f135992d4e0ba9e7b69ab0a5efb0f950ed8004fa9a3155cbb1fc26c41b59241769d6c16e65180ae474b48b43ce8e27d20a9f MISC metadata.xml 560 BLAKE2B fe8daaba2a7586247537f8ed7b92769676b20f2c1377f7bb582dff49e06cf3f9beba4f79e28f10ea76d67d089eb152b060b091414dd9b47c5694ca153211421f SHA512 a744fcc50c7e44b1939190150404aee9054eab8e921e6f63cafa58dc80be5f20692632509de85399b6a9633701da72fd951e8bcfbe9e5177f315fa1dcbcc9ee5 diff --git a/app-crypt/tpm2-tools/files/tpm2-tools-5.6-test-eventlog.sh-Fix-accidental-deletions.patch b/app-crypt/tpm2-tools/files/tpm2-tools-5.6-test-eventlog.sh-Fix-accidental-deletions.patch new file mode 100644 index 000000000000..7274ee40827a --- /dev/null +++ b/app-crypt/tpm2-tools/files/tpm2-tools-5.6-test-eventlog.sh-Fix-accidental-deletions.patch @@ -0,0 +1,68 @@ +From 4dec5295361d753c3466bc9e8b0ae3a3cc58dff5 Mon Sep 17 00:00:00 2001 +From: Juergen Repp <juergen_repp@web.de> +Date: Thu, 4 Apr 2024 09:42:51 +0200 +Subject: [PATCH] test eventlog.sh Fix accidental deletions. + +* Accidental deletions made in commit 196e3d439407e81040ced054a8ed302489348a9d + are undone. +* python3 is used as default instead of python. + +Signed-off-by: Juergen Repp <juergen_repp@web.de> +--- + test/integration/tests/eventlog.sh | 33 ++++++++++++++++++++++++++++-- + 1 file changed, 31 insertions(+), 2 deletions(-) + +diff --git a/test/integration/tests/eventlog.sh b/test/integration/tests/eventlog.sh +index 9d5290f0..e7c13706 100755 +--- a/test/integration/tests/eventlog.sh ++++ b/test/integration/tests/eventlog.sh +@@ -3,7 +3,7 @@ + set -E + shopt -s expand_aliases + +-alias python=${PYTHON-python} ++alias python=${PYTHON-python3} + + yaml_validate() { + cmd=$1 +@@ -88,7 +88,36 @@ expect_pass() { + expect_fail + expect_fail foo + expect_fail foo bar +-expect_fail ${srcdir}/test/integration/fix ++expect_fail ${srcdir}/test/integration/fixtures/event-bad.bin ++ ++expect_pass ${srcdir}/test/integration/fixtures/specid-vendordata.bin ++expect_pass ${srcdir}/test/integration/fixtures/event.bin ++expect_pass ${srcdir}/test/integration/fixtures/event-uefivar.bin ++expect_pass ${srcdir}/test/integration/fixtures/event-uefiaction.bin ++expect_pass ${srcdir}/test/integration/fixtures/event-uefiservices.bin ++expect_pass ${srcdir}/test/integration/fixtures/event-uefi-sha1-log.bin ++expect_pass ${srcdir}/test/integration/fixtures/event-bootorder.bin ++expect_pass ${srcdir}/test/integration/fixtures/event-postcode.bin ++ ++# Make sure that --eventlog-version=2 works on complete TPM2 logs ++expect_pass ${srcdir}/test/integration/fixtures/event-arch-linux.bin --eventlog-version=2 ++expect_pass ${srcdir}/test/integration/fixtures/event-gce-ubuntu-2104-log.bin --eventlog-version=2 ++expect_pass ${srcdir}/test/integration/fixtures/event-sd-boot-fedora37.bin --eventlog-version=2 ++expect_pass ${srcdir}/test/integration/fixtures/event-moklisttrusted.bin --eventlog-version=2 ++ ++# Pick an event with leading whitespace and validate we have ++# preserved it correctly after parsing the YAML ++event=$(yaml_validate "print(y['events'][80]['Event']['String'])" < ${srcdir}/test/integration/fixtures/event-moklisttrusted.bin.yaml | tr -d '\0') ++expect=$(echo -e "grub_cmd: menuentry UEFI Firmware Settings --id uefi-firmware {\n\t\tfwsetup\n\t}") ++if test "$event" != "$expect" ++then ++ echo "Got $event" ++ echo "Want $expect" ++ exit 1 ++fi ++ ++# Compare strings generated by tpm2_eventlog with binary data of the corresponding ++# events. + hex_file="${srcdir}/test/integration/fixtures/event-moklisttrusted-hex.yaml" + tool_file="${srcdir}/test/integration/fixtures/event-moklisttrusted.bin.yaml" + +-- +2.43.2 + diff --git a/app-crypt/tpm2-tools/tpm2-tools-5.6-r1.ebuild b/app-crypt/tpm2-tools/tpm2-tools-5.6-r1.ebuild index 04fb5536f1f5..ab59eed9520d 100644 --- a/app-crypt/tpm2-tools/tpm2-tools-5.6-r1.ebuild +++ b/app-crypt/tpm2-tools/tpm2-tools-5.6-r1.ebuild @@ -42,6 +42,7 @@ PATCHES=( "${WORKDIR}/${PN}-5.6-tpm2_eventlog-Create-raw-and-pretty-print-format-for.patch" "${FILESDIR}/${PN}-5.6-Makefile-am-Dont-require-pandoc-for-tests.patch" "${FILESDIR}/${PN}-5.6-bashism.patch" + "${FILESDIR}/${PN}-5.6-test-eventlog.sh-Fix-accidental-deletions.patch" ) python_check_deps() { @@ -73,7 +74,8 @@ src_install() { local utils=( "${ED}"/usr/bin/tpm2_* ) utils=("${utils[@]##*/}") # these utiltites don't have bash completions - local nobashcomp=( tpm2_encodeobject tpm2_getpolicydigest tpm2_sessionconfig ) + local nobashcomp=( tpm2_encodeobject tpm2_getpolicydigest\ + tpm2_sessionconfig tpm2_tr_encode) mapfile -d $'\0' -t utils < <(printf '%s\0' "${utils[@]}" | grep -Ezvw "${nobashcomp[@]/#/-e}") bashcomp_alias tpm2 "${utils[@]}" } |