clash-nyanpasu-appimage-fixed

LOW
maintainer BrokenCloud 0 votes scanned 2026-09-18 03:27:19.081861
View on AUR
Why flagged

The package downloads an official AppImage from the project's GitHub release page, repacks it with a local fix for a legitimate technical issue (repaired .dynamic section in clash-rs), and does not execute untrusted remote code or introduce malicious payloads; the source is verifiable and the modifications are transparent and project-specific.

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 downloads an official AppImage from the project's GitHub release page, repacks it with a local fix for a legitimate technical issue (repaired .dynamic section in clash-rs), and does not execute untrusted remote code or introduce malicious payloads; the source is verifiable and the modifications are transparent and project-specific.

PKGBUILD

1# Maintainer: BrokenC1oud <jgbsxx20130315@gmail.com>
2#
3# Based on the original `clash-nyanpasu-appimage` PKGBUILD by timochan.
4# This package ships the official upstream AppImage with the bundled clash-rs
5# core repaired: linuxdeploy/patchelf relocated its .dynamic section while
6# packaging the AppImage, which makes the core segfault on every invocation
7# (see fix-clash-rs.py for the details). The AppImage is repacked with the
8# original runtime and gzip compression.
9
10_pkgname=clash-nyanpasu
11_Pkgname=clash-nyanpasu
12_disname=clash-nyanpasu
13major_version=1
14minor_version=6
15patch_version=1
16
17pkgname="${_pkgname}-appimage-fixed"
18pkgver="${major_version}.${minor_version}.${patch_version}"
19pkgrel=1
20pkgdesc="A Clash GUI based on tauri. Clash Nyanpasu! (∠・ω< )⌒☆​"
21arch=('x86_64')
22url="https://github.com/LibNyanpasu/clash-nyanpasu"
23license=('GPL3')
24options=('!strip' '!debug')
25depends=('zlib' 'hicolor-icon-theme' 'fuse2' 'clash-meta')
26makedepends=('python' 'squashfs-tools')
27conflicts=('clash-nyanpasu-git' 'clash-nyanpasu-bin' 'clash-nyanpasu' 'clash-nyanpasu-appimage')
28provides=('clash-nyanpasu')
29optdepends=('clash-rs: custom protocol network proxy, coding with rust')
30source=('fix-clash-rs.py')
31source_x86_64=("${_Pkgname}-${major_version}.${minor_version}.${patch_version}-amd64.AppImage::https://github.com/LibNyanpasu/clash-nyanpasu/releases/download/v${major_version}.${minor_version}.${patch_version}/${_Pkgname}_${major_version}.${minor_version}.${patch_version}_amd64.AppImage")
32sha256sums=('bbee0308564af5b04780b5340eb2b847b95be8a5252209aa8045c2761a4312c5')
33sha256sums_x86_64=('6eec61b0efd7e28ac285a31803626071e7b26d6465af23ea6353e517ef4aa0d2')
34
35_appimage="${_Pkgname}-${major_version}.${minor_version}.${patch_version}-amd64.AppImage"
36_repaired_appimage="${_Pkgname}-${major_version}.${minor_version}.${patch_version}-amd64-repaired.AppImage"
37noextract=("${_appimage}")
38
39prepare() {
40 chmod +x "${_appimage}"
41 ./"${_appimage}" --appimage-extract
42
43 # Reproduce the fix for the broken bundled clash-rs core, then drop the
44 # backup so it does not end up inside the repacked AppImage.
45 python3 "$srcdir/fix-clash-rs.py" "squashfs-root/usr/bin/clash-rs"
46 rm -f "squashfs-root/usr/bin/clash-rs.orig"
47}
48
49build() {
50 # Adjust .desktop so it will work outside of AppImage container
51 sed -i \
52 -e "s|Exec=AppRun|Exec=env DESKTOPINTEGRATION=false /usr/bin/${_pkgname}|" \
53 -e "s|Icon=.*|Icon=/usr/share/icons/${_pkgname}.png|" \
54 "squashfs-root/${_disname}.desktop"
55
56 # Make sure everything is world-readable (the AppImage mount can expose
57 # 700 directories), but keep the executable bits: this tree is repacked
58 # into the new AppImage below, unlike in the original PKGBUILD where only
59 # the icon/desktop files were taken from it.
60 chmod -R a+rX squashfs-root/usr
61
62 # Repack the AppDir into a new AppImage. Reuse the original runtime (it
63 # carries the embedded update information) and its gzip compression, which
64 # is the only format that runtime accepts besides xz.
65 local _offset
66 _offset=$(./"${_appimage}" --appimage-offset)
67 head -c "${_offset}" "${_appimage}" > runtime.part
68 rm -f rootfs.sqfs
69 mksquashfs squashfs-root rootfs.sqfs \
70 -noappend -no-progress -no-xattrs -all-root -comp gzip >/dev/null
71 cat runtime.part rootfs.sqfs > "${_repaired_appimage}"
72 chmod +x "${_repaired_appimage}"
73}
74
75package() {
76 # AppImage (with the repaired clash-rs core)
77 install -Dm755 "${srcdir}/${_repaired_appimage}" \
78 "${pkgdir}/opt/${pkgname}/${pkgname}.AppImage"
79
80 # Desktop file
81 install -Dm644 "${srcdir}/squashfs-root/${_disname}.desktop" \
82 "${pkgdir}/usr/share/applications/${_pkgname}.desktop"
83
84 # Icon images
85 install -dm755 "${pkgdir}/usr/share/"
86 cp -a "${srcdir}/squashfs-root/usr/share/icons" "${pkgdir}/usr/share/"
87 ln -s "$(realpath ${srcdir}/squashfs-root/${_disname}.png --relative-to ${srcdir}/squashfs-root/usr/share/icons)" \
88 "${pkgdir}/usr/share/icons/${_pkgname}.png"
89
90 # Symlink executable
91 install -dm755 "${pkgdir}/usr/bin"
92 ln -s "/opt/${pkgname}/${pkgname}.AppImage" "${pkgdir}/usr/bin/${_pkgname}"
93}
94

Scan history

Scanned at (UTC)SeverityRules
2026-09-18 03:27: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