Build applications that make decisions (chatbots, agents, simulations, etc...). Monitor, trace, persist, and execute on your own infrastructure.
Python aiburrchatbot-frameworkdagsgenerative-aigraphshacktoberfestllmopsllmsmlopspersistent-data-structurestate-machinestate-managementvisibility
Emit standard sha512sum format in release checksums (#769)
Jarek Potiuk30c9b3a82398
diff --git a/scripts/README.md b/scripts/README.mdindex 3a07b126..9e874cce 100644--- a/scripts/README.md+++ b/scripts/README.md@@ -129,9 +129,9 @@ gpg --verify apache-burr-${VERSION}-incubating-sdist.tar.gz.asc apache-burr-${VEgpg --verify apache_burr-${VERSION}-py3-none-any.whl.asc apache_burr-${VERSION}-py3-none-any.whl# 3. Verify all SHA512 checksums-echo "$(cat apache-burr-${VERSION}-incubating-src.tar.gz.sha512) apache-burr-${VERSION}-incubating-src.tar.gz" | sha512sum -c --echo "$(cat apache-burr-${VERSION}-incubating-sdist.tar.gz.sha512) apache-burr-${VERSION}-incubating-sdist.tar.gz" | sha512sum -c --echo "$(cat apache_burr-${VERSION}-py3-none-any.whl.sha512) apache_burr-${VERSION}-py3-none-any.whl" | sha512sum -c -+sha512sum -c apache-burr-${VERSION}-incubating-src.tar.gz.sha512+sha512sum -c apache-burr-${VERSION}-incubating-sdist.tar.gz.sha512+sha512sum -c apache_burr-${VERSION}-py3-none-any.whl.sha512# 4. Extract the source archivetar -xzf apache-burr-${VERSION}-incubating-src.tar.gzdiff --git a/scripts/apache_release.py b/scripts/apache_release.pyindex fe6dfb86..678b4cc8 100644--- a/scripts/apache_release.py+++ b/scripts/apache_release.py@@ -246,14 +246,20 @@ def _check_git_working_tree() -> None:def _checksum_artifact(artifact_path: str) -> str:- """Create SHA512 checksum for artifact."""+ """Create SHA512 checksum for artifact in the standard ``sha512sum`` layout.++ The file is written as ``<digest> <filename>\n`` so that voters can verify+ with the standard ``sha512sum -c <file>.sha512`` recipe without having to+ splice the filename in by hand.+ """checksum_path = f"{artifact_path}.sha512"sha512_hash = hashlib.sha512()with open(artifact_path, "rb") as f:while chunk := f.read(65536):sha512_hash.update(chunk)+ artifact_filename = os.path.basename(artifact_path)with open(checksum_path, "w", encoding="utf-8") as f:- f.write(f"{sha512_hash.hexdigest()}\n")+ f.write(f"{sha512_hash.hexdigest()} {artifact_filename}\n")print(f" ✓ Created SHA512 checksum: {checksum_path}")return checksum_path