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

Deterministic Builds #2454

Closed
faboweb opened this issue Jan 8, 2018 · 10 comments
Closed

Deterministic Builds #2454

faboweb opened this issue Jan 8, 2018 · 10 comments
Labels

Comments

@faboweb
Copy link

faboweb commented Jan 8, 2018

Electron-builder version: 19.52.1
Targets: Windows.NSIS, Linux.AppImage

Running packaging (using the programmatic API) twice gives me two different checksums for the output '.exe'|'.AppImage'. The rest of the files do not seem to change. I wonder where the non-determinism has it's root and if there is a possibility to have deterministic builds?

@develar
Copy link
Member

develar commented Jan 8, 2018

@probonopd Could you please comment about AppImage?

@probonopd
Copy link

Not sure I understand the question. It is obvious that the .exe will have a different checksum than the .AppImage but I guess that was not the question.

@faboweb
Copy link
Author

faboweb commented Jan 8, 2018

No, the question was, why the output .AppImage has another checksum every time. (Thx for the help!)

@probonopd
Copy link

Different timestamps in the squashfs image come to mind immediately.

@faboweb
Copy link
Author

faboweb commented Jan 10, 2018

Is there a known possibility to remove the timestamps?

@probonopd
Copy link

probonopd commented Jan 11, 2018

So you are technically looking to produce "reproducible builds".

Since a type-2 AppImage contains a squashfs file, the tool used to generate the squashfs must be told to remove them. It was discussed here:
https://sourceforge.net/p/squashfs/mailman/message/35503759/

(If you would like to see support for this in appimagetool, then please open a feature request issue or ideally send a pull request on https://github.com/AppImage/AppImageKit.)

@faboweb
Copy link
Author

faboweb commented Jan 23, 2018

Awesome! Thx a lot for the information! Looking forward to it or will aid when I find time.

Is the Windows NSIS installer also using AppImage?

@probonopd
Copy link

Is the Windows NSIS installer also using AppImage?

No, AppImage is Linux only.

@develar
Copy link
Member

develar commented Jan 24, 2018

We do our best to ensure that build from the same sources will be the same. For example, even if you use unreliable and buggy npm instead of yarn, all internal npm fields are removed from node modules package.json.

Why it is important? For differential updates. We do use CDC (content defined chunking) but anyway. Problem is that in case of Windows code signing your builds will be different in any case (code signing dramatically changes the file). And you cannot get the same checksum even if you build from the same sources (timestams).

Linux — see above #2454 (comment) ("file issue to AppImageKit").

@faboweb
Copy link
Author

faboweb commented Jan 24, 2018

Thank you two for your assistance!

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

No branches or pull requests

3 participants