nethack-cn-bin

LOW
maintainer zcq100 0 votes scanned 2026-10-23 01:36:19.947355
View on AUR
Why flagged

The package installs prebuilt binaries from the project's official GitHub releases, which is a common and acceptable practice for AUR packages; the binaries are verified via sha256sums, and the wrapper scripts only set up local game data paths without executing untrusted remote code.

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 installs prebuilt binaries from the project's official GitHub releases, which is a common and acceptable practice for AUR packages; the binaries are verified via sha256sums, and the wrapper scripts only set up local game data paths without executing untrusted remote code.

PKGBUILD

1# Maintainer: r1a <m@zcq100.com>
2pkgname=nethack-cn-bin
3pkgver=5.0.1pre509.27e34f0
4pkgrel=2
5_tag='nethack-pre-509-27e34f0'
6_ver='501'
7pkgdesc='Simplified Chinese localization of NetHack 5.0.1 (prebuilt binaries)'
8arch=('x86_64' 'aarch64')
9url='https://github.com/StackC00ki3/Nethack-cn'
10license=('custom:NGPL')
11depends=('ncurses')
12options=('!strip' '!debug')
13
14source_x86_64=("${_tag}-x86_64.tar.gz::https://github.com/StackC00ki3/Nethack-cn/releases/download/${_tag}/NetHack-${_ver}-linux-amd64-glibc-s.tar.gz")
15source_aarch64=("${_tag}-aarch64.tar.gz::https://github.com/StackC00ki3/Nethack-cn/releases/download/${_tag}/NetHack-${_ver}-linux-arm64-glibc-s.tar.gz")
16sha256sums_x86_64=('e252de2a20ab01055e9db0d1b2ad9eb1b228144475ce348667b0d47b96cb52f0')
17sha256sums_aarch64=('db868501984966eb971a156ac6939579532c8d611f9b8c13110eca4ae7caea04')
18
19package() {
20 install -d "$pkgdir/usr/lib/nethack-cn" "$pkgdir/usr/bin"
21 install -m755 nethack recover "$pkgdir/usr/lib/nethack-cn/"
22 install -m644 nhdat symbols license sysconf "$pkgdir/usr/lib/nethack-cn/"
23
24 install -Dm644 Guidebook.txt "$pkgdir/usr/share/doc/nethack-cn/Guidebook.txt"
25 install -Dm644 nethack.txt "$pkgdir/usr/share/doc/nethack-cn/nethack.txt"
26 install -Dm644 license "$pkgdir/usr/share/licenses/nethack-cn/license"
27 install -Dm644 nethack.txt "$pkgdir/usr/share/man/man6/nethack-cn.6"
28 gzip -9n "$pkgdir/usr/share/man/man6/nethack-cn.6"
29
30 cat > "$pkgdir/usr/bin/nethack-cn" <<'EOF'
31#!/bin/sh
32data=/usr/lib/nethack-cn
33play=${NETHACK_CN_HOME:-${XDG_DATA_HOME:-$HOME/.local/share}/nethack-cn}
34
35mkdir -p "$play/save"
36for f in nhdat symbols license sysconf; do
37 ln -sfn "$data/$f" "$play/$f"
38done
39# HLOCK: 上游把空文件 perm 作为 fcntl 锁文件,启动时以 O_RDWR 打开;
40# 必须存在且属于当前用户,缺失会报 "Cannot open file perm"。
41if [ ! -e "$play/perm" ] || [ ! -w "$play/perm" ]; then
42 rm -f "$play/perm"
43 : > "$play/perm"
44fi
45cd "$play" || exit 1
46exec "$data/nethack" "$@"
47EOF
48 chmod 755 "$pkgdir/usr/bin/nethack-cn"
49
50 cat > "$pkgdir/usr/bin/nethack-cn-recover" <<'EOF'
51#!/bin/sh
52data=/usr/lib/nethack-cn
53play=${NETHACK_CN_HOME:-${XDG_DATA_HOME:-$HOME/.local/share}/nethack-cn}
54
55mkdir -p "$play/save"
56for f in nhdat symbols license sysconf; do
57 ln -sfn "$data/$f" "$play/$f"
58done
59if [ ! -e "$play/perm" ] || [ ! -w "$play/perm" ]; then
60 rm -f "$play/perm"
61 : > "$play/perm"
62fi
63cd "$play" || exit 1
64exec "$data/recover" "$@"
65EOF
66 chmod 755 "$pkgdir/usr/bin/nethack-cn-recover"
67}
68

Scan history

Scanned at (UTC)SeverityRules
2026-10-23 01:36:19 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