tpm2-software / tpm2-tools

The source repository for the Trusted Platform Module (TPM2.0) tools
https://tpm2-software.github.io
717 stars 378 forks source link

use of source code from tpm2.0-tss tests #5

Closed flihp closed 8 years ago

flihp commented 8 years ago

Resolving #3 will fix much of this. Still though there are bits of the tools that reference source files that aren't exposed as libraries. Specifically the use of code from the SAPI test programs here:

https://github.com/01org/tpm2.0-tools/blob/master/sapi-tools/Makefile.am#L75 https://github.com/01org/tpm2.0-tools/blob/master/sapi-tools/Makefile.am#L58

is very strange and unfriendly to packaging. If these source files are useful to code outside of the sapi tree they need to be exposed as a library.

flihp commented 8 years ago

This issue is terribly general. It's a real issue but difficult to take meaningful action on due to the scope of the problem. It needs to be decomposed into something actionable. This is in progress.

gwei3 commented 8 years ago

@flihp, do you need more discussion or help on this?

flihp commented 8 years ago

if you've got ideas I'd love to hear them. My previous comment is mostly a precursor to me closing this overly general issue and breaking it up into smaller more actionable tasks.

gwei3 commented 8 years ago

I would like to duplicate all the source code under TPM2.0-TSS/test/common/sample/ to tpm2.0-tools/sapi-tools/utilities/ folder, remove the source code not used in the new location, thus to decouple from source code of TPM2.0-TSS first.

flihp commented 8 years ago

That's one way to do it. Alternatively we could move the tools into a 'tools' directory in the TPM2.0-TSS repo and eliminate the duplication all together. I'm sure there are drawbacks to this approach as well but with a little git magic I'm pretty sure we can preserve the short history of the tools repo. I haven't thought this through much though. Thoughts?

wcarthur1 commented 8 years ago

I’d rather not duplicate code if at all possible—maintenance nightmare.

Will Arthur Intel Corporation Server Security Firmware 803-216-2101

From: Philip Tricca [mailto:notifications@github.com] Sent: Wednesday, January 6, 2016 12:16 PM To: 01org/tpm2.0-tools tpm2.0-tools@noreply.github.com Subject: Re: [tpm2.0-tools] use of source code from tpm2.0-tss tests (#5)

That's one way to do it. Alternatively we could move the tools into a 'tools' directory in the TPM2.0-TSS repo and eliminate the duplication all together. I'm sure there are drawbacks to this approach as well but with a little git magic I'm pretty sure we can preserve the short history of the tools repo. I haven't thought this through much though. Thoughts?

— Reply to this email directly or view it on GitHubhttps://github.com/01org/tpm2.0-tools/issues/5#issuecomment-169393197.

flihp commented 8 years ago

I think that's a :+1: for migrating the tools over to the TPM2.0-TSS repo?

gwei3 commented 8 years ago

We'd better resolve the dependency issue without migrating. We are regarding the tpm2.0-tools as the first app build upon TPM2.0-TSS, which is a really good example to showcase how to build apps based on TPM2.0-TSS, and can help finding and resolve the problem for how to prepare TPM2.0-TSS for using by standalone apps. We can migrate tpm2.0-tools, but we can't migrate all future apps developed by different people.

flihp commented 8 years ago

This is really an argument for a higher level interface. The only thing that the TPM2.0-TSS repo exposes for consumption by external parties is the SAPI/TCTI interfaces. Any one who builds their software with dependencies on the internals of the source repo has earned their fate.

Regardless we need to pick a direction and go with it. All other work-arounds that I've looked at are worse than duplicating code / combining the repos. Since this is @gwei3 's repo I'll follow his direction which seems to be keeping these two repos separate. I'll have a PR together in a bit.