Files
alpine-packages/README.md
T
Joachim Schlöffel 7ec03eeada
Build Alpine Packages / build-and-publish (v3.23, 3.23) (pull_request) Successful in 28m12s
Build Alpine Packages / build-and-publish (v3.24, 3.24) (pull_request) Successful in 28m5s
Add Gitea 1.26.4 Alpine package
2026-07-08 15:11:06 +02:00

5.9 KiB

Alpine Packages

Alpine stable packaging for internal packages.

https://code.factoring.digital/api/packages/public/alpine/v3.23/alpine-packages
https://code.factoring.digital/api/packages/public/alpine/v3.24/alpine-packages

Available Packages

Use In Production

Add The Package Repository

Install the registry key:

cd /etc/apk/keys
curl -fsSLOJ https://code.factoring.digital/api/packages/public/alpine/key

Add the repository for the node's Alpine branch:

printf '%s\n' \
  'https://code.factoring.digital/api/packages/public/alpine/v3.24/alpine-packages' \
  >> /etc/apk/repositories

apk update

Private registry URL format:

https://<user>:<token>@code.factoring.digital/api/packages/public/alpine/v3.24/alpine-packages

Contribution

Package Layout

Package sources live under:

packaging/alpine/local/<pkgname>/

Currently packaged:

seaweedfs    SeaweedFS 4.31 release binary and OpenRC role splits
greptimedb   GreptimeDB 1.1.2 built from source for x86_64
gitea        Gitea 1.26.4 release binary and OpenRC service

Local build output is written under:

packages/local/<arch>/

Signing keys and distfiles are cached under:

.cache/abuild/
.cache/apk-distfiles/

Build Commands

$ mise tasks
Name                  Description
apk:build             Build the Alpine package in Docker for the default architecture
apk:build-aarch64     Build the Alpine package in Docker for aarch64
apk:build-all         Build the Alpine package in Docker for all configured architectures
apk:build-x86_64      Build the Alpine package in Docker for x86_64
apk:checksum          Refresh APKBUILD checksums in Docker
apk:ci-build          Build all configured Alpine packages directly in the current Alpine...
apk:ci-smoke          Install-test built packages directly in the current Alpine environment
apk:clean             Remove generated Alpine package build outputs
apk:lint              Run Alpine APKBUILD lint in Docker
apk:packages          List built Alpine packages and dependencies
apk:publish-check     Run lint, multi-arch build, package listing, and smoke test
apk:publish-gitea     Publish built packages to the Gitea Alpine package registry
apk:shell             Open an Alpine package build shell in Docker
apk:smoke             Install-test built packages from the local repository in Docker
apk:test-install      Test README installation instructions in a fresh Alpine container
apk:test-shell        Open an Alpine shell with the current local package build installed
apk:update-generated  Refresh packaged upstream examples and shell completions
apk:runtime-test      Run package-local Docker runtime tests against the local...
gitea-workflow-build  Run the Gitea build workflow locally through act as a pull_request event

apk:build targets x86_64 by default. Multi-arch builds target x86_64 and aarch64:

ALPINE_ARCHES="x86_64 aarch64" mise run apk:build-all

Limit package selection with ALPINE_PACKAGE or ALPINE_PACKAGES:

ALPINE_PACKAGE=seaweedfs mise run apk:build
ALPINE_PACKAGES="seaweedfs other-package" mise run apk:build-all
ALPINE_PACKAGE=seaweedfs mise run apk:test-install
ALPINE_PACKAGE=greptimedb mise run apk:checksum
ALPINE_PACKAGE=greptimedb mise run apk:build
ALPINE_PACKAGE=greptimedb SKIP_BUILD=1 mise run apk:test-install
ALPINE_PACKAGE=gitea mise run apk:build
ALPINE_PACKAGE=gitea SKIP_BUILD=1 mise run apk:test-install

Override Docker cache scope:

ALPINE_APK_CACHE_SCOPE=public-alpine-packages ALPINE_PACKAGE=greptimedb mise run apk:build
ALPINE_APK_CACHE_PREFIX=alpine-apk-ci ALPINE_PACKAGE=greptimedb mise run apk:build

Open an Alpine test shell:

ALPINE_PACKAGE=seaweedfs mise run apk:shell
mise run apk:test-shell

Run the install test:

mise run apk:test-install

Reuse existing local packages:

SKIP_BUILD=1 mise run apk:test-install
SKIP_BUILD=1 mise run apk:test-shell

Run package-local runtime tests:

mise run apk:runtime-test
ALPINE_PACKAGE=seaweedfs mise run apk:runtime-test
ALPINE_VERSION=3.24 mise run apk:runtime-test

Adding Packages

Package path:

packaging/alpine/local/<pkgname>/

Optional package hooks:

packaging/alpine/local/<pkgname>/scripts/test-install.sh
packaging/alpine/local/<pkgname>/scripts/update-generated-sources.sh
packaging/alpine/local/<pkgname>/scripts/runtime-test.sh

Start from the blueprint:

packaging/alpine/blueprint/

Generated Package Sources

Generated package sources live next to the package APKBUILD:

packaging/alpine/local/seaweedfs/example-*.toml
packaging/alpine/local/seaweedfs/weed.bash-completion

Refresh generated sources:

mise run apk:update-generated
ALPINE_PACKAGE=seaweedfs mise run apk:update-generated
mise run apk:checksum

Gitea Workflow

.gitea/workflows/build.yml builds and publishes v3.23 and v3.24. Pull requests build only.

Repository variables:

INSTANCE_URL=https://code.factoring.digital
PACKAGE_OWNER=public
PACKAGE_NAME=alpine-packages

Repository secrets:

PACKAGE_USER=<gitea package publisher>
PACKAGE_TOKEN=<token with package write access>

Check the workflow locally:

mise run gitea-workflow-build

Publish local packages:

INSTANCE_URL=https://code.factoring.digital \
PACKAGE_OWNER=public \
PACKAGE_NAME=alpine-packages \
PACKAGE_USER=... \
PACKAGE_TOKEN=... \
mise run apk:publish-gitea

Checklist

Before opening a PR, run:

mise run apk:publish-check
mise run gitea-workflow-build
mise run apk:test-install
mise run apk:runtime-test

Then test at least one installed role in the package shell:

mise run apk:test-shell
rc-service seaweedfs.master start
weed version