strata-app
LOW
maintainer leynebe
0 votes
scanned 2026-11-01 10:00:05.946014
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: Ben Leynen <leynenben@gmail.com>
2
3
pkgname=strata-app
4
_pkgname=strata
5
_binaryname=strata-desktop
6
pkgdesc="Strata Desktop - Local inference engine and GUI for frontier AI models"
7
pkgver=0.2.9
8
pkgrel=2
9
arch=('x86_64')
10
url="https://github.com/Niko1221/Strata"
11
license=('MIT')
12
# the bundled CPython, its wheels and the harness's prebuilt node addons are
13
# shipped as upstream stages them: stripping or dropping static libs would
14
# change files that upstream's bundle manifests record by digest.
15
# !lto: makepkg's -flto=auto turns the C objects of the ring crate into GCC
16
# LTO bytecode, which rust-lld can't link (undefined ring_core_* symbols);
17
# cargo's own lto = true from Cargo.toml still applies
18
options=('!strip' '!debug' 'staticlibs' '!lto')
19
depends=(
20
'gcc-libs'
21
'glibc'
22
'gtk3'
23
'hicolor-icon-theme'
24
'libayatana-appindicator'
25
'webkit2gtk-4.1'
26
)
27
# no nodejs/npm/corepack: the pinned Node below provides all three
28
makedepends=(
29
'cargo'
30
'git'
31
'python'
32
)
33
optdepends=(
34
'nvidia-utils: GPU detection for the NVIDIA (CUDA) engine'
35
'rocminfo: GPU detection for the AMD (HIP) engine'
36
)
37
conflicts=("${pkgname}-bin")
38
39
# Upstream pins, written by ./update-pins.sh from Strata's source at the
40
# release tag (run by `make update-sources`); the checksums are upstream's
41
# recorded digests.
42
#
43
# DeepSeek Harness commit staged into the app, from
44
# apps/host/server/agent/README.md and preset.mjs
45
_harness_commit=571902028a75c64c1d767f4ae5fd099485f0ddf0
46
# standalone CPython, from PBS_RELEASE / PYTHON_VERSION / PYTHON_PINS in
47
# packaging/package_terminal.py
48
_pbs_release=20261009
49
_python_version=3.12.15
50
_pbs_sha256=5864001bf969db329fadc2b654c4878c6027d170c6bd77e28f88666260bcaf63
51
# Node, from STRATA_NODE_VERSION / digest_for in
52
# apps/desktop/scripts/fetch-node.sh at the release tag. The app runs its host
53
# and the harness on it, and the harness's native addons (node-pty, koffi, ...)
54
# are compiled for the Node that builds them, so the same Node is used for the
55
# build and shipped as the runtime: the addon ABI always matches, a system
56
# nodejs upgrade can't break the app, and it's the version upstream tests
57
_node_version=24.12.0
58
_node_sha256=6159227e0af7d7c3c6bb2fa900452b04a6cb8841a702a79acc613209d70b04d0
59
# makepkg's checksums (a git archive of the ref) of the two git sources, which
60
# have no upstream digest; they make a moved tag fail the build
61
_src_sha256=25237abf0df23923c31bf7be05eefdcd5829aec03559175dc6f7de589077c3cb
62
_harness_sha256=0828e92122ddbae364d23b85b76ca24dd83de726734d43845a4c1b2c42f399c2
63
64
_pbs_file="cpython-${_python_version}_${_pbs_release}-x86_64-unknown-linux-gnu-install_only.tar.gz"
65
_node_dir="node-v${_node_version}-linux-x64"
66
67
source=(
68
"${pkgname}-src::git+${url}.git#tag=v${pkgver}"
69
"${pkgname}-harness::git+https://github.com/deepseek-ai/deepseek-harness.git#commit=${_harness_commit}"
70
"${_pbs_file}::https://github.com/astral-sh/python-build-standalone/releases/download/${_pbs_release}/cpython-${_python_version}%2B${_pbs_release}-x86_64-unknown-linux-gnu-install_only.tar.gz"
71
"https://nodejs.org/dist/v${_node_version}/${_node_dir}.tar.gz"
72
"${_binaryname}.desktop"
73
"disable-app-updater.patch"
74
)
75
# package_terminal.py verifies and unpacks the interpreter itself
76
noextract=("${_pbs_file}")
77
# not maintained with updpkgsums: the pinned ones come from update-pins.sh
78
sha256sums=("${_src_sha256}"
79
"${_harness_sha256}"
80
"${_pbs_sha256}"
81
"${_node_sha256}"
82
'bccf986eb5de114e7ae8faa9917116d932b87be578cd5e165888d393c27eee1b'
83
'1041357d7d22ca52363b09e7061c18a58bb6e0516d6d65e5d3e956b0e243a5ca')
84
85
_env() {
86
export PATH="${srcdir}/${_node_dir}/bin:${PATH}"
87
export CARGO_HOME="${srcdir}/cargo-home"
88
export npm_config_cache="${srcdir}/npm-cache"
89
export COREPACK_HOME="${srcdir}/corepack-home"
90
export COREPACK_ENABLE_DOWNLOAD_PROMPT=0
91
export npm_config_store_dir="${srcdir}/pnpm-store"
92
}
93
94
prepare() {
95
_env
96
97
cd "${srcdir}/${pkgname}-src"
98
# the in-app updater would try to replace /usr/bin/strata-desktop with the
99
# release AppImage; point users to pacman instead
100
patch -Np1 -i "${srcdir}/disable-app-updater.patch"
101
102
npm ci --prefix apps/host
103
npm ci --prefix apps/desktop
104
cargo fetch --locked --manifest-path apps/desktop/src-tauri/Cargo.toml
105
106
cd "${srcdir}/${pkgname}-harness"
107
corepack pnpm install --frozen-lockfile
108
}
109
110
build() {
111
_env
112
local _src="${srcdir}/${pkgname}-src"
113
114
# DeepSeek Harness: built, then staged by upstream's script (pnpm deploy
115
# --prod, pruned, booted once as a check) into resources/harness
116
cd "${srcdir}/${pkgname}-harness"
117
corepack pnpm run build:artifacts
118
node "${_src}/apps/desktop/scripts/stage-harness.mjs" --src "${srcdir}/${pkgname}-harness"
119
120
# Control: upstream's Terminal bundle (pinned CPython plus hash-locked
121
# wheels), staged into resources/control
122
cd "${_src}"
123
rm -rf "${srcdir}/control-out"
124
python packaging/package_terminal.py --out "${srcdir}/control-out" --cache "${srcdir}"
125
python apps/desktop/scripts/stage-control.py --archive "${srcdir}"/control-out/strata-terminal-*.tar.gz
126
127
# UI, then the Tauri shell; bundling is skipped, package() lays out the
128
# resources the way upstream's deb/AppImage does
129
npm --prefix apps/host run build
130
cd apps/desktop
131
npm exec -- tauri build --no-bundle -- --locked
132
}
133
134
package() {
135
local _src="${srcdir}/${pkgname}-src"
136
local _tauri="${_src}/apps/desktop/src-tauri"
137
# the shell looks for its resources at ../lib/Strata relative to itself
138
local _res="${pkgdir}/usr/lib/Strata"
139
140
install -D -m0755 "${_tauri}/target/release/${_binaryname}" "${pkgdir}/usr/bin/${_binaryname}"
141
142
install -d "${_res}/host"
143
cp -a "${_src}/apps/host/dist" "${_src}/apps/host/server" "${_res}/host/"
144
install -m0644 "${_src}/apps/host/package.json" "${_res}/host/package.json"
145
cp -a "${_tauri}/resources/control" "${_tauri}/resources/harness" "${_res}/"
146
rm -f "${_res}/control/.gitignore" "${_res}/harness/.gitignore"
147
148
# the pinned Node the harness was built with (see _node_version)
149
install -D -m0755 "${srcdir}/${_node_dir}/bin/node" "${_res}/node/node"
150
151
install -D -m0644 "${srcdir}/${_binaryname}.desktop" "${pkgdir}/usr/share/applications/${_binaryname}.desktop"
152
install -D -m0644 "${_tauri}/icons/32x32.png" "${pkgdir}/usr/share/icons/hicolor/32x32/apps/${_binaryname}.png"
153
install -D -m0644 "${_tauri}/icons/64x64.png" "${pkgdir}/usr/share/icons/hicolor/64x64/apps/${_binaryname}.png"
154
install -D -m0644 "${_tauri}/icons/128x128.png" "${pkgdir}/usr/share/icons/hicolor/128x128/apps/${_binaryname}.png"
155
install -D -m0644 "${_tauri}/icons/128x128@2x.png" "${pkgdir}/usr/share/icons/hicolor/256x256/apps/${_binaryname}.png"
156
install -D -m0644 "${_tauri}/icons/icon.png" "${pkgdir}/usr/share/icons/hicolor/512x512/apps/${_binaryname}.png"
157
158
install -D -m0644 "${_src}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
159
install -D -m0644 "${srcdir}/${pkgname}-harness/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.deepseek-harness"
160
install -D -m0644 "${srcdir}/${_node_dir}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.nodejs"
161
}
162
Scan history
| Scanned at (UTC) | Severity | Rules |
|---|---|---|
| 2026-11-01 10:00:05 | Low | 1 |