From c21c3b0befeb46a51b6bf3758ffa30813bea0ff0 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 9 Mar 2024 14:19:22 +0100 Subject: Adding upstream version 1.44.3. Signed-off-by: Daniel Baumann --- .../packaging/tools/gh-release-checksums.py | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100755 fluent-bit/lib/librdkafka-2.1.0/packaging/tools/gh-release-checksums.py (limited to 'fluent-bit/lib/librdkafka-2.1.0/packaging/tools/gh-release-checksums.py') diff --git a/fluent-bit/lib/librdkafka-2.1.0/packaging/tools/gh-release-checksums.py b/fluent-bit/lib/librdkafka-2.1.0/packaging/tools/gh-release-checksums.py new file mode 100755 index 000000000..e7259dc20 --- /dev/null +++ b/fluent-bit/lib/librdkafka-2.1.0/packaging/tools/gh-release-checksums.py @@ -0,0 +1,39 @@ +#!/usr/bin/env python3 +# +# Calculate checksums for GitHub release artifacts/assets. +# +# Use the direct links rather than getting the tarball URLs from +# the GitHub API since the latter uses the git-sha1 rather than the tag +# in its zipped up content, causing checksum mismatches. +# + +import sys +import requests +import hashlib + + +if __name__ == '__main__': + + if len(sys.argv) != 2: + print("Usage: {} ".format(sys.argv[0])) + sys.exit(1) + + tag = sys.argv[1] + + print("## Checksums") + print("Release asset checksums:") + + for ftype in ["zip", "tar.gz"]: + url = "https://github.com/edenhill/librdkafka/archive/{}.{}".format( + tag, ftype) + + h = hashlib.sha256() + + r = requests.get(url, stream=True) + while True: + buf = r.raw.read(100 * 1000) + if len(buf) == 0: + break + h.update(buf) + + print(" * {}.{} SHA256 `{}`".format(tag, ftype, h.hexdigest())) -- cgit v1.2.3