From ede9a4f871026a96afddee35fc65d7e4c82d3925 Mon Sep 17 00:00:00 2001 From: Lans Zhang Date: Thu, 20 Jul 2017 13:51:38 +0800 Subject: [PATCH] tpm-tools: update to the latest and code style fixup Signed-off-by: Lans Zhang --- ...fix-bool-error-parseStringWithValues.patch | 0 .../tpm-tools-extendpcr.patch | 0 .../tpm-tools-1.3.8/tpm-tools-gcc-6.patch | 21 --------- .../recipes-tpm/tpm-tools/tpm-tools_1.3.8.bb | 24 ----------- .../recipes-tpm/tpm-tools/tpm-tools_git.bb | 43 +++++++++++++++++++ 5 files changed, 43 insertions(+), 45 deletions(-) rename meta-tpm/recipes-tpm/tpm-tools/{tpm-tools-1.3.8 => files}/03-fix-bool-error-parseStringWithValues.patch (100%) rename meta-tpm/recipes-tpm/tpm-tools/{tpm-tools-1.3.8 => files}/tpm-tools-extendpcr.patch (100%) delete mode 100644 meta-tpm/recipes-tpm/tpm-tools/tpm-tools-1.3.8/tpm-tools-gcc-6.patch delete mode 100644 meta-tpm/recipes-tpm/tpm-tools/tpm-tools_1.3.8.bb create mode 100644 meta-tpm/recipes-tpm/tpm-tools/tpm-tools_git.bb diff --git a/meta-tpm/recipes-tpm/tpm-tools/tpm-tools-1.3.8/03-fix-bool-error-parseStringWithValues.patch b/meta-tpm/recipes-tpm/tpm-tools/files/03-fix-bool-error-parseStringWithValues.patch similarity index 100% rename from meta-tpm/recipes-tpm/tpm-tools/tpm-tools-1.3.8/03-fix-bool-error-parseStringWithValues.patch rename to meta-tpm/recipes-tpm/tpm-tools/files/03-fix-bool-error-parseStringWithValues.patch diff --git a/meta-tpm/recipes-tpm/tpm-tools/tpm-tools-1.3.8/tpm-tools-extendpcr.patch b/meta-tpm/recipes-tpm/tpm-tools/files/tpm-tools-extendpcr.patch similarity index 100% rename from meta-tpm/recipes-tpm/tpm-tools/tpm-tools-1.3.8/tpm-tools-extendpcr.patch rename to meta-tpm/recipes-tpm/tpm-tools/files/tpm-tools-extendpcr.patch diff --git a/meta-tpm/recipes-tpm/tpm-tools/tpm-tools-1.3.8/tpm-tools-gcc-6.patch b/meta-tpm/recipes-tpm/tpm-tools/tpm-tools-1.3.8/tpm-tools-gcc-6.patch deleted file mode 100644 index eb4373d..0000000 --- a/meta-tpm/recipes-tpm/tpm-tools/tpm-tools-1.3.8/tpm-tools-gcc-6.patch +++ /dev/null @@ -1,21 +0,0 @@ ---- a/src/tpm_mgmt/tpm_present.c -+++ b/src/tpm_mgmt/tpm_present.c -@@ -349,13 +349,13 @@ - } - } while (flags[++i].name); - -- out_success: -+out_success: - logSuccess(argv[0]); - iRc = 0; -- out_close: -+out_close: - contextClose(hContext); -- out: -- if (szTpmPasswd && !isWellKnown) -- shredPasswd( szTpmPasswd ); -+out: -+ if (szTpmPasswd && !isWellKnown) -+ shredPasswd( szTpmPasswd ); - return iRc; - } diff --git a/meta-tpm/recipes-tpm/tpm-tools/tpm-tools_1.3.8.bb b/meta-tpm/recipes-tpm/tpm-tools/tpm-tools_1.3.8.bb deleted file mode 100644 index 5b5bbd8..0000000 --- a/meta-tpm/recipes-tpm/tpm-tools/tpm-tools_1.3.8.bb +++ /dev/null @@ -1,24 +0,0 @@ -SUMMARY = "The tpm-tools package contains commands to allow the platform administrator the ability to manage and diagnose the platform's TPM." -DESCRIPTION = " \ - The tpm-tools package contains commands to allow the platform administrator \ - the ability to manage and diagnose the platform's TPM. Additionally, the \ - package contains commands to utilize some of the capabilities available \ - in the TPM PKCS#11 interface implemented in the openCryptoki project. \ - " -SECTION = "tpm" -PR = "r0" -LICENSE = "CPL-1.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=059e8cd6165cb4c31e351f2b69388fd9" -DEPENDS = "libtspi openssl" - -SRC_URI += " \ - http://downloads.sourceforge.net/project/trousers/tpm-tools/1.3.8/tpm-tools-1.3.8.tar.gz \ - file://tpm-tools-extendpcr.patch \ - file://03-fix-bool-error-parseStringWithValues.patch \ - file://tpm-tools-gcc-6.patch \ -" - -SRC_URI[md5sum] = "85a978c4e03fefd4b73cbeadde7c4d0b" -SRC_URI[sha256sum] = "66eb4ff095542403db6b4bd4b574e8a5c08084fe4e9e5aa9a829ee84e20bea83" - -inherit autotools gettext diff --git a/meta-tpm/recipes-tpm/tpm-tools/tpm-tools_git.bb b/meta-tpm/recipes-tpm/tpm-tools/tpm-tools_git.bb new file mode 100644 index 0000000..cb59e8c --- /dev/null +++ b/meta-tpm/recipes-tpm/tpm-tools/tpm-tools_git.bb @@ -0,0 +1,43 @@ +SUMMARY = "The tpm-tools package contains commands to allow the platform administrator the ability to manage and diagnose the platform's TPM." +DESCRIPTION = "\ +The tpm-tools package contains commands to allow the platform administrator \ +the ability to manage and diagnose the platform's TPM. Additionally, the \ +package contains commands to utilize some of the capabilities available \ +in the TPM PKCS#11 interface implemented in the openCryptoki project. \ +" +SECTION = "security/tpm" + +LICENSE = "CPL-1.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=059e8cd6165cb4c31e351f2b69388fd9" + +DEPENDS = "libtspi openssl" +DEPENDS_class-native = "trousers-native" + +PV = "1.3.9.1+git${SRCPV}" + +SRC_URI = "\ + git://git.code.sf.net/p/trousers/tpm-tools \ + file://tpm-tools-extendpcr.patch \ + file://03-fix-bool-error-parseStringWithValues.patch;apply=0 \ +" +SRCREV = "bdf9f1bc8f63cd6fc370c2deb58d03ac55079e84" + +S = "${WORKDIR}/git" + +inherit autotools-brokensep gettext + +do_configure_prepend() { + mkdir -p po + mkdir -p m4 + cp -R po_/* po/ + touch po/Makefile.in.in + touch m4/Makefile.am +} + +do_install_append() { + #install -m 0755 "src/tpm_mgmt/tpm_startup" "${D}${sbindir}/tpm_startup" + #install -m 0744 "src/tpm_mgmt/tpm_reset" "${D}${sbindir}/tpm_reset" + #install -m 0744 "../tpm_integrationtest" "${D}${bindir}/tpm_integrationtest" +} + +BBCLASSEXTEND = "native"