%global debug_package %{nil} %global __requires_exclude ^(/usr/bin/dotslash|libc\\.so\\(\\)\\(64bit\\)|lib(dl\\.so\\.2|pthread\\.so\\.0)\\(GLIBC_[^)]*\\)\\(64bit\\))$ %undefine _disable_source_fetch %global app_version 0.0.33 %global pnpm_version 11.10.0 %global github_owner pingdotgg %global github_repo t3code %global release_tag v%{app_version} %ifarch x86_64 %global electron_arch x64 %global foreign_electron_arch arm64 %global claude_vendor_foreign_arch arm64-linux %global rpm_file_arch x86-64 %endif %ifarch aarch64 %global electron_arch arm64 %global foreign_electron_arch x64 %global claude_vendor_foreign_arch x64-linux %global rpm_file_arch ARM aarch64 %endif %{!?electron_arch:%{error:Unsupported arch %{_target_cpu}; supported arches are x86_64 and aarch64}} Name: t3code Version: %{app_version} Release: 1%{?dist} Summary: Desktop UI for code agents such as Codex License: MIT URL: https://github.com/%{github_owner}/%{github_repo} Source0: https://github.com/%{github_owner}/%{github_repo}/archive/refs/tags/%{release_tag}.tar.gz#/%{name}-%{version}.tar.gz Source1: https://registry.npmjs.org/pnpm/-/pnpm-%{pnpm_version}.tgz#/pnpm-%{pnpm_version}.tgz BuildArch: %{_target_cpu} BuildRequires: cargo BuildRequires: gcc-c++ BuildRequires: make BuildRequires: nodejs24 >= 24.13.1 BuildRequires: nodejs24-npm BuildRequires: python3 BuildRequires: ImageMagick BuildRequires: vips-devel BuildRequires: git Requires: xdg-utils %description T3 Code is a desktop UI for code agents such as Codex. This package builds the native Linux desktop bundle for the current target architecture from the pinned upstream release source tarball and installs it as a regular application. %prep %autosetup -n %{github_repo}-%{version} %build export HOME="%{_builddir}/%{name}-%{version}-home" export npm_config_cache="%{_builddir}/%{name}-%{version}-npm-cache" export PNPM_HOME="%{_builddir}/%{name}-%{version}-pnpm-home" export pnpm_config_store_dir="%{_builddir}/%{name}-%{version}-pnpm-store" export PYTHON="%{__python3}" export npm_config_python="%{__python3}" mkdir -p "$HOME" "$npm_config_cache" "$PNPM_HOME" "$pnpm_config_store_dir" node_cmd="/usr/bin/node-24" test -x "$node_cmd" node_major="$("$node_cmd" -p 'process.versions.node.split(".")[0]')" for modules_root in "/usr/lib/node_modules_${node_major}" /usr/lib/node_modules; do if [ -f "$modules_root/npm/node_modules/node-gyp/bin/node-gyp.js" ]; then node_gyp_js="$modules_root/npm/node_modules/node-gyp/bin/node-gyp.js" node_gyp_bin_dir="$modules_root/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin" break fi done test -n "$node_gyp_js" test -d "$node_gyp_bin_dir" pnpm_root="%{_builddir}/%{name}-%{version}-pnpm" rm -rf "$pnpm_root" mkdir -p "$pnpm_root" tar -xzf "%{SOURCE1}" -C "$pnpm_root" pnpm_cli="$pnpm_root/package/bin/pnpm.cjs" pnpx_cli="$pnpm_root/package/bin/pnpx.cjs" test -f "$pnpm_cli" test -f "$pnpx_cli" cat > "$PNPM_HOME/pnpm" < "$PNPM_HOME/pnpx" < "$PNPM_HOME/node" < "$file_manifest" if grep -i musl "$file_manifest"; then echo "musl-linked files remain in %{_libexecdir}/%{name}; prune or rebuild them for glibc" >&2 exit 1 fi if grep -E 'ELF .* (x86-64|ARM aarch64)' "$file_manifest" | grep -Fv '%{rpm_file_arch}'; then echo "foreign-architecture ELF files remain in %{_libexecdir}/%{name}; prune or rebuild them for %{_target_cpu}" >&2 exit 1 fi rm -f "$file_manifest" if [ -f "%{buildroot}%{_libexecdir}/%{name}/chrome-sandbox" ]; then chmod 4755 "%{buildroot}%{_libexecdir}/%{name}/chrome-sandbox" fi main_exe="$(find "$appdir" -mindepth 1 -maxdepth 1 -type f -perm /111 \ ! -name '*.desktop' \ ! -name '*.so' \ ! -name '*.so.*' \ ! -name 'chrome-sandbox' \ ! -name 'chrome_crashpad_handler' \ ! -name 'AppRun' \ -printf '%f\n' | sort | head -n1)" test -n "$main_exe" install -d "%{buildroot}%{_bindir}" cat > "%{buildroot}%{_bindir}/%{name}" < "%{buildroot}%{_datadir}/applications/%{name}.desktop" else cat > "%{buildroot}%{_datadir}/applications/%{name}.desktop" < - 0.0.33-1 - Update to the latest non-nightly upstream release * Thu Jul 30 2026 Codex - 0.0.31-2 - Add Cargo for building the native resource monitor * Sat Jul 04 2026 Codex - 0.0.28-8 - Make bundled native file checks robust and prune musl dependency directories * Sat Jul 04 2026 Codex - 0.0.28-7 - Prune foreign-architecture Linux prebuilds from bundled node modules * Thu Jul 02 2026 Codex - 0.0.28-5 - Prune bundled musl vendor binaries so the Fedora package does not require an unprovided musl libc soname * Wed Jul 01 2026 Codex - 0.0.28-4 - Add build-time node shim for package scripts that call unversioned node * Wed Jul 01 2026 Codex - 0.0.28-3 - Use Fedora's portable nodejs24-npm dependency instead of Fedora 44-only bin subpackages * Wed Jul 01 2026 Codex - 0.0.28-2 - Exclude bundled DotSlash and generic libc auto-requires from packaged agent tooling * Wed Jun 10 2026 Codex - 0.0.27-2 - Add ImageMagick build dependency for Linux icon generation - Use Fedora's Node.js 24 runtime and npm symlinks consistently during the build * Mon Jun 08 2026 Codex - 0.0.25-1 - Update to 0.0.25 - Switch the build from Bun to the upstream pinned pnpm package manager * Sat Mar 07 2026 Codex - 0.0.4-4 - Use `assets/prod/black-universal-1024.png` as the installed desktop icon * Sat Mar 07 2026 Codex - 0.0.4-3 - Use Fedora's `nodejs-npm` package name for the bundled npm/node-gyp tooling - Resolve Fedora's versioned npm path dynamically * Sat Mar 07 2026 Codex - 0.0.4-2 - Add an explicit npm-related BuildRequires and resolve Fedora's versioned npm path dynamically * Sat Mar 07 2026 Codex - 0.0.4-1 - Update to 0.0.4 - Force Bun to use the packaged node-gyp during native addon builds - Prune unused musl and non-Linux node addon prebuilds to avoid invalid RPM deps