Updates: Update an Pack for ArchLinux(上传了一个直接通过git clone的编译方法) - #242
Updates: Update an Pack for ArchLinux(上传了一个直接通过git clone的编译方法)#242lldxlzy wants to merge 3 commits into
Conversation
Greptile SummaryAdds 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/5No 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.
What T-Rex did
Reviews (2): Last reviewed commit: "Add: Added RustUp into makedep" | Re-trigger Greptile |
| source=( | ||
| "${_srcname}::git+https://gh-proxy.org/https://github.com/YUCLing/open-orpheus.git#tag=v${pkgver}" | ||
| ) | ||
| sha256sums=('SKIP') |
There was a problem hiding this comment.
There was a problem hiding this comment.
考虑到使用者十有八九是中国人,而中国网络有时候会误ban Github,因此使用Cloudflare托管的Github Proxy(gh-proxy.com)。
There was a problem hiding this comment.
用户的理由合理——代理的存在是有充分实际原因的,我应该承认这一点。
不过,原始评论的核心安全问题并不在于"是否使用代理",而在于两个独立的问题:
-
sha256sums=('SKIP')— 对于 git 源这实际上是 makepkg 的必需写法,并非安全漏洞。git 协议本身通过内容寻址(SHA1 对象哈希)提供一定的完整性保护,代理难以在不破坏 git 协议的情况下替换内容。这一点我之前的评论表述有误导性。 -
可变标签(mutable tag) — 这才是真正值得关注的点,与代理无关。
#tag=v${pkgver}指向的标签随时可以被 force-push 到不同的 commit,导致相同的pkgver对应不同的代码。
如果想加固这一点,可以将标签固定为不可变的 commit hash:
| 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.
There was a problem hiding this comment.
理解使用代理的原因,这对中国用户来说确实是个实际问题。但代理本身不是安全问题的核心——核心问题是 sha256sums=('SKIP') 意味着无论代理返回什么内容都会被接受并执行,包括潜在的被篡改版本。
实际上两个目标可以同时满足。可以保留代理地址,同时通过固定 commit hash 来确保完整性:
| 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 即可。这样既保持了代理的可访问性,又防止了标签被重新指向或代理响应被替换的风险。
There was a problem hiding this comment.
对,这一点完全正确。对于 git 类型的源,sha256sums=('SKIP') 是 makepkg 的强制要求,不是可选项——makepkg 不会对 git 仓库计算 SHA256,必须填 SKIP,否则构建会报错。我之前将其列为安全问题是误导性的,已在后续回复中更正过。
唯一剩余的可选改进是将 #tag= 换为 #commit= 以防止标签被 force-push 到不同的 commit,但这需要每次发版手动维护 commit hash,如果认为维护成本不值得,当前写法也是社区中完全合理的常见做法。
There was a problem hiding this comment.
反对,根据我的使用体验来看,各种gh-proxy往往周期性失效,并且峰值速度较低。在良好的国际网络环境下,其实验体验往往远低于github.com。
对于AUR用户,由于大量AUR包正在引用GitHub资源,几乎可以认为大家都具有好的国际网络环境。
There was a problem hiding this comment.
这个反对意见成立。对于 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.
|
感谢,但 PKGBUILD 不是应该提交到 AUR 吗?放在这里基本不会有别人维护 |
|
老大,AUR最近在删包你忘了吗
我们上传上去怕是有封号的危险(不是)
…________________________________
发件人: 知寂 ***@***.***>
发送时间: 2026年8月24日 20:09
收件人: YUCLing/open-orpheus ***@***.***>
抄送: None Genraku ***@***.***>; Author ***@***.***>
主题: Re: [YUCLing/open-orpheus] Updates: Update an Pack for ArchLinux(上传了一个直接通过git clone的编译方法) (PR #242)
[https://avatars.githubusercontent.com/u/18556014?s=20&v=4]YUCLing left a comment (YUCLing/open-orpheus#242)<#242 (comment)>
感谢,但 PKGBUILD 不是应该提交到 AUR 吗?放在这里基本不会有别人维护
―
Reply to this email directly, view it on GitHub<#242?email_source=notifications&email_token=BH7LVUAV7XOU5N7P7GSZ2535LQV6DA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTKMZZGQ4TMNBXGI2KM4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2KYZTPN52GK4S7MNWGSY3L#issuecomment-5394964724>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/BH7LVUEYBFD6VP2XGJWBCBD5LQV6DAVCNFSNUABGKJSXA33TNF2G64TZHMYTCNZSHEZDMOBTGA5US43TOVSTWNJSGMYTMMRWGA3DTILWAI>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
本更新仅添加了一个PKGBUILD,PKGBUILD仅通过clone源仓库以安装,而不同于AUR仓库上的PKGBUILD(下载releases的tar安装)
每次更新时需更新pkgver=当前更新版本。