Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package ocaml-fileutils for openSUSE:Factory 
checked in at 2025-03-04 18:31:51
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ocaml-fileutils (Old)
 and      /work/SRC/openSUSE:Factory/.ocaml-fileutils.new.19136 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ocaml-fileutils"

Tue Mar  4 18:31:51 2025 rev:9 rq:1249874 version:0.6.6

Changes:
--------
--- /work/SRC/openSUSE:Factory/ocaml-fileutils/ocaml-fileutils.changes  
2023-01-05 15:01:13.321137029 +0100
+++ 
/work/SRC/openSUSE:Factory/.ocaml-fileutils.new.19136/ocaml-fileutils.changes   
    2025-03-04 18:32:11.600965028 +0100
@@ -1,0 +2,6 @@
+Mon Mar  3 03:03:03 UTC 2025 - [email protected]
+
+- Update to version 0.6.6
+  see included CHANGES.md file for details
+
+-------------------------------------------------------------------

Old:
----
  ocaml-fileutils-0.6.4.tar.xz

New:
----
  ocaml-fileutils-0.6.6.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ocaml-fileutils.spec ++++++
--- /var/tmp/diff_new_pack.JTVm05/_old  2025-03-04 18:32:12.288993448 +0100
+++ /var/tmp/diff_new_pack.JTVm05/_new  2025-03-04 18:32:12.292993614 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package ocaml-fileutils
 #
-# Copyright (c) 2023 SUSE LLC
+# Copyright (c) 2025 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -25,7 +25,7 @@
 
 %define     pkg ocaml-fileutils
 Name:           %pkg%nsuffix
-Version:        0.6.4
+Version:        0.6.6
 Release:        0
 %{?ocaml_preserve_bytecode}
 Summary:        OCaml library for common file and filename operations
@@ -33,18 +33,13 @@
 Group:          Development/Languages/OCaml
 URL:            https://opam.ocaml.org/packages/fileutils
 Source0:        %pkg-%version.tar.xz
-BuildRequires:  ocaml
-BuildRequires:  ocaml-dune
-BuildRequires:  ocaml-rpm-macros >= 20230101
-BuildRequires:  ocamlfind(seq)
-BuildRequires:  ocamlfind(stdlib-shims)
-BuildRequires:  ocamlfind(str)
-BuildRequires:  ocamlfind(unix)
+BuildRequires:  ocaml(ocaml_base_version) >= 4.14
+BuildRequires:  ocaml-dune >= 2.9
+BuildRequires:  ocaml-rpm-macros >= 20240909
 
 %if "%build_flavor" == "testsuite"
 BuildRequires:  ocamlfind(fileutils)
 BuildRequires:  ocamlfind(ounit2)
-BuildRequires:  ocamlfind(stdlib-shims)
 %endif
 
 %description

++++++ _service ++++++
--- /var/tmp/diff_new_pack.JTVm05/_old  2025-03-04 18:32:12.332995266 +0100
+++ /var/tmp/diff_new_pack.JTVm05/_new  2025-03-04 18:32:12.332995266 +0100
@@ -1,7 +1,7 @@
 <services>
-  <service name="tar_scm" mode="disabled">
+  <service name="tar_scm" mode="manual">
     <param name="filename">ocaml-fileutils</param>
-    <param name="revision">324a05938d88c4b645287adbf5ceb74f4ce0daec</param>
+    <param name="revision">7f007779741f578f2749f1699d47a1c28e9c3f0d</param>
     <param name="scm">git</param>
     <param name="submodules">disable</param>
     <param name="url">https://github.com/gildor478/ocaml-fileutils.git</param>
@@ -9,10 +9,10 @@
     <param name="versionrewrite-pattern">[v]?([^\+]+)(.*)</param>
     <param name="versionrewrite-replacement">\1</param>
   </service>
-  <service name="recompress" mode="disabled">
+  <service name="recompress" mode="manual">
     <param name="file">*.tar</param>
     <param name="compression">xz</param>
   </service>
-  <service name="set_version" mode="disabled"/>
+  <service name="set_version" mode="manual"/>
 </services>
 

++++++ ocaml-fileutils-0.6.4.tar.xz -> ocaml-fileutils-0.6.6.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-fileutils-0.6.4/CHANGES.md 
new/ocaml-fileutils-0.6.6/CHANGES.md
--- old/ocaml-fileutils-0.6.4/CHANGES.md        2022-10-28 22:22:35.000000000 
+0200
+++ new/ocaml-fileutils-0.6.6/CHANGES.md        2024-12-28 22:25:51.000000000 
+0100
@@ -1,3 +1,18 @@
+## v0.6.6 - 2024-12-28
+
+### Fixed
+
+- Remove useless dependencies (stdlib-shims and seq) which are shipped with
+  OCaml 4.14+.
+
+## v0.6.5 - 2024-12-27
+
+### Fixed
+
+- `cmp` returns None when comparing two identical files and add some tests for
+  that. (thanks to jamesjer).
+- require OCaml > 4.14, which is now the default in Debian stable.
+
 ## v0.6.4 - 2022-10-28
 
 ### Fixed
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-fileutils-0.6.4/dune-project 
new/ocaml-fileutils-0.6.6/dune-project
--- old/ocaml-fileutils-0.6.4/dune-project      2022-10-28 22:22:35.000000000 
+0200
+++ new/ocaml-fileutils-0.6.6/dune-project      2024-12-28 22:25:51.000000000 
+0100
@@ -1,3 +1,36 @@
-(lang dune 1.11)
+(lang dune 2.9)
 (name fileutils)
+
 (explicit_js_mode)
+
+(generate_opam_files)
+
+(source (github gildor478/ocaml-fileutils))
+(license "LGPL-2.1-or-later WITH OCaml-LGPL-linking-exception")
+(authors "Sylvain Le Gall")
+(maintainers "Sylvain Le Gall <[email protected]>")
+(documentation "https://gildor478.github.io/ocaml-fileutils/";)
+
+(package
+  (name fileutils)
+  (synopsis "XDG basedir location for data/cache/configuration files")
+  (description
+"\| This library provides an API to perform POSIX like operations on files 
like:
+"\|
+"\| - mv
+"\| - cp
+"\| - rm
+"\| - mkdir
+"\| - touch
+"\| - which...
+"\|
+"\| It also provides a module to manipulate abstract filenames:
+"\|
+"\| - classification
+"\| - make_relative: made a filename relative to another
+"\| - make_absolute
+ )
+  (depends
+    base-unix
+    (ounit2 (and (>= 2.0.0) :with-test))
+    (ocaml (>= 4.14))))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-fileutils-0.6.4/fileutils.opam 
new/ocaml-fileutils-0.6.6/fileutils.opam
--- old/ocaml-fileutils-0.6.4/fileutils.opam    2022-10-28 22:22:35.000000000 
+0200
+++ new/ocaml-fileutils-0.6.6/fileutils.opam    2024-12-28 22:25:51.000000000 
+0100
@@ -1,26 +1,6 @@
+# This file is generated by dune, edit dune-project instead
 opam-version: "2.0"
-maintainer: "Sylvain Le Gall <[email protected]>"
-authors: [ "Sylvain Le Gall" ]
-homepage: "https://github.com/gildor478/ocaml-fileutils";
-license: "LGPL-2.1 with OCaml linking exception"
-dev-repo: "git+https://github.com/gildor478/ocaml-fileutils.git";
-bug-reports: "https://github.com/gildor478/ocaml-fileutils/issues";
-doc: "https://gildor478.github.io/ocaml-fileutils/";
-
-build: [
-  ["dune" "build" "-p" name "-j" jobs]
-  ["dune" "runtest" "-p" name "-j" jobs] {with-test}
-  ["dune" "build" "@doc" "-p" name "-j" jobs] {with-doc}
-]
-depends: [
-  "ocaml" {>= "4.03"}
-  "base-unix"
-  "stdlib-shims"
-  "seq"
-  "dune" {>= "1.11.0"}
-  "ounit2" {with-test & >= "2.0.0"}
-]
-synopsis: "API to manipulate files (POSIX like) and filenames"
+synopsis: "XDG basedir location for data/cache/configuration files"
 description: """
 This library provides an API to perform POSIX like operations on files like:
 
@@ -37,3 +17,33 @@
 - make_relative: made a filename relative to another
 - make_absolute
 """
+maintainer: ["Sylvain Le Gall <[email protected]>"]
+authors: ["Sylvain Le Gall"]
+license: "LGPL-2.1-or-later WITH OCaml-LGPL-linking-exception"
+homepage: "https://github.com/gildor478/ocaml-fileutils";
+doc: "https://gildor478.github.io/ocaml-fileutils/";
+bug-reports: "https://github.com/gildor478/ocaml-fileutils/issues";
+depends: [
+  "dune" {>= "2.9"}
+  "base-unix"
+  "ounit2" {>= "2.0.0" & with-test}
+  "ocaml" {>= "4.14"}
+  "odoc" {with-doc}
+]
+build: [
+  ["dune" "subst"] {dev}
+  [
+    "dune"
+    "build"
+    "-p"
+    name
+    "-j"
+    jobs
+    "--promote-install-files=false"
+    "@install"
+    "@runtest" {with-test}
+    "@doc" {with-doc}
+  ]
+  ["dune" "install" "-p" name "--create-install-files" name]
+]
+dev-repo: "git+https://github.com/gildor478/ocaml-fileutils.git";
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-fileutils-0.6.4/ocaml-fileutils.changes 
new/ocaml-fileutils-0.6.6/ocaml-fileutils.changes
--- old/ocaml-fileutils-0.6.4/ocaml-fileutils.changes   1970-01-01 
01:00:00.000000000 +0100
+++ new/ocaml-fileutils-0.6.6/ocaml-fileutils.changes   2024-12-28 
22:25:51.000000000 +0100
@@ -0,0 +1,12 @@
+b133128 Fix a opam lint warning
+cb3aded Make cmp return None for identical files
+84d2e63 Add some tests for cmp.
+92732da Silence exceptions raised when closing after an exception in FileUtilCP
+fb48d96 Prepare release 0.6.5.
+2b61b2a Add more information, to see errors on FreeBSD, if needed.
+d986aa2 Fix group for test file on FreeBSD.
+002d599 Fix group for test directory on FreeBSD.
+84e7fec (tag: v0.6.5) Don't chown files on Windows.
+9c48ae4 Remove useless dependencies, since we are now using ocaml 4.14.
+366a3c5 Auto-generate fileutils.opam and get rid of stdlib-shims and seq, 
which are not needed anymore for OCaml 4.14.
+7f00777 (tag: v0.6.6, origin/master, origin/HEAD) Prepare release v0.6.6.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-fileutils-0.6.4/src/lib/fileutils/FileUtil.mli 
new/ocaml-fileutils-0.6.6/src/lib/fileutils/FileUtil.mli
--- old/ocaml-fileutils-0.6.4/src/lib/fileutils/FileUtil.mli    2022-10-28 
22:22:35.000000000 +0200
+++ new/ocaml-fileutils-0.6.6/src/lib/fileutils/FileUtil.mli    2024-12-28 
22:25:51.000000000 +0100
@@ -498,8 +498,8 @@
 
 (** [cmp skip1 fln1 skip2 fln2] Compare files [fln1] and [fln2] starting at pos
     [skip1] [skip2] and returning the first octect where a difference occurs.
-    Returns [Some -1] if one of the file is not readable or if it is not a
-    file.
+    Returns [Some -1] if one of the files is not readable or if it is not a
+    file.  Returns [None] if given two identical files.
     See 
{{:http://pubs.opengroup.org/onlinepubs/007904875/utilities/cmp.html}POSIX 
documentation}.
   *)
 val cmp:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/ocaml-fileutils-0.6.4/src/lib/fileutils/FileUtilCMP.ml 
new/ocaml-fileutils-0.6.6/src/lib/fileutils/FileUtilCMP.ml
--- old/ocaml-fileutils-0.6.4/src/lib/fileutils/FileUtilCMP.ml  2022-10-28 
22:22:35.000000000 +0200
+++ new/ocaml-fileutils-0.6.6/src/lib/fileutils/FileUtilCMP.ml  2024-12-28 
22:25:51.000000000 +0100
@@ -48,11 +48,14 @@
     let rec loop count s1 s2 =
       match s1, s2 with
       | Seq.Cons (v1, s1), Seq.Cons (v2, s2) when v1 = v2 -> loop (count + 1) 
(s1 ()) (s2 ())
+      | Seq.Nil, Seq.Nil -> (-1)
       | _ -> count
     in
     let count = loop 0 (stream1 ()) (stream2 ()) in
     clean_fd ();
-    Some count
+    match count with
+    | (-1) -> None
+    | x -> Some x
   end else
     Some (-1)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/ocaml-fileutils-0.6.4/src/lib/fileutils/FileUtilCP.ml 
new/ocaml-fileutils-0.6.6/src/lib/fileutils/FileUtilCP.ml
--- old/ocaml-fileutils-0.6.4/src/lib/fileutils/FileUtilCP.ml   2022-10-28 
22:22:35.000000000 +0200
+++ new/ocaml-fileutils-0.6.6/src/lib/fileutils/FileUtilCP.ml   2024-12-28 
22:25:51.000000000 +0100
@@ -53,6 +53,8 @@
   | `UnhandledType of filename * kind ]
 
 
+let silent_close fd = try Unix.close fd with _ -> ()
+
 let same_file st1 st2 =
   st1.device = st2.device && st1.inode = st2.inode
 
@@ -190,11 +192,13 @@
             Unix.close fd_dst;
             copy_time_props st_src fn_dst
           with e ->
-            Unix.close fd_src;
-            raise e
+            let bt = Printexc.get_raw_backtrace () in
+            silent_close fd_src;
+            Printexc.raise_with_backtrace e bt
       with e ->
-        Unix.close fd_dst;
-        raise e
+        let bt = Printexc.get_raw_backtrace () in
+        silent_close fd_dst;
+        Printexc.raise_with_backtrace e bt
   in
 
   let cp_symlink fn_src fn_dst =
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-fileutils-0.6.4/src/lib/fileutils/dune 
new/ocaml-fileutils-0.6.6/src/lib/fileutils/dune
--- old/ocaml-fileutils-0.6.4/src/lib/fileutils/dune    2022-10-28 
22:22:35.000000000 +0200
+++ new/ocaml-fileutils-0.6.6/src/lib/fileutils/dune    2024-12-28 
22:25:51.000000000 +0100
@@ -30,4 +30,4 @@
     fileUtilWHICH
     unixPath
     win32Path)
-  (libraries unix seq stdlib-shims))
+  (libraries unix))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-fileutils-0.6.4/test/dune 
new/ocaml-fileutils-0.6.6/test/dune
--- old/ocaml-fileutils-0.6.4/test/dune 2022-10-28 22:22:35.000000000 +0200
+++ new/ocaml-fileutils-0.6.6/test/dune 2024-12-28 22:25:51.000000000 +0100
@@ -6,4 +6,4 @@
 (test
   (name test)
   (modules test)
-  (libraries fileutils fileutils_str ounit2 stdlib-shims))
+  (libraries fileutils fileutils_str ounit2))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-fileutils-0.6.4/test/test.ml 
new/ocaml-fileutils-0.6.6/test/test.ml
--- old/ocaml-fileutils-0.6.4/test/test.ml      2022-10-28 22:22:35.000000000 
+0200
+++ new/ocaml-fileutils-0.6.6/test/test.ml      2024-12-28 22:25:51.000000000 
+0100
@@ -54,6 +54,12 @@
 let assert_equal_string ~msg =
   assert_equal ~printer:(fun x -> x) ~msg:msg
 
+let assert_equal_optional_int ~msg =
+  assert_equal
+  ~printer:(function
+    | Some x -> Printf.sprintf "Some(%d)" x
+    | None -> "None")
+  ~msg:msg
 
 module DiffSetFilename =
   OUnitDiff.SetMake
@@ -484,6 +490,14 @@
     ["Test" >::
      (fun test_ctxt ->
         let tmp_dir = bracket_tmpdir test_ctxt in
+        let () =
+          if Sys.os_type <> "Win32" then begin
+            (* On FreeBSD the default group for a newly created file is
+               the group of the directory. This will result in having a
+               group to be "wheel" on FreeBSD. *)
+            Unix.chown tmp_dir (-1) (Unix.getegid ())
+          end
+        in
         let file_test =
           let fn, chn = bracket_tmpfile test_ctxt in
             output_string chn "foo";
@@ -494,8 +508,10 @@
           non_fatal test_ctxt
             (fun _ ->
                assert_bool
-                 ("Test "^stest^" on "^file)
-                 (res = (test expr file)))
+                (Printf.sprintf
+                  "Test %s on file %s (group ID %d, current group ID %d)"
+                  stest file (Unix.stat file).st_gid (Unix.getegid ()))
+                (res = (test expr file)))
         in
           non_fatal_test file_test ("Size_not_null",   Size_not_null, true);
           List.iter
@@ -1288,6 +1304,50 @@
        ()
     );
 
+    "Cmp" >:::
+    [
+      "same file has no differences" >::
+        (fun test_ctxt ->
+          let tmp_dir = bracket_tmpdir test_ctxt in
+          let file1 = make_filename [tmp_dir; "file1.txt"] in
+          let () =
+            let fd = open_out file1 in
+            output_string fd "Content of file1.";
+            close_out fd
+          in
+          assert_equal_optional_int ~msg:"" None (cmp file1 file1));
+
+      "two identical files have no differences" >::
+        (fun test_ctxt ->
+          let tmp_dir = bracket_tmpdir test_ctxt in
+          let file1 = make_filename [tmp_dir; "file1.txt"] in
+          let file2 = make_filename [tmp_dir; "file2.txt"] in
+          let () =
+            let fd = open_out file1 in
+            output_string fd "Content of file1.";
+            close_out fd
+          in
+          cp [file1] file2;
+          assert_equal_optional_int ~msg:"" None (cmp file1 file2));
+
+      "two different files have differences" >::
+        (fun test_ctxt ->
+          let tmp_dir = bracket_tmpdir test_ctxt in
+          let file1 = make_filename [tmp_dir; "file1.txt"] in
+          let file2 = make_filename [tmp_dir; "file2.txt"] in
+          let () =
+            let fd = open_out file1 in
+            output_string fd "Content of file1.";
+            close_out fd
+          in
+          let () =
+            let fd = open_out file2 in
+            output_string fd "Content of file2.";
+            close_out fd
+          in
+          assert_equal_optional_int ~msg:"" (Some 15) (cmp file1 file2));
+    ];
+
     "Size" >:::
     [
 

Reply via email to