Skip to content

Conversation

mcr
Copy link

@mcr mcr commented May 30, 2025

when building against a libtss from source code, the git tree is sometimes dirty, and so libtss puts that info into the VERSION file.
But, it's not exactly a correct prerelease SemVer string.... so just blank that part before comparing to required version.

Copy link
Collaborator

@Superhepper Superhepper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR.
Yes this seems reasonable. I wonder if it would be possible to issue a warning or an info message that the version seems to indicate a non officiell release.

@wiktor-k
Copy link
Collaborator

wiktor-k commented Jun 1, 2025

Aaah, so without this fix the version parsing fails? I'd add that info to the commit message (so that it's clear it's a bug fix when using prerelease sources).

I'd be good to drop the commented out eprintln.

Thanks for your change!

@Superhepper
Copy link
Collaborator

No updates on this one a long time.

In the current main it is no longer be possible to build from a source that has version file that indicates that the version is less then minimum required tpm2-tss version. And with bundled feature I think it will be less likely that people will build from source except for testing purposes.

When it comes to this the parsing will not fail it will just fail to recognize that anything with a no standard pre-release tag can be compared to proper version number so even if the minim required version is e.g. 4.0.1 but you provide 4.0.2-97-a1b2c4 the build scripts will claim that it does not full fill the version requirements.

The easy workaround for this is to simply modify the VERSION file and remove the dirty part.

If this is still an issue in the future that will require fix then please open a new PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants