From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36712) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eXGEv-0004DU-Ly for guix-patches@gnu.org; Thu, 04 Jan 2018 19:52:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eXGEs-00030x-D9 for guix-patches@gnu.org; Thu, 04 Jan 2018 19:52:05 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:55705) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eXGEr-0002zr-VW for guix-patches@gnu.org; Thu, 04 Jan 2018 19:52:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eXGEr-0001WF-Od for guix-patches@gnu.org; Thu, 04 Jan 2018 19:52:01 -0500 Subject: [bug#29738] Next core-updates cycle Resent-Message-ID: References: <1513447932.2411366.1207257248.22729BA6@webmail.messagingengine.com> <1515086998.2756923.1224339632.1E6AD813@webmail.messagingengine.com> <20180104175333.GA8633@jasmine.lan> From: Tobias Geerinckx-Rice Message-ID: <698050b4-f9ca-ad78-e5e3-e69996911c23@tobias.gr> Date: Fri, 5 Jan 2018 01:54:02 +0100 MIME-Version: 1.0 In-Reply-To: <20180104175333.GA8633@jasmine.lan> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="F99tl8A4s2CbO36DSwvGKQwHa9GNR05IF" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: leo@famulari.name, mark@ofosos.org Cc: 29738@debbugs.gnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --F99tl8A4s2CbO36DSwvGKQwHa9GNR05IF Content-Type: multipart/mixed; boundary="MCpL8emcWceDDHTz73eCsDocfYqJo4heK"; protected-headers="v1" From: Tobias Geerinckx-Rice To: leo@famulari.name, mark@ofosos.org Cc: 29738@debbugs.gnu.org Message-ID: <698050b4-f9ca-ad78-e5e3-e69996911c23@tobias.gr> Subject: Re: [bug#29738] Next core-updates cycle References: <1513447932.2411366.1207257248.22729BA6@webmail.messagingengine.com> <1515086998.2756923.1224339632.1E6AD813@webmail.messagingengine.com> <20180104175333.GA8633@jasmine.lan> In-Reply-To: <20180104175333.GA8633@jasmine.lan> --MCpL8emcWceDDHTz73eCsDocfYqJo4heK Content-Type: multipart/mixed; boundary="------------C4FCCB0A45800109BB8ACDB3" Content-Language: en-GB This is a multi-part message in MIME format. --------------C4FCCB0A45800109BB8ACDB3 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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? >=20 > 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 --------------C4FCCB0A45800109BB8ACDB3 Content-Type: text/x-patch; name="0001-gnu-Add-nghttp2.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="0001-gnu-Add-nghttp2.patch" =46rom 8a675465f0456f08d86a3d25dc8ec442d727dc2a Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice 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 =E2=80=98--enable-lib-= only=E2=80=99). + `(("c-ares" ,c-ares) + ("jansson" ,jansson) ; for HPACK tools + ("jemalloc" ,jemalloc) ; fight nghttpd{,x} heap fragmen= tation + ("libev" ,libev) + ("libxml2" ,libxml2) ; for =E2=80=98nghttp -a=E2=80=99= + ("openssl" ,openssl))) + (arguments + `(#:configure-flags + (list (string-append "--libdir=3D" (assoc-ref %outputs "lib") "/l= ib") + "--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 =E2=80= =98out=E2=80=99 output, + ;; which is not allowed. Break this cycle. While we could i= nstall + ;; only the library to =E2=80=98out=E2=80=99 and move everyth= ing else to a separate + ;; output, this would inconvenience the majority of (human) u= sers. + (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 too= ls built +on top of it: + +@enumerate +@item @command{nghttp}, a command-line HTTP/2 client. It exposes many a= dvanced +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 tha= t 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 f= or +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 fiel= ds to +compressed JSON header blocks. +@item @command{inflatehd} converts such compressed headers back to JSON = pairs. +@end enumerate\n") + (license l:expat))) --=20 2.15.0 --------------C4FCCB0A45800109BB8ACDB3-- --MCpL8emcWceDDHTz73eCsDocfYqJo4heK-- --F99tl8A4s2CbO36DSwvGKQwHa9GNR05IF Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iIMEARYKACsWIQT12iAyS4c9C3o4dnINsP+IT1VteQUCWk7Mqw0cbWVAdG9iaWFz LmdyAAoJEA2w/4hPVW15JW8BAJHD9JGehjEDz/8oKHfCBegyoNDtEI5y6Sv4pfwh LalZAQCwYdDhXMknXrVwemUW2ZcqFdU6AW0o2rtZYHybf0k4CQ== =Jay0 -----END PGP SIGNATURE----- --F99tl8A4s2CbO36DSwvGKQwHa9GNR05IF--