index.tar.gz contains unnecessary files #29

Closed
opened 2024-11-21 17:29:37 +00:00 by reynir · 1 comment
Owner

There are a few files we include that are not needed such as git(hub) files, markdown files and the license:

$ tar -tf index.tar.gz
/.gitattributes
/.github/workflows/unlabel.yml
/.github/workflows/windows.yml
/.gitignore
/CHANGES.md
/CONTRIBUTING.md
/COPYING
/README.md
[... a bunch of /packages/**/opam ...]
/repo
/version

The upside is we produce a significantly smaller index.tar.gz than the one served by opam.ocaml.org: 5.9 MB vs 7.3 MB (uncompressed they are 65 MB vs 84 MB). An observation I can make is that opam.ocaml.org's tar file includes explicit entries for each directory whereas we don't. Omitting the above unnecessary files probably wouldn't affect the size of the compressed tar file much, though.

There are a few files we include that are not needed such as git(hub) files, markdown files and the license: ``` $ tar -tf index.tar.gz /.gitattributes /.github/workflows/unlabel.yml /.github/workflows/windows.yml /.gitignore /CHANGES.md /CONTRIBUTING.md /COPYING /README.md [... a bunch of /packages/**/opam ...] /repo /version ``` The upside is we produce a significantly smaller index.tar.gz than the one served by opam.ocaml.org: 5.9 MB vs 7.3 MB (uncompressed they are 65 MB vs 84 MB). An observation I can make is that opam.ocaml.org's tar file includes explicit entries for each directory whereas we don't. Omitting the above unnecessary files probably wouldn't affect the size of the compressed tar file much, though.
Owner

Indeed, please see the PR for a fix. From the opam source, there's only three things to include: packages, repo, version.

Indeed, please see the PR for a fix. From the opam source, there's only three things to include: packages, repo, version.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: robur/opam-mirror#29
No description provided.