update LavinMQ bundled sources #23

Merged
fspjo merged 4 commits from development into main 2026-10-08 13:50:42 +02:00
15 changed files with 102 additions and 26 deletions
+2
View File
@@ -7,3 +7,5 @@ packaging/alpine/*/*/tmp/
packaging/alpine/*/*/*.apk packaging/alpine/*/*/*.apk
packaging/alpine/*/*/*.tar.* packaging/alpine/*/*/*.tar.*
!packaging/alpine/*/*/*-vendor.tar.gz !packaging/alpine/*/*/*-vendor.tar.gz
!packaging/alpine/local/lavinmq/lavinmq-*-shards.tar.gz
!packaging/alpine/local/lavinmq/lavinmq-*-assets.tar.gz
+1 -1
View File
@@ -1,7 +1,7 @@
# Maintainer: Joachim Schlöffel <joachim.schloeffel@financial-service-plus.de> # Maintainer: Joachim Schlöffel <joachim.schloeffel@financial-service-plus.de>
pkgname=gitea pkgname=gitea
pkgver=28.1.0 pkgver=28.1.0
pkgrel=0 pkgrel=1
pkgdesc="Self-hosted Git service written in Go" pkgdesc="Self-hosted Git service written in Go"
url="https://about.gitea.com/" url="https://about.gitea.com/"
arch="x86_64 aarch64" arch="x86_64 aarch64"
+1 -1
View File
@@ -1,7 +1,7 @@
# Maintainer: Joachim Schlöffel <joachim.schloeffel@financial-service-plus.de> # Maintainer: Joachim Schlöffel <joachim.schloeffel@financial-service-plus.de>
pkgname=greptimedb pkgname=greptimedb
pkgver=1.2.1 pkgver=1.2.1
pkgrel=4 pkgrel=5
pkgdesc="Cloud-native observability database for metrics, logs, and traces" pkgdesc="Cloud-native observability database for metrics, logs, and traces"
url="https://github.com/GreptimeTeam/greptimedb" url="https://github.com/GreptimeTeam/greptimedb"
arch="x86_64" arch="x86_64"
+4 -4
View File
@@ -1,6 +1,6 @@
# Maintainer: Joachim Schlöffel <joachim.schloeffel@financial-service-plus.de> # Maintainer: Joachim Schlöffel <joachim.schloeffel@financial-service-plus.de>
pkgname=lavinmq pkgname=lavinmq
pkgver=2.10.1 pkgver=2.10.2
pkgrel=1 pkgrel=1
pkgdesc="High-performance AMQP and MQTT message queue server" pkgdesc="High-performance AMQP and MQTT message queue server"
url="https://github.com/cloudamqp/lavinmq" url="https://github.com/cloudamqp/lavinmq"
@@ -82,9 +82,9 @@ _logrotate() {
} }
sha512sums=" sha512sums="
1c2c932a0698227abfe8353988ea75b48f9048f183d85410797af5bc14495e2cb4497e72acc8fc9ff9ef8f78e8ebb648a1b40b5cf7f1b86e18597d10297417ff lavinmq-2.10.1.tar.gz 35757407adb6fdd6378c65cde229471bd362b6a7fdc13279658312ef8a7304c0557619a1394a0b4cf33ef25ffb6c039f65c217f2af37bf12fc01b73d84e55e69 lavinmq-2.10.2.tar.gz
d0dfdd5c0e474024f57deb9e31c76e3f176e798c8d21dea53d3aea1b05436bd03fa34e69ccddf322bc89adedce5f379df5a316cddbbdfe12520e5bf672ad8228 lavinmq-2.10.1-shards.tar.gz d0dfdd5c0e474024f57deb9e31c76e3f176e798c8d21dea53d3aea1b05436bd03fa34e69ccddf322bc89adedce5f379df5a316cddbbdfe12520e5bf672ad8228 lavinmq-2.10.2-shards.tar.gz
ae3cea2534b211abbcbd1e4fcb6da73dfaf383a19aef1c45f367cba77492cc20a7ce8283fc42f26c0a023149114c369bed307fb8cde0b8f27fba61165092e986 lavinmq-2.10.1-assets.tar.gz ae3cea2534b211abbcbd1e4fcb6da73dfaf383a19aef1c45f367cba77492cc20a7ce8283fc42f26c0a023149114c369bed307fb8cde0b8f27fba61165092e986 lavinmq-2.10.2-assets.tar.gz
62a609d50f28db960098c4c84ce4f1dad78413366a9a9aca18fe321114d687be3bf7b71924d4ace69bd74383c5ac40d2ee09ae0eef9c1bfe653b97448e42e110 lavinmq.confd 62a609d50f28db960098c4c84ce4f1dad78413366a9a9aca18fe321114d687be3bf7b71924d4ace69bd74383c5ac40d2ee09ae0eef9c1bfe653b97448e42e110 lavinmq.confd
1853196e70297b5c4a2207fde50df735620cf6d99c4994644fd676bffaf863d67300ad7ae771c4bbb86fce1a0485c2a7968cf912c5f5bb878e08b15e5a28ba1b lavinmq.initd 1853196e70297b5c4a2207fde50df735620cf6d99c4994644fd676bffaf863d67300ad7ae771c4bbb86fce1a0485c2a7968cf912c5f5bb878e08b15e5a28ba1b lavinmq.initd
9999dd6a96bd29a3d0bda1b2110af940b15acf1250a0f3ba6c93d16bd62063ab1c1dfa4c237da99bbb401150517abde59e2c7275f4b72c3eb7c90e1ce61d43b9 lavinmq.logrotate 9999dd6a96bd29a3d0bda1b2110af940b15acf1250a0f3ba6c93d16bd62063ab1c1dfa4c237da99bbb401150517abde59e2c7275f4b72c3eb7c90e1ce61d43b9 lavinmq.logrotate
+4 -13
View File
@@ -55,23 +55,14 @@ Wrapper settings in `/etc/conf.d/lavinmq`:
1. In `APKBUILD`, set `pkgver` to the new upstream version and reset `pkgrel` 1. In `APKBUILD`, set `pkgver` to the new upstream version and reset `pkgrel`
to `0`. to `0`.
2. Add versioned vendored archives for the locked Shards dependencies and 2. Generate the versioned, locked Shards and frontend-asset archives:
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 ```sh
cd packaging/alpine/local/lavinmq ALPINE_PACKAGE=lavinmq mise run apk:update-generated
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 The hook uses the upstream `shard.lock` and `Makefile`, so it also refreshes
`shards install --production` in it, and create the shards archive with the bundled inputs when either dependency list changes.
`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: 3. From the repository root, refresh checksums and build the package:
```sh ```sh
@@ -0,0 +1,55 @@
#!/usr/bin/env bash
set -euo pipefail
package_dir="${PACKAGE_DIR:-$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)}"
repo_root="${REPO_ROOT:-$(cd "${package_dir}/../../../.." && pwd)}"
pkgver="$(awk -F= '$1 == "pkgver" { print $2; exit }' "${package_dir}/APKBUILD")"
distfiles_dir="${repo_root}/.cache/apk-distfiles"
shards_cache_dir="${repo_root}/.cache/shards"
source_archive="${distfiles_dir}/lavinmq-${pkgver}.tar.gz"
shards_archive="${package_dir}/lavinmq-${pkgver}-shards.tar.gz"
assets_archive="${package_dir}/lavinmq-${pkgver}-assets.tar.gz"
tmpdir="$(mktemp -d)"
assets_dir="${tmpdir}/assets"
cleanup() {
rm -rf "${tmpdir}"
}
trap cleanup EXIT
mkdir -p "${distfiles_dir}" "${shards_cache_dir}"
if [[ ! -f "${source_archive}" ]]; then
curl --fail --location --retry 3 --silent --show-error \
--output "${source_archive}" \
"https://github.com/cloudamqp/lavinmq/archive/refs/tags/v${pkgver}.tar.gz"
fi
tar -xzf "${source_archive}" -C "${tmpdir}"
source_dir="${tmpdir}/lavinmq-${pkgver}"
if [[ ! -d "${source_dir}" ]]; then
printf 'unexpected LavinMQ source archive layout: %s\n' "${source_archive}" >&2
exit 1
fi
# shard.lock pins the Crystal dependencies. `make js` fetches exactly the
# frontend assets declared by this upstream version's Makefile.
(
cd "${source_dir}"
SHARDS_CACHE_PATH="${shards_cache_dir}" shards install --production
make js
)
tar --create --gzip --file "${shards_archive}" \
--directory "${source_dir}" \
--sort=name --mtime='UTC 1970-01-01' --owner=0 --group=0 --numeric-owner \
lib
mkdir -p "${assets_dir}"
# The offline Makefile patch intentionally reads every asset from the root of
# .alpine-assets, including helpers.segment.js which upstream stores in chunks/.
find "${source_dir}/static/js/lib" -type f -exec cp -p {} "${assets_dir}/" \;
tar --create --gzip --file "${assets_archive}" \
--directory "${assets_dir}" \
--sort=name --mtime='UTC 1970-01-01' --owner=0 --group=0 --numeric-owner \
.
printf 'Updated %s and %s\n' "${shards_archive##*/}" "${assets_archive##*/}"
+1 -1
View File
@@ -1,7 +1,7 @@
# Maintainer: Joachim Schlöffel <joachim.schloeffel@financial-service-plus.de> # Maintainer: Joachim Schlöffel <joachim.schloeffel@financial-service-plus.de>
pkgname=nifi pkgname=nifi
pkgver=2.12.0 pkgver=2.12.0
pkgrel=0 pkgrel=1
pkgdesc="Reliable system for processing and distributing data" pkgdesc="Reliable system for processing and distributing data"
url="https://nifi.apache.org/" url="https://nifi.apache.org/"
arch="x86_64 aarch64" arch="x86_64 aarch64"
@@ -1,7 +1,7 @@
# Maintainer: Joachim Schlöffel <joachim.schloeffel@financial-service-plus.de> # Maintainer: Joachim Schlöffel <joachim.schloeffel@financial-service-plus.de>
pkgname=rclone-openrc pkgname=rclone-openrc
pkgver=0.1.0 pkgver=0.1.0
pkgrel=0 pkgrel=1
pkgdesc="Generic, instance-capable OpenRC service for rclone" pkgdesc="Generic, instance-capable OpenRC service for rclone"
url="https://rclone.org/" url="https://rclone.org/"
arch="noarch" arch="noarch"
+1 -1
View File
@@ -1,7 +1,7 @@
# Maintainer: Joachim Schlöffel <joachim.schloeffel@financial-service-plus.de> # Maintainer: Joachim Schlöffel <joachim.schloeffel@financial-service-plus.de>
pkgname=seaweedfs pkgname=seaweedfs
pkgver=4.48 pkgver=4.48
pkgrel=3 pkgrel=4
pkgdesc="Distributed storage system for object storage, file systems, and Iceberg tables" pkgdesc="Distributed storage system for object storage, file systems, and Iceberg tables"
url="https://github.com/seaweedfs/seaweedfs" url="https://github.com/seaweedfs/seaweedfs"
arch="x86_64 aarch64" arch="x86_64 aarch64"
+18 -3
View File
@@ -30,16 +30,30 @@ registry_key_url() {
} }
download_registry_metadata() { download_registry_metadata() {
local arch url key_dir local arch url key_dir http_status
require_registry_config INSTANCE_URL "${instance_url}" require_registry_config INSTANCE_URL "${instance_url}"
require_registry_config PACKAGE_OWNER "${owner}" require_registry_config PACKAGE_OWNER "${owner}"
declare -gA registry_index_available=()
mkdir -p "${registry_cache}" mkdir -p "${registry_cache}"
url="$(registry_url)" url="$(registry_url)"
for arch in ${arches}; do for arch in ${arches}; do
curl --fail --silent --show-error --location \ if http_status="$(curl --fail --silent --location \
--output "${registry_cache}/${arch}.APKINDEX.tar.gz" \ --output "${registry_cache}/${arch}.APKINDEX.tar.gz" \
"${url}/${arch}/APKINDEX.tar.gz" --write-out '%{http_code}' \
"${url}/${arch}/APKINDEX.tar.gz")"; then
registry_index_available["${arch}"]=1
continue
fi
if [[ "${http_status}" == 404 ]]; then
registry_index_available["${arch}"]=0
printf 'Registry index is absent: %s/%s/APKINDEX.tar.gz; treating it as empty\n' \
"${url}" "${arch}" >&2
continue
fi
printf 'failed to download registry index (%s): %s/%s/APKINDEX.tar.gz\n' \
"${http_status:-curl error}" "${url}" "${arch}" >&2
return 1
done done
key_dir="${registry_cache}/keys" key_dir="${registry_cache}/keys"
mkdir -p "${key_dir}" mkdir -p "${key_dir}"
@@ -59,6 +73,7 @@ load_registry_index() {
declare -gA registry_latest_versions=() declare -gA registry_latest_versions=()
for arch in ${arches}; do for arch in ${arches}; do
[[ "${registry_index_available[${arch}]:-0}" == 1 ]] || continue
while IFS=$'\t' read -r package_name package_version; do while IFS=$'\t' read -r package_name package_version; do
[[ -n "${package_name}" && -n "${package_version}" ]] || continue [[ -n "${package_name}" && -n "${package_version}" ]] || continue
registry_key="${arch}|${package_name}" registry_key="${arch}|${package_name}"
+14 -1
View File
@@ -12,6 +12,7 @@ registry_url="${ALPINE_REGISTRY_URL:-}"
registry_key="${ALPINE_REGISTRY_KEY:-}" registry_key="${ALPINE_REGISTRY_KEY:-}"
read -r -a package_list <<< "${packages}" read -r -a package_list <<< "${packages}"
declare -A source_packages=() declare -A source_packages=()
local_repo_complete=0
while IFS= read -r package_dir; do while IFS= read -r package_dir; do
while IFS= read -r spec; do while IFS= read -r spec; do
@@ -26,18 +27,30 @@ for package in "${package_list[@]}"; do
fi fi
done done
if [[ -d "${repo_dir}" ]]; then
local_repo_complete=1
for package in "${package_list[@]}"; do
if ! compgen -G "${repo_dir}/${package}-*.apk" >/dev/null; then
local_repo_complete=0
break
fi
done
fi
if [[ -d "${repo_dir}" ]]; then if [[ -d "${repo_dir}" ]]; then
cp "${repo_dir}"/*.rsa.pub /etc/apk/keys/ cp "${repo_dir}"/*.rsa.pub /etc/apk/keys/
echo "${repo_root}/packages/${repo_name}" >> /etc/apk/repositories echo "${repo_root}/packages/${repo_name}" >> /etc/apk/repositories
fi fi
if [[ -n "${registry_url}" ]]; then if [[ -n "${registry_url}" && "${local_repo_complete}" == 0 ]]; then
if [[ ! -f "${registry_key}" ]]; then if [[ ! -f "${registry_key}" ]]; then
printf 'missing Alpine registry signing key: %s\n' "${registry_key:-<unset>}" >&2 printf 'missing Alpine registry signing key: %s\n' "${registry_key:-<unset>}" >&2
exit 1 exit 1
fi fi
cp "${registry_key}" /etc/apk/keys/ cp "${registry_key}" /etc/apk/keys/
echo "${registry_url}" >> /etc/apk/repositories echo "${registry_url}" >> /etc/apk/repositories
elif [[ -n "${registry_url}" ]]; then
printf 'Using the complete local Alpine repository; registry fallback is not needed\n'
fi fi
if [[ ! -d "${repo_dir}" && -z "${registry_url}" ]]; then if [[ ! -d "${repo_dir}" && -z "${registry_url}" ]]; then