GeezerVison is showing github.com — tools: log and verify sha256sum · nodejs/node@801573b
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: tools/dep_updaters/update-ada.sh +5-1Lines changed: 5 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -7,6 +7,9 @@ DEPS_DIR="$BASE_DIR/deps" | 7 | 7 | [ -z "$NODE" ] && NODE="$BASE_DIR/out/Release/node" | 8 | 8 | [ -x "$NODE" ] || NODE=$(command -v node) | 9 | 9 |
| | 10 | +# shellcheck disable=SC1091 | | 11 | +. "$BASE_DIR/tools/dep_updaters/utils.sh" | | 12 | + | 10 | 13 | NEW_VERSION="$("$NODE" --input-type=module <<'EOF' | 11 | 14 | const res = await fetch('https://api.github.com/repos/ada-url/ada/releases/latest'); | 12 | 15 | if (!res.ok) throw new Error(`FetchError: ${res.status} ${res.statusText}`, { cause: res }); | @@ -37,13 +40,14 @@ cleanup () { | 37 | 40 | trap cleanup INT TERM EXIT | 38 | 41 |
| 39 | 42 | ADA_REF="v$NEW_VERSION" | 40 | | -ADA_ZIP="ada-$NEW_VERSION.zip" | | 43 | +ADA_ZIP="ada-$ADA_REF.zip" | 41 | 44 | ADA_LICENSE="LICENSE-MIT" | 42 | 45 |
| 43 | 46 | cd "$WORKSPACE" | 44 | 47 |
| 45 | 48 | echo "Fetching ada source archive..." | 46 | 49 | curl -sL -o "$ADA_ZIP" "https://github.com/ada-url/ada/releases/download/$ADA_REF/singleheader.zip" | | 50 | +log_and_verify_sha256sum "ada" "$ADA_ZIP" | 47 | 51 | unzip "$ADA_ZIP" | 48 | 52 | rm "$ADA_ZIP" | 49 | 53 |
| |
Collapse file Copy file name to clipboardExpand all lines: tools/dep_updaters/update-base64.sh +9-1Lines changed: 9 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -8,6 +8,9 @@ DEPS_DIR="$BASE_DIR/deps" | 8 | 8 | [ -z "$NODE" ] && NODE="$BASE_DIR/out/Release/node" | 9 | 9 | [ -x "$NODE" ] || NODE=$(command -v node) | 10 | 10 |
| | 11 | +# shellcheck disable=SC1091 | | 12 | +. "$BASE_DIR/tools/dep_updaters/utils.sh" | | 13 | + | 11 | 14 | NEW_VERSION="$("$NODE" --input-type=module <<'EOF' | 12 | 15 | const res = await fetch('https://api.github.com/repos/aklomp/base64/releases/latest'); | 13 | 16 | if (!res.ok) throw new Error(`FetchError: ${res.status} ${res.statusText}`, { cause: res }); | @@ -39,8 +42,13 @@ trap cleanup INT TERM EXIT | 39 | 42 |
| 40 | 43 | cd "$WORKSPACE" | 41 | 44 |
| | 45 | +BASE64_TARBALL="base64-v$NEW_VERSION.tar.gz" | | 46 | + | 42 | 47 | echo "Fetching base64 source archive" | 43 | | -curl -sL "https://api.github.com/repos/aklomp/base64/tarball/v$NEW_VERSION" | tar xzf - | | 48 | +curl -sL -o "$BASE64_TARBALL" "https://api.github.com/repos/aklomp/base64/tarball/v$NEW_VERSION" | | 49 | +log_and_verify_sha256sum "base64" "$BASE64_TARBALL" | | 50 | +gzip -dc "$BASE64_TARBALL" | tar xf - | | 51 | +rm "$BASE64_TARBALL" | 44 | 52 | mv aklomp-base64-* base64 | 45 | 53 |
| 46 | 54 | echo "Replacing existing base64" | |
Collapse file Copy file name to clipboardExpand all lines: tools/dep_updaters/update-brotli.sh +6-2Lines changed: 6 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -8,6 +8,9 @@ DEPS_DIR="$BASE_DIR/deps" | 8 | 8 | [ -z "$NODE" ] && NODE="$BASE_DIR/out/Release/node" | 9 | 9 | [ -x "$NODE" ] || NODE=$(command -v node) | 10 | 10 |
| | 11 | +# shellcheck disable=SC1091 | | 12 | +. "$BASE_DIR/tools/dep_updaters/utils.sh" | | 13 | + | 11 | 14 | NEW_VERSION="$("$NODE" --input-type=module <<'EOF' | 12 | 15 | const res = await fetch('https://api.github.com/repos/google/brotli/releases/latest'); | 13 | 16 | if (!res.ok) throw new Error(`FetchError: ${res.status} ${res.statusText}`, { cause: res }); | @@ -44,10 +47,11 @@ trap cleanup INT TERM EXIT | 44 | 47 |
| 45 | 48 | cd "$WORKSPACE" | 46 | 49 |
| 47 | | -BROTLI_TARBALL="v$NEW_VERSION.tar.gz" | | 50 | +BROTLI_TARBALL="brotli-v$NEW_VERSION.tar.gz" | 48 | 51 |
| 49 | 52 | echo "Fetching brotli source archive" | 50 | | -curl -sL -o "$BROTLI_TARBALL" "https://github.com/google/brotli/archive/$BROTLI_TARBALL" | | 53 | +curl -sL -o "$BROTLI_TARBALL" "https://github.com/google/brotli/archive/v$NEW_VERSION.tar.gz" | | 54 | +log_and_verify_sha256sum "brotli" "$BROTLI_TARBALL" | 51 | 55 | gzip -dc "$BROTLI_TARBALL" | tar xf - | 52 | 56 | rm "$BROTLI_TARBALL" | 53 | 57 | mv "brotli-$NEW_VERSION" "brotli" | |
Collapse file Copy file name to clipboardExpand all lines: tools/dep_updaters/update-c-ares.sh +7-1Lines changed: 7 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -8,6 +8,9 @@ DEPS_DIR="$BASE_DIR/deps" | 8 | 8 | [ -z "$NODE" ] && NODE="$BASE_DIR/out/Release/node" | 9 | 9 | [ -x "$NODE" ] || NODE=$(command -v node) | 10 | 10 |
| | 11 | +# shellcheck disable=SC1091 | | 12 | +. "$BASE_DIR/tools/dep_updaters/utils.sh" | | 13 | + | 11 | 14 | NEW_VERSION="$("$NODE" --input-type=module <<'EOF' | 12 | 15 | const res = await fetch('https://api.github.com/repos/c-ares/c-ares/releases/latest'); | 13 | 16 | if (!res.ok) throw new Error(`FetchError: ${res.status} ${res.statusText}`, { cause: res }); | @@ -43,7 +46,10 @@ ARES_TARBALL="c-ares-$NEW_VERSION.tar.gz" | 43 | 46 | cd "$WORKSPACE" | 44 | 47 |
| 45 | 48 | echo "Fetching c-ares source archive" | 46 | | -curl -sL "https://github.com/c-ares/c-ares/releases/download/$ARES_REF/$ARES_TARBALL" | tar xz | | 49 | +curl -sL -o "$ARES_TARBALL" "https://github.com/c-ares/c-ares/releases/download/$ARES_REF/$ARES_TARBALL" | | 50 | +log_and_verify_sha256sum "c-ares" "$ARES_TARBALL" | | 51 | +gzip -dc "$ARES_TARBALL" | tar xf - | | 52 | +rm "$ARES_TARBALL" | 47 | 53 | mv "c-ares-$NEW_VERSION" cares | 48 | 54 |
| 49 | 55 | echo "Removing tests" | |
Collapse file Copy file name to clipboardExpand all lines: tools/dep_updaters/update-libuv.sh +9-1Lines changed: 9 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -7,6 +7,9 @@ DEPS_DIR="$BASE_DIR/deps" | 7 | 7 | [ -z "$NODE" ] && NODE="$BASE_DIR/out/Release/node" | 8 | 8 | [ -x "$NODE" ] || NODE=$(command -v node) | 9 | 9 |
| | 10 | +# shellcheck disable=SC1091 | | 11 | +. "$BASE_DIR/tools/dep_updaters/utils.sh" | | 12 | + | 10 | 13 | NEW_VERSION="$("$NODE" --input-type=module <<'EOF' | 11 | 14 | const res = await fetch('https://api.github.com/repos/libuv/libuv/releases/latest'); | 12 | 15 | if (!res.ok) throw new Error(`FetchError: ${res.status} ${res.statusText}`, { cause: res }); | @@ -45,8 +48,13 @@ trap cleanup INT TERM EXIT | 45 | 48 |
| 46 | 49 | cd "$WORKSPACE" | 47 | 50 |
| | 51 | +LIBUV_TARBALL="libuv-v$NEW_VERSION.tar.gz" | | 52 | + | 48 | 53 | echo "Fetching libuv source archive..." | 49 | | -curl -sL "https://api.github.com/repos/libuv/libuv/tarball/v$NEW_VERSION" | tar xzf - | | 54 | +curl -sL -o "$LIBUV_TARBALL" "https://api.github.com/repos/libuv/libuv/tarball/v$NEW_VERSION" | | 55 | +log_and_verify_sha256sum "libuv" "$LIBUV_TARBALL" | | 56 | +gzip -dc "$LIBUV_TARBALL" | tar xf - | | 57 | +rm "$LIBUV_TARBALL" | 50 | 58 | mv libuv-libuv-* uv | 51 | 59 |
| 52 | 60 | echo "Replacing existing libuv (except GYP build files)" | |
Collapse file Copy file name to clipboardExpand all lines: tools/dep_updaters/update-llhttp.sh +9-5Lines changed: 9 additions & 5 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -9,6 +9,9 @@ DEPS_DIR="${BASE_DIR}/deps" | 9 | 9 | [ -z "$NODE" ] && NODE="$BASE_DIR/out/Release/node" | 10 | 10 | [ -x "$NODE" ] || NODE=$(command -v node) | 11 | 11 |
| | 12 | +# shellcheck disable=SC1091 | | 13 | +. "$BASE_DIR/tools/dep_updaters/utils.sh" | | 14 | + | 12 | 15 | NEW_VERSION="$("$NODE" --input-type=module <<'EOF' | 13 | 16 | const res = await fetch('https://api.github.com/repos/nodejs/llhttp/releases/latest'); | 14 | 17 | if (!res.ok) throw new Error(`FetchError: ${res.status} ${res.statusText}`, { cause: res }); | @@ -52,19 +55,20 @@ if echo "$NEW_VERSION" | grep -qs "/" ; then # Download a release | 52 | 55 | echo "Checking out branch $BRANCH ..." | 53 | 56 | git checkout "$BRANCH" | 54 | 57 |
| 55 | | - echo "Building llhtttp ..." | | 58 | + echo "Building llhttp ..." | 56 | 59 | npm install | 57 | 60 | make release | 58 | 61 |
| 59 | | - echo "Copying llhtttp release ..." | | 62 | + echo "Copying llhttp release ..." | 60 | 63 | rm -rf "$DEPS_DIR/llhttp" | 61 | 64 | cp -a release "$DEPS_DIR/llhttp" | 62 | 65 | else | 63 | 66 | echo "Download llhttp release $NEW_VERSION ..." | 64 | | - curl -sL -o llhttp.tar.gz "https://github.com/nodejs/llhttp/archive/refs/tags/release/v$NEW_VERSION.tar.gz" | 65 | | - gzip -dc llhttp.tar.gz | tar xf - | | 67 | + LLHTTP_TARBALL="llhttp-v$NEW_VERSION.tar.gz" | | 68 | + curl -sL -o "$LLHTTP_TARBALL" "https://github.com/nodejs/llhttp/archive/refs/tags/release/v$NEW_VERSION.tar.gz" | | 69 | + gzip -dc "$LLHTTP_TARBALL" | tar xf - | 66 | 70 |
| 67 | | - echo "Copying llhtttp release ..." | | 71 | + echo "Copying llhttp release ..." | 68 | 72 | rm -rf "$DEPS_DIR/llhttp" | 69 | 73 | cp -a "llhttp-release-v$NEW_VERSION" "$DEPS_DIR/llhttp" | 70 | 74 | fi | |
Collapse file Copy file name to clipboardExpand all lines: tools/dep_updaters/update-nghttp2.sh +8Lines changed: 8 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -8,6 +8,9 @@ DEPS_DIR="$BASE_DIR/deps" | 8 | 8 | [ -z "$NODE" ] && NODE="$BASE_DIR/out/Release/node" | 9 | 9 | [ -x "$NODE" ] || NODE=$(command -v node) | 10 | 10 |
| | 11 | +# shellcheck disable=SC1091 | | 12 | +. "$BASE_DIR/tools/dep_updaters/utils.sh" | | 13 | + | 11 | 14 | NEW_VERSION="$("$NODE" --input-type=module <<'EOF' | 12 | 15 | const res = await fetch('https://api.github.com/repos/nghttp2/nghttp2/releases/latest'); | 13 | 16 | if (!res.ok) throw new Error(`FetchError: ${res.status} ${res.statusText}`, { cause: res }); | @@ -44,6 +47,11 @@ cd "$WORKSPACE" | 44 | 47 |
| 45 | 48 | echo "Fetching nghttp2 source archive" | 46 | 49 | curl -sL -o "$NGHTTP2_TARBALL" "https://github.com/nghttp2/nghttp2/releases/download/$NGHTTP2_REF/$NGHTTP2_TARBALL" | | 50 | + | | 51 | +DEPOSITED_CHECKSUM=$(curl -sL "https://github.com/nghttp2/nghttp2/releases/download/$NGHTTP2_REF/checksums.txt" | grep "$NGHTTP2_TARBALL") | | 52 | + | | 53 | +log_and_verify_sha256sum "nghttp2" "$NGHTTP2_TARBALL" "$DEPOSITED_CHECKSUM" | | 54 | + | 47 | 55 | gzip -dc "$NGHTTP2_TARBALL" | tar xf - | 48 | 56 | rm "$NGHTTP2_TARBALL" | 49 | 57 | mv "nghttp2-$NEW_VERSION" nghttp2 | |
Collapse file Copy file name to clipboardExpand all lines: tools/dep_updaters/update-nghttp3.sh +4Lines changed: 4 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -7,6 +7,9 @@ DEPS_DIR="$BASE_DIR/deps" | 7 | 7 | [ -z "$NODE" ] && NODE="$BASE_DIR/out/Release/node" | 8 | 8 | [ -x "$NODE" ] || NODE=$(command -v node) | 9 | 9 |
| | 10 | +# shellcheck disable=SC1091 | | 11 | +. "$BASE_DIR/tools/dep_updaters/utils.sh" | | 12 | + | 10 | 13 | NEW_VERSION="$("$NODE" --input-type=module <<'EOF' | 11 | 14 | const res = await fetch('https://api.github.com/repos/ngtcp2/nghttp3/releases'); | 12 | 15 | if (!res.ok) throw new Error(`FetchError: ${res.status} ${res.statusText}`, { cause: res }); | @@ -44,6 +47,7 @@ cd "$WORKSPACE" | 44 | 47 |
| 45 | 48 | echo "Fetching nghttp3 source archive..." | 46 | 49 | curl -sL -o "$NGHTTP3_ZIP.zip" "https://github.com/ngtcp2/nghttp3/archive/refs/tags/$NGHTTP3_REF.zip" | | 50 | +log_and_verify_sha256sum "nghttp3" "$NGHTTP3_ZIP.zip" | 47 | 51 | unzip "$NGHTTP3_ZIP.zip" | 48 | 52 | rm "$NGHTTP3_ZIP.zip" | 49 | 53 | mv "$NGHTTP3_ZIP" nghttp3 | |
Collapse file Copy file name to clipboardExpand all lines: tools/dep_updaters/update-ngtcp2.sh +4Lines changed: 4 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -7,6 +7,9 @@ DEPS_DIR="$BASE_DIR/deps" | 7 | 7 | [ -z "$NODE" ] && NODE="$BASE_DIR/out/Release/node" | 8 | 8 | [ -x "$NODE" ] || NODE=$(command -v node) | 9 | 9 |
| | 10 | +# shellcheck disable=SC1091 | | 11 | +. "$BASE_DIR/tools/dep_updaters/utils.sh" | | 12 | + | 10 | 13 | NEW_VERSION="$("$NODE" --input-type=module <<'EOF' | 11 | 14 | const res = await fetch('https://api.github.com/repos/ngtcp2/ngtcp2/releases'); | 12 | 15 | if (!res.ok) throw new Error(`FetchError: ${res.status} ${res.statusText}`, { cause: res }); | @@ -44,6 +47,7 @@ cd "$WORKSPACE" | 44 | 47 |
| 45 | 48 | echo "Fetching ngtcp2 source archive..." | 46 | 49 | curl -sL -o "$NGTCP2_ZIP.zip" "https://github.com/ngtcp2/ngtcp2/archive/refs/tags/$NGTCP2_REF.zip" | | 50 | +log_and_verify_sha256sum "ngtcp2" "$NGTCP2_ZIP.zip" | 47 | 51 | unzip "$NGTCP2_ZIP.zip" | 48 | 52 | rm "$NGTCP2_ZIP.zip" | 49 | 53 | mv "$NGTCP2_ZIP" ngtcp2 | |
Collapse file Copy file name to clipboardExpand all lines: tools/dep_updaters/update-npm.sh +6-1Lines changed: 6 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -7,6 +7,9 @@ DEPS_DIR="$BASE_DIR/deps" | 7 | 7 | [ -z "$NODE" ] && NODE="$BASE_DIR/out/Release/node" | 8 | 8 | [ -x "$NODE" ] || NODE=$(command -v node) | 9 | 9 |
| | 10 | +# shellcheck disable=SC1091 | | 11 | +. "$BASE_DIR/tools/dep_updaters/utils.sh" | | 12 | + | 10 | 13 | NPM="$DEPS_DIR/npm/bin/npm-cli.js" | 11 | 14 |
| 12 | 15 | NPM_VERSION=$1 | @@ -30,12 +33,14 @@ trap cleanup INT TERM EXIT | 30 | 33 |
| 31 | 34 | cd "$WORKSPACE" | 32 | 35 |
| 33 | | -NPM_TGZ=npm.tgz | | 36 | +NPM_TGZ="npm-v$NPM_VERSION.tar.gz" | 34 | 37 |
| 35 | 38 | NPM_TARBALL="$($NODE "$NPM" view npm@"$NPM_VERSION" dist.tarball)" | 36 | 39 |
| 37 | 40 | curl -s "$NPM_TARBALL" > "$NPM_TGZ" | 38 | 41 |
| | 42 | +log_and_verify_sha256sum "npm" "$NPM_TGZ" | | 43 | + | 39 | 44 | rm -rf "$DEPS_DIR/npm" | 40 | 45 |
| 41 | 46 | mkdir "$DEPS_DIR/npm" | |
|