2026-06-07 21:37:27 +02:00
2026-06-07 14:30:21 +02:00
2026-06-07 14:30:21 +02:00
2026-06-07 21:37:27 +02:00
2026-06-07 21:37:27 +02:00

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: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:publish-check

apk:publish-check runs APKBUILD linting, rebuilds configured architectures, lists package metadata, and installs the built packages in an Alpine 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 source files next to the APKBUILD.
  • Put full upstream scaffolds in /usr/share/doc/seaweedfs/examples/, not active /etc.
  • Run mise run apk:update-generated when updating generated examples or completions.
  • Run mise run apk:checksum after changing any package source file.
  • Increment pkgrel for package-only changes; reset it when pkgver changes.
  • Keep installed defaults short and production-neutral.
  • Run mise run apk:publish-check before handing off a repository.

Don't:

  • Edit generated src/, pkg/, or packages/ output.
  • Hand-edit checksum lines when abuild checksum can do it.
  • Bundle long upstream examples as active /etc defaults.
  • Install all OpenRC roles on a node by default.
Description
No description provided
Readme 179 KiB
Languages
Shell 97.6%
Dockerfile 2.4%