SeaweedFS Alpine Package
Local Alpine packaging for SeaweedFS 4.31. The workflow runs Alpine tooling
inside Docker and writes signed packages under packages/local/<arch>/.
Commands
mise run apk:build
mise run apk:build-all
mise run apk:build-x86_64
mise run apk:build-aarch64
mise run apk:update-generated
mise run apk:checksum
mise run apk:lint
mise run apk:packages
mise run apk:smoke
mise run apk:test-shell
mise run apk:publish-check
mise run apk:shell
mise run apk:clean
apk:build targets x86_64 by default. Multi-arch builds target x86_64 and
aarch64; override with ALPINE_ARCHES when needed:
ALPINE_ARCHES="x86_64 aarch64" mise run apk:build-all
The release binary is also exposed as a mise HTTP tool stub:
./bin/weed version
Package Layout
packaging/alpine/local/seaweedfs/APKBUILD
packaging/alpine/local/seaweedfs/*.toml
packaging/alpine/local/seaweedfs/example-*.toml
packaging/alpine/local/seaweedfs/weed.bash-completion
packaging/alpine/local/seaweedfs/seaweedfs.*.confd
packaging/alpine/local/seaweedfs/seaweedfs.initd
packages/local/<arch>/
The package repackages upstream release tarballs, so builds use
ALPINE_BUILD_PLATFORM=linux/amd64 by default. Signing keys and distfiles are
cached in .cache/abuild/ and .cache/apk-distfiles/.
Test And Publish
mise run apk:smoke
mise run apk:test-shell
mise run apk:publish-check
apk:publish-check runs APKBUILD linting, rebuilds configured architectures,
lists package metadata, and installs the built packages in an Alpine container.
apk:test-shell builds the selected architecture, installs the local package
set in an Alpine container, and opens a shell. Use SKIP_BUILD=1 to reuse an
existing local repository. Set TEST_SHELL_TIMEOUT to adjust the timeout for
apk update and apk add inside the test container.
Install from the local repo with the base package plus the role-specific OpenRC subpackage you need:
apk add seaweedfs seaweedfs-master-openrc
Optional generated material is split out:
apk add seaweedfs-doc
apk add bash-completion seaweedfs-bash-completion
The doc split installs upstream scaffolds under
/usr/share/doc/seaweedfs/examples/. The bash completion split installs
/usr/share/bash-completion/completions/weed and is also selected by
install_if when seaweedfs and bash-completion are installed together.
This repository publishes seaweedfs, matching Alpine aports. Remove Alpine's
old generic OpenRC package before installing a role split:
apk del seaweedfs-openrc
apk add seaweedfs seaweedfs-master-openrc
The OpenRC subpackages are:
seaweedfs-master-openrc -> seaweedfs.master
seaweedfs-volume-openrc -> seaweedfs.volume
seaweedfs-filer-openrc -> seaweedfs.filer
seaweedfs-s3-openrc -> seaweedfs.s3
seaweedfs-webdav-openrc -> seaweedfs.webdav
seaweedfs-sftp-openrc -> seaweedfs.sftp
seaweedfs-admin-openrc -> seaweedfs.admin
seaweedfs-worker-openrc -> seaweedfs.worker
Each service has defaults in /etc/conf.d/seaweedfs.*. Enable only the roles
needed on the node:
rc-update add seaweedfs.master default
rc-service seaweedfs.master start
If the repo key is missing on a target system, copy .cache/abuild/*.rsa.pub
into /etc/apk/keys/ before apk update.
Alpine Package Dos And Don'ts
Do:
- Keep local
sourcefiles next to theAPKBUILD. - Put full upstream scaffolds in
/usr/share/doc/seaweedfs/examples/, not active/etc. - Run
mise run apk:update-generatedwhen updating generated examples or completions. - Run
mise run apk:checksumafter changing any package source file. - Increment
pkgrelfor package-only changes; reset it whenpkgverchanges. - Keep installed defaults short and production-neutral.
- Run
mise run apk:publish-checkbefore handing off a repository.
Don't:
- Edit generated
src/,pkg/, orpackages/output. - Hand-edit checksum lines when
abuild checksumcan do it. - Bundle long upstream examples as active
/etcdefaults. - Install all OpenRC roles on a node by default.