Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the build reproducible #376

Merged
merged 1 commit into from Oct 26, 2022
Merged

Conversation

lamby
Copy link
Contributor

@lamby lamby commented Oct 25, 2022

Whilst working on the Reproducible Builds effort I noticed that tpm2-pytss could not be built reproducibly.

This is due to the documentation embedding the current build date. This PR results in the build system using a date seeded from the SOURCE_DATE_EPOCH environment variable... if it exists.

I originally filed this in Debian as bug #1022777.

@williamcroberts
Copy link
Member

Please sign off your commit to make the DCO bot happy.

Are the docs considered part of the tpm2-pytss package on Debian? I couldn't find any existing packages.

@lamby
Copy link
Contributor Author

lamby commented Oct 25, 2022

Are the docs considered part of the tpm2-pytss package on Debian? I couldn't find any existing packages.

Yes. Look for the python-tpm2-pytss-doc package. :)

(Added the sign-off line..)

@williamcroberts
Copy link
Member

Are the docs considered part of the tpm2-pytss package on Debian? I couldn't find any existing packages.

Yes. Look for the python-tpm2-pytss-doc package. :)

Would it be better to get the year of last commit from git or would requiring git for the build be an issue?

@codecov
Copy link

codecov bot commented Oct 25, 2022

Codecov Report

Merging #376 (164ab37) into master (b4d3763) will increase coverage by 0.39%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #376      +/-   ##
==========================================
+ Coverage   88.41%   88.80%   +0.39%     
==========================================
  Files          18       18              
  Lines        6394     6394              
  Branches      979      828     -151     
==========================================
+ Hits         5653     5678      +25     
+ Misses        605      583      -22     
+ Partials      136      133       -3     
Impacted Files Coverage Δ
src/tpm2_pytss/encoding.py 92.42% <0.00%> (+2.28%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@lamby
Copy link
Contributor Author

lamby commented Oct 25, 2022

Would it be better to get the year of last commit from git or would requiring git for the build be an issue?

GIt (the .git/ directory and the git binaries themselves) are not guaranteed to be around for a build, no.

docs/conf.py Outdated Show resolved Hide resolved
Whilst working on the Reproducible Builds effort [0] I noticed that
tpm2-pytss could not be built reproducibly.

This is due to the documentation embedding the current build date. This PR
results in the build system using a date seeded from the `SOURCE_DATE_EPOCH`
environment variable... if it exists [1].

I originally filed this in Debian as bug #1022777 [2].

 [0] https://reproducible-builds.org/
 [1] https://reproducible-builds.org/specs/source-date-epoch/
 [2] https://bugs.debian.org/1022777

Signed-off-by: Chris Lamb <lamby@debian.org>
@williamcroberts williamcroberts merged commit 72b76e8 into tpm2-software:master Oct 26, 2022
37 checks passed
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.

None yet

2 participants