Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package ocaml-camlzip for openSUSE:Factory 
checked in at 2021-09-29 20:18:25
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ocaml-camlzip (Old)
 and      /work/SRC/openSUSE:Factory/.ocaml-camlzip.new.1899 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ocaml-camlzip"

Wed Sep 29 20:18:25 2021 rev:3 rq:921263 version:1.11

Changes:
--------
--- /work/SRC/openSUSE:Factory/ocaml-camlzip/ocaml-camlzip.changes      
2021-04-29 01:37:10.162473747 +0200
+++ /work/SRC/openSUSE:Factory/.ocaml-camlzip.new.1899/ocaml-camlzip.changes    
2021-09-29 20:19:28.307036962 +0200
@@ -1,0 +2,7 @@
+Sat Sep 11 12:34:56 UTC 2021 - oher...@suse.de
+
+- Update to version 1.11
+  Zip.add_entry_generator ~level:0 was missing a CRC update
+  remove changes from ocaml-camlzip.patch wich are part of this release
+
+-------------------------------------------------------------------

Old:
----
  ocaml-camlzip-1.10.tar.xz

New:
----
  ocaml-camlzip-1.11.tar.xz

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

Other differences:
------------------
++++++ ocaml-camlzip.spec ++++++
--- /var/tmp/diff_new_pack.RXn2Ka/_old  2021-09-29 20:19:28.779037646 +0200
+++ /var/tmp/diff_new_pack.RXn2Ka/_new  2021-09-29 20:19:28.783037651 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           ocaml-camlzip
-Version:        1.10
+Version:        1.11
 Release:        0
 %{?ocaml_preserve_bytecode}
 Summary:        OCaml ZIP interface
@@ -28,9 +28,9 @@
 Patch0:         ocaml-camlzip.patch
 Provides:       ocaml-camlzip-test = %{version}-%{release}
 Obsoletes:      ocaml-camlzip-test < %{version}-%{release}
-BuildRequires:  ocaml
 BuildRequires:  ocaml-dune
-BuildRequires:  ocaml-rpm-macros >= 20210121
+BuildRequires:  ocaml-rpm-macros >= 20210911
+BuildRequires:  ocaml(ocaml_base_version) >= 4.02
 BuildRequires:  ocamlfind(dune.configurator)
 BuildRequires:  ocamlfind(stdlib-shims)
 BuildRequires:  pkg-config
@@ -54,6 +54,7 @@
 %autosetup -p1
 
 %build
+rm -fv *.opam
 dune_release_pkgs='zip'
 %ocaml_dune_setup
 %ocaml_dune_build

++++++ _service ++++++
--- /var/tmp/diff_new_pack.RXn2Ka/_old  2021-09-29 20:19:28.807037686 +0200
+++ /var/tmp/diff_new_pack.RXn2Ka/_new  2021-09-29 20:19:28.807037686 +0200
@@ -1,12 +1,12 @@
 <services>
   <service name="tar_scm" mode="disabled">
     <param name="filename">ocaml-camlzip</param>
-    <!-- rel110 -->
-    <param name="revision">61b7f60b29d6a432b303b978a95e9262f27a969e</param>
+    <!-- rel111 -->
+    <param name="revision">d81554a31865064b2c5719a53265fd52a6f3d380</param>
     <param name="scm">git</param>
     <param name="submodules">disable</param>
     <param name="url">https://github.com/xavierleroy/camlzip.git</param>
-    <param name="versionformat">1.10</param>
+    <param name="versionformat">1.11</param>
   </service>
   <service name="recompress" mode="disabled">
     <param name="file">*.tar</param>

++++++ ocaml-camlzip-1.10.tar.xz -> ocaml-camlzip-1.11.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-camlzip-1.10/.gitignore 
new/ocaml-camlzip-1.11/.gitignore
--- old/ocaml-camlzip-1.10/.gitignore   1970-01-01 01:00:00.000000000 +0100
+++ new/ocaml-camlzip-1.11/.gitignore   2020-12-12 19:30:13.000000000 +0100
@@ -0,0 +1,14 @@
+*.a
+*.cma
+*.cmi
+*.cmo
+*.cmx
+*.cmxs
+*.cmxa
+*.o
+*.so
+*.cmt
+*.cmti
+test/minigzip
+test/minizip
+test/testzlib
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-camlzip-1.10/Changes 
new/ocaml-camlzip-1.11/Changes
--- old/ocaml-camlzip-1.10/Changes      2019-12-27 18:07:00.000000000 +0100
+++ new/ocaml-camlzip-1.11/Changes      2020-12-12 19:30:13.000000000 +0100
@@ -1,3 +1,13 @@
+Release 1.11:
+- `Zip.add_entry_generator ~level:0` was missing a CRC update
+- GPR#28: fix build on platforms with no shared libs
+- GPR#33: update META files to use plugin convention
+- Use `Stdlib.xxx` instead of `Pervasives.xxx`.  OCaml >= 4.07 is required.
+- `make all` automatically builds in native-code if supported
+- Added local .opam file
+- Updated tests and added automatic test harness
+- Generate and install .mli, .cmt, and .cmti files
+
 Release 1.10:
 - GPR#25: Fix Gzip.flush_continue [James Owen]
 - Improve compatibility with OCaml 4.09
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-camlzip-1.10/META-zip 
new/ocaml-camlzip-1.11/META-zip
--- old/ocaml-camlzip-1.10/META-zip     2019-12-27 18:07:00.000000000 +0100
+++ new/ocaml-camlzip-1.11/META-zip     2020-12-12 19:30:13.000000000 +0100
@@ -3,3 +3,5 @@
 archive(byte)="zip.cma"
 archive(native)="zip.cmxa"
 archive(native,plugin)="zip.cmxs"
+plugin(byte)="zip.cma"
+plugin(native)="zip.cmxs"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-camlzip-1.10/Makefile 
new/ocaml-camlzip-1.11/Makefile
--- old/ocaml-camlzip-1.10/Makefile     2019-12-27 18:07:00.000000000 +0100
+++ new/ocaml-camlzip-1.11/Makefile     2020-12-12 19:30:13.000000000 +0100
@@ -15,7 +15,7 @@
 
 ### End of configuration section
 
-OCAMLC=ocamlfind ocamlc -g -safe-string
+OCAMLC=ocamlfind ocamlc -g -safe-string -bin-annot
 OCAMLOPT=ocamlfind ocamlopt -safe-string
 OCAMLDEP=ocamlfind ocamldep
 OCAMLMKLIB=ocamlfind ocamlmklib
@@ -26,30 +26,34 @@
 include $(shell ocamlfind ocamlc -where)/Makefile.config
 
 ifeq "${NATDYNLINK}" "true"
-CMXS = zip.cmxs
+ZIP_CMXS = zip.cmxs
 endif
 
 ZLIB_L_OPT=$(if $(ZLIB_LIBDIR),-L$(ZLIB_LIBDIR))
 ZLIB_I_OPT=$(if $(ZLIB_INCLUDE),-ccopt -I$(ZLIB_INCLUDE))
 
-all: libcamlzip$(EXT_LIB) zip.cma
+all:: allbyt
+ifneq "${ARCH}" "none"
+ifneq "${NATIVE_COMPILER}" "false"
+all:: allopt
+endif
+endif
+
+allbyt: libcamlzip$(EXT_LIB) zip.cma
 
-allopt: libcamlzip$(EXT_LIB) zip.cmxa $(CMXS)
+allopt: libcamlzip$(EXT_LIB) zip.cmxa $(ZIP_CMXS)
 
 zip.cma: $(OBJS)
-       $(OCAMLMKLIB) -o zip -oc camlzip $(OBJS) \
-            $(ZLIB_L_OPT) $(ZLIB_LIB)
+       $(OCAMLMKLIB) -o zip -oc camlzip $(OBJS) $(ZLIB_L_OPT) $(ZLIB_LIB)
 
 zip.cmxa: $(OBJS:.cmo=.cmx)
-       $(OCAMLMKLIB) -o zip -oc camlzip $(OBJS:.cmo=.cmx) \
-            $(ZLIB_L_OPT) $(ZLIB_LIB)
+       $(OCAMLMKLIB) -o zip -oc camlzip $(OBJS:.cmo=.cmx) $(ZLIB_L_OPT) 
$(ZLIB_LIB)
 
-zip.cmxs: zip.cmxa
+zip.cmxs: zip.cmxa libcamlzip$(EXT_LIB)
        $(OCAMLOPT) -shared -linkall -I ./ -o $@ $^
 
 libcamlzip$(EXT_LIB): $(C_OBJS)
-       $(OCAMLMKLIB) -oc camlzip $(C_OBJS) \
-            $(ZLIB_L_OPT) $(ZLIB_LIB)
+       $(OCAMLMKLIB) -oc camlzip $(C_OBJS) $(ZLIB_L_OPT) $(ZLIB_LIB)
 
 .SUFFIXES: .mli .ml .cmo .cmi .cmx
 
@@ -67,15 +71,25 @@
        rm -f *.o *.a *.so
        rm -rf doc/
 
+TOINSTALL=\
+  *.cma *$(EXT_LIB) \
+  *.mli *.cmi *.cmti *.cmt  \
+  $(wildcard *.cmx) $(wildcard *.cmxa) \
+  $(wildcard *.cmxs) $(wildcard *$(EXT_DLL))
+
 install-findlib: install
 install:
        cp META-zip META && \
-        ocamlfind install zip META *.mli *.a *.cmi *.cma $(wildcard *.cmx) 
$(wildcard *.cmxa) $(wildcard *.cmxs) $(wildcard *$(EXT_DLL)) && \
+        ocamlfind install zip META $(TOINSTALL) && \
         rm META
        cp META-camlzip META && \
         ocamlfind install camlzip META && \
         rm META
 
+uninstall:
+       ocamlfind remove zip
+       ocamlfind remove camlzip
+
 depend:
        gcc -MM $(ZLIB_I_OPT) *.c > .depend
        $(OCAMLDEP) *.mli *.ml >> .depend
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-camlzip-1.10/README 
new/ocaml-camlzip-1.11/README
--- old/ocaml-camlzip-1.10/README       2019-12-27 18:07:00.000000000 +0100
+++ new/ocaml-camlzip-1.11/README       1970-01-01 01:00:00.000000000 +0100
@@ -1,59 +0,0 @@
-                        The CamlZip library
-
-DESCRIPTION:
-
-This Objective Caml library provides easy access to compressed files in ZIP
-and GZIP format, as well as to Java JAR files.  It provides functions
-for reading from and writing to compressed files in these formats.
-
-REQUIREMENTS:
-
-- Objective Caml 4.02 or up.
-
-- The Findlib / ocamlfind library manager.
-
-- The Zlib C library, version 1.1.3 or up.  If it is not installed on
-  your system (look for libz.a or libz.so), get it from
-  https://zlib.net/.  If you are running Linux or BSD, chances
-  are that your distribution provides precompiled binaries for this
-  library.
-
-INSTALLATION:
-
-- Edit the three variables at the beginning of the Makefile to reflect
-  the location where Zlib is installed on your system.  The defaults
-  are OK for Linux.
-
-- Do "make all".
-
-- If the Objective Caml native-code compiler is available on your platform
-  (look for the "ocamlopt" executable), do "make allopt".
-
-- Become super-user if necessary and do
-         make install
-  This installs the library through ocamlfind.
-
-
-
-DOCUMENTATION:
-
-See the comments in files zip.mli and gzip.mli.
-
-Compilation:      ocamlfind ocamlopt -package zip ...
-Linking:          ocamlfind ocamlopt -package zip -linkpgk ...
-
-The directory test/ contains examples of using this library.
-
-LICENSING:
-
-This library is copyright 2001, 2002, 2006, 2007, 2008, 2016, 2017
-Institut National de Recherche en Informatique et en Automatique (INRIA),
-and distributed under the terms of the GNU Lesser General Public
-License (LGPL) version 2.1 or above, with a special exception
-concerning static linking.  See the file LICENSE for the exact
-licensing terms.
-
-BUG REPORTS AND USER FEEDBACK:
-
-Please e-mail xavier.le...@inria.fr
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-camlzip-1.10/README.md 
new/ocaml-camlzip-1.11/README.md
--- old/ocaml-camlzip-1.10/README.md    1970-01-01 01:00:00.000000000 +0100
+++ new/ocaml-camlzip-1.11/README.md    2020-12-12 19:30:13.000000000 +0100
@@ -0,0 +1,42 @@
+# The CamlZip library
+
+## DESCRIPTION
+
+This Objective Caml library provides easy access to compressed files in ZIP 
and GZIP format, as well as to Java JAR files.  It provides functions for 
reading from and writing to compressed files in these formats.
+
+## REQUIREMENTS
+
+* Objective Caml 4.07 or up.
+
+* The Findlib / ocamlfind library manager.
+
+* The Zlib C library, version 1.1.3 or up.  You need both the library and its 
development headers.  For Debian and Ubuntu, install the package `zlib1-dev`.  
For Fedora and RHEL, install the package `zlib-devel`.  The Zlib source 
distribution is at https://zlib.net/ .
+
+## INSTALLATION
+
+* Do `make all`.
+
+* If it complains that `zlib.h` or `-lz` cannot be found, it is probably 
because Zlib is installed in non-standard directories.  Edit the top of the 
Makefile to set the appropriate values for `ZLIB_LIBDIR` and `ZLIB_INCLUDE`, or 
pass these values to `make`, for example:
+```
+        make ZLIB_LIBDIR=/opt/lib ZLIB_INCLUDE=/opt/include all
+```
+
+* Become super-user if necessary and do `make install`.  This installs the 
library through ocamlfind.
+
+## DOCUMENTATION AND USAGE
+
+See the comments in files zip.mli and gzip.mli.  Alternatively, do `make doc` 
and open the file `./doc/index.html`.
+
+Compilation:      `ocamlfind ocamlopt -package zip ...`
+Linking:          `ocamlfind ocamlopt -package zip -linkpgk ...`
+
+The directory test/ contains examples of using this library.
+
+## LICENSING
+
+This library is copyright 2001, 2002, 2006, 2007, 2008, 2016, 2017, 2020 
Institut National de Recherche en Informatique et en Automatique (INRIA), and 
distributed under the terms of the GNU Lesser General Public License (LGPL) 
version 2.1 or above, with a special exception concerning static linking.  See 
the file LICENSE for the exact licensing terms.
+
+## BUG REPORTS AND USER FEEDBACK
+
+Please use the [issue tracker](https://github.com/xavierleroy/camlzip/issues)
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-camlzip-1.10/camlzip.opam 
new/ocaml-camlzip-1.11/camlzip.opam
--- old/ocaml-camlzip-1.10/camlzip.opam 1970-01-01 01:00:00.000000000 +0100
+++ new/ocaml-camlzip-1.11/camlzip.opam 2020-12-12 19:30:13.000000000 +0100
@@ -0,0 +1,21 @@
+opam-version: "2.0"
+synopsis:
+  "Accessing compressed files in ZIP, GZIP and JAR format."
+description:
+  "The Camlzip library provides easy access to compressed files in ZIP and 
GZIP format, as well as to Java JAR files.  It provides functions for reading 
from and writing to compressed files in these formats."
+maintainer: ["Xavier Leroy <xavier.le...@college-de-france.fr>"]
+authors: ["Xavier Leroy"]
+homepage: "https://github.com/xavierleroy/camlzip";
+bug-reports: "https://github.com/xavierleroy/camlzip/issues";
+dev-repo: "git+https://github.com/xavierleroy/camlzip.git";
+license: "LGPL-2.1-or-later with OCaml-LGPL-linking-exception"
+depends: [
+  "ocaml" {>= "4.07.0"}
+  "ocamlfind" {build}
+  "conf-zlib"
+]
+build: [
+  [make "all"]
+]
+install: [make "install"]
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-camlzip-1.10/gzip.ml 
new/ocaml-camlzip-1.11/gzip.ml
--- old/ocaml-camlzip-1.10/gzip.ml      2019-12-27 18:07:00.000000000 +0100
+++ new/ocaml-camlzip-1.11/gzip.ml      2020-12-12 19:30:13.000000000 +0100
@@ -20,7 +20,7 @@
 let buffer_size = 1024
 
 type in_channel =
-  { in_chan: Pervasives.in_channel;
+  { in_chan: Stdlib.in_channel;
     in_buffer: bytes;
     mutable in_pos: int;
     mutable in_avail: int;
@@ -74,15 +74,15 @@
     in_crc = Int32.zero }
 
 let open_in filename =
-  let ic = Pervasives.open_in_bin filename in
+  let ic = Stdlib.open_in_bin filename in
   try
     open_in_chan ic
   with exn ->
-    Pervasives.close_in ic; raise exn
+    Stdlib.close_in ic; raise exn
 
 let read_byte iz =
   if iz.in_avail = 0 then begin
-    let n = Pervasives.input iz.in_chan iz.in_buffer 0
+    let n = Stdlib.input iz.in_chan iz.in_buffer 0
                              (Bytes.length iz.in_buffer) in
     if n = 0 then raise End_of_file;
     iz.in_pos <- 0;
@@ -108,7 +108,7 @@
     invalid_arg "Gzip.input";
   if iz.in_eof then 0 else begin
     if iz.in_avail = 0 then begin
-      let n = Pervasives.input iz.in_chan iz.in_buffer 0
+      let n = Stdlib.input iz.in_chan iz.in_buffer 0
                                (Bytes.length iz.in_buffer) in
       if n = 0 then raise(Error("truncated file"));
       iz.in_pos <- 0;
@@ -166,10 +166,10 @@
 
 let close_in iz =
   dispose iz;
-  Pervasives.close_in iz.in_chan
+  Stdlib.close_in iz.in_chan
 
 type out_channel =
-  { out_chan: Pervasives.out_channel;
+  { out_chan: Stdlib.out_channel;
     out_buffer: bytes;
     mutable out_pos: int;
     mutable out_avail: int;
@@ -196,10 +196,10 @@
     out_crc = Int32.zero }
 
 let open_out ?(level = 6) filename =
-  open_out_chan ~level (Pervasives.open_out_bin filename)
+  open_out_chan ~level (Stdlib.open_out_bin filename)
 
 let flush_and_reset_out_buffer oz =
-  Pervasives.output oz.out_chan oz.out_buffer 0 oz.out_pos;
+  Stdlib.output oz.out_chan oz.out_buffer 0 oz.out_pos;
   oz.out_pos <- 0;
   oz.out_avail <- Bytes.length oz.out_buffer
 
@@ -237,7 +237,7 @@
 let write_int32 oc n =
   let r = ref n in
   for i = 1 to 4 do
-    Pervasives.output_byte oc (Int32.to_int !r);
+    Stdlib.output_byte oc (Int32.to_int !r);
     r := Int32.shift_right_logical !r 8
   done
 
@@ -262,7 +262,7 @@
 let flush_continue oz =
   (* Flush everything to the underlying file channel, then flush the channel. 
*)
   flush_to_out_chan ~flush_command:Zlib.Z_SYNC_FLUSH oz;
-  Pervasives.flush oz.out_chan
+  Stdlib.flush oz.out_chan
 
 let flush oz =
   (* Flush everything to the output channel. *)
@@ -275,5 +275,5 @@
 
 let close_out oz =
   flush oz;
-  Pervasives.close_out oz.out_chan
+  Stdlib.close_out oz.out_chan
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-camlzip-1.10/gzip.mli 
new/ocaml-camlzip-1.11/gzip.mli
--- old/ocaml-camlzip-1.10/gzip.mli     2019-12-27 18:07:00.000000000 +0100
+++ new/ocaml-camlzip-1.11/gzip.mli     2020-12-12 19:30:13.000000000 +0100
@@ -26,7 +26,7 @@
 val open_in: string -> in_channel
        (** Open a compressed file for reading.  The argument is the file
            name. *)
-val open_in_chan: Pervasives.in_channel -> in_channel
+val open_in_chan: Stdlib.in_channel -> in_channel
        (** Open a compressed file for reading.  The argument is a
            regular file channel already opened on the compressed file. *)
 val input_char: in_channel -> char
@@ -62,11 +62,11 @@
 val close_in: in_channel -> unit
        (** Close the given input channel.  If the channel was created with
            [Gzip.open_in_chan], the underlying regular file channel
-           (of type [Pervasives.in_channel]) is also closed.
+           (of type [Stdlib.in_channel]) is also closed.
            Do not apply any of the functions above to a closed channel. *)
 val dispose: in_channel -> unit
        (** Same as [Gzip.close_in], but does not close the underlying
-           regular file channel (of type [Pervasives.in_channel]);
+           regular file channel (of type [Stdlib.in_channel]);
            just dispose of the resources associated with the decompression
            channel.  This can be useful if e.g. the underlying file channel
            is a network socket on which more (uncompressed) data
@@ -86,7 +86,7 @@
            (but fastest) compression and 9 being the strongest
            (but slowest) compression.  The default level is 6
            (medium compression). *)
-val open_out_chan: ?level:int -> Pervasives.out_channel -> out_channel
+val open_out_chan: ?level:int -> Stdlib.out_channel -> out_channel
        (** Open a compressed file for writing.  The argument is a
            regular file channel already opened on the compressed file.
            The optional [level] argument sets the compression level
@@ -109,11 +109,11 @@
 val close_out: out_channel -> unit
        (** Close the given output channel.  If the channel was created with
            [Gzip.open_out_chan], the underlying regular file channel
-           (of type [Pervasives.out_channel]) is also closed.
+           (of type [Stdlib.out_channel]) is also closed.
            Do not apply any of the functions above to a closed channel. *)
 val flush: out_channel -> unit
        (** Same as [Gzip.close_out], but do not close the underlying
-           regular file channel (of type [Pervasives.out_channel]);
+           regular file channel (of type [Stdlib.out_channel]);
            just flush all pending compressed data and
            dispose of the resources associated with the compression
            channel.  This can be useful if e.g. the underlying file channel
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-camlzip-1.10/test/Makefile 
new/ocaml-camlzip-1.11/test/Makefile
--- old/ocaml-camlzip-1.10/test/Makefile        2019-12-27 18:07:00.000000000 
+0100
+++ new/ocaml-camlzip-1.11/test/Makefile        2020-12-12 19:30:13.000000000 
+0100
@@ -1,13 +1,22 @@
-all: minizip minigzip testzlib
+all: test-testzlib test-minizip test-minigzip
 
-minigzip: ../zip.cma minigzip.ml
-       ocamlc -ccopt -g -g -I .. -o minigzip ../zip.cma minigzip.ml
+minigzip: ../zip.cmxa minigzip.ml
+       ocamlopt -ccopt -g -g -I .. -o minigzip ../zip.cmxa minigzip.ml
 
-minizip: ../zip.cma minizip.ml
-       ocamlc -ccopt -g -g -I .. -o minizip unix.cma ../zip.cma minizip.ml
+test-minigzip: minigzip minigzip.run
+       sh ./minigzip.run
 
-testzlib: ../zip.cma testzlib.ml
-       ocamlc -g -I .. -o testzlib ../zip.cma testzlib.ml
+minizip: ../zip.cmxa minizip.ml
+       ocamlopt -ccopt -g -g -I .. -o minizip unix.cmxa ../zip.cmxa minizip.ml
+
+test-minizip: minizip minizip.run
+       sh ./minizip.run
+
+testzlib: ../zip.cmxa testzlib.ml
+       ocamlopt -g -I .. -o testzlib ../zip.cmxa testzlib.ml
+
+test-testzlib: testzlib testzlib.run
+       sh ./testzlib.run
 
 clean:
        rm -f *.cm*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-camlzip-1.10/test/minigzip.run 
new/ocaml-camlzip-1.11/test/minigzip.run
--- old/ocaml-camlzip-1.10/test/minigzip.run    1970-01-01 01:00:00.000000000 
+0100
+++ new/ocaml-camlzip-1.11/test/minigzip.run    2020-12-12 19:30:13.000000000 
+0100
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+runtest() {
+  if $2 < minigzip.ml | $3 -d | cmp - minigzip.ml
+  then echo "$1: passed"
+  else echo "$1: FAILED"; exit 2
+  fi
+}
+
+runtest "Gzip 1" ./minigzip ./minigzip
+runtest "Gzip 2" ./minigzip gzip
+runtest "Gzip 3" gzip ./minigzip
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-camlzip-1.10/test/minizip.ml 
new/ocaml-camlzip-1.11/test/minizip.ml
--- old/ocaml-camlzip-1.10/test/minizip.ml      2019-12-27 18:07:00.000000000 
+0100
+++ new/ocaml-camlzip-1.11/test/minizip.ml      2020-12-12 19:30:13.000000000 
+0100
@@ -80,7 +80,7 @@
 "Usage: 
   minizip t <zipfile>           show contents of <zipfile>
   minizip x <zipfile>           extract files from <zipfile>
-  minizip c <zipfile> <file> .. create a <zipfile> with the given files";
+  minizip c <zipfile> <file> .. create a <zipfile> with the given files\n";
   exit 2
 
 let _ =
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-camlzip-1.10/test/minizip.run 
new/ocaml-camlzip-1.11/test/minizip.run
--- old/ocaml-camlzip-1.10/test/minizip.run     1970-01-01 01:00:00.000000000 
+0100
+++ new/ocaml-camlzip-1.11/test/minizip.run     2020-12-12 19:30:13.000000000 
+0100
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+here=`pwd`
+
+runtest() {
+  d=/tmp/minizip$$
+  zf=/tmp/minizip$$.zip
+  rm -rf $d $zf
+  mkdir $d
+  if $2 $zf * > /dev/null && \
+    (cd $d && $3 $zf > /dev/null) && \
+    cmp minizip.ml $d/minizip.ml && \
+    cmp minigzip.ml $d/minigzip.ml
+  then rm -rf $d $zf; echo "$1: passed"
+  else rm -rf $d $zf; echo "$1: FAILED"; exit 2
+  fi
+}
+
+runtest "Zip 1" "$here/minizip c" "$here/minizip x"
+runtest "Zip 2" "zip -r" "$here/minizip x"
+runtest "Zip 3" "$here/minizip c" "unzip"
+
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-camlzip-1.10/test/testzlib.run 
new/ocaml-camlzip-1.11/test/testzlib.run
--- old/ocaml-camlzip-1.10/test/testzlib.run    1970-01-01 01:00:00.000000000 
+0100
+++ new/ocaml-camlzip-1.11/test/testzlib.run    2020-12-12 19:30:13.000000000 
+0100
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+t1=`mktemp`
+t2=`mktemp`
+if ./testzlib testzlib.ml $t1 && ./testzlib -d $t1 $t2 && cmp $t2 testzlib.ml
+then rm -f $t1 $t2; echo "Zlib: passed"
+else rm -f $t1 $t2; echo "Zlib: FAILED"; exit 2
+fi
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-camlzip-1.10/zip.ml 
new/ocaml-camlzip-1.11/zip.ml
--- old/ocaml-camlzip-1.10/zip.ml       2019-12-27 18:07:00.000000000 +0100
+++ new/ocaml-camlzip-1.11/zip.ml       2020-12-12 19:30:13.000000000 +0100
@@ -59,7 +59,7 @@
 
 type in_file =
   { if_filename: string;
-    if_channel: Pervasives.in_channel;
+    if_channel: Stdlib.in_channel;
     if_entries: entry list;
     if_directory: (string, entry) Hashtbl.t;
     if_comment: string }
@@ -69,7 +69,7 @@
 
 type out_file =
   { of_filename: string;
-    of_channel: Pervasives.out_channel;
+    of_channel: Stdlib.out_channel;
     mutable of_entries: entry list;
     of_comment: string }
 
@@ -218,7 +218,7 @@
 (* Open a ZIP file for reading *)
 
 let open_in filename =
-  let ic = Pervasives.open_in_bin filename in
+  let ic = Stdlib.open_in_bin filename in
   try
     let (cd_entries, cd_size, cd_offset, cd_comment) = read_ecd filename ic in
     let entries =
@@ -231,12 +231,12 @@
       if_directory = dir;
       if_comment = cd_comment }
   with exn ->
-    Pervasives.close_in ic; raise exn
+    Stdlib.close_in ic; raise exn
 
 (* Close a ZIP file opened for reading *)
 
 let close_in ifile =
-  Pervasives.close_in ifile.if_channel
+  Stdlib.close_in ifile.if_channel
 
 (* Return the info associated with an entry *)
 
@@ -372,7 +372,7 @@
   if String.length comment >= 0x10000 then
     raise(Error(filename, "", "comment too long"));
   { of_filename = filename;
-    of_channel = Pervasives.open_out_bin filename;
+    of_channel = Stdlib.open_out_bin filename;
     of_entries = [];
     of_comment = comment }
 
@@ -419,7 +419,7 @@
   write4_int oc start_cd;               (* offset of central dir *)
   write2 oc (String.length ofile.of_comment); (* length of comment *)
   writestring oc ofile.of_comment;         (* comment *)
-  Pervasives.close_out oc
+  Stdlib.close_out oc
 
 (* Write a local file header and return the corresponding entry *)
 
@@ -554,9 +554,9 @@
         with Unix.Unix_error(_,_,_) -> None in
   try
     copy_channel_to_entry ic ofile ~extra ~comment ~level ?mtime:mtime' name;
-    Pervasives.close_in ic
+    Stdlib.close_in ic
   with x ->
-    Pervasives.close_in ic; raise x
+    Stdlib.close_in ic; raise x
 
 
 (* Add an entry whose content will be produced by the caller *)
@@ -583,7 +583,8 @@
         check ();
         output ofile.of_channel buf pos len;
         compr_size := !compr_size + len;
-        uncompr_size := !uncompr_size + len
+        uncompr_size := !uncompr_size + len;
+        crc := Zlib.update_crc !crc buf pos len
       ),
       (fun () ->
         check ();

++++++ ocaml-camlzip.patch ++++++
--- /var/tmp/diff_new_pack.RXn2Ka/_old  2021-09-29 20:19:28.875037785 +0200
+++ /var/tmp/diff_new_pack.RXn2Ka/_new  2021-09-29 20:19:28.875037785 +0200
@@ -56,11 +56,11 @@
 +
 +(generate_opam_files true)
 +
-+(license "LGPL-2.1-or-later WITH OCaml-LGPL-linking-exception")
++(license "LGPL-2.1-or-later with OCaml-LGPL-linking-exception")
 +
 +(authors "Xavier Leroy")
 +
-+(maintainers "Cryptosense <opensou...@cryptosense.com>")
++(maintainers "Xavier Leroy <xavier.le...@college-de-france.fr>")
 +
 +(homepage "https://github.com/xavierleroy/camlzip";)
 +
@@ -69,8 +69,8 @@
 +(package
 + (name zip)
 + (synopsis
-+   "Provides easy access to compressed files in ZIP, GZIP and JAR format")
-+ (description "Reading and writing zip and gzip files from OCaml.")
++   "Accessing compressed files in ZIP, GZIP and JAR format.")
++ (description "The Camlzip library provides easy access to compressed files 
in ZIP and GZIP format, as well as to Java JAR files.  It provides functions 
for reading from and writing to compressed files in these formats.")
 + (depends
 +  dune.configurator
 +  dune
@@ -78,215 +78,3 @@
 +  conf-zlib
 +  (ocaml
 +   (>= 4.02.0))))
---- a/gzip.ml
-+++ b/gzip.ml
-@@ -20,7 +20,7 @@ exception Error of string
- let buffer_size = 1024
- 
- type in_channel =
--  { in_chan: Pervasives.in_channel;
-+  { in_chan: Stdlib.in_channel;
-     in_buffer: bytes;
-     mutable in_pos: int;
-     mutable in_avail: int;
-@@ -74,15 +74,15 @@ let open_in_chan ic =
-     in_crc = Int32.zero }
- 
- let open_in filename =
--  let ic = Pervasives.open_in_bin filename in
-+  let ic = Stdlib.open_in_bin filename in
-   try
-     open_in_chan ic
-   with exn ->
--    Pervasives.close_in ic; raise exn
-+    Stdlib.close_in ic; raise exn
- 
- let read_byte iz =
-   if iz.in_avail = 0 then begin
--    let n = Pervasives.input iz.in_chan iz.in_buffer 0
-+    let n = Stdlib.input iz.in_chan iz.in_buffer 0
-                              (Bytes.length iz.in_buffer) in
-     if n = 0 then raise End_of_file;
-     iz.in_pos <- 0;
-@@ -108,7 +108,7 @@ let rec input iz buf pos len =
-     invalid_arg "Gzip.input";
-   if iz.in_eof then 0 else begin
-     if iz.in_avail = 0 then begin
--      let n = Pervasives.input iz.in_chan iz.in_buffer 0
-+      let n = Stdlib.input iz.in_chan iz.in_buffer 0
-                                (Bytes.length iz.in_buffer) in
-       if n = 0 then raise(Error("truncated file"));
-       iz.in_pos <- 0;
-@@ -166,10 +166,10 @@ let dispose iz =
- 
- let close_in iz =
-   dispose iz;
--  Pervasives.close_in iz.in_chan
-+  Stdlib.close_in iz.in_chan
- 
- type out_channel =
--  { out_chan: Pervasives.out_channel;
-+  { out_chan: Stdlib.out_channel;
-     out_buffer: bytes;
-     mutable out_pos: int;
-     mutable out_avail: int;
-@@ -196,10 +196,10 @@ let open_out_chan ?(level = 6) oc =
-     out_crc = Int32.zero }
- 
- let open_out ?(level = 6) filename =
--  open_out_chan ~level (Pervasives.open_out_bin filename)
-+  open_out_chan ~level (Stdlib.open_out_bin filename)
- 
- let flush_and_reset_out_buffer oz =
--  Pervasives.output oz.out_chan oz.out_buffer 0 oz.out_pos;
-+  Stdlib.output oz.out_chan oz.out_buffer 0 oz.out_pos;
-   oz.out_pos <- 0;
-   oz.out_avail <- Bytes.length oz.out_buffer
- 
-@@ -237,7 +237,7 @@ let output_byte oz b =
- let write_int32 oc n =
-   let r = ref n in
-   for i = 1 to 4 do
--    Pervasives.output_byte oc (Int32.to_int !r);
-+    Stdlib.output_byte oc (Int32.to_int !r);
-     r := Int32.shift_right_logical !r 8
-   done
- 
-@@ -262,7 +262,7 @@ let flush_to_out_chan ~flush_command oz
- let flush_continue oz =
-   (* Flush everything to the underlying file channel, then flush the channel. 
*)
-   flush_to_out_chan ~flush_command:Zlib.Z_SYNC_FLUSH oz;
--  Pervasives.flush oz.out_chan
-+  Stdlib.flush oz.out_chan
- 
- let flush oz =
-   (* Flush everything to the output channel. *)
-@@ -275,5 +275,5 @@ let flush oz =
- 
- let close_out oz =
-   flush oz;
--  Pervasives.close_out oz.out_chan
-+  Stdlib.close_out oz.out_chan
- 
---- a/gzip.mli
-+++ b/gzip.mli
-@@ -26,7 +26,7 @@ type in_channel
- val open_in: string -> in_channel
-        (** Open a compressed file for reading.  The argument is the file
-            name. *)
--val open_in_chan: Pervasives.in_channel -> in_channel
-+val open_in_chan: Stdlib.in_channel -> in_channel
-        (** Open a compressed file for reading.  The argument is a
-            regular file channel already opened on the compressed file. *)
- val input_char: in_channel -> char
-@@ -62,11 +62,11 @@ val really_input: in_channel -> bytes ->
- val close_in: in_channel -> unit
-        (** Close the given input channel.  If the channel was created with
-            [Gzip.open_in_chan], the underlying regular file channel
--           (of type [Pervasives.in_channel]) is also closed.
-+           (of type [Stdlib.in_channel]) is also closed.
-            Do not apply any of the functions above to a closed channel. *)
- val dispose: in_channel -> unit
-        (** Same as [Gzip.close_in], but does not close the underlying
--           regular file channel (of type [Pervasives.in_channel]);
-+           regular file channel (of type [Stdlib.in_channel]);
-            just dispose of the resources associated with the decompression
-            channel.  This can be useful if e.g. the underlying file channel
-            is a network socket on which more (uncompressed) data
-@@ -86,7 +86,7 @@ val open_out: ?level:int -> string -> ou
-            (but fastest) compression and 9 being the strongest
-            (but slowest) compression.  The default level is 6
-            (medium compression). *)
--val open_out_chan: ?level:int -> Pervasives.out_channel -> out_channel
-+val open_out_chan: ?level:int -> Stdlib.out_channel -> out_channel
-        (** Open a compressed file for writing.  The argument is a
-            regular file channel already opened on the compressed file.
-            The optional [level] argument sets the compression level
-@@ -109,11 +109,11 @@ val output_substring: out_channel -> str
- val close_out: out_channel -> unit
-        (** Close the given output channel.  If the channel was created with
-            [Gzip.open_out_chan], the underlying regular file channel
--           (of type [Pervasives.out_channel]) is also closed.
-+           (of type [Stdlib.out_channel]) is also closed.
-            Do not apply any of the functions above to a closed channel. *)
- val flush: out_channel -> unit
-        (** Same as [Gzip.close_out], but do not close the underlying
--           regular file channel (of type [Pervasives.out_channel]);
-+           regular file channel (of type [Stdlib.out_channel]);
-            just flush all pending compressed data and
-            dispose of the resources associated with the compression
-            channel.  This can be useful if e.g. the underlying file channel
---- a/zip.ml
-+++ b/zip.ml
-@@ -59,7 +59,7 @@ type entry =
- 
- type in_file =
-   { if_filename: string;
--    if_channel: Pervasives.in_channel;
-+    if_channel: Stdlib.in_channel;
-     if_entries: entry list;
-     if_directory: (string, entry) Hashtbl.t;
-     if_comment: string }
-@@ -69,7 +69,7 @@ let comment ifile = ifile.if_comment
- 
- type out_file =
-   { of_filename: string;
--    of_channel: Pervasives.out_channel;
-+    of_channel: Stdlib.out_channel;
-     mutable of_entries: entry list;
-     of_comment: string }
- 
-@@ -218,7 +218,7 @@ let read_cd filename ic cd_entries cd_of
- (* Open a ZIP file for reading *)
- 
- let open_in filename =
--  let ic = Pervasives.open_in_bin filename in
-+  let ic = Stdlib.open_in_bin filename in
-   try
-     let (cd_entries, cd_size, cd_offset, cd_comment) = read_ecd filename ic in
-     let entries =
-@@ -231,12 +231,12 @@ let open_in filename =
-       if_directory = dir;
-       if_comment = cd_comment }
-   with exn ->
--    Pervasives.close_in ic; raise exn
-+    Stdlib.close_in ic; raise exn
- 
- (* Close a ZIP file opened for reading *)
- 
- let close_in ifile =
--  Pervasives.close_in ifile.if_channel
-+  Stdlib.close_in ifile.if_channel
- 
- (* Return the info associated with an entry *)
- 
-@@ -372,7 +372,7 @@ let open_out ?(comment = "") filename =
-   if String.length comment >= 0x10000 then
-     raise(Error(filename, "", "comment too long"));
-   { of_filename = filename;
--    of_channel = Pervasives.open_out_bin filename;
-+    of_channel = Stdlib.open_out_bin filename;
-     of_entries = [];
-     of_comment = comment }
- 
-@@ -419,7 +419,7 @@ let close_out ofile =
-   write4_int oc start_cd;               (* offset of central dir *)
-   write2 oc (String.length ofile.of_comment); (* length of comment *)
-   writestring oc ofile.of_comment;         (* comment *)
--  Pervasives.close_out oc
-+  Stdlib.close_out oc
- 
- (* Write a local file header and return the corresponding entry *)
- 
-@@ -554,9 +554,9 @@ let copy_file_to_entry infilename ofile
-         with Unix.Unix_error(_,_,_) -> None in
-   try
-     copy_channel_to_entry ic ofile ~extra ~comment ~level ?mtime:mtime' name;
--    Pervasives.close_in ic
-+    Stdlib.close_in ic
-   with x ->
--    Pervasives.close_in ic; raise x
-+    Stdlib.close_in ic; raise x
- 
- 
- (* Add an entry whose content will be produced by the caller *)

Reply via email to