unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Tobias Geerinckx-Rice <me@tobias.gr>
Cc: 29738@debbugs.gnu.org
Subject: [bug#29738] Next core-updates cycle
Date: Fri, 5 Jan 2018 02:59:16 +0100	[thread overview]
Message-ID: <373f605e-100b-5c3c-9bf8-adef4f6b19ac@tobias.gr> (raw)
In-Reply-To: <698050b4-f9ca-ad78-e5e3-e69996911c23@tobias.gr>


[-- 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 --]

  reply	other threads:[~2018-01-05  1:57 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=373f605e-100b-5c3c-9bf8-adef4f6b19ac@tobias.gr \
    --to=me@tobias.gr \
    --cc=29738@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).