battle-cats-rolls-git
maintainer EduHoff
· 0 votes
· scanned 2026-08-03 00:08:14.047287
LOW
View on AUR ↗
Why flagged
The package builds from a legitimate Git source, and the gem installations are for known Ruby dependencies; no untrusted external code execution occurs.
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-2507) reviewed the full PKGBUILD and judged it LOW (confidence 95%): The package builds from a legitimate Git source, and the gem installations are for known Ruby dependencies; no untrusted external code execution occurs.
-
PKGBUILD:34
gem install --no-document --install-dir "$GEM_HOME" bundler dalli lru_redux -
PKGBUILD:58
gem install --no-document --install-dir "$GEM_HOME" bundler dalli lru_redux
2 higher static findings superseded - not the current verdict (shown for transparency)
MEDIUM
External download from an untrusted host, not in source=()
external_download_not_in_source
curl/wget fetches a URL on a non-allowlisted host that is not part of source=(), so it is not checksum-verified by makepkg.
-
PKGBUILD:93
until curl -s -o /dev/null -w "%{http_code}" http://localhost:8080 | grep -q "200" 2>/dev/null; do
MEDIUM
External install via pipx/uv/poetry/cargo/go/gem
alt_pkg_manager_install
A non-pip/npm package manager (pipx, uv, poetry, cargo install, go install, gem, conda…) fetches and builds an external package at build time, outside source=() and makepkg's checksums.
-
PKGBUILD:34
gem install --no-document --install-dir "$GEM_HOME" bundler dalli lru_redux -
PKGBUILD:58
gem install --no-document --install-dir "$GEM_HOME" bundler dalli lru_redux
PKGBUILD
3 offending line(s) highlighted
1
# Maintainer: EduHoff <ehcs.business@proton.me>
2
pkgname=battle-cats-rolls-git
3
pkgver=r1815.42885cd
4
pkgrel=2
5
pkgdesc="Local Battle Cats seed tracking server with high-performance C seeker"
6
arch=('x86_64')
7
url="https://gitlab.com/godfat/battle-cats-rolls"
8
license=("Apache-2.0")
9
depends=('ruby' 'ruby-stdlib' 'zenity' 'curl')
10
makedepends=('git')
11
provides=('battle-cats-rolls-git')
12
conflicts=('battle-cats-rolls-git')
13
source=("git+${url}.git")
14
md5sums=('SKIP')
15
16
pkgver() {
17
cd "${srcdir}/battle-cats-rolls"
18
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
19
}
20
21
build() {
22
cd "${srcdir}/battle-cats-rolls"
23
24
echo ":: Patching build script to use GCC..."
25
sed -i 's/clang/gcc/g' ./Seeker/bin/build-VampireFlower.sh
26
27
echo ":: Compiling VampireFlower C seeker engine using system compiler..."
28
./Seeker/bin/build-VampireFlower.sh
29
30
echo ":: Setting up build bootstrap environment..."
31
export GEM_HOME="${srcdir}/gem_bootstrap"
32
export PATH="$PATH:$GEM_HOME/bin"
33
34
gem install --no-document --install-dir "$GEM_HOME" bundler dalli lru_redux
35
36
bundle config set --local path "$GEM_HOME"
37
bundle install
38
}
39
40
package() {
41
cd "${srcdir}/battle-cats-rolls"
42
43
install -d "${pkgdir}/usr/share/webapps/battle-cats-rolls"
44
install -d "${pkgdir}/usr/bin"
45
install -d "${pkgdir}/usr/share/applications"
46
install -d "${pkgdir}/usr/share/pixmaps"
47
48
echo ":: Copying core files to application directory..."
49
cp -r Seeker bin config lib Gemfile config.ru Rakefile build data "${pkgdir}/usr/share/webapps/battle-cats-rolls/"
50
cp "${srcdir}/battle-cats-rolls/lib/battle-cats-rolls/asset/image/treasure.png" "${pkgdir}/usr/share/pixmaps/battle-cats-rolls.png"
51
52
[ -d public ] && cp -r public "${pkgdir}/usr/share/webapps/battle-cats-rolls/"
53
54
echo ":: Deploying sandboxed Ruby environment..."
55
export GEM_HOME="${pkgdir}/usr/share/webapps/battle-cats-rolls/vendor/bundle"
56
export PATH="$PATH:$GEM_HOME/bin"
57
58
gem install --no-document --install-dir "$GEM_HOME" bundler dalli lru_redux
59
60
bundle config set --local path "$GEM_HOME"
61
bundle config set --local without 'cache:test'
62
bundle install --gemfile="${pkgdir}/usr/share/webapps/battle-cats-rolls/Gemfile"
63
64
find "${pkgdir}/usr/share/webapps/battle-cats-rolls" -type d -exec chmod 755 {} +
65
find "${pkgdir}/usr/share/webapps/battle-cats-rolls" -type f -exec chmod 644 {} +
66
67
touch "${pkgdir}/usr/share/webapps/battle-cats-rolls/.env"
68
chmod 666 "${pkgdir}/usr/share/webapps/battle-cats-rolls/.env"
69
70
if [ -d "${pkgdir}/usr/share/webapps/battle-cats-rolls/vendor/bundle/bin" ]; then
71
chmod +x "${pkgdir}/usr/share/webapps/battle-cats-rolls/vendor/bundle/bin/"*
72
fi
73
chmod +x "${pkgdir}/usr/share/webapps/battle-cats-rolls/bin/server"
74
chmod +x "${pkgdir}/usr/share/webapps/battle-cats-rolls/Seeker/Seeker-VampireFlower"
75
76
cat <<'EOF' > "${pkgdir}/usr/bin/battle-cats-rolls-run"
77
#!/bin/bash
78
79
echo "=================================================="
80
echo " BATTLE CATS ROLLS LOCAL SERVER "
81
echo "=================================================="
82
echo ""
83
84
cd "/usr/share/webapps/battle-cats-rolls" || exit
85
export GEM_HOME="/usr/share/webapps/battle-cats-rolls/vendor/bundle"
86
export PATH="$PATH:$GEM_HOME/bin"
87
88
LOCAL_IP=$(ip route get 1.1.1.1 2>/dev/null | grep -oP 'src \K\S+')
89
[ -z "$LOCAL_IP" ] && LOCAL_IP="127.0.0.1"
90
91
(
92
echo ":: Waiting for local service initialization..."
93
until curl -s -o /dev/null -w "%{http_code}" http://localhost:8080 | grep -q "200" 2>/dev/null; do
94
sleep 0.5
95
done
96
echo ":: Server is up and stable! Launching local instance in your browser..."
97
xdg-open "http://localhost:8080"
98
) &
99
100
echo ":: Starting application stack..."
101
echo ":: Local Address: http://localhost:8080"
102
echo ":: Network Access: http://${LOCAL_IP}:8080"
103
echo ":: To stop the server, simply close this terminal window."
104
echo "--------------------------------------------------"
105
if ! bundle exec ./bin/server; then
106
echo ""
107
echo "[-] Server crashed or failed to start."
108
echo ":: Press Enter to close this window."
109
read -r
110
fi
111
EOF
112
chmod +x "${pkgdir}/usr/bin/battle-cats-rolls-run"
113
114
cat <<'EOF' > "${pkgdir}/usr/bin/battle-cats-rolls-launcher"
115
#!/bin/bash
116
117
TERMINALS=('kitty' 'alacritty' 'ghostty' 'foot' 'gnome-terminal' 'konsole' 'xfce4-terminal' 'terminator' 'guake' 'yakuake')
118
FOUND_TERM=""
119
120
for term in "${TERMINALS[@]}"; do
121
if command -v "$term" &> /dev/null; then
122
FOUND_TERM="$term"
123
break
124
fi
125
done
126
127
if [ -z "$FOUND_TERM" ]; then
128
if command -v zenity &> /dev/null; then
129
FOUND_TERM=$(zenity --entry --title="Battle Cats Rolls" --text="Nenhum terminal padrão foi detectado.\nPor favor, digite o comando do seu emulador de terminal:")
130
fi
131
if [ -z "$FOUND_TERM" ]; then
132
exit 1
133
fi
134
fi
135
136
case "$FOUND_TERM" in
137
"kitty" | "foot")
138
$FOUND_TERM /usr/bin/battle-cats-rolls-run
139
;;
140
"alacritty" | "ghostty" | "terminator" | "guake" | "yakuake")
141
$FOUND_TERM -e /usr/bin/battle-cats-rolls-run
142
;;
143
"gnome-terminal" | "konsole" | "xfce4-terminal")
144
$FOUND_TERM -- /usr/bin/battle-cats-rolls-run
145
;;
146
*)
147
$FOUND_TERM -e /usr/bin/battle-cats-rolls-run
148
;;
149
esac
150
EOF
151
chmod +x "${pkgdir}/usr/bin/battle-cats-rolls-launcher"
152
153
cat <<EOF > "${pkgdir}/usr/share/applications/battle-cats-rolls.desktop"
154
[Desktop Entry]
155
Version=1.0
156
Type=Application
157
Name=Battle Cats Rolls
158
Comment=Launch the local seed tracking engine inside a terminal window
159
Exec=/usr/bin/battle-cats-rolls-launcher
160
Icon=battle-cats-rolls
161
Terminal=false
162
Categories=Game;Utility;
163
StartupNotify=true
164
EOF
165
}
166
Changes since previous scan
--- PKGBUILD @ 2026-08-01 00:11+++ PKGBUILD @ 2026-08-03 00:08@@ -1,4 +1,4 @@-# Maintainer: EduHoff <ehcs.business@gmail.com>+# Maintainer: EduHoff <ehcs.business@proton.me> pkgname=battle-cats-rolls-git pkgver=r1815.42885cd pkgrel=2Scan history
| Scanned at (UTC) | Severity | Rules |
|---|---|---|
| 2026-08-03 00:08:14 | LOW | 3 |
| 2026-08-02 00:16:08 | LOW | 3 |
| 2026-08-01 03:19:42 | MEDIUM | 2 |
| 2026-08-01 00:11:18 | LOW | 3 |
| 2026-07-31 00:14:10 | LOW | 3 |
| 2026-07-30 00:17:23 | LOW | 4 |
| 2026-07-29 00:25:53 | LOW | 4 |
| 2026-07-28 00:07:28 | LOW | 4 |
| 2026-07-27 00:24:32 | LOW | 4 |
| 2026-07-26 00:07:32 | LOW | 4 |
| 2026-07-25 00:13:44 | LOW | 4 |
| 2026-07-24 00:02:28 | LOW | 4 |
| 2026-07-23 00:14:47 | LOW | 4 |
| 2026-07-22 00:29:32 | LOW | 4 |
| 2026-07-21 00:24:15 | LOW | 4 |
| 2026-07-20 00:19:49 | LOW | 4 |
| 2026-07-19 00:17:08 | LOW | 4 |
| 2026-07-18 15:58:03 | MEDIUM | 3 |
| 2026-07-18 00:14:48 | LOW | 4 |
| 2026-07-17 01:53:03 | MEDIUM | 3 |