tighten docs

This commit is contained in:
Joachim Schlöffel
2026-07-05 23:21:24 +02:00
parent 1c4b598b5c
commit e076b3249a
3 changed files with 50 additions and 92 deletions
+18 -43
View File
@@ -16,16 +16,14 @@ https://code.factoring.digital/api/packages/public/alpine/v3.24/alpine-packages
### Add The Package Repository
Install the registry signing key on each Alpine node:
Install the registry key:
```sh
cd /etc/apk/keys
curl -fsSLOJ https://code.factoring.digital/api/packages/public/alpine/key
```
Keep the filename returned by Gitea. Alpine matches repository signatures by key filename, otherwise `apk update` reports `UNTRUSTED signature`.
Add the stable package repository matching the Alpine branch on the node:
Add the repository for the node's Alpine branch:
```sh
printf '%s\n' \
@@ -35,8 +33,7 @@ printf '%s\n' \
apk update
```
If a forked or future registry is private, include a Gitea user and package token in the
repository URL:
Private registry URL format:
```text
https://<user>:<token>@code.factoring.digital/api/packages/public/alpine/v3.24/alpine-packages
@@ -59,8 +56,6 @@ seaweedfs SeaweedFS 4.31 release binary and OpenRC role splits
greptimedb GreptimeDB 1.0.2 built from source for x86_64
```
Package-specific details are in the linked package READMEs above.
Local build output is written under:
```text
@@ -100,17 +95,13 @@ gitea-workflow-build Run the Gitea build workflow locally through act as a pull
```
`apk:build` targets `x86_64` by default. Multi-arch builds target `x86_64` and
`aarch64`; override with `ALPINE_ARCHES` when needed:
`aarch64`:
```sh
ALPINE_ARCHES="x86_64 aarch64" mise run apk:build-all
```
Unqualified build and install-test tasks discover all packages. GreptimeDB is a
source build and can take close to an hour; it is limited to `x86_64` during
production evaluation. Target fast package work explicitly:
Build or test a subset of packages with `ALPINE_PACKAGE` or `ALPINE_PACKAGES`:
Limit package selection with `ALPINE_PACKAGE` or `ALPINE_PACKAGES`:
```sh
ALPINE_PACKAGE=seaweedfs mise run apk:build
@@ -121,29 +112,27 @@ ALPINE_PACKAGE=greptimedb mise run apk:build
ALPINE_PACKAGE=greptimedb SKIP_BUILD=1 mise run apk:test-install
```
Docker-backed build tasks keep Cargo registry, Rustup, and Cargo target caches in named Docker volumes. The default volume scope is derived from the Git remote owner/repository and is split by package and architecture. Override it when needed:
Override Docker cache scope:
```sh
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
```
Use the test shell to inspect the package in Alpine with the current build
installed:
Open an Alpine test shell:
```sh
ALPINE_PACKAGE=seaweedfs mise run apk:shell
mise run apk:test-shell
```
Use the install test to validate the production instructions against the local
package repository in a fresh Alpine container:
Run the install test:
```sh
mise run apk:test-install
```
Use `SKIP_BUILD=1` to reuse existing local packages:
Reuse existing local packages:
```sh
SKIP_BUILD=1 mise run apk:test-install
@@ -152,45 +141,35 @@ SKIP_BUILD=1 mise run apk:test-shell
### Adding Packages
Each package lives under:
Package path:
```text
packaging/alpine/local/<pkgname>/
```
The only required file is `APKBUILD`. Package-specific helpers can be added as
hooks:
Optional package hooks:
```text
packaging/alpine/local/<pkgname>/scripts/test-install.sh
packaging/alpine/local/<pkgname>/scripts/update-generated-sources.sh
```
Repo-level tasks discover all `packaging/alpine/local/*/APKBUILD` files. Hook
tasks skip packages that do not provide the requested hook.
Start new packages from the blueprint:
Start from the blueprint:
```text
packaging/alpine/blueprint/
```
For compiled software, declare build tools in `makedepends` and use normal
Alpine `build()`, `check()`, and `package()` functions in the package's
`APKBUILD`.
### Generated Package Sources
Generated files should live next to the package's `APKBUILD` so
`abuild checksum` can track them as ordinary package sources. For SeaweedFS,
that includes:
Generated package sources live next to the package `APKBUILD`:
```text
packaging/alpine/local/seaweedfs/example-*.toml
packaging/alpine/local/seaweedfs/weed.bash-completion
```
Refresh generated sources through package-local hooks:
Refresh generated sources:
```sh
mise run apk:update-generated
@@ -198,14 +177,10 @@ ALPINE_PACKAGE=seaweedfs mise run apk:update-generated
mise run apk:checksum
```
Run `apk:checksum` after changing any file listed in `source=`.
### Gitea Workflow
The workflow at `.gitea/workflows/build.yml` builds against each stable Alpine
target in its matrix and publishes to the matching registry branch, currently
`v3.23` and `v3.24`, on push or tag. It skips publishing for pull request
events.
`.gitea/workflows/build.yml` builds and publishes `v3.23` and `v3.24`.
Pull requests build only.
Repository variables:
@@ -222,13 +197,13 @@ PACKAGE_USER=<gitea package publisher>
PACKAGE_TOKEN=<token with package write access>
```
Pre-check the workflow locally with `act`:
Check the workflow locally:
```sh
mise run gitea-workflow-build
```
Publish already-built local packages manually:
Publish local packages:
```sh
INSTANCE_URL=https://code.factoring.digital \