pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/www/ocsigen No substantive changes, but a lot of patch...
details: https://anonhg.NetBSD.org/pkgsrc/rev/2cbcf60d1eb7
branches: trunk
changeset: 367940:2cbcf60d1eb7
user: jaapb <jaapb%pkgsrc.org@localhost>
date: Fri Sep 08 17:10:46 2017 +0000
description:
No substantive changes, but a lot of patches to make Ocsigen work with
ocaml-lwt 3. Most of these are already in the upstream github, so should
be removed at the next release.
diffstat:
www/ocsigen/Makefile | 7 +-
www/ocsigen/distinfo | 12 +-
www/ocsigen/patches/patch-Makefile.options | 14 +
www/ocsigen/patches/patch-configure | 16 ++
www/ocsigen/patches/patch-src_extensions_Makefile | 16 ++
www/ocsigen/patches/patch-src_extensions_ocsipersist-dbm_ocsidbm.ml | 21 ++
www/ocsigen/patches/patch-src_extensions_ocsipersist-pgsql_Makefile | 13 +
www/ocsigen/patches/patch-src_files_META.in | 23 +++
www/ocsigen/patches/patch-src_http_Makefile | 14 +
www/ocsigen/patches/patch-src_server_ocsigen_server.ml | 74 ++++++++++
www/ocsigen/patches/patch-src_server_ocsigen_socket.ml | 64 ++++++++
www/ocsigen/patches/patch-src_server_ocsigen_socket.mli | 14 +
12 files changed, 284 insertions(+), 4 deletions(-)
diffs (truncated from 356 to 300 lines):
diff -r 470df51a41f7 -r 2cbcf60d1eb7 www/ocsigen/Makefile
--- a/www/ocsigen/Makefile Fri Sep 08 17:04:57 2017 +0000
+++ b/www/ocsigen/Makefile Fri Sep 08 17:10:46 2017 +0000
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.26 2017/07/11 14:19:47 jaapb Exp $
+# $NetBSD: Makefile,v 1.27 2017/09/08 17:10:46 jaapb Exp $
#
VERSION= 2.8
GITHUB_PROJECT= ocsigenserver
-PKGREVISION= 2
+PKGREVISION= 3
PKGNAME= ocsigen-${VERSION}
DISTNAME= ${GITHUB_PROJECT}-${VERSION}
CATEGORIES= www
@@ -68,7 +68,8 @@
.include "options.mk"
.include "../../mk/pthread.buildlink3.mk"
-.include "../../devel/ocaml-lwt/buildlink3.mk"
+.include "../../devel/ocaml-lwt_react/buildlink3.mk"
+.include "../../devel/ocaml-lwt_ssl/buildlink3.mk"
.include "../../devel/pcre-ocaml/buildlink3.mk"
.include "../../lang/camlp4/buildlink3.mk"
.include "../../net/ocaml-ipaddr/buildlink3.mk"
diff -r 470df51a41f7 -r 2cbcf60d1eb7 www/ocsigen/distinfo
--- a/www/ocsigen/distinfo Fri Sep 08 17:04:57 2017 +0000
+++ b/www/ocsigen/distinfo Fri Sep 08 17:10:46 2017 +0000
@@ -1,7 +1,17 @@
-$NetBSD: distinfo,v 1.9 2016/12/30 11:55:53 jaapb Exp $
+$NetBSD: distinfo,v 1.10 2017/09/08 17:10:46 jaapb Exp $
SHA1 (ocsigenserver-2.8.tar.gz) = 1043cd33b3e356a29957b95005edff0930c11be4
RMD160 (ocsigenserver-2.8.tar.gz) = 729596c04091ed471b51ff7139359461ef883de9
SHA512 (ocsigenserver-2.8.tar.gz) = 80d5125a93239c73756b03a0f50d83e691810f93a15525daef2f7ccd69279e348f03486c26319a9511c1a746f375317082a89ba37ce0ba22872d6db7d3fddf1b
Size (ocsigenserver-2.8.tar.gz) = 1265240 bytes
SHA1 (patch-Makefile) = 637a45aacd7c8afaeb73be624eb7732b21e78b4d
+SHA1 (patch-Makefile.options) = 2a4e171d7be05411e28ada231b819901eb6c0fad
+SHA1 (patch-configure) = f7c97a277a30f828ccd41fdd00e0fa5d1d403022
+SHA1 (patch-src_extensions_Makefile) = 9715d890e08688023a98b596b72917ca08734b7c
+SHA1 (patch-src_extensions_ocsipersist-dbm_ocsidbm.ml) = cabdf3b511703186887108580697e7427a89658a
+SHA1 (patch-src_extensions_ocsipersist-pgsql_Makefile) = 9490a9d580142bbf9114d65396d54ac991b4ca7d
+SHA1 (patch-src_files_META.in) = bc90fa2f55e35e56922b741a94c1e1414571a9bc
+SHA1 (patch-src_http_Makefile) = 19f5620a710abffa479e364b1b48cbdc7cae7f5a
+SHA1 (patch-src_server_ocsigen_server.ml) = 0218d0878cd6c4654f6fccb4911889cb3bfe2e40
+SHA1 (patch-src_server_ocsigen_socket.ml) = a2f108c8355966f422f68541270d612e640a41b3
+SHA1 (patch-src_server_ocsigen_socket.mli) = 45a9d13b802322ccc3ce52eef0e6c5f704a9a62f
diff -r 470df51a41f7 -r 2cbcf60d1eb7 www/ocsigen/patches/patch-Makefile.options
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/www/ocsigen/patches/patch-Makefile.options Fri Sep 08 17:10:46 2017 +0000
@@ -0,0 +1,14 @@
+$NetBSD: patch-Makefile.options,v 1.3 2017/09/08 17:10:46 jaapb Exp $
+
+lwt_ssl for lwt 3.1
+--- Makefile.options.orig 2016-11-24 13:31:34.000000000 +0000
++++ Makefile.options
+@@ -30,7 +30,7 @@ endif
+
+ BASE_PACKAGE := lwt ipaddr bytes
+
+-SERVER_PACKAGE := lwt.ssl \
++SERVER_PACKAGE := lwt_ssl \
+ bytes \
+ ${LWT_PREEMPTIVE_PACKAGE} \
+ ipaddr \
diff -r 470df51a41f7 -r 2cbcf60d1eb7 www/ocsigen/patches/patch-configure
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/www/ocsigen/patches/patch-configure Fri Sep 08 17:10:46 2017 +0000
@@ -0,0 +1,16 @@
+$NetBSD: patch-configure,v 1.1 2017/09/08 17:10:46 jaapb Exp $
+
+lwt_ssl for lwt 3.1
+--- configure.orig 2016-11-24 13:31:34.000000000 +0000
++++ configure
+@@ -410,8 +410,8 @@ check_library ssl "See: http://sourcefor
+
+ check_library lwt "See: http://ocsigen.org/lwt"
+ check_library lwt.unix "Missing support for 'unix' in lwt."
+-check_library lwt.react "Missing support for 'react' in lwt."
+-check_library lwt.ssl "Missing support for 'ssl' in lwt."
++check_library lwt_react "Missing support for 'react' in lwt."
++check_library lwt_ssl "Missing support for 'ssl' in lwt."
+ check_library lwt.preemptive "Missing support for 'preemptive' in lwt."
+
+ check_library netstring \
diff -r 470df51a41f7 -r 2cbcf60d1eb7 www/ocsigen/patches/patch-src_extensions_Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/www/ocsigen/patches/patch-src_extensions_Makefile Fri Sep 08 17:10:46 2017 +0000
@@ -0,0 +1,16 @@
+$NetBSD: patch-src_extensions_Makefile,v 1.3 2017/09/08 17:10:46 jaapb Exp $
+
+lwt_react and lwt_ssl for lwt 3.1
+--- src/extensions/Makefile.orig 2016-11-24 13:31:34.000000000 +0000
++++ src/extensions/Makefile
+@@ -4,8 +4,8 @@ PACKAGE := \
+ bytes \
+ lwt.unix \
+ ipaddr \
+- lwt.ssl \
+- lwt.react \
++ lwt_ssl \
++ lwt_react \
+ netstring \
+ netstring-pcre \
+ tyxml.parser
diff -r 470df51a41f7 -r 2cbcf60d1eb7 www/ocsigen/patches/patch-src_extensions_ocsipersist-dbm_ocsidbm.ml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/www/ocsigen/patches/patch-src_extensions_ocsipersist-dbm_ocsidbm.ml Fri Sep 08 17:10:46 2017 +0000
@@ -0,0 +1,21 @@
+$NetBSD: patch-src_extensions_ocsipersist-dbm_ocsidbm.ml,v 1.1 2017/09/08 17:10:46 jaapb Exp $
+
+Changes to deal with lwt 3.1
+--- src/extensions/ocsipersist-dbm/ocsidbm.ml.orig 2016-11-24 13:31:34.000000000 +0000
++++ src/extensions/ocsipersist-dbm/ocsidbm.ml
+@@ -272,9 +272,12 @@ let rec loop socket =
+
+ let _ = Lwt_main.run
+ (let socket = Lwt_unix.socket Unix.PF_UNIX Unix.SOCK_STREAM 0 in
+- (try
+- Lwt_unix.bind socket (Unix.ADDR_UNIX (directory^"/"^socketname))
+- with _ -> errlog ("Please make sure that the directory "^directory^" exists, writable for ocsidbm, and no other ocsidbm process is running on the same directory. If not, remove the file
"^(directory^"/"^socketname)); the_end 1);
++ Lwt.catch
++ (fun () ->
++ Lwt_unix.bind socket (Unix.ADDR_UNIX (directory^"/"^socketname)))
++ (fun exn ->
++ errlog ("Please make sure that the directory "^directory^" exists, writable for ocsidbm, and no other ocsidbm process is running on the same directory. If not, remove the file
"^(directory^"/"^socketname));
++ the_end 1) >>= fun () ->
+ Lwt_unix.listen socket 20;
+ (* Done in ocsipersist.ml
+ let devnull = Unix.openfile "/dev/null" [Unix.O_WRONLY] 0 in
diff -r 470df51a41f7 -r 2cbcf60d1eb7 www/ocsigen/patches/patch-src_extensions_ocsipersist-pgsql_Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/www/ocsigen/patches/patch-src_extensions_ocsipersist-pgsql_Makefile Fri Sep 08 17:10:46 2017 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-src_extensions_ocsipersist-pgsql_Makefile,v 1.1 2017/09/08 17:10:46 jaapb Exp $
+
+Changes to deal with lwt 3.1
+--- src/extensions/ocsipersist-pgsql/Makefile.orig 2016-11-24 13:31:34.000000000 +0000
++++ src/extensions/ocsipersist-pgsql/Makefile
+@@ -1,6 +1,6 @@
+ include ../../../Makefile.config
+
+-PACKAGE := tyxml.parser pgocaml.syntax lwt.syntax
++PACKAGE := tyxml.parser pgocaml.syntax lwt.syntax lwt.unix
+
+ LIBS := -I ../../baselib -I ../../http -I ../../server \
+ ${addprefix -package ,${PACKAGE}}
diff -r 470df51a41f7 -r 2cbcf60d1eb7 www/ocsigen/patches/patch-src_files_META.in
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/www/ocsigen/patches/patch-src_files_META.in Fri Sep 08 17:10:46 2017 +0000
@@ -0,0 +1,23 @@
+$NetBSD: patch-src_files_META.in,v 1.1 2017/09/08 17:10:46 jaapb Exp $
+
+lwt_ssl and lwt_react for lwt 3.1
+--- src/files/META.in.orig 2016-11-24 13:31:34.000000000 +0000
++++ src/files/META.in
+@@ -37,7 +37,7 @@ package "baselib" (
+ )
+
+ package "http" (
+- requires = "%%NAME%%.baselib,lwt.ssl,tyxml"
++ requires = "%%NAME%%.baselib,lwt_ssl,tyxml"
+ version = "[distributed with Ocsigen server]"
+ description = "HTTP library for Ocsigen server"
+ archive(byte) = "http.cma"
+@@ -188,7 +188,7 @@ package "ext" (
+
+ package "comet" (
+ exists_if = "ocsigen_comet.cmo,ocsigen_comet.cmx"
+- requires = "ocsigenserver,lwt.react"
++ requires = "ocsigenserver,lwt_react"
+ version = "[distributed with Ocsigen server]"
+ description = "Comet server-to-client communication"
+ archive(byte) = "ocsigen_comet.cmo"
diff -r 470df51a41f7 -r 2cbcf60d1eb7 www/ocsigen/patches/patch-src_http_Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/www/ocsigen/patches/patch-src_http_Makefile Fri Sep 08 17:10:46 2017 +0000
@@ -0,0 +1,14 @@
+$NetBSD: patch-src_http_Makefile,v 1.3 2017/09/08 17:10:46 jaapb Exp $
+
+lwt_ssl for lwt 3.1
+--- src/http/Makefile.orig 2016-11-24 13:31:34.000000000 +0000
++++ src/http/Makefile
+@@ -3,7 +3,7 @@ PACKAGE := \
+ bytes \
+ netstring \
+ netstring-pcre \
+- lwt.ssl \
++ lwt_ssl \
+ tyxml
+
+ LIBS := -I ../baselib ${addprefix -package ,${PACKAGE}}
diff -r 470df51a41f7 -r 2cbcf60d1eb7 www/ocsigen/patches/patch-src_server_ocsigen_server.ml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/www/ocsigen/patches/patch-src_server_ocsigen_server.ml Fri Sep 08 17:10:46 2017 +0000
@@ -0,0 +1,74 @@
+$NetBSD: patch-src_server_ocsigen_server.ml,v 1.1 2017/09/08 17:10:46 jaapb Exp $
+
+Changes to deal with lwt 3.1
+--- src/server/ocsigen_server.ml.orig 2016-11-24 13:31:34.000000000 +0000
++++ src/server/ocsigen_server.ml
+@@ -1134,23 +1134,26 @@ let start_server () =
+ let stop n fmt = Printf.ksprintf (fun s -> raise (Stop (n, s))) fmt in
+ (** Thread waiting for events on a the listening port *)
+ let listen use_ssl (addr, port) wait_end_init =
+- let listening_sockets =
+- try
+- let sockets = make_sockets addr port in
+- List.iter (fun x -> Lwt_unix.listen x 1024) sockets;
+- sockets
+- with
+- | Unix.Unix_error (Unix.EACCES, _, _) ->
+- stop 7 "Fatal - You are not allowed to use port %d." port
+- | Unix.Unix_error (Unix.EADDRINUSE, _, _) ->
+- stop 8 "Fatal - The port %d is already in use." port
+- | exn ->
+- stop 100 "Fatal - Uncaught exception: %s" (Printexc.to_string exn)
+- in
+- List.iter (fun x ->
+- ignore (wait_end_init >>= fun () ->
+- wait_connection use_ssl port x)) listening_sockets;
+- listening_sockets
++ Lwt.catch
++ (fun () ->
++ make_sockets addr port >>= fun sockets ->
++ Lwt_list.iter_s
++ (fun x -> Lwt_unix.listen x 1024; Lwt.return ())
++ sockets >>= fun () ->
++ Lwt.return sockets)
++ (function
++ | Unix.Unix_error (Unix.EACCES, _, _) ->
++ stop 7 "Fatal - You are not allowed to use port %d." port
++ | Unix.Unix_error (Unix.EADDRINUSE, _, _) ->
++ stop 8 "Fatal - The port %d is already in use." port
++ | exn ->
++ stop 100 "Fatal - Uncaught exception: %s"
++ (Printexc.to_string exn)) >>= fun listening_sockets ->
++ List.iter
++ (fun x ->
++ ignore (wait_end_init >>= fun () ->
++ wait_connection use_ssl port x)) listening_sockets;
++ Lwt.return listening_sockets
+ in
+ try
+
+@@ -1192,10 +1195,20 @@ let start_server () =
+
+ let wait_end_init, wait_end_init_awakener = wait () in
+ (* Listening on all ports: *)
+- sockets := List.fold_left
+- (fun a i -> (listen false i wait_end_init) @ a) [] ports;
+- sslsockets := List.fold_left
+- (fun a i -> (listen true i wait_end_init) @ a) [] sslports;
++
++ Lwt_list.fold_left_s
++ (fun a i ->
++ listen false i wait_end_init >>= fun l ->
++ Lwt.return (l @ a))
++ [] ports >>= fun l ->
++ sockets := l;
++
++ Lwt_list.fold_left_s
++ (fun a i ->
++ listen true i wait_end_init >>= fun l ->
++ Lwt.return (l @ a))
++ [] sslports >>= fun l ->
++ sslsockets := l;
+
+ begin match ports with
+ | (_, p)::_ -> Ocsigen_config.set_default_port p
diff -r 470df51a41f7 -r 2cbcf60d1eb7 www/ocsigen/patches/patch-src_server_ocsigen_socket.ml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/www/ocsigen/patches/patch-src_server_ocsigen_socket.ml Fri Sep 08 17:10:46 2017 +0000
@@ -0,0 +1,64 @@
+$NetBSD: patch-src_server_ocsigen_socket.ml,v 1.1 2017/09/08 17:10:46 jaapb Exp $
+
+Changes to deal with lwt 3.1
+--- src/server/ocsigen_socket.ml.orig 2016-11-24 13:31:34.000000000 +0000
++++ src/server/ocsigen_socket.ml
+@@ -16,8 +16,8 @@ let make_ipv6_socket addr port =
+ * to why set REUSEADDR on socket *)
+ Lwt_unix.setsockopt socket Unix.SO_REUSEADDR true;
+ Lwt_unix.setsockopt socket Unix.IPV6_ONLY true;
+- Lwt_unix.bind socket (Unix.ADDR_INET (addr, port));
+- socket
++ Lwt_unix.bind socket (Unix.ADDR_INET (addr, port)) >>= fun () ->
++ Lwt.return socket
+
+ (** make_ipv4_socket create a socket on an ipv4 address
+ * @param addr address of socket
+@@ -27,8 +27,8 @@ let make_ipv4_socket addr port =
+ let socket = Lwt_unix.socket Unix.PF_INET Unix.SOCK_STREAM 0 in
+ Lwt_unix.set_close_on_exec socket;
+ Lwt_unix.setsockopt socket Unix.SO_REUSEADDR true;
+- Lwt_unix.bind socket (Unix.ADDR_INET (addr, port));
+- socket
++ Lwt_unix.bind socket (Unix.ADDR_INET (addr, port)) >>= fun () ->
++ Lwt.return socket
+
+ let make_sockets addr port =
Home |
Main Index |
Thread Index |
Old Index