|
| 1 | +# Codex CLI 0.131.0 issue #14860 fix package |
| 2 | + |
| 3 | +This repository contains a small, source-based patch package for Codex CLI |
| 4 | +0.131.0. It does not ship or replace Codex with any third-party binary. |
| 5 | + |
| 6 | +The patch follows the Nopiskl issue #14860 approach: |
| 7 | + |
| 8 | +- set `reqwest::ClientBuilder::tcp_user_timeout` to 120 seconds in the default |
| 9 | + Codex HTTP client |
| 10 | +- keep the installed CLI version at `codex-cli 0.131.0` |
| 11 | +- provide a CentOS 7 compatibility shim for the final link step when older |
| 12 | + system headers/libc do not expose symbols needed by transitive native code |
| 13 | + |
| 14 | +## Contents |
| 15 | + |
| 16 | +- `patches/codex-cli-0.131.0-issue14860-tcp-user-timeout.patch` |
| 17 | + - The source patch for `codex-rs/login/src/auth/default_client.rs`. |
| 18 | +- `src/centos7_compat.c` |
| 19 | + - Link-time compatibility symbols used on CentOS 7: `memfd_create`, |
| 20 | + `le16toh`, and `be16toh`. |
| 21 | +- `scripts/build_codex_0_131_0_with_issue14860_fix.sh` |
| 22 | + - Applies the patch if needed and builds `codex-cli` from an official |
| 23 | + `rust-v0.131.0` source checkout. |
| 24 | +- `scripts/install_patched_codex.sh` |
| 25 | + - Backs up the currently installed Codex vendor binary and installs the |
| 26 | + locally built replacement. |
| 27 | +- `docs/centos7-build-notes.md` |
| 28 | + - Notes from the CentOS 7 build and install flow. |
| 29 | + |
| 30 | +## Prerequisites |
| 31 | + |
| 32 | +Use an official Codex `rust-v0.131.0` source checkout. This package assumes the |
| 33 | +checkout layout contains `codex-rs/`. |
| 34 | + |
| 35 | +On CentOS 7, install the system build dependencies: |
| 36 | + |
| 37 | +```bash |
| 38 | +yum install -y openssl-devel perl-IPC-Cmd cmake |
| 39 | +``` |
| 40 | + |
| 41 | +Use a local Rust/Cargo installation for the source tree instead of modifying |
| 42 | +global shell configuration. The tested build used Rust 1.93.0 with: |
| 43 | + |
| 44 | +```bash |
| 45 | +RUSTUP_HOME=/path/to/codex-rust-v0.131.0-src/.rustup-home |
| 46 | +CARGO_HOME=/path/to/codex-rust-v0.131.0-src/.cargo-home |
| 47 | +``` |
| 48 | + |
| 49 | +## Build |
| 50 | + |
| 51 | +From this repository: |
| 52 | + |
| 53 | +```bash |
| 54 | +SOURCE_ROOT=/path/to/codex-rust-v0.131.0-src \ |
| 55 | +RUSTUP_HOME=/path/to/codex-rust-v0.131.0-src/.rustup-home \ |
| 56 | +CARGO_HOME=/path/to/codex-rust-v0.131.0-src/.cargo-home \ |
| 57 | +CARGO_TARGET_DIR=/path/to/codex-rust-v0.131.0-src/.cargo-target \ |
| 58 | +scripts/build_codex_0_131_0_with_issue14860_fix.sh |
| 59 | +``` |
| 60 | + |
| 61 | +Expected verification: |
| 62 | + |
| 63 | +```bash |
| 64 | +/path/to/codex-rust-v0.131.0-src/.cargo-target/release/codex --version |
| 65 | +# codex-cli 0.131.0 |
| 66 | +``` |
| 67 | + |
| 68 | +## Install |
| 69 | + |
| 70 | +The install script must run as a user that can write the installed Codex vendor |
| 71 | +binary path. |
| 72 | + |
| 73 | +```bash |
| 74 | +SOURCE_ROOT=/path/to/codex-rust-v0.131.0-src \ |
| 75 | +INSTALL_PATH=/usr/lib/node_modules/@openai/codex/node_modules/@openai/codex-linux-x64/vendor/x86_64-unknown-linux-musl/codex/codex \ |
| 76 | +scripts/install_patched_codex.sh |
| 77 | +``` |
| 78 | + |
| 79 | +The script creates a timestamped backup beside the original binary before |
| 80 | +installing the patched binary with mode `755`. |
| 81 | + |
| 82 | +## Verified local result |
| 83 | + |
| 84 | +The local patched binary verified as: |
| 85 | + |
| 86 | +```text |
| 87 | +codex-cli 0.131.0 |
| 88 | +``` |
| 89 | + |
| 90 | +`codex app-server --help` also returned successfully. |
0 commit comments