fix(packaging): stop shipping frontend-contract in Linux bundles

tauri-cli's get_binaries() adds every file in src-tauri/src/bin/ as a
bundle binary, and the deb/rpm packagers copy each one to /usr/bin, so
the dev-only bindings generator ended up as /usr/bin/frontend-contract
(1.0 MB) in release packages and broke downstream repackaging (Copr:
"Installed but unpackaged file(s) found"). There is no bundler option
to exclude a binary, so move the generator to an example target, which
cargo keeps dev-only and get_binaries() never scans, and invoke it via
'cargo run --example'.

Ref https://github.com/clash-verge-rev/clash-verge-rev/pull/8131#issuecomment-6137907930
This commit is contained in:
Tunglies
2026-10-13 16:20:13 +08:00
parent 3693efcf6c
commit 3ec858eb9f
3 changed files with 7 additions and 1 deletions
+4
View File
@@ -6,6 +6,10 @@
- 修复通过 URL 导入订阅时,即使导入的订阅并非当前使用的订阅,也会重新加载当前配置的问题 - 修复通过 URL 导入订阅时,即使导入的订阅并非当前使用的订阅,也会重新加载当前配置的问题
- 修复「首页」网站测速失败后卡片一直显示测试中的问题 - 修复「首页」网站测速失败后卡片一直显示测试中的问题
**🐧 Linux**
- Linux:修复 deb/rpm 安装包错误包含多余的 `frontend-contract` 可执行文件,导致下游重新打包失败的问题
</details> </details>
<details> <details>
+1 -1
View File
@@ -22,7 +22,7 @@ try {
'run', 'run',
'-p', '-p',
'clash-verge', 'clash-verge',
'--bin', '--example',
'frontend-contract', 'frontend-contract',
'--locked', '--locked',
'-q', '-q',
@@ -1,3 +1,5 @@
// Dev-only target: Tauri ships everything under src/bin/ to /usr/bin in deb/rpm
// bundles (PR #8131), so this generator must stay an example, never a bin.
fn main() -> Result<(), Box<dyn std::error::Error>> { fn main() -> Result<(), Box<dyn std::error::Error>> {
let mut args = std::env::args_os().skip(1); let mut args = std::env::args_os().skip(1);
let output = args let output = args