Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package ocaml-dune for openSUSE:Factory checked in at 2023-08-08 17:25:54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ocaml-dune (Old) and /work/SRC/openSUSE:Factory/.ocaml-dune.new.22712 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ocaml-dune" Tue Aug 8 17:25:54 2023 rev:35 rq:1102723 version:3.9.3 Changes: -------- --- /work/SRC/openSUSE:Factory/ocaml-dune/ocaml-dune.changes 2023-07-17 19:23:37.325854098 +0200 +++ /work/SRC/openSUSE:Factory/.ocaml-dune.new.22712/ocaml-dune.changes 2023-08-08 17:25:56.463176641 +0200 @@ -1,0 +2,6 @@ +Mon Jul 31 12:34:56 UTC 2023 - oher...@suse.de + +- Update to version 3.9.3 + see included CHANGES.md for details + +------------------------------------------------------------------- Old: ---- ocaml-dune-3.9.1.tar.xz New: ---- ocaml-dune-3.9.3.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ocaml-dune.spec ++++++ --- /var/tmp/diff_new_pack.EOlcmP/_old 2023-08-08 17:25:57.219181338 +0200 +++ /var/tmp/diff_new_pack.EOlcmP/_new 2023-08-08 17:25:57.223181363 +0200 @@ -25,7 +25,7 @@ %define pkg ocaml-dune %global _buildshell /bin/bash Name: %pkg%nsuffix -Version: 3.9.1 +Version: 3.9.3 Release: 0 %{?ocaml_preserve_bytecode} License: MIT ++++++ _service ++++++ --- /var/tmp/diff_new_pack.EOlcmP/_old 2023-08-08 17:25:57.263181611 +0200 +++ /var/tmp/diff_new_pack.EOlcmP/_new 2023-08-08 17:25:57.267181636 +0200 @@ -1,7 +1,7 @@ <services> <service name="tar_scm" mode="disabled"> <param name="filename">ocaml-dune</param> - <param name="revision">3276f90725e4423790a43065cc51ddbbba61eb89</param> + <param name="revision">842d104126175999e25f5cd63e2a384f9c6ef797</param> <param name="scm">git</param> <param name="submodules">disable</param> <param name="url">https://github.com/ocaml/dune.git</param> ++++++ ocaml-dune-3.9.1.tar.xz -> ocaml-dune-3.9.3.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ocaml-dune-3.9.1/CHANGES.md new/ocaml-dune-3.9.3/CHANGES.md --- old/ocaml-dune-3.9.1/CHANGES.md 2023-07-06 16:12:50.000000000 +0200 +++ new/ocaml-dune-3.9.3/CHANGES.md 2023-07-31 14:06:32.000000000 +0200 @@ -1,3 +1,18 @@ +3.9.3 (2023-07-31) +------------------ + +- Fix flushing when using `sendfile` fallback (#8288, @alan-j-hu) + +3.9.2 (2023-07-25) +------------------ + +- Disable background digests on Windows. This prevents an issue where + unremovable files would make dune crash when the shared cache is enabled. + (#8243, fixes #8228, @emillon) + +- Fix permission errors when `sendfile` is not available (#8234, fixes #8120, + @emillon) + 3.9.1 (2023-07-06) ------------------ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ocaml-dune-3.9.1/otherlibs/stdune/src/io.ml new/ocaml-dune-3.9.3/otherlibs/stdune/src/io.ml --- old/ocaml-dune-3.9.1/otherlibs/stdune/src/io.ml 2023-07-06 16:12:50.000000000 +0200 +++ new/ocaml-dune-3.9.3/otherlibs/stdune/src/io.ml 2023-07-31 14:06:32.000000000 +0200 @@ -101,7 +101,7 @@ | Linux -> `Sendfile | Windows | Other -> `Nothing - let sendfile = + let sendfile_with_fallback = let setup_copy ?(chmod = Fun.id) ~src ~dst () = match Unix.openfile src [ O_RDONLY ] 0 with | exception Unix.Unix_error (Unix.ENOENT, _, _) -> Error `Src_missing @@ -145,12 +145,23 @@ | Error `Src_missing -> let message = Printf.sprintf "%s: No such file or directory" src in raise (Sys_error message) - | Ok (fd_src, fd_dst, src_size) -> - Exn.protectx (fd_src, fd_dst, src_size) - ~f:(fun (src, dst, src_size) -> sendfile ~src ~dst src_size) - ~finally:(fun (src, dst, _) -> - Unix.close src; - Unix.close dst) + | Ok (src, dst, src_size) -> ( + let close_fds () = + Unix.close src; + Unix.close dst + in + match sendfile ~src ~dst src_size with + | exception Unix.Unix_error (EINVAL, "sendfile", _) -> + let ic = Unix.in_channel_of_descr src in + let oc = Unix.out_channel_of_descr dst in + Exn.protect + ~f:(fun () -> copy_channels ic oc) + ~finally:(fun () -> + (* we make sure to close the fd's with the channel api to make + sure everything has been flushed *) + close_both (ic, oc)) + | () -> close_fds () + | exception _ -> close_fds ()) let copyfile ?chmod ~src ~dst () = let src_stats = @@ -176,11 +187,6 @@ Exn.protectx (setup_copy ?chmod ~src ~dst ()) ~finally:close_both ~f:(fun (ic, oc) -> copy_channels ic oc) - let sendfile_with_fallback ?chmod ~src ~dst () = - try sendfile ?chmod ~src ~dst () - with Unix.Unix_error (EINVAL, "sendfile", _) -> - copy_file_portable ?chmod ~src ~dst () - let copy_file_best = match available with | `Sendfile -> sendfile_with_fallback diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ocaml-dune-3.9.1/src/dune_config/config.ml new/ocaml-dune-3.9.3/src/dune_config/config.ml --- old/ocaml-dune-3.9.1/src/dune_config/config.ml 2023-07-06 16:12:50.000000000 +0200 +++ new/ocaml-dune-3.9.3/src/dune_config/config.ml 2023-07-31 14:06:32.000000000 +0200 @@ -116,7 +116,10 @@ let t = { name = "background_digests" ; of_string = Toggle.of_string - ; value = background_default + ; value = + (match Platform.OS.value with + | Linux -> `Enabled + | _ -> `Disabled) } in register t; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ocaml-dune-3.9.1/test/blackbox-tests/test-cases/dune new/ocaml-dune-3.9.3/test/blackbox-tests/test-cases/dune --- old/ocaml-dune-3.9.1/test/blackbox-tests/test-cases/dune 2023-07-06 16:12:50.000000000 +0200 +++ new/ocaml-dune-3.9.3/test/blackbox-tests/test-cases/dune 2023-07-31 14:06:32.000000000 +0200 @@ -136,4 +136,4 @@ (applies_to github8041) (enabled_if (= %{system} linux)) - (deps %{bin:strace})) + (deps %{bin:strace} %{bin:head})) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ocaml-dune-3.9.1/test/blackbox-tests/test-cases/github8041.t new/ocaml-dune-3.9.3/test/blackbox-tests/test-cases/github8041.t --- old/ocaml-dune-3.9.1/test/blackbox-tests/test-cases/github8041.t 2023-07-06 16:12:50.000000000 +0200 +++ new/ocaml-dune-3.9.3/test/blackbox-tests/test-cases/github8041.t 2023-07-31 14:06:32.000000000 +0200 @@ -1,17 +1,33 @@ $ cat > dune-project << EOF - > (lang dune 1.0) + > (lang dune 2.4) > (package > (name p)) > EOF $ cat > dune << EOF + > (rule (copy data.txt data2.txt)) + > > (install - > (files data.txt) + > (files data.txt data2.txt data3.txt) > (section share)) > EOF $ echo contents > data.txt + $ head -c 100000 /dev/zero > data3.txt If sendfile fails, we should fallback to the portable implementation. $ strace -e inject=sendfile:error=EINVAL -o /dev/null dune build @install + +#8210: data2.txt is copied from readonly-file data.txt (#3092), so it needs to +be adequately unlinked before starting the fallback. + +#8284: the buffer needs to be flushed, or there will be incomplete data in +larger files. + + $ if cmp -s data3.txt _build/default/data3.txt ; then + > echo "File copied correctly" + > else + > echo "File copied incorrectly" + > fi + File copied correctly