Files
Joachim Schlöffel c9543e113b
Build Alpine Packages / preflight (pull_request) Successful in 14s
Build Alpine Packages / build (gitea) (pull_request) Successful in 1m0s
Build Alpine Packages / build (lavinmq) (pull_request) Successful in 2m51s
Build Alpine Packages / build (nifi) (pull_request) Successful in 5s
Build Alpine Packages / build (seaweedfs) (pull_request) Successful in 39m45s
Build Alpine Packages / build (greptimedb) (pull_request) Successful in 1h31m44s
Build Alpine Packages / verify-and-publish (pull_request) Successful in 1m42s
add logrotate subpackages
2026-10-06 22:39:50 +02:00

111 lines
2.8 KiB
Markdown

# LavinMQ Alpine Package
Builds LavinMQ from the upstream source release for `x86_64` and packages the
OpenRC service plus `/etc/lavinmq` defaults. The locked Shards dependencies and
frontend assets are versioned, checksummed source inputs, so the build does not
need network access.
Build command:
```sh
make
```
LavinMQ 2.10.1 requires Crystal 1.21.0 or newer. The package uses Alpine
edge's native Crystal package, avoiding a glibc toolchain in the Alpine musl
build.
## Runtime Layout
Installs:
- `lavinmq`
- `lavinmqctl`
- `lavinmqperf`
- `/etc/lavinmq/lavinmq.ini`
- `/var/lib/lavinmq`
Default ports:
- `5672`: AMQP
- `15672`: management UI
## OpenRC Usage
```sh
apk add lavinmq lavinmq-doc lavinmq-openrc
rc-update add lavinmq default
rc-service lavinmq start
```
Install daily rotation for the OpenRC service log, retaining 14 compressed
archives:
```sh
apk add lavinmq-logrotate
```
Wrapper settings in `/etc/conf.d/lavinmq`:
- `LAVINMQ_CONFIG`: config file path passed with `--config`
- `LAVINMQ_DATA_DIR`: data directory passed with `-D`
- `LAVINMQ_OPTS`: extra LavinMQ arguments appended after package defaults
## Updating LavinMQ
1. In `APKBUILD`, set `pkgver` to the new upstream version and reset `pkgrel`
to `0`.
2. Add versioned vendored archives for the locked Shards dependencies and
frontend assets. If the new upstream `shard.lock` and the asset rules in its
`Makefile` are unchanged, the existing archives can be reused under the new
names:
```sh
cd packaging/alpine/local/lavinmq
cp lavinmq-2.10.1-shards.tar.gz lavinmq-<version>-shards.tar.gz
cp lavinmq-2.10.1-assets.tar.gz lavinmq-<version>-assets.tar.gz
git add -f lavinmq-<version>-shards.tar.gz lavinmq-<version>-assets.tar.gz
```
When `shard.lock` changes, extract the upstream source, run
`shards install --production` in it, and create the shards archive with
`tar -czf lavinmq-<version>-shards.tar.gz lib`. If the asset rules change,
download the files specified by the new `Makefile` to a staging directory
and create `lavinmq-<version>-assets.tar.gz` from that directory's contents.
3. From the repository root, refresh checksums and build the package:
```sh
ALPINE_PACKAGE=lavinmq mise run apk:checksum
ALPINE_PACKAGE=lavinmq mise run apk:build
```
## Package Commands
Refresh checksums:
```sh
ALPINE_PACKAGE=lavinmq mise run apk:checksum
```
Build:
```sh
ALPINE_PACKAGE=lavinmq mise run apk:build
```
Install-test local build:
```sh
ALPINE_PACKAGE=lavinmq SKIP_BUILD=1 mise run apk:test-install
```
Install-test published repository:
```sh
ALPINE_PACKAGE=lavinmq \
SKIP_BUILD=1 \
ALPINE_REPOSITORY_URL=https://code.factoring.digital/api/packages/public/alpine/v3.24/alpine-packages \
ALPINE_REPOSITORY_KEY_URL=https://code.factoring.digital/api/packages/public/alpine/key \
mise run apk:test-install
```