fix(boot): sort readdir output for reproducibility#9861
Merged
emillon merged 2 commits intoocaml:mainfrom Jan 30, 2024
Merged
Conversation
Fixes ocaml#9794 `_boot/dune.exe` is installed, so it needs to be reproducible. This change ensures that the source files are scanned in an order that is independent from the underlying directory entries. This has been tested with `disorderfs --shuffle-dirents=yes`: two runs of `make bootstrap` create the same binary. Signed-off-by: Etienne Millon <me@emillon.org>
eb1d84d to
c84d187
Compare
bmwiedemann
approved these changes
Jan 30, 2024
bmwiedemann
left a comment
There was a problem hiding this comment.
With #9735 this produced bit-identical binaries in my tests for openSUSE.
Leonidas-from-XIV
approved these changes
Jan 30, 2024
Collaborator
Author
|
Yes, this is only used to build dune itself. |
emillon
added a commit
to emillon/dune
that referenced
this pull request
Feb 5, 2024
Fixes ocaml#9794 `_boot/dune.exe` is installed, so it needs to be reproducible. This change ensures that the source files are scanned in an order that is independent from the underlying directory entries. This has been tested with `disorderfs --shuffle-dirents=yes`: two runs of `make bootstrap` create the same binary. Signed-off-by: Etienne Millon <me@emillon.org>
emillon
added a commit
that referenced
this pull request
Feb 5, 2024
Fixes #9794 `_boot/dune.exe` is installed, so it needs to be reproducible. This change ensures that the source files are scanned in an order that is independent from the underlying directory entries. This has been tested with `disorderfs --shuffle-dirents=yes`: two runs of `make bootstrap` create the same binary. Signed-off-by: Etienne Millon <me@emillon.org>
emillon
added a commit
to emillon/opam-repository
that referenced
this pull request
Feb 5, 2024
CHANGES: - Fix performance regression for incremental builds (ocaml/dune#9769, fixes ocaml/dune#9738, @rgrinberg) - Fix `dune ocaml top-module` to correctly handle absolute paths. (ocaml/dune#8249, fixes ocaml/dune#7370, @Alizter) - subst: ignore broken symlinks when looking at source files (ocaml/dune#9810, fixes ocaml/dune#9593, @emillon) - subst: do not fail on 32-bit systems when large files are encountered. Just log a warning in this case. (ocaml/dune#9811, fixes ocaml/dune#9538, @emillon) - boot: sort directory entries in readdir. This makes the dune binary reproducible in terms of filesystem order. (ocaml/dune#9861, fixes ocaml/dune#9794, @emillon)
nberth
pushed a commit
to nberth/opam-repository
that referenced
this pull request
Jun 18, 2024
CHANGES: - Fix performance regression for incremental builds (ocaml/dune#9769, fixes ocaml/dune#9738, @rgrinberg) - Fix `dune ocaml top-module` to correctly handle absolute paths. (ocaml/dune#8249, fixes ocaml/dune#7370, @Alizter) - subst: ignore broken symlinks when looking at source files (ocaml/dune#9810, fixes ocaml/dune#9593, @emillon) - subst: do not fail on 32-bit systems when large files are encountered. Just log a warning in this case. (ocaml/dune#9811, fixes ocaml/dune#9538, @emillon) - boot: sort directory entries in readdir. This makes the dune binary reproducible in terms of filesystem order. (ocaml/dune#9861, fixes ocaml/dune#9794, @emillon)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #9794
_boot/dune.exeis installed, so it needs to be reproducible. Thischange ensures that the source files are scanned in an order that is
independent from the underlying directory entries.
This has been tested with
disorderfs --shuffle-dirents=yes: two runsof
make bootstrapcreate the same binary.Signed-off-by: Etienne Millon me@emillon.org