-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #626 from psafont/private/paus/otlp
- Loading branch information
Showing
9 changed files
with
295 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
opam-version: "2.0" | ||
name: "conf-libcurl" | ||
version: "2" | ||
synopsis: "Virtual package relying on a libcurl system installation" | ||
description: | ||
"This package can only install if the libcurl is installed on the system." | ||
maintainer: "blue-prawn" | ||
authors: "Daniel Stenberg" | ||
license: "BSD-like" | ||
homepage: "http://curl.haxx.se/" | ||
bug-reports: "https://github.com/ocaml/opam-repository/issues" | ||
flags: conf | ||
build: ["curl-config" "--libs"] | ||
depexts: [ | ||
["libcurl4-gnutls-dev"] {os-family = "debian"} | ||
["libcurl-devel"] {os-distribution = "mageia"} | ||
["libcurl-devel" "openssl-devel"] {os-distribution = "centos"} | ||
["curl"] {os-distribution = "nixos"} | ||
["curl"] {os-distribution = "arch"} | ||
["curl"] {os = "win32" & os-distribution = "cygwinports"} | ||
["curl-dev"] {os-distribution = "alpine"} | ||
["libcurl-devel"] {os-family = "suse"} | ||
["libcurl-devel"] {os-distribution = "fedora"} | ||
["libcurl-devel"] {os-distribution = "ol"} | ||
["curl"] {os-distribution = "homebrew" & os = "macos"} | ||
["curl"] {os-distribution = "macports" & os = "macos"} | ||
] |
40 changes: 40 additions & 0 deletions
40
packages/upstream/ezcurl.0.2.2-1/files/001-post-non-form-data.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
From a92d7bbe4cd0a528ce6710f932d115d0c3f06d73 Mon Sep 17 00:00:00 2001 | ||
From: =?UTF-8?q?Edwin=20T=C3=B6r=C3=B6k?= <edwin.torok@cloud.com> | ||
Date: Tue, 31 Jan 2023 16:35:46 +0000 | ||
Subject: [PATCH] ezcurl: allow POST with non-form data | ||
MIME-Version: 1.0 | ||
Content-Type: text/plain; charset=UTF-8 | ||
Content-Transfer-Encoding: 8bit | ||
|
||
Currently ezcurl always sets CURLOPT_HTTPPOST, but that means it is not able | ||
to send a custom body that is not a form (e.g. JSON is quite a common use-case | ||
these days). | ||
|
||
Add a special case: if the POST params is empty, *and* a 'content' is set, then | ||
just set CURLOPT_POST, but not CURLOPT_HTTPPOST. | ||
|
||
Example usage: | ||
``` | ||
let contents = Ezjsonm.to_string json in | ||
let config = EZ.Config.(verbose true default) in | ||
match EZ.post ~config ~url ~params:[] ~content:(`String contents) () with | ||
``` | ||
|
||
Signed-off-by: Edwin Török <edwin.torok@cloud.com> | ||
--- | ||
src/core/Ezcurl_core.ml | 2 ++ | ||
1 file changed, 2 insertions(+) | ||
|
||
diff --git a/src/core/Ezcurl_core.ml b/src/core/Ezcurl_core.ml | ||
index 09999c3..f26216d 100644 | ||
--- a/src/core/Ezcurl_core.ml | ||
+++ b/src/core/Ezcurl_core.ml | ||
@@ -317,6 +317,8 @@ module Make(IO : IO) | ||
let resp_headers_done = ref false in (* once we get "\r\n" header line *) | ||
Curl.set_url self url; | ||
begin match meth with | ||
+ | POST [] when (content <> None) -> | ||
+ Curl.set_post self true | ||
| POST l -> Curl.set_httppost self l; | ||
| GET -> Curl.set_httpget self true; | ||
| PUT -> Curl.set_put self true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
opam-version: "2.0" | ||
name: "ezcurl" | ||
version: "0.2.2-1" | ||
synopsis: "Friendly wrapper around OCurl" | ||
maintainer: "simon.cruanes.2007@m4x.org" | ||
authors: "Simon Cruanes" | ||
license: "MIT" | ||
tags: ["curl" "web" "http" "client"] | ||
homepage: "https://github.com/c-cube/ezcurl/" | ||
doc: "https://c-cube.github.io/ezcurl/doc/1.2" | ||
bug-reports: "https://github.com/c-cube/ezcurl/issues" | ||
depends: [ | ||
"ocurl" {>= "0.8.0"} | ||
"dune" {>= "1.0"} | ||
"odoc" {with-doc} | ||
"ocaml" {>= "4.03.0"} | ||
] | ||
build: [ | ||
["dune" "build" "@install" "-p" name "-j" jobs] | ||
["dune" "build" "@doc" "-p" name] {with-doc} | ||
] | ||
patches: "001-post-non-form-data.patch" | ||
dev-repo: "git+https://github.com/c-cube/ezcurl.git" | ||
extra-files: [ | ||
"001-post-non-form-data.patch" | ||
"sha256=a9acedda0b76f58e93a8641be300fca39673cee4eecbddf307c0aa9d0d4f5e43" | ||
] | ||
url { | ||
src: "https://github.com/c-cube/ezcurl/archive/v0.2.2.tar.gz" | ||
checksum: [ | ||
"md5=75eafead85b6fe5ba2652a4eb580a9a9" | ||
"sha512=dde8178f2c06adb047b8fcecc8c14bc2c5f9f51748c725c2917f7f5d3faeff385303123eb0213c55d7f2e29dad9e8c88da1b0460fa643cfba958fbe531c097fd" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
opam-version: "2.0" | ||
name: "ocaml-protoc" | ||
version: "2.3" | ||
synopsis: "Protobuf compiler for OCaml" | ||
description: "Protobuf compiler for OCaml" | ||
maintainer: "Maxime Ransan <maxime.ransan@gmail.com>" | ||
authors: "Maxime Ransan <maxime.ransan@gmail.com>" | ||
license: "MIT" | ||
homepage: "https://github.com/mransan/ocaml-protoc" | ||
bug-reports: "https://github.com/mransan/ocaml-protoc/issues" | ||
depends: [ | ||
"ocaml" {>= "4.03.0"} | ||
"dune" {>= "2.0"} | ||
"stdlib-shims" | ||
"pbrt" {= version} | ||
"odoc" {with-doc} | ||
] | ||
build: [ | ||
["dune" "subst"] {dev} | ||
["dune" "build" "@install" "-p" name "-j" jobs] | ||
["dune" "runtest" "-p" name "-j" jobs] {with-test} | ||
["dune" "build" "@doc" "-p" name "-j" jobs] {with-doc} | ||
] | ||
post-messages: "The runtime library is now called \"pbrt\"." | ||
dev-repo: "git+https://github.com/mransan/ocaml-protoc.git" | ||
url { | ||
src: "https://github.com/mransan/ocaml-protoc/archive/2.3.0.tar.gz" | ||
checksum: [ | ||
"md5=14cb15d70a4ab90f692e132cbf640b11" | ||
"sha512=063a6a6a1c267ca3e965775f18e5362a58d7a0de92bcee90e57b6004fb79106c03ad1a4c04bd2d259e8d1d0461d2e2bd0b1c7862c58f763364d1cff62bba37a3" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
opam-version: "2.0" | ||
name: "ocurl" | ||
version: "0.9.1" | ||
synopsis: "Bindings to libcurl" | ||
description: | ||
"libcurl is a client-side URL transfer library, supporting HTTP and a multitude of other network protocols (FTP/SMTP/RTSP/etc). This library wrap easy synchronous API (Curl), synchronous parallel and generic asynchronous API (Curl.Multi), and provides an Lwt-enabled asynchronous interface (Curl_lwt)." | ||
maintainer: "ygrek@autistici.org" | ||
authors: ["Lars Nilsson" "ygrek"] | ||
license: "MIT" | ||
tags: ["org:ygrek" "clib:curl"] | ||
homepage: "https://ygrek.org/p/ocurl" | ||
doc: "https://ygrek.org/p/ocurl/api/index.html" | ||
bug-reports: "https://github.com/ygrek/ocurl/issues" | ||
depends: [ | ||
"ocaml" {>= "4.02.0"} | ||
"ocamlfind" {build} | ||
"base-unix" | ||
"conf-libcurl" | ||
] | ||
depopts: ["lwt" "lwt_ppx"] | ||
build: [ | ||
["./configure"] | ||
[make] | ||
[make "doc"] {with-doc} | ||
[make "test"] {with-test} | ||
] | ||
install: [make "install"] | ||
dev-repo: "git+https://github.com/ygrek/ocurl.git" | ||
url { | ||
src: "https://ygrek.org/p/release/ocurl/ocurl-0.9.1.tar.gz" | ||
checksum: [ | ||
"md5=1ff6b12803fa0c6e9a4358dd29b83910" | ||
"sha256=c65f01913270b674a0ca0f278f91bc1e368d7110e8308084bc2280b43a0bc258" | ||
"sha512=1ec21065f67ac227efb071ad696648ab4ac488ce77db091b4f212821b863fdcb2b23b6b9d579e8878fe8f1a6b2f0ec81c2751a72a1df201ea47f016012107429" | ||
] | ||
mirrors: | ||
"https://github.com/ygrek/ocurl/releases/download/0.9.1/ocurl-0.9.1.tar.gz" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
opam-version: "2.0" | ||
name: "opentelemetry-client-ocurl" | ||
version: "0.3" | ||
synopsis: "Collector client for opentelemetry, using http + ocurl" | ||
maintainer: "the Imandra team and contributors" | ||
authors: "the Imandra team and contributors" | ||
license: "MIT" | ||
homepage: "https://github.com/aestheticintegration/ocaml-opentelemetry" | ||
bug-reports: | ||
"https://github.com/aestheticintegration/ocaml-opentelemetry/issues" | ||
depends: [ | ||
"dune" {>= "2.7"} | ||
"ocaml" {>= "4.08"} | ||
"mtime" {>= "1.4"} | ||
"opentelemetry" {= version} | ||
"ocaml-protoc" {>= "2.2"} | ||
"pbrt" {>= "2.2"} | ||
"odoc" {with-doc} | ||
"ocurl" | ||
] | ||
build: [ | ||
["dune" "subst"] {dev} | ||
[ | ||
"dune" | ||
"build" | ||
"-p" | ||
name | ||
"-j" | ||
jobs | ||
"@install" | ||
"@runtest" {with-test} | ||
"@doc" {with-doc} | ||
] | ||
] | ||
dev-repo: | ||
"git+https://github.com/aestheticintegration/ocaml-opentelemetry.git" | ||
url { | ||
src: | ||
"https://github.com/AestheticIntegration/ocaml-opentelemetry/archive/v0.3.tar.gz" | ||
checksum: [ | ||
"md5=aa5caa75abb2dd3b8777aec10f69b220" | ||
"sha512=63538c716f4938a756b0a2fd89edf213bc4fdd636d0f08473cd822da25f751fc3b4faf57926f45edc2e3df4bd51f04ff10e8eed205f05d8be154dcd848166443" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
opam-version: "2.0" | ||
name: "opentelemetry" | ||
version: "0.3" | ||
synopsis: "Instrumentation for https://opentelemetry.io" | ||
maintainer: "the Imandra team and contributors" | ||
authors: "the Imandra team and contributors" | ||
license: "MIT" | ||
tags: ["instrumentation" "tracing" "opentelemetry" "datadog" "jaeger"] | ||
homepage: "https://github.com/aestheticintegration/ocaml-opentelemetry" | ||
bug-reports: | ||
"https://github.com/aestheticintegration/ocaml-opentelemetry/issues" | ||
depends: [ | ||
"dune" {>= "2.7"} | ||
"ocaml" {>= "4.08"} | ||
"ptime" | ||
"odoc" {with-doc} | ||
"ocaml-protoc" {>= "2.2"} | ||
"pbrt" {>= "2.2"} | ||
] | ||
build: [ | ||
["dune" "subst"] {dev} | ||
[ | ||
"dune" | ||
"build" | ||
"-p" | ||
name | ||
"-j" | ||
jobs | ||
"@install" | ||
"@runtest" {with-test} | ||
"@doc" {with-doc} | ||
] | ||
] | ||
dev-repo: | ||
"git+https://github.com/aestheticintegration/ocaml-opentelemetry.git" | ||
url { | ||
src: | ||
"https://github.com/AestheticIntegration/ocaml-opentelemetry/archive/v0.3.tar.gz" | ||
checksum: [ | ||
"md5=aa5caa75abb2dd3b8777aec10f69b220" | ||
"sha512=63538c716f4938a756b0a2fd89edf213bc4fdd636d0f08473cd822da25f751fc3b4faf57926f45edc2e3df4bd51f04ff10e8eed205f05d8be154dcd848166443" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
opam-version: "2.0" | ||
name: "pbrt" | ||
version: "2.3" | ||
synopsis: "Runtime library for Protobuf tooling" | ||
description: "Runtime library for Protobuf tooling" | ||
maintainer: "Maxime Ransan <maxime.ransan@gmail.com>" | ||
authors: "Maxime Ransan <maxime.ransan@gmail.com>" | ||
license: "MIT" | ||
homepage: "https://github.com/mransan/ocaml-protoc" | ||
bug-reports: "https://github.com/mransan/ocaml-protoc/issues" | ||
depends: [ | ||
"ocaml" {>= "4.03.0"} | ||
"dune" {>= "2.0"} | ||
"stdlib-shims" | ||
"odoc" {with-doc} | ||
] | ||
build: [ | ||
["dune" "subst"] {dev} | ||
["dune" "build" "@install" "-p" name "-j" jobs] | ||
["dune" "runtest" "-p" "pbrt,ocaml-protoc" "-j" jobs] {with-test} | ||
["dune" "build" "@doc" "-p" name "-j" jobs] {with-doc} | ||
] | ||
post-messages: """\ | ||
Pbrt: runtime library for ocaml-protoc. | ||
|
||
A shim library named "ocaml-protoc" still exists, to ease the | ||
migration.""" | ||
dev-repo: "git+https://github.com/mransan/ocaml-protoc.git" | ||
url { | ||
src: "https://github.com/mransan/ocaml-protoc/archive/2.3.0.tar.gz" | ||
checksum: [ | ||
"md5=14cb15d70a4ab90f692e132cbf640b11" | ||
"sha512=063a6a6a1c267ca3e965775f18e5362a58d7a0de92bcee90e57b6004fb79106c03ad1a4c04bd2d259e8d1d0461d2e2bd0b1c7862c58f763364d1cff62bba37a3" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters