diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | XmlRpc.ml | 14 | ||||
-rw-r--r-- | debian/changelog | 8 | ||||
-rw-r--r-- | debian/control | 4 | ||||
-rw-r--r-- | debian/patches/0001-Allow-installation-under-a-given-div-externally-pass.patch | 9 | ||||
-rw-r--r-- | debian/patches/0002-Compile-with-ocamlnet-3.3.5.patch | 5 | ||||
-rw-r--r-- | debian/patches/0003-Compile-with-ocamlnet-4.0.4.patch | 1 | ||||
-rw-r--r-- | debian/patches/0004-Fix-compilation-with-OCaml-4.08.0.patch | 67 | ||||
-rw-r--r-- | debian/patches/auto-gitignore | 15 | ||||
-rw-r--r-- | debian/patches/series | 2 |
10 files changed, 109 insertions, 17 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..845ca06 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.pc @@ -254,14 +254,16 @@ let message_of_xml_element (* Workaround for Xml-Light, which doesn't like dots in tag names. *) let fix_dotted_tags s = let len = String.length s in + let s = Bytes.of_string s in let in_tag = ref false in for i = 0 to len - 1 do - match s.[i] with + match Bytes.get s i with | '<' -> in_tag := true | '>' -> in_tag := false | '.' when !in_tag -> s.[i] <- ':' | _ -> () - done + done; + Bytes.to_string s let pipe_process command data = let (in_channel, out_channel) = Unix.open_process command in @@ -274,7 +276,7 @@ let pipe_process command data = let chars_read = ref 1 in while !chars_read <> 0 do chars_read := input in_channel string 0 buffer_size; - Buffer.add_substring buffer string 0 !chars_read + Buffer.add_subbytes buffer string 0 !chars_read done; let status = Unix.close_process (in_channel, out_channel) in (status, Buffer.contents buffer) @@ -383,7 +385,7 @@ object (self) match status with | Unix.WEXITED 0 -> if debug then prerr_endline contents; - fix_dotted_tags contents; + let contents = fix_dotted_tags contents in (match (message_of_xml_element ~base64_decoder ~datetime_decoder @@ -457,7 +459,7 @@ object (self) match call#status with | `Successful -> let contents = call#get_resp_body () in - fix_dotted_tags contents; + let contents = fix_dotted_tags contents in (match (message_of_xml_element ~base64_decoder ~datetime_decoder @@ -553,7 +555,7 @@ let serve ?(datetime_decoder=XmlRpcDateTime.of_string) ?(error_handler=default_error_handler) f s = - fix_dotted_tags s; + let s = fix_dotted_tags s in try begin try diff --git a/debian/changelog b/debian/changelog index f4ce2df..29ff2ca 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +xmlrpc-light (0.6.1-5) unstable; urgency=medium + + * Team upload + * Update Vcs-* + * Fix compilation with OCaml 4.08.0 + + -- Stéphane Glondu <glondu@debian.org> Thu, 12 Sep 2019 09:17:11 +0200 + xmlrpc-light (0.6.1-4) unstable; urgency=medium * Port to ocamlnet 4.0.4 diff --git a/debian/control b/debian/control index 78c7f80..088efc3 100644 --- a/debian/control +++ b/debian/control @@ -15,8 +15,8 @@ Build-Depends: ocaml-findlib, dh-ocaml (>= 0.9) Standards-Version: 3.9.2 -Vcs-Git: git://git.debian.org/git/pkg-ocaml-maint/packages/xmlrpc-light.git -Vcs-Browser: http://git.debian.org/?p=pkg-ocaml-maint/packages/xmlrpc-light.git +Vcs-Git: https://salsa.debian.org/ocaml-team/xmlrpc-light.git +Vcs-Browser: https://salsa.debian.org/ocaml-team/xmlrpc-light Homepage: http://code.google.com/p/xmlrpc-light/ Package: libxmlrpc-light-ocaml-dev diff --git a/debian/patches/0001-Allow-installation-under-a-given-div-externally-pass.patch b/debian/patches/0001-Allow-installation-under-a-given-div-externally-pass.patch index f9aea24..7430361 100644 --- a/debian/patches/0001-Allow-installation-under-a-given-div-externally-pass.patch +++ b/debian/patches/0001-Allow-installation-under-a-given-div-externally-pass.patch @@ -1,11 +1,11 @@ From: Pietro Abate <pietro.abate@anu.edu.au> Date: Fri, 22 Jul 2011 00:34:28 +0200 -Subject: Allow installation under a given div, externally passed by - debian/rules +Subject: Allow installation under a given div, + externally passed by debian/rules --- - Makefile | 7 +++++-- - 1 files changed, 5 insertions(+), 2 deletions(-) + Makefile | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index e9f50e6..e7dee0b 100644 @@ -27,4 +27,3 @@ index e9f50e6..e7dee0b 100644 uninstall: libuninstall .PHONY: test --- diff --git a/debian/patches/0002-Compile-with-ocamlnet-3.3.5.patch b/debian/patches/0002-Compile-with-ocamlnet-3.3.5.patch index 8215812..a47d3b1 100644 --- a/debian/patches/0002-Compile-with-ocamlnet-3.3.5.patch +++ b/debian/patches/0002-Compile-with-ocamlnet-3.3.5.patch @@ -3,8 +3,8 @@ Date: Fri, 22 Jul 2011 00:32:59 +0200 Subject: Compile with ocamlnet 3.3.5 --- - XmlRpcServer.ml | 8 +++----- - 1 files changed, 3 insertions(+), 5 deletions(-) + XmlRpcServer.ml | 8 +++----- + 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/XmlRpcServer.ml b/XmlRpcServer.ml index 3d4f130..47d6a8b 100644 @@ -36,4 +36,3 @@ index 3d4f130..47d6a8b 100644 } in let handlers = [handler, xmlrpc] in --- diff --git a/debian/patches/0003-Compile-with-ocamlnet-4.0.4.patch b/debian/patches/0003-Compile-with-ocamlnet-4.0.4.patch index fb485b5..604ac88 100644 --- a/debian/patches/0003-Compile-with-ocamlnet-4.0.4.patch +++ b/debian/patches/0003-Compile-with-ocamlnet-4.0.4.patch @@ -101,4 +101,3 @@ index f1c919d..48e6400 100644 #require "xml-light";; #load "xmlrpc-light.cma";; --- diff --git a/debian/patches/0004-Fix-compilation-with-OCaml-4.08.0.patch b/debian/patches/0004-Fix-compilation-with-OCaml-4.08.0.patch new file mode 100644 index 0000000..bd62866 --- /dev/null +++ b/debian/patches/0004-Fix-compilation-with-OCaml-4.08.0.patch @@ -0,0 +1,67 @@ +From: Stephane Glondu <steph@glondu.net> +Date: Thu, 12 Sep 2019 09:14:27 +0200 +Subject: Fix compilation with OCaml 4.08.0 + +--- + XmlRpc.ml | 14 ++++++++------ + 1 file changed, 8 insertions(+), 6 deletions(-) + +diff --git a/XmlRpc.ml b/XmlRpc.ml +index 9d81a79..d5c1f83 100644 +--- a/XmlRpc.ml ++++ b/XmlRpc.ml +@@ -254,14 +254,16 @@ let message_of_xml_element + (* Workaround for Xml-Light, which doesn't like dots in tag names. *) + let fix_dotted_tags s = + let len = String.length s in ++ let s = Bytes.of_string s in + let in_tag = ref false in + for i = 0 to len - 1 do +- match s.[i] with ++ match Bytes.get s i with + | '<' -> in_tag := true + | '>' -> in_tag := false + | '.' when !in_tag -> s.[i] <- ':' + | _ -> () +- done ++ done; ++ Bytes.to_string s + + let pipe_process command data = + let (in_channel, out_channel) = Unix.open_process command in +@@ -274,7 +276,7 @@ let pipe_process command data = + let chars_read = ref 1 in + while !chars_read <> 0 do + chars_read := input in_channel string 0 buffer_size; +- Buffer.add_substring buffer string 0 !chars_read ++ Buffer.add_subbytes buffer string 0 !chars_read + done; + let status = Unix.close_process (in_channel, out_channel) in + (status, Buffer.contents buffer) +@@ -383,7 +385,7 @@ object (self) + match status with + | Unix.WEXITED 0 -> + if debug then prerr_endline contents; +- fix_dotted_tags contents; ++ let contents = fix_dotted_tags contents in + (match (message_of_xml_element + ~base64_decoder + ~datetime_decoder +@@ -457,7 +459,7 @@ object (self) + match call#status with + | `Successful -> + let contents = call#get_resp_body () in +- fix_dotted_tags contents; ++ let contents = fix_dotted_tags contents in + (match (message_of_xml_element + ~base64_decoder + ~datetime_decoder +@@ -553,7 +555,7 @@ let serve + ?(datetime_decoder=XmlRpcDateTime.of_string) + ?(error_handler=default_error_handler) + f s = +- fix_dotted_tags s; ++ let s = fix_dotted_tags s in + try + begin + try diff --git a/debian/patches/auto-gitignore b/debian/patches/auto-gitignore new file mode 100644 index 0000000..4301a0a --- /dev/null +++ b/debian/patches/auto-gitignore @@ -0,0 +1,15 @@ +Subject: Update .gitignore from Debian packaging branch + +The Debian packaging git branch contains these updates to the upstream +.gitignore file(s). This patch is autogenerated, to provide these +updates to users of the official Debian archive view of the package. + +[dgit (9.7) update-gitignore] +--- +diff --git a/.gitignore b/.gitignore +new file mode 100644 +index 0000000..845ca06 +--- /dev/null ++++ b/.gitignore +@@ -0,0 +1 @@ ++.pc diff --git a/debian/patches/series b/debian/patches/series index c655853..ed6eef2 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,3 +1,5 @@ 0001-Allow-installation-under-a-given-div-externally-pass.patch 0002-Compile-with-ocamlnet-3.3.5.patch 0003-Compile-with-ocamlnet-4.0.4.patch +0004-Fix-compilation-with-OCaml-4.08.0.patch +auto-gitignore |