-
-
Notifications
You must be signed in to change notification settings - Fork 157
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
fix: Ensure reproducable Deb package #747
Conversation
Each time building exaclty from the same source, ensure exaclty the same size deb package is generated. Signed-off-by: keliramu <ramunas.keliuotis@nordsec.com>
ceea871
to
c4959c5
Compare
@@ -391,14 +391,14 @@ func createFilesInsideDataTar(info *nfpm.Info, tw *tar.Writer) (md5buf bytes.Buf | |||
Format: tar.FormatGNU, | |||
Uname: file.FileInfo.Owner, | |||
Gname: file.FileInfo.Group, | |||
ModTime: file.FileInfo.MTime, | |||
ModTime: time.Unix(0, 0), |
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.
Probably ModTime
setting to zero should be controlled via some kind of flag or config option.
"./md5sums": md5sums, | ||
"./conffiles": conffiles(info), | ||
// ensure predefined sort order of these items | ||
filesToCreateNames := []string{ |
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.
Go map[string]
does not ensure predefined sort order when iterated via for ... range ...
and that is the cause of control.tar.gz
is different size when executed on the same input.
gonna merge this and continue working on it, thanks for the PR |
Each time building exaclty from the same source,
ensure exaclty the same size deb package is generated.