build greptimedb dashboard from source
This commit is contained in:
@@ -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=0
|
pkgrel=1
|
||||||
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"
|
||||||
@@ -12,14 +12,17 @@ makedepends="
|
|||||||
clang
|
clang
|
||||||
cmake
|
cmake
|
||||||
coreutils
|
coreutils
|
||||||
curl
|
cargo-auditable
|
||||||
|
git
|
||||||
lld
|
lld
|
||||||
linux-headers
|
linux-headers
|
||||||
make
|
make
|
||||||
mold
|
mold
|
||||||
|
nodejs
|
||||||
openssl-dev
|
openssl-dev
|
||||||
openssl-libs-static
|
openssl-libs-static
|
||||||
perl
|
perl
|
||||||
|
pnpm
|
||||||
protobuf
|
protobuf
|
||||||
protobuf-dev
|
protobuf-dev
|
||||||
rustup
|
rustup
|
||||||
@@ -28,6 +31,7 @@ makedepends="
|
|||||||
zstd-dev
|
zstd-dev
|
||||||
zstd-static
|
zstd-static
|
||||||
"
|
"
|
||||||
|
checkdepends="cargo-nextest"
|
||||||
install="$pkgname.pre-install"
|
install="$pkgname.pre-install"
|
||||||
subpackages="
|
subpackages="
|
||||||
$pkgname-datanode-openrc:_openrc_datanode:noarch
|
$pkgname-datanode-openrc:_openrc_datanode:noarch
|
||||||
@@ -41,7 +45,7 @@ options="net"
|
|||||||
_dashboard_version="v0.12.0"
|
_dashboard_version="v0.12.0"
|
||||||
source="
|
source="
|
||||||
$pkgname-$pkgver.tar.gz::https://github.com/GreptimeTeam/greptimedb/archive/refs/tags/v$pkgver.tar.gz
|
$pkgname-$pkgver.tar.gz::https://github.com/GreptimeTeam/greptimedb/archive/refs/tags/v$pkgver.tar.gz
|
||||||
dashboard-$_dashboard_version.tar.gz::https://github.com/GreptimeTeam/dashboard/releases/download/$_dashboard_version/build.tar.gz
|
dashboard-$_dashboard_version.tar.gz::https://github.com/GreptimeTeam/dashboard/archive/refs/tags/$_dashboard_version.tar.gz
|
||||||
datanode.toml
|
datanode.toml
|
||||||
flownode.toml
|
flownode.toml
|
||||||
frontend.toml
|
frontend.toml
|
||||||
@@ -68,27 +72,39 @@ export LIBRARY_PATH="/usr/lib"
|
|||||||
|
|
||||||
prepare() {
|
prepare() {
|
||||||
default_prepare
|
default_prepare
|
||||||
if [ ! -d "$builddir"/src/servers/dashboard/dist ]; then
|
|
||||||
mv "$srcdir"/dist "$builddir"/src/servers/dashboard/dist
|
|
||||||
fi
|
|
||||||
|
|
||||||
rustup-init \
|
rustup-init \
|
||||||
-y \
|
-y \
|
||||||
--no-modify-path \
|
--no-modify-path \
|
||||||
--profile minimal \
|
--profile minimal \
|
||||||
--default-toolchain "$_rust_toolchain"
|
--default-toolchain "$_rust_toolchain"
|
||||||
|
"$CARGO_HOME"/bin/rustup run "$_rust_toolchain" cargo fetch \
|
||||||
|
--locked
|
||||||
|
|
||||||
|
local _dashboard_builddir="$srcdir"/dashboard-${_dashboard_version#v}
|
||||||
|
(
|
||||||
|
cd "$_dashboard_builddir"
|
||||||
|
pnpm install --frozen-lockfile --store-dir "$srcdir"/pnpm-store
|
||||||
|
pnpm run build:docker
|
||||||
|
)
|
||||||
|
rm -rf "$builddir"/src/servers/dashboard/dist
|
||||||
|
cp -a "$_dashboard_builddir"/dist "$builddir"/src/servers/dashboard/
|
||||||
}
|
}
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
"$CARGO_HOME"/bin/rustup run "$_rust_toolchain" cargo build \
|
"$CARGO_HOME"/bin/rustup run "$_rust_toolchain" cargo auditable build \
|
||||||
--profile "$_cargo_profile" \
|
--profile "$_cargo_profile" \
|
||||||
|
--frozen \
|
||||||
--locked \
|
--locked \
|
||||||
--bin greptime \
|
--bin greptime \
|
||||||
--features servers/dashboard
|
--features servers/dashboard
|
||||||
}
|
}
|
||||||
|
|
||||||
check() {
|
check() {
|
||||||
"$CARGO_TARGET_DIR"/"$_cargo_profile"/greptime --version
|
"$CARGO_HOME"/bin/rustup run "$_rust_toolchain" cargo nextest run \
|
||||||
|
-p cmd \
|
||||||
|
--lib \
|
||||||
|
--frozen
|
||||||
}
|
}
|
||||||
|
|
||||||
package() {
|
package() {
|
||||||
@@ -128,7 +144,7 @@ _docs() {
|
|||||||
|
|
||||||
sha512sums="
|
sha512sums="
|
||||||
fc580f6e34df84b4f37219047d751968324c356f3cad352d1515abb4b441515a1ad98f0d01e2de33aac5129a2d7a5335edc4d8888923da7683a084a484769bea greptimedb-1.2.1.tar.gz
|
fc580f6e34df84b4f37219047d751968324c356f3cad352d1515abb4b441515a1ad98f0d01e2de33aac5129a2d7a5335edc4d8888923da7683a084a484769bea greptimedb-1.2.1.tar.gz
|
||||||
4260acae5bed00a693dceffe9f53d0f8b25fd677b15638e951cf973dc29681f4bacde352c661a12bd78af7be9181a3740812f814fc3c4c8c87ea4eee6ee07e2d dashboard-v0.12.0.tar.gz
|
3f853b6767a86cfa97ec640a17de59b2e798561c9402026e9b3a749907780b9b686149dba8a932b5d61ae538c430deab2410248e5c9e6e1961909000445ee2ee dashboard-v0.12.0.tar.gz
|
||||||
29cc3376753487b216748e3f85e12639830e1ac4a763e94f330f87c3651a8ef9de35732958311c0049e1b7cbb4e90a9e602b3aff43297fe088c5ce795a110a79 datanode.toml
|
29cc3376753487b216748e3f85e12639830e1ac4a763e94f330f87c3651a8ef9de35732958311c0049e1b7cbb4e90a9e602b3aff43297fe088c5ce795a110a79 datanode.toml
|
||||||
52790808cb4f5cf0220ac2ab169b623fe76b6318d27d7f003e1197e850373cb915bfd40556098bcb7650f293d751039cb3bccbf9107bb160b8284887794ba975 flownode.toml
|
52790808cb4f5cf0220ac2ab169b623fe76b6318d27d7f003e1197e850373cb915bfd40556098bcb7650f293d751039cb3bccbf9107bb160b8284887794ba975 flownode.toml
|
||||||
e3e19ab3c7a345ecf8cf0a507f7fc95dd3b036a4a797385cf77fcf1999f2e4f053042c7bbda8de73ed43ff72e87aad81e4ac6d4a34d01773bbc1f6d0d967d9f7 frontend.toml
|
e3e19ab3c7a345ecf8cf0a507f7fc95dd3b036a4a797385cf77fcf1999f2e4f053042c7bbda8de73ed43ff72e87aad81e4ac6d4a34d01773bbc1f6d0d967d9f7 frontend.toml
|
||||||
|
|||||||
@@ -1,14 +1,22 @@
|
|||||||
# GreptimeDB Alpine Package
|
# GreptimeDB Alpine Package
|
||||||
|
|
||||||
Builds `greptime` from the upstream source release and packages OpenRC service
|
Builds `greptime` and its embedded dashboard from their upstream source
|
||||||
subpackages plus `/etc/greptimedb` defaults.
|
releases, and packages OpenRC service subpackages plus `/etc/greptimedb`
|
||||||
|
defaults.
|
||||||
|
|
||||||
Build command:
|
Build command:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
cargo build --profile nightly --locked --bin greptime --features servers/dashboard
|
cargo auditable build --profile nightly --frozen --locked --bin greptime --features servers/dashboard
|
||||||
```
|
```
|
||||||
|
|
||||||
|
GreptimeDB requires the nightly pinned in its source release
|
||||||
|
(`nightly-2026-03-21`). The package uses Rustup to install that toolchain and
|
||||||
|
uses locked Cargo and pnpm dependency resolution, so `options="net"` is
|
||||||
|
intentional. Cargo dependencies are fetched before compilation; the Rust build
|
||||||
|
then runs frozen. The dashboard is built from the matching `v0.12.0` source tag
|
||||||
|
with its checked-in `pnpm-lock.yaml`.
|
||||||
|
|
||||||
## Runtime Layout
|
## Runtime Layout
|
||||||
|
|
||||||
Installs `/usr/bin/greptime` and component OpenRC packages:
|
Installs `/usr/bin/greptime` and component OpenRC packages:
|
||||||
@@ -92,4 +100,4 @@ ALPINE_REPOSITORY_KEY_URL=https://code.factoring.digital/api/packages/public/alp
|
|||||||
mise run apk:test-install
|
mise run apk:test-install
|
||||||
```
|
```
|
||||||
|
|
||||||
Full builds take close to an hour.
|
Full builds and the targeted upstream Nextest check take close to an hour.
|
||||||
|
|||||||
@@ -21,3 +21,14 @@ greptime --version
|
|||||||
|
|
||||||
rc-update add greptimedb.standalone default || true
|
rc-update add greptimedb.standalone default || true
|
||||||
test -L /etc/runlevels/default/greptimedb.standalone
|
test -L /etc/runlevels/default/greptimedb.standalone
|
||||||
|
|
||||||
|
rc-service greptimedb.standalone start
|
||||||
|
for _attempt in $(seq 1 30); do
|
||||||
|
if wget -qO- http://127.0.0.1:4000/status >/dev/null; then
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
|
wget -qO- http://127.0.0.1:4000/status >/dev/null
|
||||||
|
wget -qO- http://127.0.0.1:4000/dashboard/ | grep -qi '<!doctype html>'
|
||||||
|
rc-service greptimedb.standalone stop
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
package_dir="${PACKAGE_DIR:-$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)}"
|
|
||||||
|
|
||||||
printf 'No generated sources for %s\n' "${package_dir}"
|
|
||||||
Reference in New Issue
Block a user