* [bug#29738] Add support for HTTP/2 to curl
@ 2017-12-16 18:12 Mark Meyer
2017-12-16 18:14 ` [bug#29738] Patch was missing Mark Meyer
` (3 more replies)
0 siblings, 4 replies; 12+ messages in thread
From: Mark Meyer @ 2017-12-16 18:12 UTC (permalink / raw)
To: 29738
Hi,
this patch adds HTTP/2 support to curl, this is a prerequisite to
closing bug#29733. I am aware that this will trigger about 2500 rebuilt
packages, but having HTTP/2 in curl seems to be worth the hassle.
Cheers, Mark
--
Mark Meyer
mark@ofosos.org
^ permalink raw reply [flat|nested] 12+ messages in thread
* [bug#29738] Patch was missing
2017-12-16 18:12 [bug#29738] Add support for HTTP/2 to curl Mark Meyer
@ 2017-12-16 18:14 ` Mark Meyer
2017-12-17 6:31 ` [bug#29738] Add support for HTTP/2 to curl Ricardo Wurmus
` (2 subsequent siblings)
3 siblings, 0 replies; 12+ messages in thread
From: Mark Meyer @ 2017-12-16 18:14 UTC (permalink / raw)
To: 29738
[-- Attachment #1: Type: text/plain, Size: 89 bytes --]
The patch is attached to this message.
Cheers, Mark
--
Mark Meyer
mark@ofosos.org
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Add-http2-support-to-curl.patch --]
[-- Type: text/x-patch; name="0001-gnu-Add-http2-support-to-curl.patch", Size: 2541 bytes --]
From c8b91fe40480f9c403d1294c9d6cdd76d62922fc Mon Sep 17 00:00:00 2001
From: Mark Meyer <mark@ofosos.org>
Date: Sat, 16 Dec 2017 19:02:10 +0100
Subject: [PATCH] gnu: Add http2 support to curl.
* gnu/packages/curl.scm (nghttp2): New variable.
* gnu/packages/curl.scm (curl)[inputs]: Add nghttp2
---
gnu/packages/curl.scm | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/gnu/packages/curl.scm b/gnu/packages/curl.scm
index 49703c092..d9c34aea4 100644
--- a/gnu/packages/curl.scm
+++ b/gnu/packages/curl.scm
@@ -5,6 +5,7 @@
;;; Copyright © 2015 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2016, 2017 Leo Famulari <leo@famulari.name>
;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2017 Mark Meyer <mark@ofosos.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -28,6 +29,7 @@
#:use-module (guix utils)
#:use-module (guix build-system gnu)
#:use-module (gnu packages)
+ #:use-module (gnu packages check)
#:use-module (gnu packages compression)
#:use-module (gnu packages groff)
#:use-module (gnu packages gsasl)
@@ -39,6 +41,30 @@
#:use-module (gnu packages ssh)
#:use-module (gnu packages tls))
+(define-public nghttp2
+ (package
+ (name "nghttp2")
+ (version "1.28.0")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/nghttp2/nghttp2/releases/download/v"
+ version "/nghttp2-" version ".tar.xz"))
+ (sha256
+ (base32
+ "13gxk72manbmaaf3mahvihfw71zas1m7z8j2bs9s7v2dc403yv0d"))))
+ (build-system gnu-build-system)
+ (native-inputs
+ `(("cunit" ,cunit)))
+ (arguments
+ `(#:configure-flags '("--enable-lib-only")))
+ (synopsis "This is an implementation of HTTP version 2 in C")
+ (description "nghttp2 is an implementation of framing layer of HTTP/2 in
+reusable C library. On top of that, this library implements an HTTP/2 client,
+server and proxy. HPACK encoder and decoder are available as a public API.")
+ (license (license:non-copyleft "file://COPYING"
+ "See COPYING in the distribution."))
+ (home-page "https://nghttp2.org")))
+
(define-public curl
(package
(name "curl")
@@ -58,6 +84,7 @@
("gss" ,gss)
("libidn" ,libidn)
("libssh2" ,libssh2)
+ ("nghttp2" ,nghttp2)
("openldap" ,openldap)
("zlib" ,zlib)))
(native-inputs
--
2.15.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [bug#29738] Add support for HTTP/2 to curl
2017-12-16 18:12 [bug#29738] Add support for HTTP/2 to curl Mark Meyer
2017-12-16 18:14 ` [bug#29738] Patch was missing Mark Meyer
@ 2017-12-17 6:31 ` Ricardo Wurmus
2017-12-17 8:35 ` Mark Meyer
2018-01-04 17:29 ` [bug#29738] Next core-updates cycle Mark Meyer
2018-03-14 17:17 ` bug#29738: Add support for HTTP/2 to curl Tobias Geerinckx-Rice
3 siblings, 1 reply; 12+ messages in thread
From: Ricardo Wurmus @ 2017-12-17 6:31 UTC (permalink / raw)
To: Mark Meyer; +Cc: 29738
Hi Mark,
> this patch adds HTTP/2 support to curl, this is a prerequisite to
> closing bug#29733. I am aware that this will trigger about 2500 rebuilt
> packages, but having HTTP/2 in curl seems to be worth the hassle.
We would make this change on the core-updates branch to avoid disrupting
the availability of substitutes, so rebuilding a large number of
packages is not a big problem. Does this patch apply on top of
core-updates?
About the patch: it would be better to separate the two changes. One
commit would add the nghttp2 package, the other would modify the curl
package. Could you please split the patch?
Since curl is used by a great number of packages we need to pay
attention to the size of the closure. How does adding nghttp2 to curl
affect the size of the closure of the curl package? (You can check with
“guix size”.)
--
Ricardo
GPG: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC
https://elephly.net
^ permalink raw reply [flat|nested] 12+ messages in thread
* [bug#29738] Add support for HTTP/2 to curl
2017-12-17 6:31 ` [bug#29738] Add support for HTTP/2 to curl Ricardo Wurmus
@ 2017-12-17 8:35 ` Mark Meyer
0 siblings, 0 replies; 12+ messages in thread
From: Mark Meyer @ 2017-12-17 8:35 UTC (permalink / raw)
To: Ricardo Wurmus; +Cc: 29738
[-- Attachment #1: Type: text/plain, Size: 1326 bytes --]
Hi Ricardo,
thanks for you feedback. The closure changes from 223.7 MiB to 224.5
MiB.
The patches attached apply cleanly to core-updates and split the change
into two components.
Cheers, Mark
On Sun, Dec 17, 2017, at 07:31, Ricardo Wurmus wrote:
>
> Hi Mark,
>
> > this patch adds HTTP/2 support to curl, this is a prerequisite to
> > closing bug#29733. I am aware that this will trigger about 2500 rebuilt
> > packages, but having HTTP/2 in curl seems to be worth the hassle.
>
> We would make this change on the core-updates branch to avoid disrupting
> the availability of substitutes, so rebuilding a large number of
> packages is not a big problem. Does this patch apply on top of
> core-updates?
>
> About the patch: it would be better to separate the two changes. One
> commit would add the nghttp2 package, the other would modify the curl
> package. Could you please split the patch?
>
> Since curl is used by a great number of packages we need to pay
> attention to the size of the closure. How does adding nghttp2 to curl
> affect the size of the closure of the curl package? (You can check with
> “guix size”.)
>
> --
> Ricardo
>
> GPG: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC
> https://elephly.net
>
>
--
Mark Meyer
mark@ofosos.org
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Add-nghttp2-support.patch --]
[-- Type: text/x-patch; name="0001-gnu-Add-nghttp2-support.patch", Size: 2255 bytes --]
From 05c8f4a443ad62c013aa5e18b46979b985737dac Mon Sep 17 00:00:00 2001
From: Mark Meyer <mark@ofosos.org>
Date: Sat, 16 Dec 2017 19:02:10 +0100
Subject: [PATCH] gnu: Add nghttp2 support.
* gnu/packages/curl.scm (nghttp2): New variable.
---
gnu/packages/curl.scm | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/gnu/packages/curl.scm b/gnu/packages/curl.scm
index 3df8acc2c..741454978 100644
--- a/gnu/packages/curl.scm
+++ b/gnu/packages/curl.scm
@@ -6,6 +6,7 @@
;;; Copyright © 2016, 2017 Leo Famulari <leo@famulari.name>
;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2017 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2017 Mark Meyer <mark@ofosos.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -29,6 +30,7 @@
#:use-module (guix utils)
#:use-module (guix build-system gnu)
#:use-module (gnu packages)
+ #:use-module (gnu packages check)
#:use-module (gnu packages compression)
#:use-module (gnu packages groff)
#:use-module (gnu packages gsasl)
@@ -40,6 +42,30 @@
#:use-module (gnu packages ssh)
#:use-module (gnu packages tls))
+(define-public nghttp2
+ (package
+ (name "nghttp2")
+ (version "1.28.0")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/nghttp2/nghttp2/releases/download/v"
+ version "/nghttp2-" version ".tar.xz"))
+ (sha256
+ (base32
+ "13gxk72manbmaaf3mahvihfw71zas1m7z8j2bs9s7v2dc403yv0d"))))
+ (build-system gnu-build-system)
+ (native-inputs
+ `(("cunit" ,cunit)))
+ (arguments
+ `(#:configure-flags '("--enable-lib-only")))
+ (synopsis "This is an implementation of HTTP version 2 in C")
+ (description "nghttp2 is an implementation of framing layer of HTTP/2 in
+reusable C library. On top of that, this library implements an HTTP/2 client,
+server and proxy. HPACK encoder and decoder are available as a public API.")
+ (license (license:non-copyleft "file://COPYING"
+ "See COPYING in the distribution."))
+ (home-page "https://nghttp2.org")))
+
(define-public curl
(package
(name "curl")
--
2.15.1
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: 0002-gnu-Add-http2-support-to-curl.patch --]
[-- Type: text/x-patch; name="0002-gnu-Add-http2-support-to-curl.patch", Size: 787 bytes --]
From d6d3320046de905ec3cf9c17dca133d01cc105e4 Mon Sep 17 00:00:00 2001
From: Mark Meyer <mark@ofosos.org>
Date: Sun, 17 Dec 2017 09:31:58 +0100
Subject: [PATCH] gnu: Add http2 support to curl.
* gnu/packages/curl.scm (curl)[inputs]: Add nghttp2.
---
gnu/packages/curl.scm | 1 +
1 file changed, 1 insertion(+)
diff --git a/gnu/packages/curl.scm b/gnu/packages/curl.scm
index 741454978..077f330d2 100644
--- a/gnu/packages/curl.scm
+++ b/gnu/packages/curl.scm
@@ -84,6 +84,7 @@ server and proxy. HPACK encoder and decoder are available as a public API.")
("gss" ,gss)
("libidn" ,libidn)
("libssh2" ,libssh2)
+ ("nghttp2" ,nghttp2)
("openldap" ,openldap)
("zlib" ,zlib)))
(native-inputs
--
2.15.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [bug#29738] Next core-updates cycle
2017-12-16 18:12 [bug#29738] Add support for HTTP/2 to curl Mark Meyer
2017-12-16 18:14 ` [bug#29738] Patch was missing Mark Meyer
2017-12-17 6:31 ` [bug#29738] Add support for HTTP/2 to curl Ricardo Wurmus
@ 2018-01-04 17:29 ` Mark Meyer
2018-01-04 17:53 ` Leo Famulari
2018-03-14 17:17 ` bug#29738: Add support for HTTP/2 to curl Tobias Geerinckx-Rice
3 siblings, 1 reply; 12+ messages in thread
From: Mark Meyer @ 2018-01-04 17:29 UTC (permalink / raw)
To: 29738
Hi,
will this patch make it into the next core-updates cycle?
Cheers, Mark
--
Mark Meyer
mark@ofosos.org
^ permalink raw reply [flat|nested] 12+ messages in thread
* [bug#29738] Next core-updates cycle
2018-01-04 17:29 ` [bug#29738] Next core-updates cycle Mark Meyer
@ 2018-01-04 17:53 ` Leo Famulari
2018-01-05 0:54 ` Tobias Geerinckx-Rice
0 siblings, 1 reply; 12+ messages in thread
From: Leo Famulari @ 2018-01-04 17:53 UTC (permalink / raw)
To: Mark Meyer; +Cc: 29738
[-- Attachment #1: Type: text/plain, Size: 236 bytes --]
On Thu, Jan 04, 2018 at 06:29:58PM +0100, Mark Meyer wrote:
> Hi,
> will this patch make it into the next core-updates cycle?
I saved them on my local core-updates-next staging branch, along with
some other changes for the next round.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* [bug#29738] Next core-updates cycle
2018-01-04 17:53 ` Leo Famulari
@ 2018-01-05 0:54 ` Tobias Geerinckx-Rice
2018-01-05 1:59 ` Tobias Geerinckx-Rice
2018-01-06 18:59 ` Leo Famulari
0 siblings, 2 replies; 12+ messages in thread
From: Tobias Geerinckx-Rice @ 2018-01-05 0:54 UTC (permalink / raw)
To: leo, mark; +Cc: 29738
[-- Attachment #1.1.1: Type: text/plain, Size: 1357 bytes --]
Mark, Leo,
Leo Famulari wrote on 04/01/18 at 18:53:
> On Thu, Jan 04, 2018 at 06:29:58PM +0100, Mark Meyer wrote:
>> Hi,
>> will this patch make it into the next core-updates cycle?
>
> I saved them on my local core-updates-next staging branch, along with
> some other changes for the next round.
So this week I decided to finally get my local h2 branch into shape (I'd
started it in November, but life gets in the way) and send it in. I'd
somehow missed Mark's original message in the meantime. I apologise;
duplicated work really sucks.
Now... I'm going to gingerly attach my version anyway, since it makes a
few different choices. And I spent too much time on that description,
damn it! :-)
Most importantly, this builds the entire nghttp2 package, not only the
core library required by curl. The tools that use it aren't just toys or
examples as in some other packages. I use them regularly.
By splitting it into multiple outputs, the closure size for curl with
HTTP/2 support only increases by .5 MiB (same as Mark's patch).
I put nghttp2 in web.scm, since it's not curl-related. In any case,
adding nghttp2 itself doesn't need to pass through core-updates first.
Also note that the licence is really l:expat, not l:non-copyleft.
Thanks for working on this, and sorry again for not noticing it sooner,
T G-R
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.1.2: 0001-gnu-Add-nghttp2.patch --]
[-- Type: text/x-patch; name="0001-gnu-Add-nghttp2.patch", Size: 5118 bytes --]
From 8a675465f0456f08d86a3d25dc8ec442d727dc2a Mon Sep 17 00:00:00 2001
From: Tobias Geerinckx-Rice <me@tobias.gr>
Date: Thu, 4 Jan 2018 15:27:03 +0000
Subject: [PATCH] gnu: Add nghttp2.
* gnu/packages/web.scm (nghttp2): New public variable.
---
gnu/packages/web.scm | 84 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 84 insertions(+)
diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index f67f415d2..89f36f218 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -58,6 +58,7 @@
#:use-module (guix build-system ant)
#:use-module (guix build-system scons)
#:use-module (gnu packages)
+ #:use-module (gnu packages adns)
#:use-module (gnu packages apr)
#:use-module (gnu packages check)
#:use-module (gnu packages cran)
@@ -81,9 +82,11 @@
#:use-module (gnu packages gtk)
#:use-module (gnu packages java)
#:use-module (gnu packages javascript)
+ #:use-module (gnu packages jemalloc)
#:use-module (gnu packages image)
#:use-module (gnu packages imagemagick)
#:use-module (gnu packages libidn)
+ #:use-module (gnu packages libevent)
#:use-module (gnu packages libunistring)
#:use-module (gnu packages lua)
#:use-module (gnu packages markup)
@@ -6214,3 +6217,84 @@ features include:
@item logging with multiple log levels.
@end enumerate\n")
(license l:expat)))
+
+(define-public nghttp2
+ (package
+ (name "nghttp2")
+ (version "1.28.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/nghttp2/nghttp2/"
+ "releases/download/v" version "/"
+ name "-" version ".tar.xz"))
+ (sha256
+ (base32
+ "13gxk72manbmaaf3mahvihfw71zas1m7z8j2bs9s7v2dc403yv0d"))))
+ (build-system gnu-build-system)
+ (outputs (list "out"
+ "lib")) ; only libnghttp2
+ (native-inputs
+ `(("pkg-config" ,pkg-config)
+
+ ;; Required by tests.
+ ("cunit" ,cunit)
+ ("tzdata" ,tzdata)))
+ (inputs
+ ;; Required to build the tools (i.e. without ‘--enable-lib-only’).
+ `(("c-ares" ,c-ares)
+ ("jansson" ,jansson) ; for HPACK tools
+ ("jemalloc" ,jemalloc) ; fight nghttpd{,x} heap fragmentation
+ ("libev" ,libev)
+ ("libxml2" ,libxml2) ; for ‘nghttp -a’
+ ("openssl" ,openssl)))
+ (arguments
+ `(#:configure-flags
+ (list (string-append "--libdir=" (assoc-ref %outputs "lib") "/lib")
+ "--enable-app" ; build all the tools
+ "--enable-hpack-tools" ; ...all the tools
+ "--disable-examples"
+ "--disable-static") ; don't bother building .a files
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'break-circular-reference
+ ;; libnghttp2.pc by default retains a reference to the ‘out’ output,
+ ;; which is not allowed. Break this cycle. While we could install
+ ;; only the library to ‘out’ and move everything else to a separate
+ ;; output, this would inconvenience the majority of (human) users.
+ (lambda* (#:key outputs #:allow-other-keys)
+ (substitute* "lib/libnghttp2.pc.in"
+ (("@prefix@")
+ (assoc-ref outputs "lib")))
+ #t))
+ (add-before 'check 'set-timezone-directory
+ (lambda* (#:key inputs #:allow-other-keys)
+ (setenv "TZDIR" (string-append (assoc-ref inputs "tzdata")
+ "/share/zoneinfo"))
+ #t)))))
+ (home-page "https://nghttp2.org/")
+ (synopsis "HTTP/2 protocol client, proxy, server, and library")
+ (description
+ "nghttp2 implements the Hypertext Transfer Protocol, version
+2 (@dfn{HTTP/2}).
+
+A reusable C library provides the HTTP/2 framing layer, with several tools built
+on top of it:
+
+@enumerate
+@item @command{nghttp}, a command-line HTTP/2 client. It exposes many advanced
+and low-level aspects of the protocol and is useful for debugging.
+@item @command{nghttpd}, a fast, multi-threaded HTTP/2 static web server that
+serves files from a local directory.
+@item @command{nghttpx}, a fast, multi-threaded HTTP/2 reverse proxy that can be
+deployed in front of existing web servers that don't support HTTP/2.
+Both @command{nghttpd} and @command{nghttpx} can fall back to HTTP/1.1 for
+backwards compatibilty with clients that don't speak HTTP/2.
+@item @command{h2load} for benchmarking (only!) your own HTTP/2 servers.
+@item HTTP/2 uses a header compression method called @dfn{HPACK}.
+nghttp2 provides a HPACK encoder and decoder as part of its public API.
+@item @command{deflatehd} converts JSON data or HTTP/1-style header fields to
+compressed JSON header blocks.
+@item @command{inflatehd} converts such compressed headers back to JSON pairs.
+@end enumerate\n")
+ (license l:expat)))
--
2.15.0
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 248 bytes --]
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [bug#29738] Next core-updates cycle
2018-01-05 0:54 ` Tobias Geerinckx-Rice
@ 2018-01-05 1:59 ` Tobias Geerinckx-Rice
2018-01-06 18:59 ` Leo Famulari
1 sibling, 0 replies; 12+ messages in thread
From: Tobias Geerinckx-Rice @ 2018-01-05 1:59 UTC (permalink / raw)
Cc: 29738
[-- Attachment #1.1.1: Type: text/plain, Size: 215 bytes --]
Tobias Geerinckx-Rice wrote on 05/01/18 at 01:54:
> So this week I decided to finally get my local h2 branch into shape
Sigh. Now with the correct, up-to-date patch and gnurl support.
Kind regards,
T G-R
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.1.2: 0001-gnu-Add-nghttp2.patch --]
[-- Type: text/x-patch; name="0001-gnu-Add-nghttp2.patch", Size: 5146 bytes --]
From 1d1ef0de9986f1fa66779fe39bfd8cbc78be3548 Mon Sep 17 00:00:00 2001
From: Tobias Geerinckx-Rice <me@tobias.gr>
Date: Thu, 4 Jan 2018 21:04:02 +0000
Subject: [PATCH 1/2] gnu: Add nghttp2.
* gnu/packages/web.scm (nghttp2): New public variable.
---
gnu/packages/web.scm | 84 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 84 insertions(+)
diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index f67f415d2..854476d89 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -58,6 +58,7 @@
#:use-module (guix build-system ant)
#:use-module (guix build-system scons)
#:use-module (gnu packages)
+ #:use-module (gnu packages adns)
#:use-module (gnu packages apr)
#:use-module (gnu packages check)
#:use-module (gnu packages cran)
@@ -81,9 +82,11 @@
#:use-module (gnu packages gtk)
#:use-module (gnu packages java)
#:use-module (gnu packages javascript)
+ #:use-module (gnu packages jemalloc)
#:use-module (gnu packages image)
#:use-module (gnu packages imagemagick)
#:use-module (gnu packages libidn)
+ #:use-module (gnu packages libevent)
#:use-module (gnu packages libunistring)
#:use-module (gnu packages lua)
#:use-module (gnu packages markup)
@@ -6214,3 +6217,84 @@ features include:
@item logging with multiple log levels.
@end enumerate\n")
(license l:expat)))
+
+(define-public nghttp2
+ (package
+ (name "nghttp2")
+ (version "1.29.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/nghttp2/nghttp2/"
+ "releases/download/v" version "/"
+ name "-" version ".tar.xz"))
+ (sha256
+ (base32
+ "0fc7hgbi3n9w92w750qfgfg21jbfgni8x61rfwxabrkvwn5v38d7"))))
+ (build-system gnu-build-system)
+ (outputs (list "out"
+ "lib")) ; only libnghttp2
+ (native-inputs
+ `(("pkg-config" ,pkg-config)
+
+ ;; Required by tests.
+ ("cunit" ,cunit)
+ ("tzdata" ,tzdata)))
+ (inputs
+ ;; Required to build the tools (i.e. without ‘--enable-lib-only’).
+ `(("c-ares" ,c-ares)
+ ("jansson" ,jansson) ; for HPACK tools
+ ("jemalloc" ,jemalloc) ; fight nghttpd{,x} heap fragmentation
+ ("libev" ,libev)
+ ("libxml2" ,libxml2) ; for ‘nghttp -a’
+ ("openssl" ,openssl)))
+ (arguments
+ `(#:configure-flags
+ (list (string-append "--libdir=" (assoc-ref %outputs "lib") "/lib")
+ "--enable-app" ; build all the tools
+ "--enable-hpack-tools" ; ...all the tools
+ "--disable-examples"
+ "--disable-static") ; don't bother building .a files
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'break-circular-reference
+ ;; libnghttp2.pc by default retains a reference to the ‘out’ output,
+ ;; which is not allowed. Break this cycle. While we could install
+ ;; only the library to ‘out’ and move everything else to a separate
+ ;; output, this would inconvenience the majority of (human) users.
+ (lambda* (#:key outputs #:allow-other-keys)
+ (substitute* "lib/libnghttp2.pc.in"
+ (("@prefix@")
+ (assoc-ref outputs "lib")))
+ #t))
+ (add-before 'check 'set-timezone-directory
+ (lambda* (#:key inputs #:allow-other-keys)
+ (setenv "TZDIR" (string-append (assoc-ref inputs "tzdata")
+ "/share/zoneinfo"))
+ #t)))))
+ (home-page "https://nghttp2.org/")
+ (synopsis "HTTP/2 protocol client, proxy, server, and library")
+ (description
+ "nghttp2 implements the Hypertext Transfer Protocol, version
+2 (@dfn{HTTP/2}).
+
+A reusable C library provides the HTTP/2 framing layer, with several tools built
+on top of it:
+
+@enumerate
+@item @command{nghttp}, a command-line HTTP/2 client. It exposes many advanced
+and low-level aspects of the protocol and is useful for debugging.
+@item @command{nghttpd}, a fast, multi-threaded HTTP/2 static web server that
+serves files from a local directory.
+@item @command{nghttpx}, a fast, multi-threaded HTTP/2 reverse proxy that can be
+deployed in front of existing web servers that don't support HTTP/2.
+Both @command{nghttpd} and @command{nghttpx} can fall back to HTTP/1.1 for
+backwards compatibilty with clients that don't speak HTTP/2.
+@item @command{h2load} for benchmarking (only!) your own HTTP/2 servers.
+@item HTTP/2 uses a header compression method called @dfn{HPACK}.
+nghttp2 provides a HPACK encoder and decoder as part of its public API.
+@item @command{deflatehd} converts JSON data or HTTP/1-style header fields to
+compressed JSON header blocks.
+@item @command{inflatehd} converts such compressed headers back to JSON pairs.
+@end enumerate\n")
+ (license l:expat)))
--
2.15.0
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.1.3: 0002-gnu-gnurl-Add-HTTP-2-support.patch --]
[-- Type: text/x-patch; name="0002-gnu-gnurl-Add-HTTP-2-support.patch", Size: 1149 bytes --]
From af5d8eabbfd40a46e70b5b28bfa4a5705f8338ed Mon Sep 17 00:00:00 2001
From: Tobias Geerinckx-Rice <me@tobias.gr>
Date: Thu, 4 Jan 2018 22:49:22 +0000
Subject: [PATCH 2/2] gnu: gnurl: Add HTTP/2 support.
* gnu/packages/gnunet.scm (gnurl)[inputs]: Add nghttp2:lib.
---
gnu/packages/gnunet.scm | 2 ++
1 file changed, 2 insertions(+)
diff --git a/gnu/packages/gnunet.scm b/gnu/packages/gnunet.scm
index 2d238febc..8bccf263b 100644
--- a/gnu/packages/gnunet.scm
+++ b/gnu/packages/gnunet.scm
@@ -6,6 +6,7 @@
;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2016 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2016, 2017 ng0 <ng0@n0.is>
+;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -197,6 +198,7 @@ authentication and support for SSL3 and TLS.")
"doc")) ; 1.5 MiB of man3 pages
(inputs `(("gnutls" ,gnutls/dane)
("libidn" ,libidn)
+ ("nghttp2" ,nghttp2 "lib")
("zlib" ,zlib)))
(native-inputs
`(("libtool" ,libtool)
--
2.15.0
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 248 bytes --]
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [bug#29738] Next core-updates cycle
2018-01-05 0:54 ` Tobias Geerinckx-Rice
2018-01-05 1:59 ` Tobias Geerinckx-Rice
@ 2018-01-06 18:59 ` Leo Famulari
2018-01-06 19:03 ` Mark Meyer
2018-01-06 21:23 ` Tobias Geerinckx-Rice
1 sibling, 2 replies; 12+ messages in thread
From: Leo Famulari @ 2018-01-06 18:59 UTC (permalink / raw)
To: Tobias Geerinckx-Rice; +Cc: 29738, mark
[-- Attachment #1: Type: text/plain, Size: 920 bytes --]
On Fri, Jan 05, 2018 at 01:54:02AM +0100, Tobias Geerinckx-Rice wrote:
> So this week I decided to finally get my local h2 branch into shape (I'd
> started it in November, but life gets in the way) and send it in. I'd
> somehow missed Mark's original message in the meantime. I apologise;
> duplicated work really sucks.
No worries!
> Now... I'm going to gingerly attach my version anyway, since it makes a
> few different choices. And I spent too much time on that description,
> damn it! :-)
>
> Most importantly, this builds the entire nghttp2 package, not only the
> core library required by curl. The tools that use it aren't just toys or
> examples as in some other packages. I use them regularly.
Okay, this sounds like a more complete package.
Can you keep it yourself for the next core-updates cycle? And I'll
remove Mark's from my branch.
Mark, what do you think of Tobias's patch?
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* [bug#29738] Next core-updates cycle
2018-01-06 18:59 ` Leo Famulari
@ 2018-01-06 19:03 ` Mark Meyer
2018-01-06 21:23 ` Tobias Geerinckx-Rice
1 sibling, 0 replies; 12+ messages in thread
From: Mark Meyer @ 2018-01-06 19:03 UTC (permalink / raw)
To: Leo Famulari, Tobias Geerinckx-Rice; +Cc: 29738
Looks good!
Thanks for the work.
Cheers, Mark
On Sat, Jan 6, 2018, at 19:59, Leo Famulari wrote:
> On Fri, Jan 05, 2018 at 01:54:02AM +0100, Tobias Geerinckx-Rice wrote:
> > So this week I decided to finally get my local h2 branch into shape (I'd
> > started it in November, but life gets in the way) and send it in. I'd
> > somehow missed Mark's original message in the meantime. I apologise;
> > duplicated work really sucks.
>
> No worries!
>
> > Now... I'm going to gingerly attach my version anyway, since it makes a
> > few different choices. And I spent too much time on that description,
> > damn it! :-)
> >
> > Most importantly, this builds the entire nghttp2 package, not only the
> > core library required by curl. The tools that use it aren't just toys or
> > examples as in some other packages. I use them regularly.
>
> Okay, this sounds like a more complete package.
>
> Can you keep it yourself for the next core-updates cycle? And I'll
> remove Mark's from my branch.
>
> Mark, what do you think of Tobias's patch?
> Email had 1 attachment:
> + signature.asc
> 1k (application/pgp-signature)
--
Mark Meyer
mark@ofosos.org
^ permalink raw reply [flat|nested] 12+ messages in thread
* [bug#29738] Next core-updates cycle
2018-01-06 18:59 ` Leo Famulari
2018-01-06 19:03 ` Mark Meyer
@ 2018-01-06 21:23 ` Tobias Geerinckx-Rice
1 sibling, 0 replies; 12+ messages in thread
From: Tobias Geerinckx-Rice @ 2018-01-06 21:23 UTC (permalink / raw)
To: leo; +Cc: 29738, mark
[-- Attachment #1.1: Type: text/plain, Size: 659 bytes --]
Mark, Leo,
Leo Famulari wrote on 06/01/18 at 19:59:
> On Fri, Jan 05, 2018 at 01:54:02AM +0100, Tobias Geerinckx-Rice wrote:
>> Most importantly, this builds the entire nghttp2 package, not only the
>> core library required by curl. The tools that use it aren't just toys or
>> examples as in some other packages. I use them regularly.
>
> Okay, this sounds like a more complete package.
>
> Can you keep it yourself for the next core-updates cycle? And I'll
> remove Mark's from my branch.
OK. I'll push nghttp2 and the gnurl patch to master in a few days, and
keep HTTP/2 curl in my core-updates-next. Thanks!
Kind regards,
T G-R
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 248 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#29738: Add support for HTTP/2 to curl
2017-12-16 18:12 [bug#29738] Add support for HTTP/2 to curl Mark Meyer
` (2 preceding siblings ...)
2018-01-04 17:29 ` [bug#29738] Next core-updates cycle Mark Meyer
@ 2018-03-14 17:17 ` Tobias Geerinckx-Rice
3 siblings, 0 replies; 12+ messages in thread
From: Tobias Geerinckx-Rice @ 2018-03-14 17:17 UTC (permalink / raw)
To: 29738-done
Done: HTTP/2 support is enabled for curl in core-updates now that
nghttp2 has landed there.
Kind regards,
T G-R
Sent from a Web browser. Excuse or enjoy my brevity.
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2018-03-14 17:18 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-16 18:12 [bug#29738] Add support for HTTP/2 to curl Mark Meyer
2017-12-16 18:14 ` [bug#29738] Patch was missing Mark Meyer
2017-12-17 6:31 ` [bug#29738] Add support for HTTP/2 to curl Ricardo Wurmus
2017-12-17 8:35 ` Mark Meyer
2018-01-04 17:29 ` [bug#29738] Next core-updates cycle Mark Meyer
2018-01-04 17:53 ` Leo Famulari
2018-01-05 0:54 ` Tobias Geerinckx-Rice
2018-01-05 1:59 ` Tobias Geerinckx-Rice
2018-01-06 18:59 ` Leo Famulari
2018-01-06 19:03 ` Mark Meyer
2018-01-06 21:23 ` Tobias Geerinckx-Rice
2018-03-14 17:17 ` bug#29738: Add support for HTTP/2 to curl Tobias Geerinckx-Rice
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).