goreleaser / nfpm

nFPM is Not FPM - a simple deb, rpm, apk, ipk, and arch linux packager written in Go
https://nfpm.goreleaser.com/
MIT License
2.13k stars 157 forks source link

feat: reproducible packages #748

Closed caarlos0 closed 8 months ago

caarlos0 commented 8 months ago

This adds a new mtime fields to the root of the yaml configuration file, and replace all occurrences of time.Now() with its value.

This should help making packaging reproducible.

Also, if that value is empty, it will default to $SOURCE_DATE_EPOCH as per reproducible-builds.org

It also fixes several instances in which ordering could change, changing the contents of the package slightly (namely, usage of maps).

closes #744 closes #734

cloudflare-pages[bot] commented 8 months ago

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: f2da005
Status: ✅  Deploy successful!
Preview URL: https://387daf8f.nfpm.pages.dev
Branch Preview URL: https://dates.nfpm.pages.dev

View logs

caarlos0 commented 8 months ago

PS: jury not set on the field name, feel free to suggest others

codecov[bot] commented 8 months ago

Codecov Report

Attention: 31 lines in your changes are missing coverage. Please review.

Comparison is base (60cff80) 75.36% compared to head (f2da005) 74.93%. Report is 2 commits behind head on main.

Files Patch % Lines
deb/deb.go 67.21% 11 Missing and 9 partials :warning:
arch/arch.go 72.22% 0 Missing and 5 partials :warning:
nfpm.go 89.28% 2 Missing and 1 partial :warning:
apk/apk.go 85.71% 1 Missing and 1 partial :warning:
files/files.go 94.44% 0 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #748 +/- ## ========================================== - Coverage 75.36% 74.93% -0.43% ========================================== Files 10 11 +1 Lines 2440 2466 +26 ========================================== + Hits 1839 1848 +9 - Misses 425 439 +14 - Partials 176 179 +3 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.