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 deb packages reproducible by NOT having gzipped time-stamp. #253

Open
shirishag75 opened this issue Feb 22, 2017 · 4 comments
Open
Milestone

Comments

@shirishag75
Copy link

Hi there,

I'm sure you have heard about reproducible builds . I ran lintian over a package mars-sim and found it generated quite a few warnings, as shown in mars-sim bug-tracker . Talking with reproducible-builds debian upstream came to know that it may well be because of src/main/java/org/vafer/jdeb/DebMaker.java . Please take a look at it.

@ebourg
Copy link
Collaborator

ebourg commented Feb 22, 2017

Hi,

In this case the .gz files weren't generated by jdeb, so unless jdeb reimplements strip-nondeterminism there isn't much we can do.

@tcurdt tcurdt added this to the 2.0 milestone Feb 25, 2017
@tbroyer
Copy link

tbroyer commented Apr 4, 2018

AFAICT, overwriting archive entries' modTime to 0 would help, and might even be enough. (there are a few uses of new Date() in DebMaker, but AFAICT only when signing with dpkg-sig method or generating the changes file)

@ebourg
Copy link
Collaborator

ebourg commented Apr 4, 2018

Supporting the SOURCE_DATE_EPOCH environment variable would be good too.

@tbroyer
Copy link

tbroyer commented Apr 4, 2018

FWIW, it looks to me like Mappers could set modTime (when jdeb is used from other tools, e.g. Nebula plugins for Gradle), but there does not seem to be a way to do this for control files.

As far as I'm concerned, adding some API such that this could be controlled at least for control files could be enough; the Nebula plugin for Gradle could then take advantage of it to respect Gradle's preserveFileTimestamps (I can't tell about the ordering of control files in jdeb, but content files are all handled by Gradle AFAICT so should –didn't actually checked– already respect reproducibleFileOrder). See https://docs.gradle.org/3.4/userguide/working_with_files.html#sec:reproducible_archives (which applies to JARs, WARs, EARs, ZIPs and TARs –builtin archive types–, but not DEBs –or RPMs for that matters)

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

No branches or pull requests

4 participants