From a384dd42ffb1c9123f589981ae4c2b72fd605d65 Mon Sep 17 00:00:00 2001 From: Marco Ippolito Date: Tue, 21 Feb 2023 18:45:10 +0100 Subject: [PATCH] doc: maintaining nghttp2 PR-URL: https://github.com/nodejs/node/pull/46539 Reviewed-By: Michael Dawson Reviewed-By: Luigi Pinca Reviewed-By: Paolo Insogna Reviewed-By: Rafael Gonzaga --- doc/contributing/maintaining-http.md | 9 ++--- doc/contributing/maintaining-nghttp2.md | 46 +++++++++++++++++++++++++ 2 files changed, 48 insertions(+), 7 deletions(-) create mode 100644 doc/contributing/maintaining-nghttp2.md diff --git a/doc/contributing/maintaining-http.md b/doc/contributing/maintaining-http.md index a0a2316844c1dd..dab06fdc6ed84a 100644 --- a/doc/contributing/maintaining-http.md +++ b/doc/contributing/maintaining-http.md @@ -113,11 +113,6 @@ directory and C++ code in the The low-level implementation of [HTTP2](https://nodejs.org/docs/latest/api/http2.html) -is based on [nghttp2](https://nghttp2.org/). Updates are pulled into Node.js -under [deps/nghttp2](https://github.com/nodejs/node/tree/HEAD/deps/nghttp2) -as needed. +is based on [nghttp2](https://nghttp2.org/). See [maintaining nghttp2][]. -The low-level implementation is made available in the Node.js API through -JavaScript code in the [lib](https://github.com/nodejs/node/tree/HEAD/lib) -directory and C++ code in the -[src](https://github.com/nodejs/node/tree/HEAD/src) directory. +[maintaining nghttp2]: ./maintaining-nghttp2.md diff --git a/doc/contributing/maintaining-nghttp2.md b/doc/contributing/maintaining-nghttp2.md new file mode 100644 index 00000000000000..e75240f107aa35 --- /dev/null +++ b/doc/contributing/maintaining-nghttp2.md @@ -0,0 +1,46 @@ +# Maintaining nghttp2 in Node.js + +The low-level implementation of +[HTTP2](https://nodejs.org/docs/latest/api/http2.html) +is based on [nghttp2](https://nghttp2.org/). Updates are pulled into Node.js +under [deps/nghttp2](https://github.com/nodejs/node/tree/HEAD/deps/nghttp2) +as needed. + +The low-level implementation is made available in the Node.js API through +JavaScript code in the [lib](https://github.com/nodejs/node/tree/HEAD/lib) +directory and C++ code in the +[src](https://github.com/nodejs/node/tree/HEAD/src) directory. + +## Step 1: Updating nghttp2 + +The `tools/update-nghttp2.sh` script automates the update of the +postject source files. + +In the following examples, `x.y.z` should match the nghttp2 +version to update to. + +```console +$ ./tools/update-nghttp2.sh x.y.z +``` + +## Step 2: Test the build + +```console +$ make test-http2 +``` + +## Step 3: Commit new nghttp2 + +```console +$ git add -A deps/nghttp2 +$ git commit -m "deps: upgrade nghttp2 to x.y.z" +``` + +## Step 4: Update licenses + +```console +$ ./tools/license-builder.sh +# The following commands are only necessary if there are changes +$ git add . +$ git commit -m "doc: update nghttp2 LICENSE using license-builder.sh" +```