-
Notifications
You must be signed in to change notification settings - Fork 10
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
Reproducible Builds #157
Reproducible Builds #157
Conversation
Codecov Report
@@ Coverage Diff @@
## master #157 +/- ##
=======================================
Coverage 75.27% 75.27%
=======================================
Files 28 28
Lines 2419 2419
=======================================
Hits 1821 1821
Misses 459 459
Partials 139 139 Continue to review full report at Codecov.
|
When working tree is clean, use commit time as date in version command output.
Add '-s' and '-w' to linker flags set by mage build/install.
In clean builds, main.date is the commit date rather than the build date. Display 'Date' rather than 'Built' heading for this field in human readable output to make these semantics clearer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Confirmed repeatable on my system. Since we are not static / CGO is in use, not repeatable across systems with different ld
and basic libs.
Good point. Since the |
Refactor
github.com/sylabs/sif/v2/internal/pkg/git
to expose(*Description).CommitTime
. Remove(*Description).Reference()
and add(*Description).CommitHash()
in its place.Ensure builds are reproducible by:
(*Description).CommitTime
asmain.date
formage
builds when the working directory is clean.mage
builds.-trimpath
inmage
/goreleaser
builds.Harmonize linker flags used by
mage
/goreleaser
by adding-s -w
tomage
build/install commands.Use
Date:
rather thanBuilt:
insiftool version
output to clarify semantics of this value (in clean builds,main.date
is the commit date rather than the build date.Closes #156