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 2023-01-05 15:00:53
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ocaml-fileutils (Old)
and /work/SRC/openSUSE:Factory/.ocaml-fileutils.new.1563 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ocaml-fileutils"
Thu Jan 5 15:00:53 2023 rev:8 rq:1056073 version:0.6.4
Changes:
--------
--- /work/SRC/openSUSE:Factory/ocaml-fileutils/ocaml-fileutils.changes
2022-04-06 21:51:30.463555996 +0200
+++
/work/SRC/openSUSE:Factory/.ocaml-fileutils.new.1563/ocaml-fileutils.changes
2023-01-05 15:01:13.321137029 +0100
@@ -1,0 +2,6 @@
+Sun Jan 1 01:01:01 UTC 2023 - [email protected]
+
+- Update to version 0.6.4
+ See included CHANGES.md for details
+
+-------------------------------------------------------------------
Old:
----
ocaml-fileutils-0.6.3.tar.xz
New:
----
ocaml-fileutils-0.6.4.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ocaml-fileutils.spec ++++++
--- /var/tmp/diff_new_pack.hlgex3/_old 2023-01-05 15:01:13.753139305 +0100
+++ /var/tmp/diff_new_pack.hlgex3/_new 2023-01-05 15:01:13.757139327 +0100
@@ -1,7 +1,7 @@
#
# spec file for package ocaml-fileutils
#
-# Copyright (c) 2022 SUSE LLC
+# Copyright (c) 2023 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.3
+Version: 0.6.4
Release: 0
%{?ocaml_preserve_bytecode}
Summary: OCaml library for common file and filename operations
@@ -35,15 +35,15 @@
Source0: %pkg-%version.tar.xz
BuildRequires: ocaml
BuildRequires: ocaml-dune
-BuildRequires: ocaml-rpm-macros >= 20220222
-BuildRequires: ocamlfind(bytes)
+BuildRequires: ocaml-rpm-macros >= 20230101
+BuildRequires: ocamlfind(seq)
BuildRequires: ocamlfind(stdlib-shims)
BuildRequires: ocamlfind(str)
BuildRequires: ocamlfind(unix)
%if "%build_flavor" == "testsuite"
BuildRequires: ocamlfind(fileutils)
-BuildRequires: ocamlfind(oUnit)
+BuildRequires: ocamlfind(ounit2)
BuildRequires: ocamlfind(stdlib-shims)
%endif
++++++ _service ++++++
--- /var/tmp/diff_new_pack.hlgex3/_old 2023-01-05 15:01:13.809139601 +0100
+++ /var/tmp/diff_new_pack.hlgex3/_new 2023-01-05 15:01:13.813139623 +0100
@@ -1,7 +1,7 @@
<services>
<service name="tar_scm" mode="disabled">
<param name="filename">ocaml-fileutils</param>
- <param name="revision">9ad8d2ee342c551391f2a9873de01982d24b36d5</param>
+ <param name="revision">324a05938d88c4b645287adbf5ceb74f4ce0daec</param>
<param name="scm">git</param>
<param name="submodules">disable</param>
<param name="url">https://github.com/gildor478/ocaml-fileutils.git</param>
++++++ ocaml-fileutils-0.6.3.tar.xz -> ocaml-fileutils-0.6.4.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ocaml-fileutils-0.6.3/.gitignore
new/ocaml-fileutils-0.6.4/.gitignore
--- old/ocaml-fileutils-0.6.3/.gitignore 2020-07-11 23:21:55.000000000
+0200
+++ new/ocaml-fileutils-0.6.4/.gitignore 2022-10-28 22:22:35.000000000
+0200
@@ -1,8 +1,8 @@
/_build/
+/_opam/
/dist/
/test/oUnit.log
/website/website-tools/
/website/dist/
*.merlin
-/*.install
*.swp
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ocaml-fileutils-0.6.3/.travis.yml
new/ocaml-fileutils-0.6.4/.travis.yml
--- old/ocaml-fileutils-0.6.3/.travis.yml 2020-07-11 23:21:55.000000000
+0200
+++ new/ocaml-fileutils-0.6.4/.travis.yml 1970-01-01 01:00:00.000000000
+0100
@@ -1,30 +0,0 @@
-language: c
-sudo: required
-install: test -e .travis.opam.sh || wget
https://raw.githubusercontent.com/ocaml/ocaml-ci-scripts/master/.travis-opam.sh
-script: bash -ex .travis-opam.sh
-cache:
- directories:
- - $HOME/.opam
-env:
- global:
- - PACKAGE=fileutils
-matrix:
- include:
- - os:
- - linux
- env:
- - OCAML_VERSION=4.08
-
- - os:
- - linux
- env:
- # Use an old version for backward compatibility.
- - OCAML_VERSION=4.05
-
- - os:
- - osx
- env:
- - OCAML_VERSION=4.08
- cache:
- directories:
- - $HOME/Library/Caches/Homebrew
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ocaml-fileutils-0.6.3/CHANGES.md
new/ocaml-fileutils-0.6.4/CHANGES.md
--- old/ocaml-fileutils-0.6.3/CHANGES.md 2020-07-11 23:21:55.000000000
+0200
+++ new/ocaml-fileutils-0.6.4/CHANGES.md 2022-10-28 22:22:35.000000000
+0200
@@ -1,6 +1,15 @@
+## v0.6.4 - 2022-10-28
+
+### Fixed
+
+- Fix documentation for FilePath.is_updir and FilePath.is_subdir. Thanks to
+ dmbaturin for the contribution.
+- Support for OCaml 5 (thanks to Leonidas-from-XIV and kit-ty-kate)
+
+
## v0.6.3 - 2020-07-11
-## Fixed
+### Fixed
- Fix mkdir when trying to create directory with ~parent:true and a directory
ending with "/". For example:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ocaml-fileutils-0.6.3/README.md
new/ocaml-fileutils-0.6.4/README.md
--- old/ocaml-fileutils-0.6.3/README.md 2020-07-11 23:21:55.000000000 +0200
+++ new/ocaml-fileutils-0.6.4/README.md 2022-10-28 22:22:35.000000000 +0200
@@ -1,8 +1,7 @@
Fileutils - OCaml API to manipulate real files (POSIX like) and filenames
=========================================================================
-[![Travis status][travis-img]][travis]
-[![AppVeyor status][appveyor-img]][appveyor]
+[](https://ci.ocamllabs.io/github/gildor478/ocaml-fileutils)
Features of the project:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ocaml-fileutils-0.6.3/appveyor.yml
new/ocaml-fileutils-0.6.4/appveyor.yml
--- old/ocaml-fileutils-0.6.3/appveyor.yml 2020-07-11 23:21:55.000000000
+0200
+++ new/ocaml-fileutils-0.6.4/appveyor.yml 1970-01-01 01:00:00.000000000
+0100
@@ -1,13 +0,0 @@
-platform:
- - x86
-
-environment:
- FORK_USER: ocaml
- FORK_BRANCH: master
- CYG_ROOT: C:\cygwin64
-
-install:
- - ps: iex ((new-object
net.webclient).DownloadString("https://raw.githubusercontent.com/$env:FORK_USER/ocaml-ci-scripts/$env:FORK_BRANCH/appveyor-install.ps1"))
-
-build_script:
- - call %CYG_ROOT%\bin\bash.exe -l %APPVEYOR_BUILD_FOLDER%\appveyor-opam.sh
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ocaml-fileutils-0.6.3/fileutils.opam
new/ocaml-fileutils-0.6.4/fileutils.opam
--- old/ocaml-fileutils-0.6.3/fileutils.opam 2020-07-11 23:21:55.000000000
+0200
+++ new/ocaml-fileutils-0.6.4/fileutils.opam 2022-10-28 22:22:35.000000000
+0200
@@ -15,10 +15,10 @@
depends: [
"ocaml" {>= "4.03"}
"base-unix"
- "base-bytes"
"stdlib-shims"
+ "seq"
"dune" {>= "1.11.0"}
- "ounit" {with-test & >= "2.0.0"}
+ "ounit2" {with-test & >= "2.0.0"}
]
synopsis: "API to manipulate files (POSIX like) and filenames"
description: """
@@ -31,7 +31,7 @@
- touch
- which...
-It also providesa module to manipulate abstract filenames:
+It also provides a module to manipulate abstract filenames:
- classification
- make_relative: made a filename relative to another
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ocaml-fileutils-0.6.3/src/lib/fileutils/FilePath.mli
new/ocaml-fileutils-0.6.4/src/lib/fileutils/FilePath.mli
--- old/ocaml-fileutils-0.6.3/src/lib/fileutils/FilePath.mli 2020-07-11
23:21:55.000000000 +0200
+++ new/ocaml-fileutils-0.6.4/src/lib/fileutils/FilePath.mli 2022-10-28
22:22:35.000000000 +0200
@@ -65,10 +65,10 @@
(** {2 Ordering} *)
-(** [is_subdir fl1 fl2] Is [fl2] a sub directory of [fl1] *)
+(** [is_subdir child parent] Is [child] really a sub directory of [parent] *)
val is_subdir: filename -> filename -> bool
-(** [is_updir fl1 fl2] Is [fl1] a sub directory of [fl2] *)
+(** [is_updir parent child] Is [parent] really a parent directory of [child] *)
val is_updir: filename -> filename -> bool
(** [compare fl1 fl2] Give an order between the two filename. The
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ocaml-fileutils-0.6.3/src/lib/fileutils/FileUtil.mli
new/ocaml-fileutils-0.6.4/src/lib/fileutils/FileUtil.mli
--- old/ocaml-fileutils-0.6.3/src/lib/fileutils/FileUtil.mli 2020-07-11
23:21:55.000000000 +0200
+++ new/ocaml-fileutils-0.6.4/src/lib/fileutils/FileUtil.mli 2022-10-28
22:22:35.000000000 +0200
@@ -100,10 +100,10 @@
}
(** Translate POSIX integer permission. *)
-val permission_of_int: int -> permission
+val permission_of_int: int -> permission [@@pure]
(** Return the POSIX integer permission *)
-val int_of_permission: permission -> int
+val int_of_permission: permission -> int [@@pure]
(** Permission symbolic mode. *)
module Mode:
@@ -129,7 +129,7 @@
*)
type t = clause list
- val to_string: t -> string
+ val to_string: t -> string [@@pure]
val apply: is_dir:bool -> umask:int -> Unix.file_perm -> t -> Unix.file_perm
end
@@ -150,21 +150,21 @@
| B of int64 (** Bytes *)
(** Convert size to bytes. *)
-val byte_of_size: size -> int64
+val byte_of_size: size -> int64 [@@pure]
(** Add two sizes. *)
-val size_add: size -> size -> size
+val size_add: size -> size -> size [@@pure]
(** Compare two sizes, using the classical compare function. If fuzzy is set to
true, the comparison is done on the most significant size unit of both
value.
*)
-val size_compare: ?fuzzy:bool -> size -> size -> int
+val size_compare: ?fuzzy:bool -> size -> size -> int [@@pure]
(** Convert a value to a string representation. If fuzzy is set to true, only
consider the most significant unit
*)
-val string_of_size: ?fuzzy:bool -> size -> string
+val string_of_size: ?fuzzy:bool -> size -> string [@@pure]
(*********************************************************************)
(**
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/ocaml-fileutils-0.6.3/src/lib/fileutils/FileUtilCMP.ml
new/ocaml-fileutils-0.6.4/src/lib/fileutils/FileUtilCMP.ml
--- old/ocaml-fileutils-0.6.3/src/lib/fileutils/FileUtilCMP.ml 2020-07-11
23:21:55.000000000 +0200
+++ new/ocaml-fileutils-0.6.4/src/lib/fileutils/FileUtilCMP.ml 2022-10-28
22:22:35.000000000 +0200
@@ -23,6 +23,10 @@
open FilePath
open FileUtilTEST
+let rec seq_of_channel ch () =
+ match input_char ch with
+ | exception End_of_file -> Seq.Nil
+ | char -> Seq.Cons (char, seq_of_channel ch)
let cmp ?(skip1 = 0) fln1 ?(skip2 = 0) fln2 =
if (reduce fln1) = (reduce fln2) then
@@ -37,42 +41,18 @@
()
in
- let test_empty st =
- try
- Stream.empty st;
- true
- with Stream.Failure ->
- false
- in
-
let _ = seek_in fd1 skip1 in
let _ = seek_in fd2 skip2 in
- let stream1 = Stream.of_channel fd1 in
- let stream2 = Stream.of_channel fd2 in
- try
- begin
- while ((Stream.next stream1) = (Stream.next stream2)) do
- ()
- done;
- clean_fd ();
- Some (Stream.count stream1)
- end
- with
- | Stream.Failure ->
- begin
- match ((test_empty stream1), (test_empty stream2)) with
- true, true ->
- None
- | true, false
- | false, true
- (* Don't know how this case could be... *)
- | false, false ->
- clean_fd ();
- Some (Stream.count stream1)
- end
- | e ->
- clean_fd ();
- raise e
+ let stream1 = seq_of_channel fd1 in
+ let stream2 = seq_of_channel fd2 in
+ 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 ())
+ | _ -> count
+ in
+ let count = loop 0 (stream1 ()) (stream2 ()) in
+ clean_fd ();
+ Some count
end else
Some (-1)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ocaml-fileutils-0.6.3/src/lib/fileutils/dune
new/ocaml-fileutils-0.6.4/src/lib/fileutils/dune
--- old/ocaml-fileutils-0.6.3/src/lib/fileutils/dune 2020-07-11
23:21:55.000000000 +0200
+++ new/ocaml-fileutils-0.6.4/src/lib/fileutils/dune 2022-10-28
22:22:35.000000000 +0200
@@ -30,4 +30,4 @@
fileUtilWHICH
unixPath
win32Path)
- (libraries unix bytes stdlib-shims))
+ (libraries unix seq stdlib-shims))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ocaml-fileutils-0.6.3/test/dune
new/ocaml-fileutils-0.6.4/test/dune
--- old/ocaml-fileutils-0.6.3/test/dune 2020-07-11 23:21:55.000000000 +0200
+++ new/ocaml-fileutils-0.6.4/test/dune 2022-10-28 22:22:35.000000000 +0200
@@ -6,4 +6,4 @@
(test
(name test)
(modules test)
- (libraries fileutils fileutils_str oUnit stdlib-shims))
+ (libraries fileutils fileutils_str ounit2 stdlib-shims))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ocaml-fileutils-0.6.3/test/test.ml
new/ocaml-fileutils-0.6.4/test/test.ml
--- old/ocaml-fileutils-0.6.3/test/test.ml 2020-07-11 23:21:55.000000000
+0200
+++ new/ocaml-fileutils-0.6.4/test/test.ml 2022-10-28 22:22:35.000000000
+0200
@@ -223,6 +223,20 @@
assert_equal
res
(OsPath.is_relative filename))
+
+ let is_updir (parent, child, res) =
+ (test_name "is_updir") >::
+ (fun _ ->
+ assert_equal
+ res
+ (OsPath.is_updir parent child))
+
+ let is_subdir (child, parent, is) =
+ (test_name "is_subdir") >::
+ (fun _ ->
+ assert_equal
+ is
+ (OsPath.is_subdir child parent))
end
@@ -339,6 +353,22 @@
("a.", "a", "");
]
)
+
+ @ (
+ List.map TestUnix.is_updir
+ [
+ ("foo", "foo/bar/baz", true);
+ ("bar", "foo", false);
+ ]
+ )
+
+ @ (
+ List.map TestUnix.is_subdir
+ [
+ ("foo/bar", "foo", true);
+ ("bar", "foo", false);
+ ]
+ )
)