diff options
author | jaapb <jaapb@pkgsrc.org> | 2019-01-29 12:47:02 +0000 |
---|---|---|
committer | jaapb <jaapb@pkgsrc.org> | 2019-01-29 12:47:02 +0000 |
commit | 1ee1ea839423a1232bd2d49f5de8a20f71d945ec (patch) | |
tree | 9e9ac78e237df7f410c6a146cecb44a73c31f323 | |
parent | eb1ed1e843f48909fa00dd11a9c22c87ced47e4d (diff) | |
download | pkgsrc-1ee1ea839423a1232bd2d49f5de8a20f71d945ec.tar.gz |
Updated www/ocsigen to 2.11.0.
Changes include:
- compatibility with ocaml 4.07
- compatibility with Lwt 4.x (a lot of this was already in patches,
which I've now been able to remove)
- replace tyxml-parser with xml-light
and some other minor bugfixes and improvements.
28 files changed, 11 insertions, 1208 deletions
diff --git a/www/ocsigen/Makefile b/www/ocsigen/Makefile index ac07431cb9e..f0836659169 100644 --- a/www/ocsigen/Makefile +++ b/www/ocsigen/Makefile @@ -1,10 +1,9 @@ -# $NetBSD: Makefile,v 1.34 2018/11/29 10:54:14 jaapb Exp $ +# $NetBSD: Makefile,v 1.35 2019/01/29 12:47:02 jaapb Exp $ # -VERSION= 2.9 +VERSION= 2.11.0 GITHUB_PROJECT= ocsigenserver PKGNAME= ocsigen-${VERSION} -PKGREVISION= 4 DISTNAME= ${GITHUB_PROJECT}-${VERSION} CATEGORIES= www MASTER_SITES= ${MASTER_SITE_GITHUB:=ocsigen/} diff --git a/www/ocsigen/distinfo b/www/ocsigen/distinfo index b0c909f5734..18c0d0916b7 100644 --- a/www/ocsigen/distinfo +++ b/www/ocsigen/distinfo @@ -1,37 +1,10 @@ -$NetBSD: distinfo,v 1.12 2018/11/29 10:54:14 jaapb Exp $ +$NetBSD: distinfo,v 1.13 2019/01/29 12:47:02 jaapb Exp $ -SHA1 (ocsigenserver-2.9.tar.gz) = 1b4d50c9b6fff3ab78c8aef3ebbde1f8ddcc594e -RMD160 (ocsigenserver-2.9.tar.gz) = f5114a7bda3327e279f57f40336a7c23e19b66ce -SHA512 (ocsigenserver-2.9.tar.gz) = b3c5a86785feac18bac677ebb3736705f5d015a8692d2811bf22009dc319636e8b7bbb54dfd0223b2040a8f8bdef5ca3336d903b5ecd7eb260e8c0d48946ee46 -Size (ocsigenserver-2.9.tar.gz) = 1265175 bytes +SHA1 (ocsigenserver-2.11.0.tar.gz) = 6c8e5c5bae9fe52e62ef3c7d7333c3196f191ede +RMD160 (ocsigenserver-2.11.0.tar.gz) = c4d9380cd4f49ebab9e7abfb0ac2dec0881b6810 +SHA512 (ocsigenserver-2.11.0.tar.gz) = 18b9f4dff8214487dc3cd111c8ce2a06835ffec8062fae46ebafde97b1c3267f37f6b1c620d6c07320172c33a75568220c298cc96b789e907e72870a1ae7c70b +Size (ocsigenserver-2.11.0.tar.gz) = 1265753 bytes SHA1 (patch-Makefile) = 637a45aacd7c8afaeb73be624eb7732b21e78b4d -SHA1 (patch-Makefile.options) = 3e88ca4a0d04e01a4cb61e88aaec1b013ff0de5e -SHA1 (patch-configure) = ed7a047081dfd233b95d4c25cb5832cb65bbcb11 SHA1 (patch-src_baselib_Makefile) = e2fd5e5bd933d4ec844713c8f574efd5fa8426cf -SHA1 (patch-src_baselib_ocsigen__stream.ml) = 6907fd8f7e0295f5147a0f2322cb1bec28f73953 -SHA1 (patch-src_extensions_Makefile) = 1dc200d1bd7a55424830acc5e79140e5e996c762 -SHA1 (patch-src_extensions_accesscontrol.ml) = a02101ea97747bb139f72413eb4f4a9ee738692e -SHA1 (patch-src_extensions_accesscontrol.mli) = 19a67e7e43a9411616d8893d2886e4f048a107d8 -SHA1 (patch-src_extensions_authbasic.ml) = 8179c77352d52965d17c98d0ea3454cb3ff6e090 -SHA1 (patch-src_extensions_authbasic.mli) = 718c05392e48579a72b251a5966933b39bb7eff2 -SHA1 (patch-src_extensions_cgimod.ml) = ba572df1ab27f3e090bc1a1e032c1430113995ed -SHA1 (patch-src_extensions_deflatemod.ml) = 16a4bb7a048930053120636f474297ff3c78d471 -SHA1 (patch-src_extensions_extendconfiguration.ml) = beb1a298427ea0d4c19326f29503eee7bd6b3dcb -SHA1 (patch-src_extensions_extensiontemplate.ml) = 805bf033a8fc7a1ecd3532411b2defdb82eeaad4 -SHA1 (patch-src_extensions_ocsipersist-dbm_Makefile) = 2b73b0fa5594bc0542393e005d2979737a28d9bc -SHA1 (patch-src_extensions_ocsipersist-dbm_ocsipersist.ml) = f747c7e54f23cf29fabbe972e6f5e43c952ce1d1 -SHA1 (patch-src_extensions_ocsipersist-pgsql_Makefile) = e3fa0e4691aa098826b93e67503a9116b28e5efb -SHA1 (patch-src_extensions_ocsipersist-pgsql_ocsipersist.ml) = 3984d34c71965a2e0d02bf5da547b437911d7f38 -SHA1 (patch-src_extensions_ocsipersist-sqlite_Makefile) = 30bf60665d816ddb5cf1320ae5fdb51d7a50cb86 -SHA1 (patch-src_extensions_ocsipersist-sqlite_ocsipersist.ml) = 8a227e10de4fd5cec0f2f1b8b8aa88578d69056e -SHA1 (patch-src_extensions_revproxy.ml) = e834ef862baed57310e3fe710905904298a3ac1d -SHA1 (patch-src_extensions_rewritemod.ml) = cac9b8d6fa815bc2098de9eb5c6346c8d4a795f4 -SHA1 (patch-src_extensions_userconf.ml) = 8d62d77f760ee1027794698f88fc4e4da2de3eeb -SHA1 (patch-src_http_Makefile) = 1bcfe69470fe53a8fc9b197fd95d21889646909d -SHA1 (patch-src_http_ocsigen__http__com.mli) = f1760bf423e8aae763992e57c13408aa01c6316f +SHA1 (patch-src_extensions_cgimod.ml) = 06630606179f07e1c9ffcec05e8e0f41cf73fc7c SHA1 (patch-src_server_Makefile) = 0f315fb0533d3d0b8f8cf1f3a61e11b013571b05 -SHA1 (patch-src_server_ocsigen__extensions.ml) = 7da60f1c1fc2c2370eac93829380cb108f40b2db -SHA1 (patch-src_server_ocsigen__extensions.mli) = c2c426d96446292dd850b23b7feb9d93d1b5590a -SHA1 (patch-src_server_ocsigen__parseconfig.ml) = b4a088c5cd3addb70dc4fa9a023878056fc9d1d1 -SHA1 (patch-src_server_ocsigen__parseconfig.mli) = 2b4b091a91efa1bf99e861c82d7d971845947bf9 -SHA1 (patch-src_server_ocsigen__server.ml) = 93c4dac4be34e68c65cf0814eb58954abcc31b1b diff --git a/www/ocsigen/patches/patch-src_baselib_ocsigen__stream.ml b/www/ocsigen/patches/patch-src_baselib_ocsigen__stream.ml deleted file mode 100644 index e2468ccc7ca..00000000000 --- a/www/ocsigen/patches/patch-src_baselib_ocsigen__stream.ml +++ /dev/null @@ -1,18 +0,0 @@ -$NetBSD: patch-src_baselib_ocsigen__stream.ml,v 1.1 2018/04/13 13:15:00 jaapb Exp $ - -Lwt_chan no longer exists in Lwt 4, replaced by Lwt_io ---- src/baselib/ocsigen_stream.ml.orig 2018-02-01 12:55:17.000000000 +0000 -+++ src/baselib/ocsigen_stream.ml -@@ -229,10 +229,10 @@ let of_file filename = - let fd = Lwt_unix.of_unix_file_descr - (Unix.openfile filename [Unix.O_RDONLY;Unix.O_NONBLOCK] 0o666) - in -- let ch = Lwt_chan.in_channel_of_descr fd in -+ let ch = Lwt_io.of_fd ~mode:Input fd in - let buf = Bytes.create 1024 in - let rec aux () = -- Lwt_chan.input ch buf 0 1024 >>= fun n -> -+ Lwt_io.read_into ch buf 0 1024 >>= fun n -> - if n = 0 then empty None else - (* Streams should be immutable, thus we always make a copy - of the buffer *) diff --git a/www/ocsigen/patches/patch-src_extensions_Makefile b/www/ocsigen/patches/patch-src_extensions_Makefile deleted file mode 100644 index aecf9a100a0..00000000000 --- a/www/ocsigen/patches/patch-src_extensions_Makefile +++ /dev/null @@ -1,16 +0,0 @@ -$NetBSD: patch-src_extensions_Makefile,v 1.5 2018/11/29 10:54:14 jaapb Exp $ - -The lwt_log package has been separated from lwt -Replace tyxml.parser with xml-light (patch from upstream) ---- src/extensions/Makefile.orig 2018-02-01 12:55:17.000000000 +0000 -+++ src/extensions/Makefile -@@ -8,7 +8,8 @@ PACKAGE := \ - lwt_react \ - netstring \ - netstring-pcre \ -- tyxml.parser -+ xml-light \ -+ lwt_log - - LIBS := -I ../baselib -I ../http -I ../server ${addprefix -package ,${PACKAGE}} - OCAMLC := $(OCAMLFIND) ocamlc ${BYTEDBG} ${THREAD} diff --git a/www/ocsigen/patches/patch-src_extensions_accesscontrol.ml b/www/ocsigen/patches/patch-src_extensions_accesscontrol.ml deleted file mode 100644 index 8d66e427548..00000000000 --- a/www/ocsigen/patches/patch-src_extensions_accesscontrol.ml +++ /dev/null @@ -1,259 +0,0 @@ -$NetBSD: patch-src_extensions_accesscontrol.ml,v 1.1 2018/11/29 10:54:14 jaapb Exp $ - -Replace tyxml.parser with xml-light (patch from upstream) ---- src/extensions/accesscontrol.ml.orig 2018-02-01 12:55:17.000000000 +0000 -+++ src/extensions/accesscontrol.ml -@@ -32,7 +32,6 @@ open Ocsigen_lib - open Printf - open Lwt - open Ocsigen_extensions --open Simplexmlparser - open Ocsigen_http_frame - - -@@ -43,7 +42,7 @@ let section = Lwt_log.Section.make "ocsi - - let rec parse_condition = function - -- | Element ("ip", ["value", s], []) -> -+ | Xml.Element ("ip", ["value", s], []) -> - let prefix = - try - Ipaddr.Prefix.of_string_exn s -@@ -67,9 +66,9 @@ let rec parse_condition = function - "IP: %a does not match %s" - (fun () -> Ocsigen_request_info.remote_ip) ri s; - r) -- | Element ("ip" as s, _, _) -> badconfig "Bad syntax for tag %s" s -+ | Xml.Element ("ip" as s, _, _) -> badconfig "Bad syntax for tag %s" s - -- | Element ("port", ["value", s], []) -> -+ | Xml.Element ("port", ["value", s], []) -> - let port = - try - int_of_string s -@@ -87,9 +86,9 @@ let rec parse_condition = function - (fun () ri -> string_of_int (Ocsigen_request_info.server_port ri)) - ri port; - r) -- | Element ("port" as s, _, _) -> badconfig "Bad syntax for tag %s" s -+ | Xml.Element ("port" as s, _, _) -> badconfig "Bad syntax for tag %s" s - -- | Element ("ssl", [], []) -> -+ | Xml.Element ("ssl", [], []) -> - (fun ri -> - let r = Ocsigen_request_info.ssl ri in - if r then -@@ -97,9 +96,9 @@ let rec parse_condition = function - else - Lwt_log.ign_info ~section "SSL: not accepted"; - r) -- | Element ("ssl" as s, _, _) -> badconfig "Bad syntax for tag %s" s -+ | Xml.Element ("ssl" as s, _, _) -> badconfig "Bad syntax for tag %s" s - -- | Element ("header", ["name", name; "regexp", reg], []) -> -+ | Xml.Element ("header", ["name", name; "regexp", reg], []) -> - let regexp = - try - Netstring_pcre.regexp ("^"^reg^"$") -@@ -126,9 +125,9 @@ let rec parse_condition = function - if not r - then Lwt_log.ign_info_f "HEADER: header %s does not match %S" name reg; - r) -- | Element ("header" as s, _, _) -> badconfig "Bad syntax for tag %s" s -+ | Xml.Element ("header" as s, _, _) -> badconfig "Bad syntax for tag %s" s - -- | Element ("method", ["value", s], []) -> -+ | Xml.Element ("method", ["value", s], []) -> - let meth = - try - Framepp.method_of_string s -@@ -146,9 +145,9 @@ let rec parse_condition = function - "METHOD: %a does not match %s" - (fun () ri -> Framepp.string_of_method (Ocsigen_request_info.meth ri)) ri s; - r) -- | Element ("method" as s, _, _) -> badconfig "Bad syntax for tag %s" s -+ | Xml.Element ("method" as s, _, _) -> badconfig "Bad syntax for tag %s" s - -- | Element ("protocol", ["value", s], []) -> -+ | Xml.Element ("protocol", ["value", s], []) -> - let pr = - try - Framepp.proto_of_string s -@@ -166,9 +165,9 @@ let rec parse_condition = function - "PROTOCOL: %a does not match %s" - (fun () ri -> Framepp.string_of_proto (Ocsigen_request_info.protocol ri)) ri s; - r) -- | Element ("protocol" as s, _, _) -> badconfig "Bad syntax for tag %s" s -+ | Xml.Element ("protocol" as s, _, _) -> badconfig "Bad syntax for tag %s" s - -- | Element ("path", ["regexp", s], []) -> -+ | Xml.Element ("path", ["regexp", s], []) -> - let regexp = - try - Netstring_pcre.regexp ("^"^s^"$") -@@ -189,22 +188,22 @@ let rec parse_condition = function - "PATH: \"%a\" does not match %S" - (fun () ri -> Ocsigen_request_info.sub_path_string ri) ri s; - r) -- | Element ("path" as s, _, _) -> badconfig "Bad syntax for tag %s" s -+ | Xml.Element ("path" as s, _, _) -> badconfig "Bad syntax for tag %s" s - -- | Element ("and", [], sub) -> -+ | Xml.Element ("and", [], sub) -> - let sub = List.map parse_condition sub in - (fun ri -> List.for_all (fun cond -> cond ri) sub) -- | Element ("and" as s, _, _) -> badconfig "Bad syntax for tag %s" s -+ | Xml.Element ("and" as s, _, _) -> badconfig "Bad syntax for tag %s" s - -- | Element ("or", [], sub) -> -+ | Xml.Element ("or", [], sub) -> - let sub = List.map parse_condition sub in - (fun ri -> List.exists (fun cond -> cond ri) sub) -- | Element ("or" as s, _, _) -> badconfig "Bad syntax for tag %s" s -+ | Xml.Element ("or" as s, _, _) -> badconfig "Bad syntax for tag %s" s - -- | Element ("not", [], [sub]) -> -+ | Xml.Element ("not", [], [sub]) -> - let sub = parse_condition sub in - (fun ri -> not (sub ri)) -- | Element ("not" as s, _, _) -> badconfig "Bad syntax for tag %s" s -+ | Xml.Element ("not" as s, _, _) -> badconfig "Bad syntax for tag %s" s - - | _ -> - badconfig "Bad syntax for condition" -@@ -217,17 +216,17 @@ let comma_space_regexp = Netstring_pcre. - - let parse_config parse_fun = function - -- | Element ("if", [], sub) -> -+ | Xml.Element ("if", [], sub) -> - let (condition, sub) = match sub with - | cond::q -> (parse_condition cond, q) - | _ -> badconfig "Bad condition in <if>" - in - let (ithen, sub) = match sub with -- | Element("then", [], ithen)::q -> (parse_fun ithen, q) -+ | Xml.Element("then", [], ithen)::q -> (parse_fun ithen, q) - | _ -> badconfig "Bad <then> branch in <if>" - in - let (ielse, sub) = match sub with -- | Element ("else", [], ielse)::([] as q) -> (parse_fun ielse, q) -+ | Xml.Element ("else", [], ielse)::([] as q) -> (parse_fun ielse, q) - | [] -> (parse_fun [], []) - | _ -> badconfig "Bad <else> branch in <if>" - in -@@ -243,17 +242,17 @@ let parse_config parse_fun = function - Lwt_log.ign_info ~section "COND: going into <else> branch, if any"; - Ocsigen_extensions.Ext_sub_result ielse - end)) -- | Element ("if" as s, _, _) -> badconfig "Bad syntax for tag %s" s -+ | Xml.Element ("if" as s, _, _) -> badconfig "Bad syntax for tag %s" s - - -- | Element ("notfound", [], []) -> -+ | Xml.Element ("notfound", [], []) -> - (fun rs -> - Lwt_log.ign_info ~section "NOT_FOUND: taking in charge 404"; - Lwt.return (Ocsigen_extensions.Ext_stop_all - (Ocsigen_cookies.Cookies.empty, 404))) -- | Element ("notfound" as s, _, _) -> badconfig "Bad syntax for tag %s" s -+ | Xml.Element ("notfound" as s, _, _) -> badconfig "Bad syntax for tag %s" s - -- | Element ("nextsite", [], []) -> -+ | Xml.Element ("nextsite", [], []) -> - (function - | Ocsigen_extensions.Req_found (_, r) -> - Lwt.return (Ocsigen_extensions.Ext_found_stop -@@ -262,7 +261,7 @@ let parse_config parse_fun = function - Lwt.return (Ocsigen_extensions.Ext_stop_site - (Ocsigen_cookies.Cookies.empty, 404))) - -- | Element ("nexthost", [], []) -> -+ | Xml.Element ("nexthost", [], []) -> - (function - | Ocsigen_extensions.Req_found (_, r) -> - Lwt.return (Ocsigen_extensions.Ext_found_stop -@@ -270,9 +269,9 @@ let parse_config parse_fun = function - | Ocsigen_extensions.Req_not_found (err, ri) -> - Lwt.return (Ocsigen_extensions.Ext_stop_host - (Ocsigen_cookies.Cookies.empty, 404))) -- | Element ("nextsite" as s, _, _) -> badconfig "Bad syntax for tag %s" s -+ | Xml.Element ("nextsite" as s, _, _) -> badconfig "Bad syntax for tag %s" s - -- | Element ("stop", [], []) -> -+ | Xml.Element ("stop", [], []) -> - (function - | Ocsigen_extensions.Req_found (_, r) -> - Lwt.return (Ocsigen_extensions.Ext_found_stop -@@ -280,25 +279,25 @@ let parse_config parse_fun = function - | Ocsigen_extensions.Req_not_found (err, ri) -> - Lwt.return (Ocsigen_extensions.Ext_stop_all - (Ocsigen_cookies.Cookies.empty, 404))) -- | Element ("stop" as s, _, _) -> badconfig "Bad syntax for tag %s" s -+ | Xml.Element ("stop" as s, _, _) -> badconfig "Bad syntax for tag %s" s - -- | Element ("forbidden", [], []) -> -+ | Xml.Element ("forbidden", [], []) -> - (fun rs -> - Lwt_log.ign_info ~section "FORBIDDEN: taking in charge 403"; - Lwt.return (Ocsigen_extensions.Ext_stop_all - (Ocsigen_cookies.Cookies.empty, 403))) -- | Element ("forbidden" as s, _, _) -> badconfig "Bad syntax for tag %s" s -+ | Xml.Element ("forbidden" as s, _, _) -> badconfig "Bad syntax for tag %s" s - -- | Element ("iffound", [], sub) -> -+ | Xml.Element ("iffound", [], sub) -> - let ext = parse_fun sub in - (function - | Ocsigen_extensions.Req_found (_, _) -> - Lwt.return (Ext_sub_result ext) - | Ocsigen_extensions.Req_not_found (err, ri) -> - Lwt.return (Ocsigen_extensions.Ext_next err)) -- | Element ("iffound" as s, _, _) -> badconfig "Bad syntax for tag %s" s -+ | Xml.Element ("iffound" as s, _, _) -> badconfig "Bad syntax for tag %s" s - -- | Element ("ifnotfound", [], sub) -> -+ | Xml.Element ("ifnotfound", [], sub) -> - let ext = parse_fun sub in - (function - | Ocsigen_extensions.Req_found (_, r) -> -@@ -306,7 +305,7 @@ let parse_config parse_fun = function - (fun () -> Lwt.return r)) - | Ocsigen_extensions.Req_not_found (err, ri) -> - Lwt.return (Ext_sub_result ext)) -- | Element ("ifnotfound", [("code", s)], sub) -> -+ | Xml.Element ("ifnotfound", [("code", s)], sub) -> - let ext = parse_fun sub in - let r = Netstring_pcre.regexp ("^"^s^"$") in - (function -@@ -318,9 +317,9 @@ let parse_config parse_fun = function - Lwt.return (Ext_sub_result ext) - else - Lwt.return (Ocsigen_extensions.Ext_next err)) -- | Element ("ifnotfound" as s, _, _) -> badconfig "Bad syntax for tag %s" s -+ | Xml.Element ("ifnotfound" as s, _, _) -> badconfig "Bad syntax for tag %s" s - -- | Element ("allow-forward-for", param, _) -> -+ | Xml.Element ("allow-forward-for", param, _) -> - let apply request code = - Lwt_log.ign_info ~section "Allowed proxy"; - let request = -@@ -372,7 +371,7 @@ let parse_config parse_fun = function - apply request (Ocsigen_http_frame.Result.code resp) - | Ocsigen_extensions.Req_not_found (code, request) -> apply request code) - -- | Element ("allow-forward-proto", _, _) -> -+ | Xml.Element ("allow-forward-proto", _, _) -> - let apply request code = - Lwt_log.ign_info ~section "Allowed proxy for ssl"; - let request = -@@ -406,7 +405,7 @@ let parse_config parse_fun = function - | Ocsigen_extensions.Req_found (request, resp) -> - apply request (Ocsigen_http_frame.Result.code resp) - | Ocsigen_extensions.Req_not_found (code, request) -> apply request code) -- | Element (t, _, _) -> raise (Bad_config_tag_for_extension t) -+ | Xml.Element (t, _, _) -> raise (Bad_config_tag_for_extension t) - | _ -> badconfig "(accesscontrol extension) Bad data" - - diff --git a/www/ocsigen/patches/patch-src_extensions_accesscontrol.mli b/www/ocsigen/patches/patch-src_extensions_accesscontrol.mli deleted file mode 100644 index cd938ac05c4..00000000000 --- a/www/ocsigen/patches/patch-src_extensions_accesscontrol.mli +++ /dev/null @@ -1,11 +0,0 @@ -$NetBSD: patch-src_extensions_accesscontrol.mli,v 1.1 2018/11/29 10:54:14 jaapb Exp $ - -Replace tyxml.parser with xml-light (patch from upstream) ---- src/extensions/accesscontrol.mli.orig 2018-02-01 12:55:17.000000000 +0000 -+++ src/extensions/accesscontrol.mli -@@ -20,4 +20,4 @@ - - - val parse_condition : -- Simplexmlparser.xml -> Ocsigen_extensions.request_info -> bool -+ Xml.xml -> Ocsigen_extensions.request_info -> bool diff --git a/www/ocsigen/patches/patch-src_extensions_authbasic.ml b/www/ocsigen/patches/patch-src_extensions_authbasic.ml deleted file mode 100644 index 42d4ca69023..00000000000 --- a/www/ocsigen/patches/patch-src_extensions_authbasic.ml +++ /dev/null @@ -1,23 +0,0 @@ -$NetBSD: patch-src_extensions_authbasic.ml,v 1.1 2018/11/29 10:54:14 jaapb Exp $ - -Replace tyxml.parser with xml-light (patch from upstream) ---- src/extensions/authbasic.ml.orig 2018-02-01 12:55:17.000000000 +0000 -+++ src/extensions/authbasic.ml -@@ -55,7 +55,7 @@ let register_basic_authentication_method - (* Basic authentication with a predefined login/password (example) *) - - let _ = -- let open Simplexmlparser in -+ let open Xml in - register_basic_authentication_method - (function - | Element ("plain", ["login", login; "password", password], _) -> -@@ -133,7 +133,7 @@ let parse_config element = - ] - ~other_elements:(fun name attrs content -> - rest_ref := -- Simplexmlparser.Element (name, attrs, content) :: !rest_ref) -+ Xml.Element (name, attrs, content) :: !rest_ref) - ()] - element - ); diff --git a/www/ocsigen/patches/patch-src_extensions_authbasic.mli b/www/ocsigen/patches/patch-src_extensions_authbasic.mli deleted file mode 100644 index e82b3c84710..00000000000 --- a/www/ocsigen/patches/patch-src_extensions_authbasic.mli +++ /dev/null @@ -1,23 +0,0 @@ -$NetBSD: patch-src_extensions_authbasic.mli,v 1.1 2018/11/29 10:54:14 jaapb Exp $ - -Replace tyxml.parser with xml-light (patch from upstream) ---- src/extensions/authbasic.mli.orig 2018-02-01 12:55:17.000000000 +0000 -+++ src/extensions/authbasic.mli -@@ -34,7 +34,7 @@ - - - val register_basic_authentication_method : -- (Simplexmlparser.xml -> string -> string -> bool Lwt.t) -> unit -+ (Xml.xml -> string -> string -> bool Lwt.t) -> unit - (** This function registers an authentication plugin: it adds a new - parser to the list of available authentication schemes. - -@@ -55,7 +55,7 @@ val register_basic_authentication_method - - - val get_basic_authentication_method : -- Simplexmlparser.xml -> string -> string -> bool Lwt.t -+ Xml.xml -> string -> string -> bool Lwt.t - (** This function combines all the parsers registered with - [register_basic_authentication_method]. It might be useful for - other extensions. Not for the casual user. *) diff --git a/www/ocsigen/patches/patch-src_extensions_cgimod.ml b/www/ocsigen/patches/patch-src_extensions_cgimod.ml index 079b5b45d8f..b95387ddb7b 100644 --- a/www/ocsigen/patches/patch-src_extensions_cgimod.ml +++ b/www/ocsigen/patches/patch-src_extensions_cgimod.ml @@ -1,82 +1,14 @@ -$NetBSD: patch-src_extensions_cgimod.ml,v 1.2 2018/11/29 10:54:14 jaapb Exp $ +$NetBSD: patch-src_extensions_cgimod.ml,v 1.3 2019/01/29 12:47:02 jaapb Exp $ Write correct request URI -Lwt_chan no longer exists in Lwt 4, replaced by Lwt_io -Replace tyxml.parser with xml-light (patch from upstream) ---- src/extensions/cgimod.ml.orig 2018-02-01 12:55:17.000000000 +0000 +--- src/extensions/cgimod.ml.orig 2018-12-19 10:54:19.000000000 +0000 +++ src/extensions/cgimod.ml -@@ -28,7 +28,6 @@ open Ocsigen_lib - - open Lwt - open Ocsigen_extensions --open Simplexmlparser - open Ocsigen_http_frame - open Ocsigen_http_com - open Ocsigen_senders -@@ -271,7 +270,8 @@ let array_environment filename re doc_ro +@@ -270,7 +270,7 @@ let array_environment filename re doc_ro (* Neither in the CGI's spec nor in the HTTP headers but used, e.g., by PHP *) Printf.sprintf "REMOTE_PORT=%d" (Ocsigen_request_info.remote_port ri); - Printf.sprintf "REQUEST_URI=%s" (Ocsigen_request_info.url_string ri); + Printf.sprintf "REQUEST_URI=%s" (string_conform0 (Ocsigen_request_info.url_string ri)); -+ (* FIXME: URI instead of URL ? *) Printf.sprintf "SCRIPT_FILENAME=%s" filename ] ; additionnal_headers -@@ -368,7 +368,7 @@ let recupere_cgi head re doc_root filena - Lwt_timeout.start timeout; - - (* A thread giving POST data to the CGI script: *) -- let post_in_ch = Lwt_chan.out_channel_of_descr post_in in -+ let post_in_ch = Lwt_io.of_fd ~mode:Output post_in in - ignore - (catch - (fun () -> -@@ -376,7 +376,7 @@ let recupere_cgi head re doc_root filena - | None -> Lwt_unix.close post_in - | Some content_post -> - Ocsigen_http_com.write_stream post_in_ch content_post >>= fun () -> -- Lwt_chan.flush post_in_ch >>= fun () -> -+ Lwt_io.flush post_in_ch >>= fun () -> - Lwt_unix.close post_in - )) - (*XXX Check possible errors! *) -@@ -391,9 +391,9 @@ let recupere_cgi head re doc_root filena - - (* A thread listening the error output of the CGI script - and writing them in warnings.log *) -- let err_channel = Lwt_chan.in_channel_of_descr err_out in -+ let err_channel = Lwt_io.of_fd ~mode:Input err_out in - let rec get_errors () = -- Lwt_chan.input_line err_channel >>= fun err -> -+ Lwt_io.read_line err_channel >>= fun err -> - Lwt_log.ign_warning ~section err; - get_errors () - in ignore -@@ -456,7 +456,7 @@ let get_content str = - (*****************************************************************************) - let rec parse_global_config = function - | [] -> () -- | (Element ("cgitimeout", [("value", s)], []))::[] -> -+ | (Xml.Element ("cgitimeout", [("value", s)], []))::[] -> - cgitimeout := int_of_string s - | _ -> raise (Error_in_config_file - ("Unexpected content inside cgimod config")) -@@ -573,7 +573,7 @@ let gen reg = function - - let rec set_env = function - | [] -> [] -- | (Element("setenv", [("var",vr);("val",vl)], []))::l -> -+ | (Xml.Element("setenv", [("var",vr);("val",vl)], []))::l -> - if List.mem vr environment - then (Lwt_log.ign_info_f ~section "Variable no set %s" vr; - set_env l) -@@ -581,7 +581,7 @@ let rec set_env = function - | _ :: l -> raise (Error_in_config_file "Bad config tag for <cgi>") - - let parse_config _ path _ _ = function -- | Element ("cgi", atts, l) -> -+ | Xml.Element ("cgi", atts, l) -> - let good_root r = - Regexp.quote (string_conform2 r) - in diff --git a/www/ocsigen/patches/patch-src_extensions_deflatemod.ml b/www/ocsigen/patches/patch-src_extensions_deflatemod.ml deleted file mode 100644 index 33915544cf7..00000000000 --- a/www/ocsigen/patches/patch-src_extensions_deflatemod.ml +++ /dev/null @@ -1,38 +0,0 @@ -$NetBSD: patch-src_extensions_deflatemod.ml,v 1.1 2018/11/29 10:54:14 jaapb Exp $ - -Replace tyxml.parser with xml-light (patch from upstream) ---- src/extensions/deflatemod.ml.orig 2018-02-01 12:55:17.000000000 +0000 -+++ src/extensions/deflatemod.ml -@@ -26,7 +26,6 @@ - open Ocsigen_lib - open Lwt - open Ocsigen_extensions --open Simplexmlparser - open Ocsigen_headers - - let section = Lwt_log.Section.make "ocsigen:ext:deflate" -@@ -303,13 +302,13 @@ let filter choice_list = function - - let rec parse_global_config = function - | [] -> () -- | (Element ("compress", [("level", l)], []))::ll -> -+ | (Xml.Element ("compress", [("level", l)], []))::ll -> - let l = try int_of_string l - with Failure _ -> raise (Error_in_config_file - "Compress level should be an integer between 0 and 9") in - compress_level := if (l <= 9 && l >= 0) then l else 6 ; - parse_global_config ll -- | (Element ("buffer", [("size", s)], []))::ll -> -+ | (Xml.Element ("buffer", [("size", s)], []))::ll -> - let s = (try int_of_string s - with Failure _ -> raise (Error_in_config_file - "Buffer size should be a positive integer")) in -@@ -317,7 +316,7 @@ let rec parse_global_config = function - parse_global_config ll - (* TODO: Pas de filtre global pour l'instant - * le nom de balise contenttype est mauvais, au passage -- | (Element ("contenttype", [("compress", b)], choices))::ll -> -+ | (Xml.Element ("contenttype", [("compress", b)], choices))::ll -> - let l = (try parse_filter choices - with Not_found -> raise (Error_in_config_file - "Can't parse mime-type content")) in diff --git a/www/ocsigen/patches/patch-src_extensions_extendconfiguration.ml b/www/ocsigen/patches/patch-src_extensions_extendconfiguration.ml deleted file mode 100644 index efec8ed4892..00000000000 --- a/www/ocsigen/patches/patch-src_extensions_extendconfiguration.ml +++ /dev/null @@ -1,161 +0,0 @@ -$NetBSD: patch-src_extensions_extendconfiguration.ml,v 1.1 2018/11/29 10:54:14 jaapb Exp $ - -Replace tyxml.parser with xml-light (patch from upstream) ---- src/extensions/extendconfiguration.ml.orig 2018-02-01 12:55:17.000000000 +0000 -+++ src/extensions/extendconfiguration.ml -@@ -19,7 +19,6 @@ - *) - open Lwt - open Ocsigen_extensions --open Simplexmlparser - open Ocsigen_charset_mime - - -@@ -50,11 +49,11 @@ let gather_do_not_serve_files tag = - do_not_serve_extensions = extensions - } - -- | Element ("regexp", ["regexp", f], []) :: q -> -+ | Xml.Element ("regexp", ["regexp", f], []) :: q -> - aux (f :: regexps, files, extensions) q -- | Element ("file", ["file", f], []) :: q -> -+ | Xml.Element ("file", ["file", f], []) :: q -> - aux (regexps, f :: files, extensions) q -- | Element ("extension", ["ext", f], []) :: q -> -+ | Xml.Element ("extension", ["ext", f], []) :: q -> - aux (regexps, files, f :: extensions) q - - | _ :: q -> bad_config ("invalid options in tag " ^ tag) -@@ -78,14 +77,14 @@ let check_regexp_list = - - - let update_config usermode = function -- | Element ("listdirs", ["value", "true"], []) -> -+ | Xml.Element ("listdirs", ["value", "true"], []) -> - gen (fun config -> { config with list_directory_content = true }) -- | Element ("listdirs", ["value", "false"], []) -> -+ | Xml.Element ("listdirs", ["value", "false"], []) -> - gen (fun config -> { config with list_directory_content = false }) -- | Element ("listdirs" as s, _, _) -> badconfig "Bad syntax for tag %s" s -+ | Xml.Element ("listdirs" as s, _, _) -> badconfig "Bad syntax for tag %s" s - - -- | Element ("followsymlinks", ["value", s], []) -> -+ | Xml.Element ("followsymlinks", ["value", s], []) -> - let v = match s with - | "never" -> DoNotFollowSymlinks - | "always" -> -@@ -100,17 +99,17 @@ let update_config usermode = function - bad_config ("Wrong value \""^s^"\" for option \"followsymlinks\"") - in - gen (fun config -> { config with follow_symlinks = v }) -- | Element ("followsymlinks" as s, _, _) -> badconfig "Bad syntax for tag %s" s -+ | Xml.Element ("followsymlinks" as s, _, _) -> badconfig "Bad syntax for tag %s" s - - -- | Element ("charset", attrs, exts) -> -+ | Xml.Element ("charset", attrs, exts) -> - let rec aux charset_assoc = function - | [] -> charset_assoc -- | Element ("extension", ["ext", extension; "value", charset], []) :: q -> -+ | Xml.Element ("extension", ["ext", extension; "value", charset], []) :: q -> - aux (update_charset_ext charset_assoc extension charset) q -- | Element ("file", ["file", file; "value", charset], []) :: q -> -+ | Xml.Element ("file", ["file", file; "value", charset], []) :: q -> - aux (update_charset_file charset_assoc file charset) q -- | Element ("regexp", ["regexp", regexp; "value", charset], []) :: q -> -+ | Xml.Element ("regexp", ["regexp", regexp; "value", charset], []) :: q -> - (try - let r = Netstring_pcre.regexp regexp in - aux (update_charset_regexp charset_assoc r charset) q -@@ -129,14 +128,14 @@ let update_config usermode = function - { config with charset_assoc = aux config.charset_assoc exts }) - - -- | Element ("contenttype", attrs, exts) -> -+ | Xml.Element ("contenttype", attrs, exts) -> - let rec aux mime_assoc = function - | [] -> mime_assoc -- | Element ("extension", ["ext", extension; "value", mime], []) :: q -> -+ | Xml.Element ("extension", ["ext", extension; "value", mime], []) :: q -> - aux (update_mime_ext mime_assoc extension mime) q -- | Element ("file", ["file", file; "value", mime], []) :: q -> -+ | Xml.Element ("file", ["file", file; "value", mime], []) :: q -> - aux (update_mime_file mime_assoc file mime) q -- | Element ("regexp", ["regexp", regexp; "value", mime], []) :: q -> -+ | Xml.Element ("regexp", ["regexp", regexp; "value", mime], []) :: q -> - (try - let r = Netstring_pcre.regexp regexp in - aux (update_mime_regexp mime_assoc r mime) q -@@ -155,10 +154,10 @@ let update_config usermode = function - { config with mime_assoc = aux config.mime_assoc exts }) - - -- | Element ("defaultindex", [], l) -> -+ | Xml.Element ("defaultindex", [], l) -> - let rec aux indexes = function - | [] -> List.rev indexes -- | Element ("index", [], [PCData f]) :: q -> -+ | Xml.Element ("index", [], [PCData f]) :: q -> - aux (f :: indexes) q - | _ :: q -> bad_config "subtags must be of the form \ - <index>...</index> \ -@@ -166,9 +165,9 @@ let update_config usermode = function - in - gen (fun config -> - { config with default_directory_index = aux [] l }) -- | Element ("defaultindex" as s, _, _) -> badconfig "Bad syntax for tag %s" s -+ | Xml.Element ("defaultindex" as s, _, _) -> badconfig "Bad syntax for tag %s" s - -- | Element ("hidefile", [], l) -> -+ | Xml.Element ("hidefile", [], l) -> - let do_not_serve = gather_do_not_serve_files "hidefile" l in - (try - check_regexp_list do_not_serve.do_not_serve_regexps; -@@ -177,9 +176,9 @@ let update_config usermode = function - join_do_not_serve do_not_serve config.do_not_serve_404 }) - with Bad_regexp r -> - badconfig "Invalid regexp %s in %s" r "hidefile") -- | Element ("hidefile" as s, _, _) -> badconfig "Bad syntax for tag %s" s -+ | Xml.Element ("hidefile" as s, _, _) -> badconfig "Bad syntax for tag %s" s - -- | Element ("forbidfile", [], l) -> -+ | Xml.Element ("forbidfile", [], l) -> - let do_not_serve = gather_do_not_serve_files "forbidfile" l in - (try - check_regexp_list do_not_serve.do_not_serve_regexps; -@@ -188,28 +187,28 @@ let update_config usermode = function - join_do_not_serve do_not_serve config.do_not_serve_403 }) - with Bad_regexp r -> - badconfig "Invalid regexp %s in %s" r "forbidfile") -- | Element ("forbidfile" as s, _, _) -> badconfig "Bad syntax for tag %s" s -+ | Xml.Element ("forbidfile" as s, _, _) -> badconfig "Bad syntax for tag %s" s - -- | Element ("uploaddir", [], [PCData s]) -> -+ | Xml.Element ("uploaddir", [], [PCData s]) -> - if s = "" then - gen (fun config -> { config with uploaddir = None }) - else - gen (fun config -> { config with uploaddir = Some s }) -- | Element ("uploaddir" as s, _, _) -> -+ | Xml.Element ("uploaddir" as s, _, _) -> - badconfig "Bad syntax for tag %s" s - -- | Element ("maxuploadfilesize" as tag, [], [PCData s]) -> -+ | Xml.Element ("maxuploadfilesize" as tag, [], [PCData s]) -> - let s = - try Ocsigen_parseconfig.parse_size_tag "uploaddir" s - with Ocsigen_config.Config_file_error _ -> - badconfig "Bad syntax for tag %s" tag - in - gen (fun config -> { config with maxuploadfilesize = s }) -- | Element ("maxuploadfilesize" as s, _, _) -> -+ | Xml.Element ("maxuploadfilesize" as s, _, _) -> - badconfig "Bad syntax for tag %s" s - - -- | Element (t, _, _) -> raise (Bad_config_tag_for_extension t) -+ | Xml.Element (t, _, _) -> raise (Bad_config_tag_for_extension t) - | _ -> - raise (Error_in_config_file "Unexpected data in config file") - diff --git a/www/ocsigen/patches/patch-src_extensions_extensiontemplate.ml b/www/ocsigen/patches/patch-src_extensions_extensiontemplate.ml deleted file mode 100644 index 0f1041ffc53..00000000000 --- a/www/ocsigen/patches/patch-src_extensions_extensiontemplate.ml +++ /dev/null @@ -1,42 +0,0 @@ -$NetBSD: patch-src_extensions_extensiontemplate.ml,v 1.1 2018/11/29 10:54:14 jaapb Exp $ - -Replace tyxml.parser with xml-light (patch from upstream) ---- src/extensions/extensiontemplate.ml.orig 2018-02-01 12:55:17.000000000 +0000 -+++ src/extensions/extensiontemplate.ml -@@ -41,7 +41,6 @@ - - open Lwt - open Ocsigen_extensions --open Simplexmlparser - - - -@@ -58,7 +57,7 @@ open Simplexmlparser - - let rec parse_global_config = function - | [] -> () -- | (Element ("myoption", [("myattr", s)], []))::ll -> () -+ | (Xml.Element ("myoption", [("myattr", s)], []))::ll -> () - | _ -> raise (Error_in_config_file - ("Unexpected content inside extensiontemplate config")) - -@@ -126,8 +125,8 @@ let gen = function - *) - - let parse_config path _ parse_site = function -- | Element ("extensiontemplate", atts, []) -> gen -- | Element (t, _, _) -> raise (Bad_config_tag_for_extension t) -+ | Xml.Element ("extensiontemplate", atts, []) -> gen -+ | Xml.Element (t, _, _) -> raise (Bad_config_tag_for_extension t) - | _ -> - raise (Error_in_config_file "Unexpected data in config file") - -@@ -173,7 +172,7 @@ let exn_handler = raise - {- raise [Bad_config_tag_for_extension] if it does not recognize that tag} - {- return something of type [extension] (filter or page generator)}} - *) --let site_creator -+let site_creator - (hostpattern : Ocsigen_extensions.virtual_hosts) - (config_info : Ocsigen_extensions.config_info) - = parse_config diff --git a/www/ocsigen/patches/patch-src_extensions_ocsipersist-dbm_Makefile b/www/ocsigen/patches/patch-src_extensions_ocsipersist-dbm_Makefile deleted file mode 100644 index dea973b178c..00000000000 --- a/www/ocsigen/patches/patch-src_extensions_ocsipersist-dbm_Makefile +++ /dev/null @@ -1,14 +0,0 @@ -$NetBSD: patch-src_extensions_ocsipersist-dbm_Makefile,v 1.1 2018/11/29 10:54:14 jaapb Exp $ - -Replace tyxml.parser with xml-light (patch from upstream) ---- src/extensions/ocsipersist-dbm/Makefile.orig 2018-02-01 12:55:17.000000000 +0000 -+++ src/extensions/ocsipersist-dbm/Makefile -@@ -2,7 +2,7 @@ include ../../../Makefile.config - - PACKAGE := ${LWT_PREEMPTIVE_PACKAGE} \ - lwt.unix \ -- tyxml.parser \ -+ xml-light \ - dbm \ - - LIBS := -I ../../baselib -I ../../http -I ../../server \ diff --git a/www/ocsigen/patches/patch-src_extensions_ocsipersist-dbm_ocsipersist.ml b/www/ocsigen/patches/patch-src_extensions_ocsipersist-dbm_ocsipersist.ml deleted file mode 100644 index 08959e60de9..00000000000 --- a/www/ocsigen/patches/patch-src_extensions_ocsipersist-dbm_ocsipersist.ml +++ /dev/null @@ -1,36 +0,0 @@ -$NetBSD: patch-src_extensions_ocsipersist-dbm_ocsipersist.ml,v 1.1 2018/11/29 10:54:14 jaapb Exp $ - -Replace tyxml.parser with xml-light (patch from upstream) ---- src/extensions/ocsipersist-dbm/ocsipersist.ml.orig 2018-02-01 12:55:17.000000000 +0000 -+++ src/extensions/ocsipersist-dbm/ocsipersist.ml -@@ -38,26 +38,25 @@ let socketname = "socket" - (*****************************************************************************) - (** Internal functions: storage directory *) - --open Simplexmlparser - (** getting the directory from config file *) - let rec parse_global_config (store, ocsidbm, delayloading as d) = function - | [] -> d -- | Element ("delayloading", [("val", ("true" | "1"))], []) :: ll -> -+ | Xml.Element ("delayloading", [("val", ("true" | "1"))], []) :: ll -> - parse_global_config (store, ocsidbm, true) ll - -- | Element ("store", [("dir", s)], []) :: ll -> -+ | Xml.Element ("store", [("dir", s)], []) :: ll -> - if store = None then - parse_global_config ((Some s), ocsidbm, delayloading) ll - else - Ocsigen_extensions.badconfig "Ocsipersist: Duplicate <store> tag" - -- | Element ("ocsidbm", [("name", s)], []) :: ll -> -+ | Xml.Element ("ocsidbm", [("name", s)], []) :: ll -> - if ocsidbm = None then - parse_global_config (store, (Some s), delayloading) ll - else - Ocsigen_extensions.badconfig "Ocsipersist: Duplicate <ocsidbm> tag" - -- | (Element (s,_,_))::ll -> Ocsigen_extensions.badconfig "Bad tag %s" s -+ | (Xml.Element (s,_,_))::ll -> Ocsigen_extensions.badconfig "Bad tag %s" s - - | _ -> Ocsigen_extensions.badconfig - "Unexpected content inside Ocsipersist config" diff --git a/www/ocsigen/patches/patch-src_extensions_ocsipersist-pgsql_Makefile b/www/ocsigen/patches/patch-src_extensions_ocsipersist-pgsql_Makefile deleted file mode 100644 index 1651ba046e9..00000000000 --- a/www/ocsigen/patches/patch-src_extensions_ocsipersist-pgsql_Makefile +++ /dev/null @@ -1,14 +0,0 @@ -$NetBSD: patch-src_extensions_ocsipersist-pgsql_Makefile,v 1.3 2018/11/29 10:54:14 jaapb Exp $ - -The lwt_log package has been separated from lwt -Replace tyxml.parser with xml-light (patch from upstream) ---- src/extensions/ocsipersist-pgsql/Makefile.orig 2018-02-01 12:55:17.000000000 +0000 -+++ src/extensions/ocsipersist-pgsql/Makefile -@@ -1,6 +1,6 @@ - include ../../../Makefile.config - --PACKAGE := tyxml.parser pgocaml lwt -+PACKAGE := xml-light pgocaml lwt lwt_log - - LIBS := -I ../../baselib -I ../../http -I ../../server \ - ${addprefix -package ,${PACKAGE}} diff --git a/www/ocsigen/patches/patch-src_extensions_ocsipersist-pgsql_ocsipersist.ml b/www/ocsigen/patches/patch-src_extensions_ocsipersist-pgsql_ocsipersist.ml deleted file mode 100644 index 286f802ec33..00000000000 --- a/www/ocsigen/patches/patch-src_extensions_ocsipersist-pgsql_ocsipersist.ml +++ /dev/null @@ -1,18 +0,0 @@ -$NetBSD: patch-src_extensions_ocsipersist-pgsql_ocsipersist.ml,v 1.1 2018/11/29 10:54:14 jaapb Exp $ - -Replace tyxml.parser with xml-light (patch from upstream) ---- src/extensions/ocsipersist-pgsql/ocsipersist.ml.orig 2018-02-01 12:55:17.000000000 +0000 -+++ src/extensions/ocsipersist-pgsql/ocsipersist.ml -@@ -275,11 +275,9 @@ let fold_table = fold_step - - let iter_block a b = failwith "Ocsipersist.iter_block: not implemented" - -- --open Simplexmlparser - let parse_global_config = function - | [] -> () -- | [Element ("database", attrs, [])] -> let parse_attr = function -+ | [Xml.Element ("database", attrs, [])] -> let parse_attr = function - | ("host", h) -> host := Some h - | ("port", p) -> begin - try port := Some (int_of_string p) diff --git a/www/ocsigen/patches/patch-src_extensions_ocsipersist-sqlite_Makefile b/www/ocsigen/patches/patch-src_extensions_ocsipersist-sqlite_Makefile deleted file mode 100644 index 6b779161dd0..00000000000 --- a/www/ocsigen/patches/patch-src_extensions_ocsipersist-sqlite_Makefile +++ /dev/null @@ -1,18 +0,0 @@ -$NetBSD: patch-src_extensions_ocsipersist-sqlite_Makefile,v 1.2 2018/11/29 10:54:14 jaapb Exp $ - -The lwt_log package has been separated from lwt -Replace tyxml.parser with xml-light (patch from upstream) ---- src/extensions/ocsipersist-sqlite/Makefile.orig 2018-02-01 12:55:17.000000000 +0000 -+++ src/extensions/ocsipersist-sqlite/Makefile -@@ -1,8 +1,9 @@ - include ../../../Makefile.config - --PACKAGE := lwt.preemptive \ -- tyxml.parser \ -+PACKAGE := lwt.unix \ -+ xml-light \ - sqlite3 \ -+ lwt_log - - LIBS := -I ../../baselib -I ../../http -I ../../server \ - ${addprefix -package ,${PACKAGE}} diff --git a/www/ocsigen/patches/patch-src_extensions_ocsipersist-sqlite_ocsipersist.ml b/www/ocsigen/patches/patch-src_extensions_ocsipersist-sqlite_ocsipersist.ml deleted file mode 100644 index 105877f5236..00000000000 --- a/www/ocsigen/patches/patch-src_extensions_ocsipersist-sqlite_ocsipersist.ml +++ /dev/null @@ -1,18 +0,0 @@ -$NetBSD: patch-src_extensions_ocsipersist-sqlite_ocsipersist.ml,v 1.1 2018/11/29 10:54:14 jaapb Exp $ - -Replace tyxml.parser with xml-light (patch from upstream) ---- src/extensions/ocsipersist-sqlite/ocsipersist.ml.orig 2018-02-01 12:55:17.000000000 +0000 -+++ src/extensions/ocsipersist-sqlite/ocsipersist.ml -@@ -36,11 +36,10 @@ exception Ocsipersist_error - - (*****************************************************************************) - --open Simplexmlparser - (** getting the directory from config file *) - let rec parse_global_config = function - | [] -> None -- | (Element ("database", [("file", s)], []))::[] -> Some s -+ | (Xml.Element ("database", [("file", s)], []))::[] -> Some s - | _ -> raise (Ocsigen_extensions.Error_in_config_file - ("Unexpected content inside Ocsipersist config")) - diff --git a/www/ocsigen/patches/patch-src_extensions_revproxy.ml b/www/ocsigen/patches/patch-src_extensions_revproxy.ml deleted file mode 100644 index 9f97fbc5e45..00000000000 --- a/www/ocsigen/patches/patch-src_extensions_revproxy.ml +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-src_extensions_revproxy.ml,v 1.1 2018/11/29 10:54:14 jaapb Exp $ - -Replace tyxml.parser with xml-light (patch from upstream) ---- src/extensions/revproxy.ml.orig 2018-02-01 12:55:17.000000000 +0000 -+++ src/extensions/revproxy.ml -@@ -42,7 +42,6 @@ open Ocsigen_lib - - open Lwt - open Ocsigen_extensions --open Simplexmlparser - - let section = Lwt_log.Section.make "ocsigen:ext:revproxy" - diff --git a/www/ocsigen/patches/patch-src_extensions_rewritemod.ml b/www/ocsigen/patches/patch-src_extensions_rewritemod.ml deleted file mode 100644 index cc2b2c409da..00000000000 --- a/www/ocsigen/patches/patch-src_extensions_rewritemod.ml +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-src_extensions_rewritemod.ml,v 1.1 2018/11/29 10:54:14 jaapb Exp $ - -Replace tyxml.parser with xml-light (patch from upstream) ---- src/extensions/rewritemod.ml.orig 2018-02-01 12:55:17.000000000 +0000 -+++ src/extensions/rewritemod.ml -@@ -44,7 +44,6 @@ - - open Lwt - open Ocsigen_extensions --open Simplexmlparser - - let section = Lwt_log.Section.make "ocsigen:ext:rewritemod" - diff --git a/www/ocsigen/patches/patch-src_extensions_userconf.ml b/www/ocsigen/patches/patch-src_extensions_userconf.ml deleted file mode 100644 index 4ad5c730ab6..00000000000 --- a/www/ocsigen/patches/patch-src_extensions_userconf.ml +++ /dev/null @@ -1,24 +0,0 @@ -$NetBSD: patch-src_extensions_userconf.ml,v 1.1 2018/11/29 10:54:14 jaapb Exp $ - -Replace tyxml.parser with xml-light (patch from upstream) ---- src/extensions/userconf.ml.orig 2018-02-01 12:55:17.000000000 +0000 -+++ src/extensions/userconf.ml -@@ -98,11 +98,15 @@ let subresult new_req user_parse_site co - - - let conf_to_xml conf = -- try Simplexmlparser.xmlparser_file conf -+ try [Xml.parse_file conf] - with - | Sys_error _ -> raise NoConfFile -- | Simplexmlparser.Xml_parser_error s -> -- raise (Ocsigen_extensions.Error_in_config_file s) -+ | Xml.Error (s, loc) -> -+ let begin_char, end_char = Xml.range loc and line = Xml.line loc in -+ raise (Ocsigen_extensions.Error_in_config_file -+ (Printf.sprintf "%s, line %d, characters %d-%d" -+ (Xml.error_msg s) -+ line begin_char end_char)) - - - let gen hostpattern sitepath (regexp, conf, url, prefix, localpath) = function diff --git a/www/ocsigen/patches/patch-src_http_Makefile b/www/ocsigen/patches/patch-src_http_Makefile deleted file mode 100644 index 3d0170ca978..00000000000 --- a/www/ocsigen/patches/patch-src_http_Makefile +++ /dev/null @@ -1,15 +0,0 @@ -$NetBSD: patch-src_http_Makefile,v 1.4 2018/04/13 13:15:00 jaapb Exp $ - -The lwt_log package has been separated from lwt ---- src/http/Makefile.orig 2018-02-01 12:55:17.000000000 +0000 -+++ src/http/Makefile -@@ -4,7 +4,8 @@ PACKAGE := \ - netstring \ - netstring-pcre \ - lwt_ssl \ -- tyxml -+ tyxml \ -+ lwt_log - - LIBS := -I ../baselib ${addprefix -package ,${PACKAGE}} - OCAMLC := $(OCAMLFIND) ocamlc ${BYTEDBG} ${THREAD} diff --git a/www/ocsigen/patches/patch-src_http_ocsigen__http__com.mli b/www/ocsigen/patches/patch-src_http_ocsigen__http__com.mli deleted file mode 100644 index c28d56fb1f8..00000000000 --- a/www/ocsigen/patches/patch-src_http_ocsigen__http__com.mli +++ /dev/null @@ -1,14 +0,0 @@ -$NetBSD: patch-src_http_ocsigen__http__com.mli,v 1.1 2018/04/13 13:15:00 jaapb Exp $ - -Lwt_chan no longer exists in Lwt 4, replaced by Lwt_io ---- src/http/ocsigen_http_com.mli.orig 2018-02-01 12:55:17.000000000 +0000 -+++ src/http/ocsigen_http_com.mli -@@ -69,7 +69,7 @@ val wait_all_senders : connection -> uni - interrupted stream exception. - *) - val write_stream : -- ?chunked:bool -> Lwt_chan.out_channel -> string Ocsigen_stream.t -> unit Lwt.t -+ ?chunked:bool -> Lwt_io.output_channel -> string Ocsigen_stream.t -> unit Lwt.t - - (****) - diff --git a/www/ocsigen/patches/patch-src_server_ocsigen__extensions.ml b/www/ocsigen/patches/patch-src_server_ocsigen__extensions.ml deleted file mode 100644 index 810254b31cd..00000000000 --- a/www/ocsigen/patches/patch-src_server_ocsigen__extensions.ml +++ /dev/null @@ -1,104 +0,0 @@ -$NetBSD: patch-src_server_ocsigen__extensions.ml,v 1.1 2018/11/29 10:54:14 jaapb Exp $ - -Replace tyxml.parser with xml-light (patch from upstream) ---- src/server/ocsigen_extensions.ml.orig 2018-02-01 12:55:17.000000000 +0000 -+++ src/server/ocsigen_extensions.ml -@@ -291,13 +291,13 @@ and extension2 = - type extension = request_state -> answer Lwt.t - - --type parse_fun = Simplexmlparser.xml list -> extension2 -+type parse_fun = Xml.xml list -> extension2 - - - type parse_host = - Parse_host of - (Url.path -> -- parse_host -> parse_fun -> Simplexmlparser.xml -> extension) -+ parse_host -> parse_fun -> Xml.xml -> extension) - - let (hosts : (virtual_hosts * config_info * extension2) list ref) = - ref [] -@@ -357,7 +357,7 @@ let new_url_of_directory_request request - - (*****************************************************************************) - (* To give parameters to extensions: *) --let dynlinkconfig = ref ([] : Simplexmlparser.xml list) -+let dynlinkconfig = ref ([] : Xml.xml list) - let set_config s = dynlinkconfig := s - let get_config () = !dynlinkconfig - -@@ -458,7 +458,7 @@ let rec default_parse_config - prevpath - (Parse_host parse_host) - (parse_fun : parse_fun) = function -- | Simplexmlparser.Element ("site", atts, l) -> -+ | Xml.Element ("site", atts, l) -> - let rec parse_site_attrs (enc,dir) = function - | [] -> (match dir with - | None -> -@@ -550,7 +550,7 @@ let rec default_parse_config - Lwt.return (Ext_found_continue_with' (r, ri)) - | Req_not_found (err, ri) -> - Lwt.return (Ext_sub_result ext)) -- | Simplexmlparser.Element (tag,_,_) -> -+ | Xml.Element (tag,_,_) -> - raise (Bad_config_tag_for_extension tag) - | _ -> raise (Ocsigen_config.Config_file_error - ("Unexpected content inside <host>")) -@@ -613,7 +613,7 @@ type parse_config = virtual_hosts -> con - and parse_config_user = userconf_info -> parse_config - and parse_config_aux = - Url.path -> parse_host -> -- (parse_fun -> Simplexmlparser.xml -> -+ (parse_fun -> Xml.xml -> - extension - ) - -@@ -621,11 +621,11 @@ and parse_config_aux = - - let user_extension_void_fun_site : parse_config_user = - fun _ _ _ _ _ _ -> function -- | Simplexmlparser.Element (t, _, _) -> raise (Bad_config_tag_for_extension t) -+ | Xml.Element (t, _, _) -> raise (Bad_config_tag_for_extension t) - | _ -> raise (Error_in_config_file "Unexpected data in config file") - - let extension_void_fun_site : parse_config = fun _ _ _ _ _ -> function -- | Simplexmlparser.Element (t, _, _) -> raise (Bad_config_tag_for_extension t) -+ | Xml.Element (t, _, _) -> raise (Bad_config_tag_for_extension t) - | _ -> raise (Error_in_config_file "Unexpected data in config file") - - -@@ -748,7 +748,7 @@ module Configuration = struct - elements : element list; - attributes : attribute list; - pcdata : (string -> unit) option; -- other_elements : (string -> (string * string) list -> Simplexmlparser.xml list -> unit) option; -+ other_elements : (string -> (string * string) list -> Xml.xml list -> unit) option; - other_attributes : (string -> string -> unit) option; - } - and element = string * element' -@@ -792,7 +792,7 @@ module Configuration = struct - let check_element_occurrence ~in_tag elements = function - | name, { obligatory = true } -> - let corresponding_element = function -- | Simplexmlparser.Element (name', _, _) -> name = name' -+ | Xml.Element (name', _, _) -> name = name' - | _ -> false - in - if not (List.exists corresponding_element elements) then -@@ -815,12 +815,12 @@ module Configuration = struct - let rec process_element ~in_tag ~elements:spec_elements - ?pcdata:spec_pcdata ?other_elements:spec_other_elements = - function -- | Simplexmlparser.PCData str -> -+ | Xml.PCData str -> - let spec_pcdata = - Option.get (fun () -> ignore_blank_pcdata ~in_tag) spec_pcdata - in - spec_pcdata str -- | Simplexmlparser.Element (name, attributes, elements) -> -+ | Xml.Element (name, attributes, elements) -> - try - let spec = List.assoc name spec_elements in - List.iter diff --git a/www/ocsigen/patches/patch-src_server_ocsigen__extensions.mli b/www/ocsigen/patches/patch-src_server_ocsigen__extensions.mli deleted file mode 100644 index 5e9f571f6b3..00000000000 --- a/www/ocsigen/patches/patch-src_server_ocsigen__extensions.mli +++ /dev/null @@ -1,72 +0,0 @@ -$NetBSD: patch-src_server_ocsigen__extensions.mli,v 1.1 2018/11/29 10:54:14 jaapb Exp $ - -Replace tyxml.parser with xml-light (patch from upstream) ---- src/server/ocsigen_extensions.mli.orig 2018-02-01 12:55:17.000000000 +0000 -+++ src/server/ocsigen_extensions.mli -@@ -262,7 +262,7 @@ type extension = request_state -> answer - the extension may want to modify the result (filters). - *) - --type parse_fun = Simplexmlparser.xml list -> extension2 -+type parse_fun = Xml.xml list -> extension2 - - (** Type of the functions parsing the content of a <host> tag *) - type parse_host -@@ -305,7 +305,7 @@ and parse_config_user = - userconf_info -> parse_config - and parse_config_aux = - Url.path -> parse_host -> -- (parse_fun -> Simplexmlparser.xml -> -+ (parse_fun -> Xml.xml -> - extension - ) - -@@ -355,7 +355,7 @@ val register_extension : - ?user_fun_site:parse_config_user -> - ?begin_init:(unit -> unit) -> - ?end_init:(unit -> unit) -> -- ?init_fun:(Simplexmlparser.xml list -> unit) -> -+ ?init_fun:(Xml.xml list -> unit) -> - ?exn_handler:(exn -> string) -> - ?respect_pipeline:bool -> - unit -> unit -@@ -388,7 +388,7 @@ module Configuration : sig - ?elements:element list -> - ?attributes:attribute list -> - ?pcdata:(string -> unit) -> -- ?other_elements:(string -> (string * string) list -> Simplexmlparser.xml list -> unit) -> -+ ?other_elements:(string -> (string * string) list -> Xml.xml list -> unit) -> - ?other_attributes:(string -> string -> unit) -> - unit -> element - -@@ -416,17 +416,17 @@ module Configuration : sig - in_tag:string -> - elements:element list -> - ?pcdata:(string -> unit) -> -- ?other_elements:(string -> (string * string) list -> Simplexmlparser.xml list -> unit) -> -- Simplexmlparser.xml -> unit -+ ?other_elements:(string -> (string * string) list -> Xml.xml list -> unit) -> -+ Xml.xml -> unit - - (** Application of [process_element] on a list of XML elements. *) - val process_elements : - in_tag:string -> - elements:element list -> - ?pcdata:(string -> unit) -> -- ?other_elements:(string -> (string * string) list -> Simplexmlparser.xml list -> unit) -> -+ ?other_elements:(string -> (string * string) list -> Xml.xml list -> unit) -> - ?init:(unit -> unit) -> -- Simplexmlparser.xml list -> unit -+ Xml.xml list -> unit - - (** The specification for ignoring blank PCDATA ('\n', '\r', ' ', '\t') and failing - otherwise (a reasonable default). *) -@@ -524,7 +524,7 @@ val get_numberofreloads : unit -> int - - val get_init_exn_handler : unit -> exn -> string - --val set_config : Simplexmlparser.xml list -> unit -+val set_config : Xml.xml list -> unit - - val client_of_connection : Ocsigen_http_com.connection -> client - diff --git a/www/ocsigen/patches/patch-src_server_ocsigen__parseconfig.ml b/www/ocsigen/patches/patch-src_server_ocsigen__parseconfig.ml deleted file mode 100644 index 027ee04e3da..00000000000 --- a/www/ocsigen/patches/patch-src_server_ocsigen__parseconfig.ml +++ /dev/null @@ -1,51 +0,0 @@ -$NetBSD: patch-src_server_ocsigen__parseconfig.ml,v 1.1 2018/11/29 10:54:14 jaapb Exp $ - -Replace tyxml.parser with xml-light (patch from upstream) ---- src/server/ocsigen_parseconfig.ml.orig 2018-02-01 12:55:17.000000000 +0000 -+++ src/server/ocsigen_parseconfig.ml -@@ -24,7 +24,7 @@ - open Ocsigen_lib - open Ocsigen_socket - --open Simplexmlparser -+open Xml - open Ocsigen_config - - let section = Lwt_log.Section.make "ocsigen:config" -@@ -184,10 +184,7 @@ let parse_string_tag tag s = - - - let rec parser_config = -- let rec verify_empty = function -- | [] -> () -- | _ -> raise (Config_file_error "Don't know what to do with trailing data") -- in let rec parse_servers n = function -+ let rec parse_servers n = function - | [] -> (match n with - | [] -> raise (Config_file_error ("<server> tag expected")) - | _ -> n) -@@ -203,14 +200,13 @@ let rec parser_config = - (* nouveau at the end *) - | _ -> raise (Config_file_error ("syntax error inside <ocsigen>")) - in function -- | (Element ("ocsigen", [], l))::ll -> -- verify_empty ll; -+ | (Element ("ocsigen", [], l)) -> - parse_servers [] l - | _ -> raise (Config_file_error "<ocsigen> tag expected") - - - let parse_ext file = -- parser_config (Simplexmlparser.xmlparser_file file) -+ parser_config (Xml.parse_file file) - - - let preloadfile config () = Ocsigen_extensions.set_config config -@@ -785,6 +781,6 @@ let parse_config ?file () = - | None -> Ocsigen_config.get_config_file () - | Some f -> f - in -- parser_config (Simplexmlparser.xmlparser_file file) -+ parser_config (Xml.parse_file file) - - (******************************************************************) diff --git a/www/ocsigen/patches/patch-src_server_ocsigen__parseconfig.mli b/www/ocsigen/patches/patch-src_server_ocsigen__parseconfig.mli deleted file mode 100644 index efcb35eb66a..00000000000 --- a/www/ocsigen/patches/patch-src_server_ocsigen__parseconfig.mli +++ /dev/null @@ -1,48 +0,0 @@ -$NetBSD: patch-src_server_ocsigen__parseconfig.mli,v 1.1 2018/11/29 10:54:14 jaapb Exp $ - -Replace tyxml.parser with xml-light (patch from upstream) ---- src/server/ocsigen_parseconfig.mli.orig 2018-02-01 12:55:17.000000000 +0000 -+++ src/server/ocsigen_parseconfig.mli -@@ -36,13 +36,13 @@ val parse_size_tag : string -> string -> - (** Parse a string (PCDATA) as XML content. - Raises [Failure "Ocsigen_parseconfig.parse_string"] in case of error. - *) --val parse_string : Simplexmlparser.xml list -> string -+val parse_string : Xml.xml list -> string - - (** [parse_string_tag tag s] parses a string (same syntax as [parse_string]). - In case of error, raises [Ocsigen_config.Config_file_error m] where [m] - is an error message explaining that a string was expected in tag [<tag>]. - *) --val parse_string_tag : string -> Simplexmlparser.xml list -> string -+val parse_string_tag : string -> Xml.xml list -> string - - - (** Parses the [hostfilter] field of the configuration file, which -@@ -52,9 +52,8 @@ val parse_host_field: string option -> O - - (**/**) - --val parser_config : Simplexmlparser.xml list -> -- Simplexmlparser.xml list list --val parse_server : bool -> Simplexmlparser.xml list -> unit -+val parser_config : Xml.xml -> Xml.xml list list -+val parse_server : bool -> Xml.xml list -> unit - - type ssl_info = { - ssl_certificate : string option; -@@ -76,7 +75,7 @@ type ssl_info = { - } - *) - val extract_info : -- Simplexmlparser.xml list -> -+ Xml.xml list -> - (string option * string option) * - (ssl_info option * - (Ocsigen_socket.socket_type * int) list * -@@ -86,4 +85,4 @@ val extract_info : - val parse_config : - ?file:string -> - unit -> -- Simplexmlparser.xml list list -+ Xml.xml list list diff --git a/www/ocsigen/patches/patch-src_server_ocsigen__server.ml b/www/ocsigen/patches/patch-src_server_ocsigen__server.ml deleted file mode 100644 index 39e80b4d08e..00000000000 --- a/www/ocsigen/patches/patch-src_server_ocsigen__server.ml +++ /dev/null @@ -1,38 +0,0 @@ -$NetBSD: patch-src_server_ocsigen__server.ml,v 1.2 2018/11/29 10:54:14 jaapb Exp $ - -Lwt_chan no longer exists in Lwt 4, replaced by Lwt_io -Replace tyxml.parser with xml-light (patch from upstream) ---- src/server/ocsigen_server.ml.orig 2018-02-01 12:55:17.000000000 +0000 -+++ src/server/ocsigen_server.ml -@@ -1029,9 +1029,12 @@ let errmsg = function - | Ocsigen_extensions.Error_in_config_file msg -> - (("Fatal - Error in configuration file: "^msg), - 50) -- | Simplexmlparser.Xml_parser_error s -> -- (("Fatal - Error in configuration file: "^s), -- 51) -+ | Xml.Error (s, loc) -> -+ let begin_char, end_char = Xml.range loc and line = Xml.line loc in -+ raise (Ocsigen_extensions.Error_in_config_file -+ (Printf.sprintf "%s, line %d, characters %d-%d" -+ (Xml.error_msg s) -+ line begin_char end_char)) - | Ocsigen_loader.Dynlink_error (s, exn) -> - (("Fatal - While loading "^s^": "^(Printexc.to_string exn)), - 52) -@@ -1317,13 +1320,13 @@ let start_server () = - - Ocsigen_extensions.end_initialisation (); - -- let pipe = Lwt_chan.in_channel_of_descr -+ let pipe = Lwt_io.of_fd ~mode:Input - (Lwt_unix.of_unix_file_descr - (Unix.openfile commandpipe - [Unix.O_RDWR; Unix.O_NONBLOCK; Unix.O_APPEND] 0o660)) in - - let rec f () = -- Lwt_chan.input_line pipe >>= fun s -> -+ Lwt_io.read_line pipe >>= fun s -> - Lwt_log.ign_notice ~section ("Command received: "^s); - (Lwt.catch - (fun () -> |