local-llama-git
maintainer zxp19821005
· 0 votes
· scanned 2026-08-03 00:08:14.047287
LOW
View on AUR ↗
Why flagged
The npm install runs in the build environment with dependencies from the project's own package.json; the use of a mirror in China is a regional optimization, not a supply-chain risk, and no external packages are secretly added.
Triggered rules
LOW
AI review downgraded a static finding
llm_review
The static rules flagged this MEDIUM, but an AI model (qwen/qwen3-235b-a22b-07-25) reviewed the full PKGBUILD and judged it LOW (confidence 95%): The npm install runs in the build environment with dependencies from the project's own package.json; the use of a mirror in China is a regional optimization, not a supply-chain risk, and no external packages are secretly added.
1 higher static finding superseded - not the current verdict (shown for transparency)
MEDIUM
npm/yarn/pnpm install of an undeclared external package
npm_install_external
Runs `npm/yarn/pnpm install <package>` for a package not in source=(), pulling unpinned, unreviewed code at build time. Severity downgraded: the package declares/looks like a Node.js consumer, where build-time installs are expected.
-
PKGBUILD:87
NODE_ENV=development npm add -D @electron-forge/plugin-local-electron
PKGBUILD
1 offending line(s) highlighted
1
# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
2
pkgname=local-llama-git
3
_pkgname='Local Llama'
4
pkgver=1.0.2.r2.g3e8f37a
5
_electronversion=31
6
_nodeversion=22
7
pkgrel=1
8
pkgdesc="Local Llama also known as L³ is designed to be easy to use, with a user-friendly interface and advanced settings.(Use system-wide electron)"
9
arch=(
10
'aarch64'
11
'armv7h'
12
'x86_64'
13
)
14
url="https://folio.tib0.com/"
15
_ghurl="https://github.com/tib0/local-llama"
16
license=('CC-BY-NC-ND-4.0')
17
conflicts=("${pkgname%-git}")
18
provides=("${pkgname%-git}=${pkgver%.r*}")
19
depends=(
20
"electron${_electronversion}"
21
'vulkan-icd-loader'
22
'nodejs'
23
'ollama'
24
)
25
makedepends=(
26
'gendesk'
27
'npm'
28
'nvm'
29
'curl'
30
'git'
31
)
32
options=(
33
'!emptydirs'
34
)
35
source=(
36
"${pkgname%-git}.git::git+${_ghurl}.git"
37
"${pkgname%-git}.sh"
38
)
39
sha256sums=('SKIP'
40
'291f50480f5a61bc9c68db7d44cd0412071128706baa868a9cb854f8779a1980')
41
pkgver() {
42
cd "${srcdir}/${pkgname%-git}.git"
43
set -o pipefail
44
git describe --long --tags --abbrev=7 | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/v//g' ||
45
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
46
}
47
_ensure_local_nvm() {
48
local NVM_DIR="${srcdir}/.nvm"
49
source /usr/share/nvm/init-nvm.sh || [[ $? != 1 ]]
50
nvm install "${_nodeversion}"
51
nvm use "${_nodeversion}"
52
}
53
prepare() {
54
cd "${srcdir}/${pkgname%-git}.git"
55
sed -i -e "
56
s/@electronversion@/${_electronversion}/g
57
s/@appname@/${pkgname%-git}/g
58
s/@runname@/app/g
59
s/@cfgdirname@/${_pkgname}/g
60
s/@options@/env ELECTRON_OZONE_PLATFORM_HINT=auto/g
61
" "${srcdir}/${pkgname%-git}.sh"
62
_ensure_local_nvm
63
gendesk -f -n -q \
64
--pkgname="${pkgname%-git}" \
65
--pkgdesc="${pkgdesc}" \
66
--categories="Utility" \
67
--name="${_pkgname}" \
68
--exec="${pkgname%-git} %U"
69
export ELECTRON_SKIP_BINARY_DOWNLOAD=1
70
export SYSTEM_ELECTRON_VERSION="$(electron${_electronversion} -v | sed 's/v//g')"
71
HOME="${srcdir}/.electron-gyp"
72
{
73
echo -e '\n'
74
#echo 'build_from_source=true'
75
echo "cache=${srcdir}/.npm_cache"
76
} >> .npmrc
77
if [[ "$(curl -s ipinfo.io/country)" == *"CN"* ]]; then
78
{
79
echo 'registry=https://registry.npmmirror.com'
80
echo 'electron_mirror=https://registry.npmmirror.com/-/binary/electron/'
81
echo 'electron_builder_binaries_mirror=https://registry.npmmirror.com/-/binary/electron-builder-binaries/'
82
} >> .npmrc
83
find ./ -type f -name "package-lock.json" -exec sed -i "s/registry.npmjs.org/registry.npmmirror.com/g" {} +
84
fi
85
sed -i "s/\"electron\": \"[^\"]*\"/\"electron\": \"${SYSTEM_ELECTRON_VERSION}\"/g" package.json
86
NODE_ENV=development npm install
87
NODE_ENV=development npm add -D @electron-forge/plugin-local-electron
88
}
89
build() {
90
cd "${srcdir}/${pkgname%-git}.git"
91
local electronDist="/usr/lib/electron${_electronversion}"
92
sed -i -e "/^[[:space:]]*plugins:[[:space:]]*\[.*\$/a\\
93
{\\
94
name: \"@electron-forge/plugin-local-electron\",\\
95
config: {\\
96
electronPath: \"${electronDist}\"\\
97
}\\
98
}," forge.config.*
99
npm run package
100
case "${CARCH}" in
101
aarch64)
102
find "${srcdir}/${pkgname%-git}.git/out/esm/${_pkgname}-linux-"*/resources/app \
103
-type d \( -name "*x64*" -o -name "*armv7l*" -o -name "*mac-*" -o -name "*win-*" \) -exec rm -rf {} +
104
;;
105
armv7h)
106
find "${srcdir}/${pkgname%-git}.git/out/esm/${_pkgname}-linux-"*/resources/app \
107
-type d \( -name "*x64*" -o -name "*arm64*" -o -name "*mac-*" -o -name "*win-*" \) -exec rm -rf {} +
108
;;
109
x86_64)
110
find "${srcdir}/${pkgname%-git}.git/out/esm/${_pkgname}-linux-"*/resources/app \
111
-type d \( -name "*arm*" -o -name "*mac-*" -o -name "*win-*" \) -exec rm -rf {} +
112
;;
113
esac
114
}
115
package() {
116
install -Dm755 "${srcdir}/${pkgname%-git}.sh" "${pkgdir}/usr/bin/${pkgname%-git}"
117
install -Dm755 -d "${pkgdir}/usr/lib/${pkgname%-bin}"
118
cp -Pr --no-preserve=ownership "${srcdir}/${pkgname%-git}.git/out/esm/${_pkgname}-linux-"*/resources/app "${pkgdir}/usr/lib/${pkgname%-bin}"
119
install -Dm644 "${srcdir}/${pkgname%-git}.git/static/icon.png" "${pkgdir}/usr/share/pixmaps/${pkgname%-git}.png"
120
install -Dm644 "${srcdir}/${pkgname%-git}.git/${pkgname%-git}.desktop" -t "${pkgdir}/usr/share/applications"
121
install -Dm644 "${srcdir}/${pkgname%-git}.git/LICENSE.md" -t "${pkgdir}/usr/share/licenses/${pkgname}"
122
}
Scan history
| Scanned at (UTC) | Severity | Rules |
|---|---|---|
| 2026-08-03 00:08:14 | LOW | 2 |
| 2026-08-02 00:16:08 | LOW | 2 |
| 2026-08-01 00:11:18 | LOW | 2 |
| 2026-07-31 00:14:10 | LOW | 2 |
| 2026-07-30 00:17:23 | LOW | 2 |
| 2026-07-29 00:25:53 | LOW | 2 |
| 2026-07-28 00:07:28 | LOW | 2 |
| 2026-07-27 00:24:32 | LOW | 2 |
| 2026-07-26 00:07:32 | LOW | 2 |
| 2026-07-25 00:13:44 | LOW | 2 |
| 2026-07-24 00:02:28 | LOW | 2 |
| 2026-07-23 00:14:47 | LOW | 2 |
| 2026-07-22 00:29:32 | LOW | 2 |
| 2026-07-21 00:24:15 | LOW | 2 |
| 2026-07-20 00:19:49 | LOW | 2 |
| 2026-07-19 00:17:08 | LOW | 2 |
| 2026-07-18 00:14:48 | LOW | 2 |
| 2026-07-17 00:06:16 | LOW | 2 |
| 2026-07-16 00:05:41 | LOW | 2 |
| 2026-07-15 00:09:25 | LOW | 2 |