Commit graph

82 commits

Author SHA1 Message Date
1e35bfefbd initialization: potentially rename bad data 2024-11-04 17:33:33 +01:00
a9b8f18192 stream git contents, also make the tarball and the find_urls in one go 2024-11-04 17:17:52 +01:00
2312092e42 first write to a temporary filename, and rename later 2024-11-04 17:17:37 +01:00
4bec3bfbd8 restore checksum failure error 2024-11-04 16:50:42 +01:00
f48cc19fc4 drop superfluous 'unknown' 2024-11-04 16:46:01 +01:00
7689397ac3 remove bad archive list 2024-11-04 16:14:09 +01:00
e59f02a16f always use swap, remove the pending / to_delete stuff 2024-11-04 16:13:36 +01:00
456340562d Use swapfs 2024-11-01 14:35:08 +01:00
53af2665fa record free bytes in tar archive 2024-10-31 17:45:34 +01:00
f40083692a tweaks 2024-10-31 17:17:34 +01:00
eb95821b2e Add a download status page, recording:
- number of archives on disk
- current downloads
- failed downloads
2024-10-31 11:30:52 +01:00
9bfde48f43 also handle extra-source, fixes #8 2024-10-24 15:03:35 +02:00
9a2576c423 extract the opam parsing function to a separate module (opam_file.ml / Opam_file)
prepares for handling extra-source as well
2024-10-24 14:45:31 +02:00
8af9f04dd0 Hex-encode computed checksum in log message
Oops!
2024-10-18 10:43:09 +02:00
5accfcfc08 More informative log message 2024-10-18 10:26:43 +02:00
625081abff Merge pull request 'Improve logging of bad checksums' (#7) from log-bad-checksum into main
Reviewed-on: #7
2024-10-17 16:12:30 +00:00
5938a60289 Improve logging of bad checksums
We now print the computed hash \o/
2024-10-17 17:26:00 +02:00
7a71e095da Demote log level for unavailable packages
Many packages are marked unavailable these days in preparation of
opam-repository cleanup \o/ so let's be a little less noisy.
2024-10-17 17:18:16 +02:00
26643fbcde Add a message on successful --initialize-disk 2024-10-16 11:06:48 +02:00
719b4ea45d Repo tarball: use level Ustar 2024-10-16 11:05:27 +02:00
ceb4674ec2 Add code for formatting a disk 2024-10-16 11:05:24 +02:00
d36a0714e7 Use GPTar table
We expect the disk to be formatted already.
2024-10-16 10:56:20 +02:00
58656926e3 update to mirage 4.8 2024-10-11 13:31:48 +02:00
6490801ce1 Update dependencies, refactor
- Tar.3.0.0 was released! So we can drop the pin and depend on it
  directly.
- Use digestif in favor of the bygone mirage-crypto hash
- Move most of the hashing logic into archive_checksum.ml
- When checking the checksum we should check the checksum chosen, too. I
  believe this was a bug that was hidden due to opam packages always
  using one of md5, sha256 or sha512 for checksums.
2024-10-03 14:37:37 +02:00
8fc8f1c62d Update the unikernel with the new version of tar 2024-07-31 14:54:26 +02:00
c2ffbdb891 Update to mirage.4.6.0 2024-07-15 12:22:57 +02:00
1ebf370a4f compiles now 2023-05-02 16:13:43 +02:00
Robur
fd8ce3be03 more wip 2023-05-02 12:03:25 +00:00
ebeadf69d8 Skip unavailable packages 2023-02-08 16:30:56 +01:00
adf6564385 Print error and exit if we can't get commit id 2023-02-08 16:30:30 +01:00
8c7e71127f Try to remove files before marking for deletion
You know, it might just work...
2023-02-08 16:29:55 +01:00
1a6c6b8f9d Return error on bad checksum when finalizing write 2023-01-31 10:27:25 +01:00
8e326ecbc5 WIP partial writes
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.
2023-01-25 11:34:31 +01:00
b76f2997f5 Migrate to mirage-kv 6 2023-01-23 09:13:42 +01:00
b0eb816a68 Log before and after restoring/fetching git state
This may take quite a while, and the application is unresponsive
meanwhile.
2022-11-17 12:12:15 +01:00
c6e8c6cf77 update for the released http-mirage-client 2022-11-02 22:19:03 +01:00
d143e9b766 as suggested by @reynir: verify -> verify_sha256 2022-10-28 14:58:58 +02:00
1ff5c7e1b6 if --verify is passed, don't use the md5s/sha512s from disk, instead re-create them 2022-10-28 13:57:30 +02:00
0d5745b340 Add a boot argument to ignore the local git state 2022-10-26 18:32:43 +02:00
7d1c9b0814 Fix the compilation of opam-mirror with lastest version of packages 2022-10-21 15:56:20 +02:00
5f761b38fb Upgrade opam-mirror with last release of git and new version of git-kv 2022-10-20 16:09:05 +02:00
e177cb156d adapt to new paf 2022-09-29 14:40:50 +02:00
3e946395aa Rename partition devices so they are shadowed 2022-09-28 11:18:17 +02:00
b9003fb91d add a list of urls not to try to download (since they fail or have bad checksums) 2022-09-27 18:56:08 +02:00
5e427897be use git-kv on store to dump and restore the git commit 2022-09-27 17:24:37 +02:00
8bdfb19e6f use read_partial in init as well for checksum computation 2022-09-27 16:25:57 +02:00
007842f3d3 flush and wait 2022-09-27 12:22:29 +02:00
938da1a211 read the data in chunks and send them chunk-wise 2022-09-27 10:46:14 +02:00
c81ba101f9 Merge pull request 'Hash cache' (#14) from partition' into main
Reviewed-on: https://git.robur.io/robur/opam-mirror/pulls/14
2022-09-27 08:05:27 +00:00
9bb066cd56 minor cleanups 2022-09-26 21:51:42 +02:00