From 4d9e196d4c220aba7b583c1a7fbc435c15b6afa6 Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Thu, 29 Oct 2026 08:26:12 +0000 Subject: automatic import of opencode --- opencode.spec | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'opencode.spec') diff --git a/opencode.spec b/opencode.spec index 13b1dc9..83a2771 100644 --- a/opencode.spec +++ b/opencode.spec @@ -7,9 +7,17 @@ # monorepo 内部 workspace 包(opencode-ai/plugin、script、sdk)在编译时 # 已被打进二进制,运行时不作为独立 RPM 依赖。 +# 预编译二进制保护:Bun compile 产物将其版本号等运行时元数据嵌入 ELF 节中, +# 任何形式的 strip(含 find-debuginfo 的 --strip-debug / -g)都会移除这些节, +# 导致 `opencode --version` 退化为 Bun 运行时编译期默认值(1.4.4), +# %check 的版本校验随之失败。本包直接采用上游预编译产物,无源码可重新编译, +# 因此必须彻底禁用 debuginfo 提取与 strip,保持二进制原样。 +%global debug_package %{nil} +%global __strip /bin/true + Name: opencode Version: 1.19.5 -Release: 1%{?dist} +Release: 2%{?dist} Summary: AI-powered development tool License: MIT @@ -50,6 +58,10 @@ install -Dpm 0755 bin/opencode %{buildroot}%{_bindir}/opencode %{_bindir}/opencode %changelog +* Thu Oct 29 2026 AI Importer - 1.19.5-2 +- Disable debug_package and strip: stripping corrupts the Bun-compiled binary's + embedded version metadata, causing --version to report a fallback value. + * Thu Oct 29 2026 AI Importer - 1.19.5-1 - Initial package for opencode 1.19.5 - Ship upstream pre-compiled Linux x86_64 binary (Bun compile) -- cgit v1.2.3