trousers: add package
PATCH 1/2 trousers: add package
Signed-off-by Armin Kuster <[email protected]>
--- .../trousers/files/07-read_data-not-inline.patch | 65 ++++++++++++ recipes-tpm/trousers/files/tcsd.service | 10 ++ recipes-tpm/trousers/files/trousers-udev.rules | 2 + recipes-tpm/trousers/files/trousers.init.sh | 65 ++++++++++++ recipes-tpm/trousers/trousers_0.3.13.bb | 112 +++++++++++++++++++++ 5 files changed, 254 insertions(+) create mode 100644 recipes-tpm/trousers/files/07-read_data-not-inline.patch create mode 100644 recipes-tpm/trousers/files/tcsd.service create mode 100644 recipes-tpm/trousers/files/trousers-udev.rules create mode 100644 recipes-tpm/trousers/files/trousers.init.sh create mode 100644 recipes-tpm/trousers/trousers_0.3.13.bb
recipes-tpm/trousers/files/07-read_data-not-inline.patch new file +65 -0
@@ -0,0 +1,65 @@ +Title: Remove inline keyword for read_data and write_data +Date: 2015-06-28 +Origin: https://chromium.googlesource.com/chromiumos%2Fthird_party%2Ftrousers/+/c9c7cd50640c2d8882a04f59f1bcb383a88b19e9 +Bug-Debian: http://bugs.debian.org/778149 +Index: trousers/src/include/tcsps.h +=================================================================== +--- trousers.orig/src/include/tcsps.h ++++ trousers/src/include/tcsps.h +@@ -23,13 +23,6 @@ int get_file(); + int put_file(int); + void close_file(int); + void ps_destroy(); +-#ifdef SOLARIS +-TSS_RESULT read_data(int, void *, UINT32); +-TSS_RESULT write_data(int, void *, UINT32); +-#else +-inline TSS_RESULT read_data(int, void *, UINT32); +-inline TSS_RESULT write_data(int, void *, UINT32); +-#endif + int write_key_init(int, UINT32, UINT32, UINT32); + TSS_RESULT cache_key(UINT32, UINT16, TSS_UUID *, TSS_UUID *, UINT16, UINT32, UINT32); + TSS_RESULT UnloadBlob_KEY_PS(UINT16 *, BYTE *, TSS_KEY *); +Index: trousers/src/include/tspps.h +=================================================================== +--- trousers.orig/src/include/tspps.h ++++ trousers/src/include/tspps.h +@@ -18,8 +18,8 @@ + + TSS_RESULT get_file(int *); + int put_file(int); +-inline TSS_RESULT read_data(int, void *, UINT32); +-inline TSS_RESULT write_data(int, void *, UINT32); ++TSS_RESULT read_data(int, void *, UINT32); ++TSS_RESULT write_data(int, void *, UINT32); + UINT32 psfile_get_num_keys(int); + TSS_RESULT psfile_get_parent_uuid_by_uuid(int, TSS_UUID *, TSS_UUID *); + TSS_RESULT psfile_remove_key_by_uuid(int, TSS_UUID *); +Index: trousers/src/tcs/ps/ps_utils.c +=================================================================== +--- trousers.orig/src/tcs/ps/ps_utils.c ++++ trousers/src/tcs/ps/ps_utils.c +@@ -42,11 +42,7 @@ + struct key_disk_cache *key_disk_cache_head = NULL; + + +-#ifdef SOLARIS + TSS_RESULT +-#else +-inline TSS_RESULT +-#endif + read_data(int fd, void *data, UINT32 size) + { + int rc; +@@ -64,11 +60,7 @@ read_data(int fd, void *data, UINT32 siz + } + + +-#ifdef SOLARIS + TSS_RESULT +-#else +-inline TSS_RESULT +-#endif + write_data(int fd, void *data, UINT32 size) + { + int rc;
recipes-tpm/trousers/files/tcsd.service new file +10 -0
@@ -0,0 +1,10 @@ +[Unit] +Description=TCG Core Services Daemon +After=syslog.target + +[Service] +Type=forking +ExecStart=@SBINDIR@/tcsd + +[Install] +WantedBy=multi-user.target
recipes-tpm/trousers/files/trousers-udev.rules new file +2 -0
@@ -0,0 +1,2 @@ +# trousers daemon expects tpm device to be owned by tss user & group +KERNEL=="tpm[0-9]*", MODE="0600", OWNER="tss", GROUP="tss"
recipes-tpm/trousers/files/trousers.init.sh new file +65 -0
65 lines not on this page · raw message
recipes-tpm/trousers/trousers_0.3.13.bb new file +112 -0
112 lines not on this page · raw message
Signature · 1 line
2.3.5
PATCH 2/2 tpm-tools: add package
Signed-off-by Armin Kuster <[email protected]>
--- .../03-fix-bool-error-parseStringWithValues.patch | 30 +++ .../tpm-tools-1.3.8/tpm-tools-extendpcr.patch | 244 +++++++++++++++++++++ recipes-tpm/tpm-tools/tpm-tools_1.3.8.bb | 22 ++ 3 files changed, 296 insertions(+) create mode 100644 recipes-tpm/tpm-tools/tpm-tools-1.3.8/03-fix-bool-error-parseStringWithValues.patch create mode 100644 recipes-tpm/tpm-tools/tpm-tools-1.3.8/tpm-tools-extendpcr.patch create mode 100644 recipes-tpm/tpm-tools/tpm-tools_1.3.8.bb
recipes-tpm/tpm-tools/tpm-tools-1.3.8/03-fix-bool-error-parseStringWithValues.patch new file +30 -0
@@ -0,0 +1,30 @@ +Title: Fix boolean comparison error (and FTBFS with gcc-5) +Date: 2015-06-28 +Author: Pierre Chifflier <[email protected]> +Bug-Debian: http://bugs.debian.org/778147 +Index: tpm-tools/src/tpm_mgmt/tpm_nvcommon.c +=================================================================== +--- tpm-tools.orig/src/tpm_mgmt/tpm_nvcommon.c ++++ tpm-tools/src/tpm_mgmt/tpm_nvcommon.c +@@ -140,8 +140,8 @@ int parseStringWithValues(const char *aA + aArg); + return -1; + } +- if (!aArg[offset+numbytes] == '|' && +- !aArg[offset+numbytes] == 0) { ++ if (!(aArg[offset+numbytes] == '|' || ++ aArg[offset+numbytes] == 0)) { + logError(_("Illegal character following " + "hexadecimal number in %s\n"), + aArg + offset); +@@ -164,8 +164,8 @@ int parseStringWithValues(const char *aA + return -1; + } + +- if (!aArg[offset+numbytes] == '|' && +- !aArg[offset+numbytes] == 0) { ++ if (!(aArg[offset+numbytes] == '|' || ++ aArg[offset+numbytes] == 0)) { + logError(_("Illegal character following decimal " + "number in %s\n"), + aArg + offset);
recipes-tpm/tpm-tools/tpm-tools-1.3.8/tpm-tools-extendpcr.patch new file +244 -0
244 lines not on this page · raw message
recipes-tpm/tpm-tools/tpm-tools_1.3.8.bb new file +22 -0
@@ -0,0 +1,22 @@ +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" +LICENSE = "CPL-1.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=059e8cd6165cb4c31e351f2b69388fd9" +DEPENDS = "libtspi openssl" + +SRC_URI += " \ + http://downloads.sourceforge.net/project/trousers/${BPN}/${PV}/${BP}.tar.gz \ + file://tpm-tools-extendpcr.patch \ + file://03-fix-bool-error-parseStringWithValues.patch \ +" + +SRC_URI[md5sum] = "85a978c4e03fefd4b73cbeadde7c4d0b" +SRC_URI[sha256sum] = "66eb4ff095542403db6b4bd4b574e8a5c08084fe4e9e5aa9a829ee84e20bea83" + +inherit autotools gettext
Signature · 1 line
2.3.5