pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/www/ocsigen



Module Name:    pkgsrc
Committed By:   jaapb
Date:           Fri Sep  8 17:10:46 UTC 2017

Modified Files:
        pkgsrc/www/ocsigen: Makefile distinfo
Added Files:
        pkgsrc/www/ocsigen/patches: patch-Makefile.options patch-configure
            patch-src_extensions_Makefile
            patch-src_extensions_ocsipersist-dbm_ocsidbm.ml
            patch-src_extensions_ocsipersist-pgsql_Makefile
            patch-src_files_META.in patch-src_http_Makefile
            patch-src_server_ocsigen_server.ml
            patch-src_server_ocsigen_socket.ml
            patch-src_server_ocsigen_socket.mli

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 pkgsrc/www/ocsigen/Makefile
cvs rdiff -u -r1.9 -r1.10 pkgsrc/www/ocsigen/distinfo
cvs rdiff -u -r0 -r1.3 pkgsrc/www/ocsigen/patches/patch-Makefile.options \
    pkgsrc/www/ocsigen/patches/patch-src_extensions_Makefile \
    pkgsrc/www/ocsigen/patches/patch-src_http_Makefile
cvs rdiff -u -r0 -r1.1 pkgsrc/www/ocsigen/patches/patch-configure \
    pkgsrc/www/ocsigen/patches/patch-src_extensions_ocsipersist-dbm_ocsidbm.ml \
    pkgsrc/www/ocsigen/patches/patch-src_extensions_ocsipersist-pgsql_Makefile \
    pkgsrc/www/ocsigen/patches/patch-src_files_META.in \
    pkgsrc/www/ocsigen/patches/patch-src_server_ocsigen_server.ml \
    pkgsrc/www/ocsigen/patches/patch-src_server_ocsigen_socket.ml \
    pkgsrc/www/ocsigen/patches/patch-src_server_ocsigen_socket.mli

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/www/ocsigen/Makefile
diff -u pkgsrc/www/ocsigen/Makefile:1.26 pkgsrc/www/ocsigen/Makefile:1.27
--- pkgsrc/www/ocsigen/Makefile:1.26    Tue Jul 11 14:19:47 2017
+++ pkgsrc/www/ocsigen/Makefile Fri Sep  8 17:10:46 2017
@@ -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 @@ CONFIGURE_ARGS+=              --disable-natdynlink
 
 .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"

Index: pkgsrc/www/ocsigen/distinfo
diff -u pkgsrc/www/ocsigen/distinfo:1.9 pkgsrc/www/ocsigen/distinfo:1.10
--- pkgsrc/www/ocsigen/distinfo:1.9     Fri Dec 30 11:55:53 2016
+++ pkgsrc/www/ocsigen/distinfo Fri Sep  8 17:10:46 2017
@@ -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

Added files:

Index: pkgsrc/www/ocsigen/patches/patch-Makefile.options
diff -u /dev/null pkgsrc/www/ocsigen/patches/patch-Makefile.options:1.3
--- /dev/null   Fri Sep  8 17:10:46 2017
+++ pkgsrc/www/ocsigen/patches/patch-Makefile.options   Fri Sep  8 17:10:46 2017
@@ -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            \
Index: pkgsrc/www/ocsigen/patches/patch-src_extensions_Makefile
diff -u /dev/null pkgsrc/www/ocsigen/patches/patch-src_extensions_Makefile:1.3
--- /dev/null   Fri Sep  8 17:10:46 2017
+++ pkgsrc/www/ocsigen/patches/patch-src_extensions_Makefile    Fri Sep  8 17:10:46 2017
@@ -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
Index: pkgsrc/www/ocsigen/patches/patch-src_http_Makefile
diff -u /dev/null pkgsrc/www/ocsigen/patches/patch-src_http_Makefile:1.3
--- /dev/null   Fri Sep  8 17:10:46 2017
+++ pkgsrc/www/ocsigen/patches/patch-src_http_Makefile  Fri Sep  8 17:10:46 2017
@@ -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}}

Index: pkgsrc/www/ocsigen/patches/patch-configure
diff -u /dev/null pkgsrc/www/ocsigen/patches/patch-configure:1.1
--- /dev/null   Fri Sep  8 17:10:46 2017
+++ pkgsrc/www/ocsigen/patches/patch-configure  Fri Sep  8 17:10:46 2017
@@ -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 \
Index: pkgsrc/www/ocsigen/patches/patch-src_extensions_ocsipersist-dbm_ocsidbm.ml
diff -u /dev/null pkgsrc/www/ocsigen/patches/patch-src_extensions_ocsipersist-dbm_ocsidbm.ml:1.1
--- /dev/null   Fri Sep  8 17:10:46 2017
+++ pkgsrc/www/ocsigen/patches/patch-src_extensions_ocsipersist-dbm_ocsidbm.ml  Fri Sep  8 17:10:46 2017
@@ -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
Index: pkgsrc/www/ocsigen/patches/patch-src_extensions_ocsipersist-pgsql_Makefile
diff -u /dev/null pkgsrc/www/ocsigen/patches/patch-src_extensions_ocsipersist-pgsql_Makefile:1.1
--- /dev/null   Fri Sep  8 17:10:46 2017
+++ pkgsrc/www/ocsigen/patches/patch-src_extensions_ocsipersist-pgsql_Makefile  Fri Sep  8 17:10:46 2017
@@ -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}}
Index: pkgsrc/www/ocsigen/patches/patch-src_files_META.in
diff -u /dev/null pkgsrc/www/ocsigen/patches/patch-src_files_META.in:1.1
--- /dev/null   Fri Sep  8 17:10:46 2017
+++ pkgsrc/www/ocsigen/patches/patch-src_files_META.in  Fri Sep  8 17:10:46 2017
@@ -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"
Index: pkgsrc/www/ocsigen/patches/patch-src_server_ocsigen_server.ml
diff -u /dev/null pkgsrc/www/ocsigen/patches/patch-src_server_ocsigen_server.ml:1.1
--- /dev/null   Fri Sep  8 17:10:46 2017
+++ pkgsrc/www/ocsigen/patches/patch-src_server_ocsigen_server.ml       Fri Sep  8 17:10:46 2017
@@ -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
Index: pkgsrc/www/ocsigen/patches/patch-src_server_ocsigen_socket.ml
diff -u /dev/null pkgsrc/www/ocsigen/patches/patch-src_server_ocsigen_socket.ml:1.1
--- /dev/null   Fri Sep  8 17:10:46 2017
+++ pkgsrc/www/ocsigen/patches/patch-src_server_ocsigen_socket.ml       Fri Sep  8 17:10:46 2017
@@ -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 =
+   match addr with
+@@ -39,19 +39,25 @@ let make_sockets addr port =
+        corresponds to the net.ipv6.bindv6only=0 behaviour on Linux,
+        but is portable and should work with
+        net.ipv6.bindv6only=1 as well. *)
+-    let ipv6_socket =
+-      try [make_ipv6_socket Unix.inet6_addr_any port]
+-      with Unix.Unix_error
+-          ((Unix.EAFNOSUPPORT
+-           | Unix.EPROTONOSUPPORT
+-           | Unix.EADDRINUSE (* GH issue #104 *)
+-           ), _, _) -> []
+-    in
+-    (make_ipv4_socket Unix.inet_addr_any port)::ipv6_socket
++    Lwt.catch
++      (fun () ->
++         make_ipv6_socket Unix.inet6_addr_any port >>= fun s ->
++         Lwt.return [s])
++      (function
++        | Unix.Unix_error
++            ((Unix.EAFNOSUPPORT
++             | Unix.EPROTONOSUPPORT
++             | Unix.EADDRINUSE (* GH issue #104 *)
++             ), _, _) ->
++          Lwt.return []
++        | e ->
++          Lwt.fail e) >>= fun ipv6_sockets ->
++    make_ipv4_socket Unix.inet_addr_any port >>= fun ipv4_socket ->
++    Lwt.return (ipv4_socket :: ipv6_sockets)
+   | IPv4 addr ->
+-    [make_ipv4_socket addr port]
++    make_ipv4_socket addr port >>= fun s -> Lwt.return [s]
+   | IPv6 addr ->
+-    [make_ipv6_socket addr port]
++    make_ipv6_socket addr port >>= fun s -> Lwt.return [s]
+ 
+ 
+ let ip_of_sockaddr = function
Index: pkgsrc/www/ocsigen/patches/patch-src_server_ocsigen_socket.mli
diff -u /dev/null pkgsrc/www/ocsigen/patches/patch-src_server_ocsigen_socket.mli:1.1
--- /dev/null   Fri Sep  8 17:10:46 2017
+++ pkgsrc/www/ocsigen/patches/patch-src_server_ocsigen_socket.mli      Fri Sep  8 17:10:46 2017
@@ -0,0 +1,14 @@
+$NetBSD: patch-src_server_ocsigen_socket.mli,v 1.1 2017/09/08 17:10:46 jaapb Exp $
+
+Changes to deal with lwt 3.1
+--- src/server/ocsigen_socket.mli.orig 2016-11-24 13:31:34.000000000 +0000
++++ src/server/ocsigen_socket.mli
+@@ -10,7 +10,7 @@ type socket_type =
+     @param addr type of addresss (All | IPv4 | IPv6)
+     @param port port of socket
+ *)
+-val make_sockets : socket_type -> int -> Lwt_unix.file_descr list
++val make_sockets : socket_type -> int -> Lwt_unix.file_descr list Lwt.t
+ 
+ (** ip_of_sockaddr accessor for ip
+     @param A Unix.ADDR_INET value or raise error



Home | Main Index | Thread Index | Old Index