[meta-security,1/6] tpm2-tools: fix missing version number

Message ID TY2PR02MB367874688F7BC483F7E6E0E281EB9@TY2PR02MB3678.apcprd02.prod.outlook.com
State Accepted, archived
Delegated to: Armin Kuster
Headers show
Series [meta-security,1/6] tpm2-tools: fix missing version number | expand

Commit Message

Petr Gotthard April 10, 2022, 3:30 p.m. UTC
Calling autoreconf outside git repo causes the version number to
be null. This patch makes the version number fixed.

Signed-off-by: Petr Gotthard <petr.gotthard@advantech.cz>
---
 meta-tpm/recipes-tpm2/tpm2-tools/tpm2-tools_5.2.bb | 5 +++++
 1 file changed, 5 insertions(+)

-- 
2.25.1

Patch

diff --git a/meta-tpm/recipes-tpm2/tpm2-tools/tpm2-tools_5.2.bb b/meta-tpm/recipes-tpm2/tpm2-tools/tpm2-tools_5.2.bb
index 6e95a0e..f924038 100644
--- a/meta-tpm/recipes-tpm2/tpm2-tools/tpm2-tools_5.2.bb
+++ b/meta-tpm/recipes-tpm2/tpm2-tools/tpm2-tools_5.2.bb
@@ -11,3 +11,8 @@  SRC_URI = "https://github.com/tpm2-software/${BPN}/releases/download/${PV}/${BPN
 SRC_URI[sha256sum] = "c0b402f6a7b3456e8eb2445211e2d41c46c7e769e05fe4d8909ff64119f7a630"
 
 inherit autotools pkgconfig bash-completion
+
+do_configure:prepend() {
+    # do not extract the version number from git
+    sed -i -e 's/m4_esyscmd_s(\[git describe --tags --always --dirty\])/${PV}/' ${S}/configure.ac
+}