Menu

#1318 Cross-platform reproducable builds

3.0 Series
open
nobody
5
2 days ago
2025-02-11
Rainer Jung
No

Is it possible to create installers using makensis.exe (on Windows) or makensis (on Linux) based on the same nsi file and file tree which are identical as binary files?
We try to provide reproducable installer builds in the sense of
https://reproducible-builds.org
When we switch the platform used to run makensis, the produced installers slightly change.

Discussion

  • Rainer Jung

    Rainer Jung - 2025-02-12

    It seems we managed to be able to do cross-platform reproducible builds. So I am closing this.
    We used the following scons line to build the makensis installer (and tool all other files from the same binary download for Windows, that are used when building the installer directly on Windows):

    scons UNICODE=yes PREFIX=/home/myuser/install/nsis-3.10/bin SKIPPLUGINS=all SKIPUTILS=all SKIPMISC=all NSIS_CONFIG_CONST_DATA_PATH=no VERSION=3.10 install-compiler

     
    • Anders

      Anders - 2025-02-12

      Yes, the stubs and plug-in will always be different between Windows on Posix so copy them from Windows and only build makensis on Posix.

      If you really want reproducible builds:

      1. Build everything on Windows and set SOURCE_DATE_EPOCH on the command line to scons.
      2. Build makensis on Posix with the same SOURCE_DATE_EPOCH value.
      3. Copy the stubs and plug-in from your Windows build.
       
  • Rainer Jung

    Rainer Jung - 2025-02-12

    I can't close the ticket, but feel free to close it. Thanks.

     
  • Rainer Jung

    Rainer Jung - 2025-02-12

    Thanks! Can one find out the SOURCE_DATE_EPOCH that the project used for its own binary distribution? And doesn't SOURCE_DATE_EPOCH only influence the makensis binary, but not any application installer created by makensis using an nsi file?

     

    Last edit: Rainer Jung 2025-02-12
    • Anders

      Anders - 2025-02-13

      I added some extra details to the documentation. The official release does not set it but we will try to do it for the next release.

      When SOURCE_DATE_EPOCH is set, it is propagated to the stubs and plug-ins when compiling those. Even when setting it, you still need to copy the stubs and plug-in from Windows to Posix if you want to match a specific Windows build (and vice versa).

       
  • Anders

    Anders - 2 days ago
    • labels: --> reproducible builds
     

Log in to post a comment.

MongoDB Logo MongoDB