Mirroring the opam repository, including source archives
Reynir Björnsson
8e326ecbc5
If possible, downloads are streamed to disk in the /pending/ directory in the tar filesystem. If the download is successful and the checksums match the file is renamed to its sha256 hash. Otherwise, it is moved under /to-delete/ so it can be deleted by an operator. Before downloading we check if it has been downloaded before, but we need to check as well if it is being downloaded (in /pending/) or if we unsuccessfully downloaded it before (e.g. failed checksum, stored in /to-delete/). It is not very elegant code, and it could do with a thorough review or rewrite. |
||
---|---|---|
mirage | ||
LICENSE.md | ||
README.md |
opam-mirror unikernel
This unikernel periodically (at startup, on request, every hour) updates the provided opam-repository and downloads all referenced archives. It acts as an opam-repository including archive mirror. Only archives with appropriate checksums are stored.