reproducible tarball index.tar.gz? same as on opam.ocaml.org? #11
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
we should strive for having a reproducible tarball. we may need to adjust whatever opam.ocaml.org uses to get a reproducible output. when I remember correctly, https://github.com/ocaml-opam/opam2web/ is used for generating the opam.ocaml.org tarball (and does a lot of other things).
The command used is actually in opam (make_index_tar_gz in opamHTTP,ml, used by opam admin):
so, [c]reate, [z]ip, [h] (synonym for [L] - dereference, follow symlinks), [f]ile. hard to reproduce due to timestamps of files (or are git pulled files timestamped to the git commit they appear(ed) in)?
I downloaded https://opam.ocaml.org/index.tar.gz and I found all timestamps were the same except for
repo
:My suspicion is the timestamp is when the opam2web was built, and
repo
was built 15 mins later for some reason.Then when writing this I notice in the output the resolution is in minutes, but in the tar format it's in seconds:
Perhaps we can ask the maintainers of opam
2webto set the mtime to the timestamp of the commit? With GNU tar that would betar --mtime $COMMIT_TIMESTAMP czhf index.tar.gz --exclude=.git* ...
. Then I readman bsdtar
and there is no such option /o\I was as well looking a bit more into this issue. Thanks for your investigations.
There are some paths forward for opam:
I prefer the second option, since it is more portable. I plan to go ahead and PR that to the opam developers, who seem to be keen to have index.tar.gz cached via last-modified / etag (see https://github.com/ocaml/opam/issues/5553).