gomodel
LOW
maintainer weselben
0 votes
scanned 2026-10-27 03:46:34.713263
Why flagged
Uploaded within the last 14 days with 2 or fewer community votes — little peer review so far.
Triggered rules
Low
Few votes, recently uploaded
zero_votes_recent
Uploaded within the last 14 days with 2 or fewer community votes — little peer review so far.
PKGBUILD
1
# Maintainer: weselben <bengottwaldi04 at gmail dot com>
2
# Contributor: weselben <bengottwaldi04 at gmail dot com>
3
4
pkgname=gomodel
5
pkgver=0.1.108
6
pkgrel=1
7
pkgdesc="High-performance AI gateway with caching, cost tracking, budgets, rate limits, virtual models and plugins"
8
arch=('x86_64' 'aarch64')
9
url="https://github.com/ENTERPILOT/GoModel"
10
license=('MIT')
11
depends=('glibc')
12
makedepends=('go' 'git')
13
optdepends=('go: build and load plugin shared objects (gomodel plugin build)'
14
'redis: distributed rate limiting and response cache backend'
15
'postgresql: cost/history storage backend')
16
backup=('etc/gomodel/config.yaml')
17
install=gomodel.install
18
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/ENTERPILOT/GoModel/archive/refs/tags/v${pkgver}.tar.gz"
19
"gomodel_${pkgver}_dashboard.tar.gz::https://github.com/ENTERPILOT/GoModel/releases/download/v${pkgver}/gomodel_${pkgver}_dashboard.tar.gz"
20
"gomodel.service"
21
"gomodel-user.service"
22
"gomodel.sysusers"
23
"gomodel.tmpfiles")
24
sha256sums=('de831cba34fe6766e3cf32486d508657a2c9c649d779a8fd17a64d10a22d2e5e'
25
'1154950a316a45f80f9fa6009c2f42c11b8cde447ab04d338d98a7af809c42fd'
26
'e6c2719a296d21e39793d572959efb0356c3f98ad47e9a2c98f21f6e6c2c64f6'
27
'fe63ac54caa66676e59bfa5044ebe1372e3cc5546ac68fac9bde4ddb19f82973'
28
'0381e411b3245933da1fe3c7021de4727c7f596c55464c993333153d57781ad3'
29
'093568d86cda64db582c2c4f6ce88875a4ee448941c9d11422a0f1127ab0cf04')
30
options=('!lto')
31
32
prepare() {
33
cd "GoModel-${pkgver}"
34
# goreleaser's dashboard archive unpacks to
35
# internal/admin/dashboard/static/dist — go:embed consumes it. The git
36
# archive only ships a .gitkeep placeholder there, so plain extract is
37
# correct.
38
tar -xzf "${srcdir}/gomodel_${pkgver}_dashboard.tar.gz"
39
}
40
41
build() {
42
cd "GoModel-${pkgver}"
43
44
export CGO_ENABLED=1
45
export GOFLAGS='-mod=readonly'
46
export GOPATH="${srcdir}/gopath"
47
export GOCACHE="${srcdir}/gocache"
48
49
# Source-only build: the dashboard dist ships as its own release asset
50
# (gomodel_<ver>_dashboard.tar.gz), so no nodejs/npm/bun toolchain is
51
# needed here.
52
go build -trimpath \
53
-buildmode=pie \
54
-ldflags "-s -w \
55
-X github.com/enterpilot/gomodel/internal/version.Version=${pkgver} \
56
-X github.com/enterpilot/gomodel/internal/version.Commit=v${pkgver} \
57
-X github.com/enterpilot/gomodel/internal/version.Date=$(date -u +%Y-%m-%dT%H:%M:%SZ)" \
58
-o gomodel ./cmd/gomodel
59
}
60
61
check() {
62
cd "GoModel-${pkgver}"
63
# Skipped: integration tests need Redis, Postgres and live provider
64
# endpoints. Same decision as upstream's NixOS package.
65
true
66
}
67
68
package() {
69
cd "GoModel-${pkgver}"
70
71
install -Dm755 gomodel "${pkgdir}/usr/bin/gomodel"
72
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
73
install -Dm644 README.md "${pkgdir}/usr/share/doc/${pkgname}/README.md"
74
75
# Example config as the seed for /etc/gomodel/config.yaml (backup-protected).
76
# gomodel group does not exist while BUILDING (sysusers runs at install);
77
# create ownership in the tmpfiles rule instead of here.
78
install -Dm640 config/config.example.yaml "${pkgdir}/etc/gomodel/config.yaml"
79
install -d -m750 "${pkgdir}/etc/gomodel"
80
81
# System state dir for the DynamicUser service: ownership applied by
82
# tmpfiles.d at install/boot (gomodel user is created by sysusers.d then).
83
# No plugins/ subdir here: it is created by the install message instructions
84
# and its absence avoids an "empty directory" namcap warning.
85
install -d -m750 "${pkgdir}/var/lib/gomodel"
86
87
# System service (root installs: systemctl enable --now gomodel).
88
install -Dm644 "${srcdir}/gomodel.service" \
89
"${pkgdir}/usr/lib/systemd/system/gomodel.service"
90
91
# User service (every user, enable per login: systemctl --user enable --now gomodel).
92
install -Dm644 "${srcdir}/gomodel-user.service" \
93
"${pkgdir}/usr/lib/systemd/user/gomodel.service"
94
95
install -Dm644 "${srcdir}/gomodel.sysusers" \
96
"${pkgdir}/usr/lib/sysusers.d/gomodel.conf"
97
install -Dm644 "${srcdir}/gomodel.tmpfiles" \
98
"${pkgdir}/usr/lib/tmpfiles.d/gomodel.conf"
99
}
100
Scan history
| Scanned at (UTC) | Severity | Rules |
|---|---|---|
| 2026-10-27 03:46:34 | Low | 1 |