diff options
| author | Chris Lu <chrislusf@users.noreply.github.com> | 2025-11-19 20:06:57 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-11-19 20:06:57 -0800 |
| commit | c6b6ea40e61b79722e1a539f814933898b9780a7 (patch) | |
| tree | 3b09cd214ed6420881412ba9570122216d8df5bd /docker/get_fdb_checksum.sh | |
| parent | 8be9e258fc7d1110421aaee451945668cafa23e7 (diff) | |
| download | seaweedfs-c6b6ea40e61b79722e1a539f814933898b9780a7.tar.xz seaweedfs-c6b6ea40e61b79722e1a539f814933898b9780a7.zip | |
filer store: add foundationdb (#7178)
* add foundationdb
* Update foundationdb_store.go
* fix
* apply the patch
* avoid panic on error
* address comments
* remove extra data
* address comments
* adds more debug messages
* fix range listing
* delete with prefix range; list with right start key
* fix docker files
* use the more idiomatic FoundationDB KeySelectors
* address comments
* proper errors
* fix API versions
* more efficient
* recursive deletion
* clean up
* clean up
* pagination, one transaction for deletion
* error checking
* Use fdb.Strinc() to compute the lexicographically next string and create a proper range
* fix docker
* Update README.md
* delete in batches
* delete in batches
* fix build
* add foundationdb build
* Updated FoundationDB Version
* Fixed glibc/musl Incompatibility (Alpine → Debian)
* Update container_foundationdb_version.yml
* build SeaweedFS
* build tag
* address comments
* separate transaction
* address comments
* fix build
* empty vs no data
* fixes
* add go test
* Install FoundationDB client libraries
* nil compare
Diffstat (limited to 'docker/get_fdb_checksum.sh')
| -rwxr-xr-x | docker/get_fdb_checksum.sh | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/docker/get_fdb_checksum.sh b/docker/get_fdb_checksum.sh new file mode 100755 index 000000000..73f975528 --- /dev/null +++ b/docker/get_fdb_checksum.sh @@ -0,0 +1,61 @@ +#!/bin/bash +# Helper script to get SHA256 checksum for FoundationDB client package +# Usage: ./get_fdb_checksum.sh <version> [arch] +# Example: ./get_fdb_checksum.sh 7.4.5 amd64 +# Example: ./get_fdb_checksum.sh 7.4.5 arm64 + +set -euo pipefail + +if [ $# -lt 1 ] || [ $# -gt 2 ]; then + echo "Usage: $0 <fdb_version> [arch]" >&2 + echo "Example: $0 7.4.5" >&2 + echo "Example: $0 7.4.5 arm64" >&2 + exit 1 +fi + +FDB_VERSION="$1" +FDB_ARCH="${2:-amd64}" + +case "$FDB_ARCH" in + "amd64") + CANONICAL_ARCH="amd64" + PACKAGE_ARCH="amd64" + ;; + "arm64"|"aarch64") + CANONICAL_ARCH="arm64" + PACKAGE_ARCH="aarch64" + ;; + *) + echo "Error: Architecture must be 'amd64', 'arm64', or 'aarch64'" >&2 + exit 1 + ;; +esac + +PACKAGE="foundationdb-clients_${FDB_VERSION}-1_${PACKAGE_ARCH}.deb" +URL="https://github.com/apple/foundationdb/releases/download/${FDB_VERSION}/${PACKAGE}" + +echo "Downloading FoundationDB ${FDB_VERSION} client package for ${FDB_ARCH}..." +echo "URL: ${URL}" +echo "" + +# Download to temp directory +TEMP_DIR=$(mktemp -d) +trap 'rm -rf "${TEMP_DIR}"' EXIT + +cd "${TEMP_DIR}" +if wget --timeout=30 --tries=3 -q "${URL}"; then + CHECKSUM=$(sha256sum "${PACKAGE}" | awk '{print $1}') + echo "✓ Download successful" + echo "" + echo "SHA256 Checksum:" + echo "${CHECKSUM}" + echo "" + echo "Add this to Dockerfile.foundationdb_large:" + echo " \"${FDB_VERSION}_${CANONICAL_ARCH}\") \\" + echo " EXPECTED_SHA256=\"${CHECKSUM}\" ;; \\" +else + echo "✗ Failed to download package from ${URL}" >&2 + echo "Please verify the version number, architecture, and URL" >&2 + exit 1 +fi + |
