Skip to content

Commit 781e151

Browse files
authored
Merge pull request #6976 from kit-ty-kate/ocaml-tar-3.5.0
Upgrade to ocaml-tar 3.5.0
2 parents 56535c9 + addad9a commit 781e151

7 files changed

Lines changed: 14 additions & 10 deletions

File tree

.github/workflows/ci.ml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -552,10 +552,9 @@ let main oc : unit =
552552
("OPAMBSVERSION", "2.1.0");
553553
("OPAMBSROOT", "~/.cache/.opam.cached");
554554
("OPAM12CACHE", "~/.cache/opam1.2/cache");
555-
(* These should be identical to the values in appveyor.yml *)
556555
("OPAM_REPO", "https://github.com/ocaml/opam-repository.git");
557-
("OPAM_TEST_REPO_SHA", "ea549f9f2496d9b1454d1cb4817bba7be9013985");
558-
("OPAM_REPO_SHA", "38a1469dbbc69c770e534e26f79c97256a442b71");
556+
("OPAM_TEST_REPO_SHA", "ceed23f9d33677f323a62325ad42599d14f46b98");
557+
("OPAM_REPO_SHA", "ceed23f9d33677f323a62325ad42599d14f46b98");
559558
("SOLVER", "");
560559
(* Cygwin configuration *)
561560
("CYGWIN_MIRROR", "http://mirrors.kernel.org/sourceware/cygwin/");

.github/workflows/depexts.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ defaults:
2020
env:
2121
OPAMVERSION: 2.5.1
2222
OPAM_REPO: https://github.com/ocaml/opam-repository.git
23-
OPAM_REPO_SHA: ea549f9f2496d9b1454d1cb4817bba7be9013985
23+
OPAM_REPO_SHA: ceed23f9d33677f323a62325ad42599d14f46b98
2424

2525
jobs:
2626
opam-cache:

.github/workflows/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ env:
2727
OPAMBSROOT: ~/.cache/.opam.cached
2828
OPAM12CACHE: ~/.cache/opam1.2/cache
2929
OPAM_REPO: https://github.com/ocaml/opam-repository.git
30-
OPAM_TEST_REPO_SHA: ea549f9f2496d9b1454d1cb4817bba7be9013985
31-
OPAM_REPO_SHA: 38a1469dbbc69c770e534e26f79c97256a442b71
30+
OPAM_TEST_REPO_SHA: ceed23f9d33677f323a62325ad42599d14f46b98
31+
OPAM_REPO_SHA: ceed23f9d33677f323a62325ad42599d14f46b98
3232
SOLVER:
3333
CYGWIN_MIRROR: http://mirrors.kernel.org/sourceware/cygwin/
3434
CYGWIN_ROOT: D:\cygwin

master_changes.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ users)
101101
* Add lower-bounds constraints to the dependencies that have none (`ocamlgraph` >= 1.8.8, `jsonm` >= 1.0.2, `swhid_core` >= 0.1, `uutf` >= 1.0.3) [#6878 @kit-ty-kate]
102102
* Require `spdx_licenses` >= 1.4.0 to ensure compatibility with SPDX v3 syntax [#6878 @kit-ty-kate]
103103
* Remove support for building opam with OCaml 4.08, 4.09 and 4.10 [#6879 @kit-ty-kate]
104+
* Upgrade to ocaml-tar.3.5.0 [#6976 @kit-ty-kate]
104105

105106
## Infrastructure
106107

@@ -198,6 +199,8 @@ users)
198199
* Install `micro_httpd` in test scripts [#6939 @rjbou]
199200
* Fix ubuntu depext job: remove install of no longer available system packages 'ocaml-compiler-libs' [#6960 @rjbou]
200201
* Fix opensuse depexts job : force resolution in case of conflict (ocaml/ncurses) [#6960 @rjbou]
202+
* Bump the opam-repository commits sha [#6976 @kit-ty-kate]
203+
* Fix the archlinux depexts run [#6976 @kit-ty-kate]
201204

202205
## Doc
203206
* Add spacing between two words in `--locked` man section [#6806 @yosefAlsuhaibani]

opam-repository.opam

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ depends: [
3232
"dune" {>= "2.8.0"}
3333
"opam-format" {= version}
3434
"patch" {>= "3.0.0"}
35-
"tar" {>= "3.3.0"}
35+
"tar" {>= "3.5.0"}
3636
"checkseum" {>= "0.5.2"}
3737
"decompress" {>= "1.5.1"}
3838
]

src/repository/opamTar.ml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ let run archive =
3030
let raise_error fmt = raise_error archive fmt in
3131
let rec run : type a. Unix.file_descr -> (a, _, _) Tar.t -> a = fun fd -> function
3232
| Tar.Read len ->
33+
let len = Int64.to_int len in
3334
let b = Bytes.create len in
3435
let read = safe_read fd b 0 len in
3536
if read = 0 then
@@ -47,6 +48,7 @@ let run archive =
4748
else
4849
loop fd buf (offset + n) len
4950
in
51+
let len = Int64.to_int len in
5052
let buf = Bytes.create len in
5153
loop fd buf 0 len;
5254
Bytes.unsafe_to_string buf
@@ -65,7 +67,7 @@ let fold_reg_files_aux archive f acc fd =
6567
let go ?global:_ hdr acc =
6668
match hdr.Tar.Header.link_indicator with
6769
| Normal ->
68-
let* content = Tar.really_read (Int64.to_int hdr.file_size) in
70+
let* content = Tar.really_read hdr.file_size in
6971
let acc = f acc (OpamFilename.Unix.of_string hdr.file_name) content in
7072
Tar.return (Ok acc)
7173
| Directory -> Tar.return (Ok acc)

src_ext/Makefile.sources

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,5 +66,5 @@ MD5_optint = 46cc1b8bd00872529ac01407f908d389
6666
URL_decompress = https://github.com/mirage/decompress/releases/download/v1.5.3/decompress-1.5.3.tbz
6767
MD5_decompress = 6c22cdd6368a6c66fbcae2944578fdd7
6868

69-
URL_tar = https://github.com/mirage/ocaml-tar/releases/download/v3.3.0/tar-3.3.0.tbz
70-
MD5_tar = ee524f7b7049342eaf2bcad0ef40d331
69+
URL_tar = https://github.com/mirage/ocaml-tar/releases/download/v3.5.0/tar-3.5.0.tbz
70+
MD5_tar = 06026fdb95a4a6c85a19177887351175

0 commit comments

Comments
 (0)