Skip to content

Commit

Permalink
Update dune to 3.17
Browse files Browse the repository at this point in the history
Signed-off-by: Sora Morimoto <[email protected]>
  • Loading branch information
smorimoto committed Dec 24, 2024
1 parent 382573c commit fc29170
Show file tree
Hide file tree
Showing 9 changed files with 121 additions and 45 deletions.
35 changes: 34 additions & 1 deletion dune-project
Original file line number Diff line number Diff line change
@@ -1,2 +1,35 @@
(lang dune 2.7)
(lang dune 3.17)
(name ocsigenserver)
(version 6.0.0)

(generate_opam_files true)

(license "LGPL-2.1-only WITH OCaml-LGPL-linking-exception")
(authors "Ocsigen team <[email protected]>")
(maintainers "Ocsigen team <[email protected]>")
(source (github ocsigen/ocsigenserver))
(homepage "http://ocsigen.org/ocsigenserver")

(package
(name ocsigenserver)
(synopsis "A full-featured and extensible Web server")
(description
"Ocsigen Server is a Web Server that can be used either as a library for OCaml or as an executable (taking its configuration from a file). It has a very powerful extension mechanism that makes it very easy to plug your own OCaml modules for generating pages. Many extensions are already implemented, like a reverse proxy, content compression, access control, authentication, etc.")
(depends
(ocaml (>= 4.08.1))
(camlzip (>= 1.04))
(cohttp-lwt-unix (and (>= 5.0) (< 6.0)))
(conduit-lwt-unix (and (>= 2.0) (< 7.0)))
cryptokit
(ipaddr (>= 2.1))
(lwt (>= 3.0))
lwt_log
lwt_react
lwt_ssl
ocamlfind
(re (>= 1.11))
react
(ssl (>= 0.5.8))
xml-light)
(conflicts
(pgocaml (< 2.2))))
58 changes: 29 additions & 29 deletions ocsigenserver.opam
Original file line number Diff line number Diff line change
@@ -1,13 +1,36 @@
# This file is generated by dune, edit dune-project instead
opam-version: "2.0"
name: "ocsigenserver"
version: "6.0.0"
maintainer: "[email protected]"
synopsis: "A full-featured and extensible Web server"
description: "Ocsigen Server is a Web Server that can be used either as a library for OCaml or as an executable (taking its configuration from a file). It has a very powerful extension mechanism that makes it very easy to plug your own OCaml modules for generating pages. Many extensions are already implemented, like a reverse proxy, content compression, access control, authentication, etc."
authors: "[email protected]"
homepage: "http://ocsigen.org/ocsigenserver/"
bug-reports: "https://github.com/ocsigen/ocsigenserver/issues/"
description:
"Ocsigen Server is a Web Server that can be used either as a library for OCaml or as an executable (taking its configuration from a file). It has a very powerful extension mechanism that makes it very easy to plug your own OCaml modules for generating pages. Many extensions are already implemented, like a reverse proxy, content compression, access control, authentication, etc."
maintainer: ["Ocsigen team <dev@ocsigen.org>"]
authors: ["Ocsigen team <dev@ocsigen.org>"]
license: "LGPL-2.1-only WITH OCaml-LGPL-linking-exception"
homepage: "http://ocsigen.org/ocsigenserver"
bug-reports: "https://github.com/ocsigen/ocsigenserver/issues"
depends: [
"dune" {>= "3.17"}
"ocaml" {>= "4.08.1"}
"camlzip" {>= "1.04"}
"cohttp-lwt-unix" {>= "5.0" & < "6.0"}
"conduit-lwt-unix" {>= "2.0" & < "7.0"}
"cryptokit"
"ipaddr" {>= "2.1"}
"lwt" {>= "3.0"}
"lwt_log"
"lwt_react"
"lwt_ssl"
"ocamlfind"
"re" {>= "1.11"}
"react"
"ssl" {>= "0.5.8"}
"xml-light"
"odoc" {with-doc}
]
conflicts: [
"pgocaml" {< "2.2"}
]
dev-repo: "git+https://github.com/ocsigen/ocsigenserver.git"
build: [
[
Expand Down Expand Up @@ -42,26 +65,3 @@ build: [
["dune" "build" "-p" name "-j" jobs]
]
install:[make "install.files"]
depends: [
"ocaml" {>= "4.08.1"}
"dune" {>= "2.7"}
"ocamlfind"
"base-unix"
"base-threads"
"react"
"ssl" {>= "0.5.8"}
"lwt" {>= "3.0.0"}
"lwt_ssl"
"lwt_react"
"lwt_log"
"re" {>= "1.11.0"}
"cryptokit"
"ipaddr" {>= "2.1"}
"cohttp-lwt-unix" {>= "5.0.0" & < "6.0"}
"conduit-lwt-unix" {>= "2.0.0" & < "7.0"}
"xml-light"
"camlzip" {>= "1.04"}
]
conflicts: [
"pgocaml" {< "2.2"}
]
33 changes: 33 additions & 0 deletions ocsigenserver.opam.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
build: [
[
"sh"
"configure"
"--prefix"
"%{prefix}%"
"--ocsigen-user"
"%{user}%"
"--ocsigen-group"
"%{group}%"
"--commandpipe"
"%{lib}%/ocsigenserver/var/run/ocsigenserver_command"
"--logdir"
"%{lib}%/ocsigenserver/var/log/ocsigenserver"
"--mandir"
"%{man}%/man1"
"--docdir"
"%{lib}%/ocsigenserver/share/doc/ocsigenserver"
"--commandpipe"
"%{lib}%/ocsigenserver/var/run/ocsigenserver_command"
"--staticpagesdir"
"%{lib}%/ocsigenserver/var/www"
"--datadir"
"%{lib}%/ocsigenserver/var/lib/ocsigenserver"
"--temproot"
""
"--sysconfdir"
"%{lib}%/ocsigenserver/etc/ocsigenserver"
]
[make "-C" "src" "confs"]
["dune" "build" "-p" name "-j" jobs]
]
install:[make "install.files"]
9 changes: 7 additions & 2 deletions src/baselib/dune
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,13 @@
(wrapped false)
(flags
(:standard -no-keep-locs))
(modules dynlink_wrapper ocsigen_cache ocsigen_config_static ocsigen_lib
ocsigen_loader ocsigen_stream)
(modules
dynlink_wrapper
ocsigen_cache
ocsigen_config_static
ocsigen_lib
ocsigen_loader
ocsigen_stream)
(libraries
str
findlib
Expand Down
12 changes: 6 additions & 6 deletions src/baselib/ocsigen_cache.ml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ module Dlist : sig
(** returns the finalizers. *)
end = struct
type 'a node =
{ mutable value : 'a
{ mutable value : 'a [@ocaml.warning "-69"]
; mutable succ : 'a node option
; (* the node added just after *)
mutable prev : 'a node option
Expand Down Expand Up @@ -434,11 +434,11 @@ functor
{ mutable pointers : A.key Dlist.t
; mutable table : (A.value * A.key Dlist.node) H.t
; finder : A.key -> A.value Lwt.t
; clear : unit -> unit
(* This function clears the cache. It is put inside the
cache structure so that it is garbage-collected only when the cache
is no longer referenced, as the functions themselves are put inside
a weak hash table *)
; clear : unit -> unit [@ocaml.warning "-69"]
(* This function clears the cache. It is put inside the cache structure
so that it is garbage-collected only when the cache is no longer
referenced, as the functions themselves are put inside a weak hash
table *)
}

let mk ?timer size =
Expand Down
2 changes: 1 addition & 1 deletion src/extensions/deflatemod.ml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ type output_buffer =
; mutable avail : int
; mutable size : int32
; mutable crc : int32
; mutable add_trailer : bool }
; mutable add_trailer : bool [@ocaml.warning "-69"] }

let write_int32 oz n =
for i = 0 to 3 do
Expand Down
2 changes: 1 addition & 1 deletion src/extensions/revproxy.ml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ type redirection =
{ regexp : Pcre.regexp
; full_url : bool
; dest : string
; pipeline : bool
; pipeline : bool [@ocaml.warning "-69"]
; keephost : bool }
(** The table of redirections for each virtual server *)

Expand Down
9 changes: 7 additions & 2 deletions src/server/dune
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,10 @@
(name ocsigenserver)
(public_name ocsigenserver)
(wrapped false)
(libraries xml-light cohttp-lwt-unix polytables ocsigen_cookie_map baselib
http))
(libraries
xml-light
cohttp-lwt-unix
polytables
ocsigen_cookie_map
baselib
http))
6 changes: 3 additions & 3 deletions src/server/ocsigen_request.ml
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ type t =
{ r_address : Unix.inet_addr
; r_port : int
; r_ssl : bool
; r_filenames : string list ref
; r_sockaddr : Lwt_unix.sockaddr
; r_filenames : string list ref [@ocaml.warning "-69"]
; r_sockaddr : Lwt_unix.sockaddr [@ocaml.warning "-69"]
; r_remote_ip : string Lazy.t
; r_remote_ip_parsed : Ipaddr.t Lazy.t
; r_forward_ip : string list
Expand All @@ -66,7 +66,7 @@ type t =
; r_original_full_path : string option
; r_sub_path : string option
; r_cookies_override : string Ocsigen_cookie_map.Map_inner.t option
; mutable r_request_cache : Polytables.t
; mutable r_request_cache : Polytables.t [@ocaml.warning "-69"]
; mutable r_tries : int
; r_connection_closed : unit Lwt.t
; r_timeofday : float }
Expand Down

0 comments on commit fc29170

Please sign in to comment.