Add SeaweedFS Alpine package build

This commit is contained in:
Joachim Schlöffel
2026-06-07 14:30:21 +02:00
commit ca2db8e206
29 changed files with 1578 additions and 0 deletions

30
scripts/apk/smoke.sh Executable file
View File

@@ -0,0 +1,30 @@
#!/usr/bin/env bash
set -euo pipefail
repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
alpine_version="${ALPINE_VERSION:-3.22}"
platform="${ALPINE_BUILD_PLATFORM:-linux/amd64}"
arch="${ALPINE_ARCH:-x86_64}"
packages="${SMOKE_PACKAGES:-seaweedfs seaweedfs-master-openrc seaweedfs-filer-openrc seaweedfs-worker-openrc}"
if [[ ! -d "${repo_root}/packages/local/${arch}" ]]; then
printf 'missing local repository: packages/local/%s\n' "${arch}" >&2
printf 'run: mise run apk:build-all\n' >&2
exit 1
fi
docker run --rm --platform "${platform}" \
-v "${repo_root}/packages/local:/repo:ro" \
"alpine:${alpine_version}" \
sh -lc "
set -e
cp /repo/${arch}/*.rsa.pub /etc/apk/keys/
echo /repo >> /etc/apk/repositories
apk update >/dev/null
apk add ${packages} >/dev/null
weed version
ls -1 /etc/seaweedfs
if ls /etc/init.d/seaweedfs.* >/dev/null 2>&1; then
ls -1 /etc/init.d/seaweedfs.* | sort
fi
"