Skip to content

Updates: Update an Pack for ArchLinux(上传了一个直接通过git clone的编译方法) - #242

Open
lldxlzy wants to merge 3 commits into
YUCLing:mainfrom
lldxlzy:main
Open

Updates: Update an Pack for ArchLinux(上传了一个直接通过git clone的编译方法)#242
lldxlzy wants to merge 3 commits into
YUCLing:mainfrom
lldxlzy:main

Conversation

@lldxlzy

@lldxlzy lldxlzy commented Aug 24, 2026

Copy link
Copy Markdown

本更新仅添加了一个PKGBUILD,PKGBUILD仅通过clone源仓库以安装,而不同于AUR仓库上的PKGBUILD(下载releases的tar安装)
每次更新时需更新pkgver=当前更新版本。

@greptile-apps

greptile-apps Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Adds an Arch Linux PKGBUILD for Open Orpheus, including runtime and build dependencies, source retrieval, Electron packaging, a launcher, desktop metadata, icon installation, and license installation.

Confidence Score: 5/5

No blocking failure remains.

The package build commands resolve to defined scripts, and the module build progressed through Rust and native-module compilation after the required WASM target was available.

T-Rex T-Rex Logs

What T-Rex did

  • Ran the direct pnpm build:modules after inspecting the PKGBUILD dependency declarations and root script mappings, and the build progressed through the WASM and native-module compilation path once the missing sandbox WASM target was added.
  • Verified the PKGBUILD does not invoke rustup and that the Arch wasm-wasm dependency supplies the required wasm32-unknown-unknown target on an Arch build host, enabling cargo build --target wasm32-unknown-unknown.
  • Analyzed makepkg source-fetch tagging behavior and identified a reproducibility and integrity risk, recommending an explicit commit pin or tag controls to harden supply-chain authenticity.

View all artifacts

T-Rex Ran code and verified through T-Rex

Reviews (2): Last reviewed commit: "Add: Added RustUp into makedep" | Re-trigger Greptile

Comment thread PKGBUILD
Comment on lines +35 to +38
source=(
"${_srcname}::git+https://gh-proxy.org/https://github.com/YUCLing/open-orpheus.git#tag=v${pkgver}"
)
sha256sums=('SKIP')

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 security 未验证的代理源码会执行构建脚本

源码通过 gh-proxy.org 从可变的 v${pkgver} 标签获取,但 sha256sums=('SKIP') 会接受返回的任意修订版本。之后 prepare()build() 会执行源码控制的 pnpm installpnpm build:modulespnpm package。代理响应被替换或标签被重新指向时,构建用户会执行未经审核的代码,并可能产出与声明发行版不一致的软件包。请固定经过审核的不可变提交或已验证的发行版归档,并在执行任何构建脚本前启用完整性校验。

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

考虑到使用者十有八九是中国人,而中国网络有时候会误ban Github,因此使用Cloudflare托管的Github Proxy(gh-proxy.com)。

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

用户的理由合理——代理的存在是有充分实际原因的,我应该承认这一点。

不过,原始评论的核心安全问题并不在于"是否使用代理",而在于两个独立的问题:

  1. sha256sums=('SKIP') — 对于 git 源这实际上是 makepkg 的必需写法,并非安全漏洞。git 协议本身通过内容寻址(SHA1 对象哈希)提供一定的完整性保护,代理难以在不破坏 git 协议的情况下替换内容。这一点我之前的评论表述有误导性。

  2. 可变标签(mutable tag) — 这才是真正值得关注的点,与代理无关。#tag=v${pkgver} 指向的标签随时可以被 force-push 到不同的 commit,导致相同的 pkgver 对应不同的代码。

如果想加固这一点,可以将标签固定为不可变的 commit hash:

Suggested change
source=(
"${_srcname}::git+https://gh-proxy.org/https://github.com/YUCLing/open-orpheus.git#tag=v${pkgver}"
)
sha256sums=('SKIP')
"${_srcname}::git+https://gh-proxy.org/https://github.com/YUCLing/open-orpheus.git#commit=<具体的commit_sha>"

但这需要每次发版手动更新 commit hash,如果认为维护成本过高,当前做法在 git 协议的保护下也是社区中常见的实践。代理的使用本身是合理的。

Tip: You can customize Greptile's behavior for this repo with .greptile/rules.md and .greptile/config.json.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

理解使用代理的原因,这对中国用户来说确实是个实际问题。但代理本身不是安全问题的核心——核心问题是 sha256sums=('SKIP') 意味着无论代理返回什么内容都会被接受并执行,包括潜在的被篡改版本。

实际上两个目标可以同时满足。可以保留代理地址,同时通过固定 commit hash 来确保完整性:

Suggested change
source=(
"${_srcname}::git+https://gh-proxy.org/https://github.com/YUCLing/open-orpheus.git#tag=v${pkgver}"
)
sha256sums=('SKIP')
source=(
"${_srcname}::git+https://gh-proxy.org/https://github.com/YUCLing/open-orpheus.git#commit=<v${pkgver}对应的commit sha>"
)
sha256sums=('SKIP')

#commit= 替代 #tag= 后,即使代理返回的内容被篡改,只要 commit hash 不匹配就会构建失败。每次更新 pkgver 时同步更新对应的 commit hash 即可。这样既保持了代理的可访问性,又防止了标签被重新指向或代理响应被替换的风险。

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sha256sums跳过的原因是无法逐文件验证

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

对,这一点完全正确。对于 git 类型的源,sha256sums=('SKIP') 是 makepkg 的强制要求,不是可选项——makepkg 不会对 git 仓库计算 SHA256,必须填 SKIP,否则构建会报错。我之前将其列为安全问题是误导性的,已在后续回复中更正过。

唯一剩余的可选改进是将 #tag= 换为 #commit= 以防止标签被 force-push 到不同的 commit,但这需要每次发版手动维护 commit hash,如果认为维护成本不值得,当前写法也是社区中完全合理的常见做法。

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

反对,根据我的使用体验来看,各种gh-proxy往往周期性失效,并且峰值速度较低。在良好的国际网络环境下,其实验体验往往远低于github.com。

对于AUR用户,由于大量AUR包正在引用GitHub资源,几乎可以认为大家都具有好的国际网络环境。

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个反对意见成立。对于 AUR 包,gh-proxy.org 并不是普适优化:它会额外引入一个可能周期性失效、性能不稳定的中间依赖,而许多 AUR 用户本身已经能够访问 GitHub。因此更合理的默认值是直接使用上游地址:git+https://github.com/YUCLing/open-orpheus.git

这只涉及下载可用性,不改变前面关于可变 #tag= 的结论;若希望防止标签被重新指向,仍可将其固定到对应的 #commit=sha256sums=('SKIP') 对 git 源仍应保留。

Tip: You can customize Greptile's behavior for this repo with .greptile/rules.md and .greptile/config.json.

Comment thread PKGBUILD Outdated
@lldxlzy
lldxlzy marked this pull request as draft August 24, 2026 06:49
@lldxlzy
lldxlzy marked this pull request as ready for review August 24, 2026 06:49
@YUCLing

YUCLing commented Aug 24, 2026

Copy link
Copy Markdown
Owner

感谢,但 PKGBUILD 不是应该提交到 AUR 吗?放在这里基本不会有别人维护

@lldxlzy

lldxlzy commented Aug 27, 2026 via email

Copy link
Copy Markdown
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants