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:
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:
lavinmqlavinmqctllavinmqperf/etc/lavinmq/lavinmq.ini/var/lib/lavinmq
Default ports:
5672: AMQP15672: management UI
OpenRC Usage
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:
apk add lavinmq-logrotate
Wrapper settings in /etc/conf.d/lavinmq:
LAVINMQ_CONFIG: config file path passed with--configLAVINMQ_DATA_DIR: data directory passed with-DLAVINMQ_OPTS: extra LavinMQ arguments appended after package defaults
Updating LavinMQ
-
In
APKBUILD, setpkgverto the new upstream version and resetpkgrelto0. -
Add versioned vendored archives for the locked Shards dependencies and frontend assets. If the new upstream
shard.lockand the asset rules in itsMakefileare unchanged, the existing archives can be reused under the new names: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.gzWhen
shard.lockchanges, extract the upstream source, runshards install --productionin it, and create the shards archive withtar -czf lavinmq-<version>-shards.tar.gz lib. If the asset rules change, download the files specified by the newMakefileto a staging directory and createlavinmq-<version>-assets.tar.gzfrom that directory's contents. -
From the repository root, refresh checksums and build the package:
ALPINE_PACKAGE=lavinmq mise run apk:checksum ALPINE_PACKAGE=lavinmq mise run apk:build
Package Commands
Refresh checksums:
ALPINE_PACKAGE=lavinmq mise run apk:checksum
Build:
ALPINE_PACKAGE=lavinmq mise run apk:build
Install-test local build:
ALPINE_PACKAGE=lavinmq SKIP_BUILD=1 mise run apk:test-install
Install-test published repository:
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