Make the release archive reproducible#6706
Merged
kit-ty-kate merged 2 commits intoocaml:masterfrom Oct 14, 2025
Merged
Conversation
Extra ._* and .DS_Store files are present and can interfere with at least the OpenBSD build, in some cases
0904447 to
9200f4f
Compare
dra27
reviewed
Oct 4, 2025
| --prefix "opam-full-$(VERSION)/" \ | ||
| --mtime "$$(git show -s --format=%ct "$(TAG)" | tail -1)" \ | ||
| -o "$(abspath $(OUTDIR)/opam-full-$(VERSION).tar)" \ | ||
| $$(for f in $$(git ls-files -i -o -x '*'); do echo "--add-file=$$f" || exit 1; done) && \ |
Member
There was a problem hiding this comment.
Doing it directly in make has the benefit that the displayed command explicitly shows what was added (I haven’t run it - I’m 99.9% sure the asterisk doesn’t want quoting when used with $(shell!)
Suggested change
| $$(for f in $$(git ls-files -i -o -x '*'); do echo "--add-file=$$f" || exit 1; done) && \ | |
| $(addprefix --add-file=,$(shell git ls-files -i -o -x *)) && \ |
Member
Author
There was a problem hiding this comment.
As discussed during the dev meeting last week, i've tried $(shell ...) before but given the change of directory using cd above in the same command string, these commands would have to use git -C which complicates the whole thing and it didn't work in my case for both git show and git ls-files for some reason. For now using sh subshells work out a bit better. I think we can improve later if needed
rjbou
approved these changes
Oct 14, 2025
Collaborator
rjbou
left a comment
There was a problem hiding this comment.
Discussed on dev meeting, lgtm!
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 #6619
While testing #6705 i encountered some failures due to extra
._*files in the archive (see https://superuser.com/questions/61185/why-do-i-get-files-like-foo-in-my-tarball-on-os-x) which made dune fail.Using
--no-mac-metadatafixes this problem but usinggit archivegoes even further and should make the archive reproducible (same archive regardless of username, group, uid, gid, current time, …)