bettbox-pre

LOW
maintainer VillagerTom 0 votes scanned 2026-09-29 05:22:53.434583
View on AUR
Why flagged

The package builds from a legitimate source repository with no obfuscated downloads or remote code execution; the low severity is due to few votes and recent upload, not inherent risk.

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.

Low AI review llm_review

An AI model (qwen/qwen3-235b-a22b-2507) reviewed this and agrees it is LOW (confidence 95%): The package builds from a legitimate source repository with no obfuscated downloads or remote code execution; the low severity is due to few votes and recent upload, not inherent risk.

PKGBUILD

1# Maintainer: VillagerTom <villager-tom at proton dot me>
2
3pkgname=bettbox-pre
4_pkgname=Bettbox
5pkgver=1.19.4pre1
6pkgrel=1
7_pkgver="${pkgver/pre/-pre}"
8pkgdesc="A multi-platform proxy client powered by the Mihomo (Clash Meta) core, refactored based on early versions of FlClash."
9arch=('x86_64' 'aarch64')
10options=('!lto')
11case "$CARCH" in
12 x86_64) _arch=amd64; _flutter_arch=x64 ;;
13 aarch64) _arch=arm64; _flutter_arch=arm64 ;;
14esac
15url="https://github.com/appshubcc/${_pkgname}"
16license=('GPL-3.0-or-later')
17conflicts=('bettbox' 'bettbox-compatible' 'bettbox-compatible-pre' 'bettbox-compatible-bin' 'bettbox-compatible-pre-bin' 'bettbox-bin')
18provides=("${pkgname%-pre}=${pkgver}")
19depends=(
20 'gtk3'
21 'libayatana-appindicator'
22 'libkeybinder3'
23)
24makedepends=('git' 'clang' 'cmake' 'ninja' 'go' 'rustup' 'fvm' 'patchelf')
25source=("${_pkgname}-${_pkgver}.tar.gz::${url}/archive/v${_pkgver}.tar.gz" "restart-bettbox.hook" "bettbox.desktop")
26sha256sums=('2d057a1b6361746f033798a515c4d92948f83aec64d5ce76feb3fbeb8c1557ae'
27 '03d4aadb32c7a3876ac3dbafeb3d2ecd38b0fc87d19ff57d5dc46d452fd026a2'
28 'd7b7bdb64b1aabcedc8092a1498d743fad66d34b7f592194f805d039004d3e0f')
29prepare() {
30 cd "${_pkgname}-${_pkgver}"
31 fvm use 3.44.9
32 fvm flutter --disable-analytics
33 fvm flutter --no-version-check pub get
34}
35
36build () {
37 cd "${_pkgname}-${_pkgver}"
38 # cargokit (code_forge plugin) requires FLUTTER_ROOT for its dart
39 export FLUTTER_ROOT="$(pwd)/.fvm/flutter_sdk"
40 local app_env=stable
41 [[ "${pkgver}" == *pre* ]] && app_env=pre
42 fvm dart run build_runner build -d
43 fvm dart ./setup.dart linux --arch "$_arch" --out core
44 fvm flutter build linux --no-pub --release --target-platform "linux-$_flutter_arch" --dart-define=APP_ENV="$app_env"
45}
46
47# Waiting for https://github.com/appshubcc/Bettbox/pull/159
48# Once merged, setup.dart gains --out app --build-only (-B) which builds the
49# core, sets setuid, and runs flutter build in one step (with --env for APP_ENV).
50# --arch is omitted since setup.dart now auto-detects the host CPU architecture
51# (ArchExt.same). With --build-only, flutter build runs inside setup.dart, which
52# derives --target-platform from the auto-detected arch, so neither $_arch nor
53# $_flutter_arch are used in PKGBUILD anymore.
54# Replace the build() above with:
55# build() {
56# cd "${_pkgname}-${_pkgver}"
57# export FLUTTER_ROOT="$(pwd)/.fvm/flutter_sdk"
58# local app_env=stable
59# [[ "${pkgver}" == *pre* ]] && app_env=pre
60# fvm dart run build_runner build -d
61# fvm dart ./setup.dart linux --build-only --env "$app_env"
62# }
63
64package () {
65 cd "${_pkgname}-${_pkgver}"
66 pushd "build/linux/$_flutter_arch/release"
67 install -Dm755 "bundle/${_pkgname}" -t "${pkgdir}/usr/lib/${pkgname%-pre}/"
68 install -Dm755 "bundle/BettboxCore" -t "${pkgdir}/usr/lib/${pkgname%-pre}/"
69 # Install lib/ and data/ from the bundle; `cmake -P` bakes $pkgdir into CMakeCache.txt, breaking `makepkg -f`.
70 install -dm755 "${pkgdir}/usr/lib/${pkgname%-pre}/lib"
71 cp -a bundle/lib/. "${pkgdir}/usr/lib/${pkgname%-pre}/lib/"
72 install -dm755 "${pkgdir}/usr/lib/${pkgname%-pre}/data"
73 cp -a bundle/data/. "${pkgdir}/usr/lib/${pkgname%-pre}/data/"
74 popd
75
76 # Reset RPATH
77 patchelf --set-rpath '$ORIGIN' ${pkgdir}/usr/lib/${pkgname%-pre}/lib/*.so
78
79 # Set setuid on BettboxCore for TUN mode (to avoid password prompt)
80 chmod u+sx "${pkgdir}/usr/lib/${pkgname%-pre}/BettboxCore"
81
82 # Symlink
83 install -dm755 "${pkgdir}/usr/bin"
84 ln -s "/usr/lib/${pkgname%-pre}/${_pkgname}" "${pkgdir}/usr/bin/bettbox"
85
86 # Hook
87 install -Dm644 -t "${pkgdir}/usr/share/libalpm/hooks/" "${srcdir}/restart-bettbox.hook"
88
89 # Desktop file
90 install -Dm644 "${srcdir}/bettbox.desktop" -t "${pkgdir}/usr/share/applications/"
91
92 cd assets
93 install -Dm644 images/icon.png "${pkgdir}/usr/share/icons/hicolor/128x128/apps/bettbox.png"
94 install -Dm644 images/icon.png "${pkgdir}/usr/share/icons/hicolor/256x256/apps/bettbox.png"
95}
96

Scan history

Scanned at (UTC)SeverityRules
2026-09-29 05:22:53 Low 2

Report a package

Reports go to the AURWatch maintainer (one person) and are read by hand. No login required.

0 / 4000
Your suggestion