genoffice-electron

LOW
maintainer chuanshanjia 0 votes scanned 2026-08-31 13:45:31.809418
View on AUR
Why flagged

The package modifies a legitimate upstream release from GitHub by patching paths to use the system Electron; the source is verifiable and no untrusted remote code execution occurs.

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 modifies a legitimate upstream release from GitHub by patching paths to use the system Electron; the source is verifiable and no untrusted remote code execution occurs.

PKGBUILD

1# Maintainer: chuanshanjia <1845776552@qq.com>
2#
3# 本包与 AUR 上的 genoffice-bin 是同一上游的两种不同打包方式,不是重复提交:
4# genoffice-bin —— 将 deb 的 data.tar 原样解到 /opt/GenOffice,附带上游自带的
5# Electron 运行时,/usr/bin/genoffice 是指向 /opt 的软链。
6# genoffice-electron —— 本包:改用系统的 electron43 运行,不安装上游 Electron。
7# 做法是解包 app.asar、把其中的 process.resourcesPath 改写为
8# /usr/lib/genoffice 后重新打包,并用启动脚本调用 electron43。
9# 因此本包体积小、Electron 安全更新随系统走;代价是依赖 electron43 且需要 asar 补丁。
10# 两者都提供 /usr/bin/genoffice,文件互斥,故下面用 provides/conflicts 声明不能同装。
11
12pkgname=genoffice-electron
13_pkgname=genoffice
14_dist_name="GenOffice"
15_electronversion=43
16pkgver=0.8.667
17pkgrel=1
18pkgdesc="Free, open-source AI office suite by Genspark — docs, sheets, slides, PDF and Markdown (system Electron)"
19arch=('x86_64')
20url="https://github.com/genspark-ai/genoffice"
21license=('Apache-2.0')
22depends=("electron${_electronversion}" 'hicolor-icon-theme' 'shared-mime-info')
23makedepends=('asar')
24provides=('genoffice')
25conflicts=('genoffice' 'genoffice-bin')
26options=('!strip' '!emptydirs')
27
28source_x86_64=("https://github.com/genspark-ai/genoffice/releases/download/v${pkgver}/${_pkgname}_${pkgver}_amd64.deb")
29source=("${_pkgname}.sh")
30
31sha256sums_x86_64=('76cc57d64526d3ff85752042be32df06ccdcb0b0739945df42d0a5f67f2a1258')
32sha256sums=('67b5d78fb2ecdc193068957df2cf90cd96352f854b7dbf1bd882e69fbe8907b6')
33
34prepare() {
35 # 解压 deb 数据归档
36 if [ -f "${srcdir}/data.tar.xz" ]; then
37 bsdtar -xf "${srcdir}/data.tar.xz"
38 elif [ -f "${srcdir}/data.tar.zst" ]; then
39 bsdtar -xf "${srcdir}/data.tar.zst"
40 fi
41
42 local _res_path="/usr/lib/${_pkgname}"
43
44 # 解包 app.asar,将所有 JS 文件中的 process.resourcesPath 替换为实际安装路径
45 asar e "${srcdir}/opt/${_dist_name}/resources/app.asar" "${srcdir}/app-patched"
46 find "${srcdir}/app-patched" -type f -name "*.js" \
47 -exec sed -i "s|process\.resourcesPath|\"${_res_path}\"|g" {} +
48 asar p "${srcdir}/app-patched" "${srcdir}/app.asar"
49
50 # modules 目录中的 JS 同样引用了 process.resourcesPath,需要一并替换
51 find "${srcdir}/opt/${_dist_name}/resources/modules" -type f -name "*.js" \
52 -exec sed -i "s|process\.resourcesPath|\"${_res_path}\"|g" {} +
53
54 # 填充启动脚本占位符
55 sed -i -e "
56 s/@electronversion@/${_electronversion}/g
57 s/@appname@/${_pkgname}/g
58 s/@options@//g
59 " "${srcdir}/${_pkgname}.sh"
60
61 # 修正 .desktop 文件中的 Exec 行,指向系统启动器
62 sed -i "s|Exec=.*|Exec=${_pkgname} %U|" \
63 "${srcdir}/usr/share/applications/${_pkgname}.desktop"
64}
65
66package() {
67 local _lib_dir="${pkgdir}/usr/lib/${_pkgname}"
68
69 # 安装启动脚本
70 install -Dm755 "${srcdir}/${_pkgname}.sh" "${pkgdir}/usr/bin/${_pkgname}"
71
72 # 安装应用资源目录
73 install -d "${_lib_dir}"
74
75 # 使用修补后的 app.asar,同时拷贝其余资源(native、wasm、modules、gsk 等)
76 install -Dm644 "${srcdir}/app.asar" "${_lib_dir}/app.asar"
77 find "${srcdir}/opt/${_dist_name}/resources" -mindepth 1 -maxdepth 1 ! -name "app.asar" \
78 -exec cp -a {} "${_lib_dir}/" \;
79
80 # 确保原生辅助程序有执行权限
81 chmod +x "${_lib_dir}/native/xlsx-sidecar"
82
83 # 安装桌面文件
84 install -Dm644 "${srcdir}/usr/share/applications/${_pkgname}.desktop" \
85 "${pkgdir}/usr/share/applications/${_pkgname}.desktop"
86
87 # 安装图标
88 install -d "${pkgdir}/usr/share/icons/hicolor"
89 cp -a "${srcdir}/usr/share/icons/hicolor/." "${pkgdir}/usr/share/icons/hicolor/"
90
91 # 安装 MIME 类型定义
92 install -Dm644 "${srcdir}/usr/share/mime/packages/${_pkgname}.xml" \
93 "${pkgdir}/usr/share/mime/packages/${_pkgname}.xml"
94
95 # 安装许可证
96 install -Dm644 "${srcdir}/opt/${_dist_name}/LICENSE.electron.txt" \
97 "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.electron.txt"
98}
99

Scan history

Scanned at (UTC)SeverityRules
2026-08-31 13:45:31 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