dev-util/codex: add 0.156.0 and 0.155.1-r1

The new version's connectors code overflows rustc's query depth limit, and
both versions now depend on sys-apps/bubblewrap for the Linux sandbox.

Signed-off-by: Huang Rui <vowstar@gmail.com>
This commit is contained in:
Huang Rui committed 2026-09-22 21:48:40 -07:00
1 parent dc51f2aa05
commit 48bfc9bafc
4 files changed
+325

No files matched your search

+3
View File
@@ -1,8 +1,11 @@
DIST codex-0.155.0.tar.gz 14486537 BLAKE2B 10250cbe0259df03f21d140ef3d6baa4c56711332756f53b90b4405bcf03641f5931d11d935a047c8970e913cd4e7941ff8fe8da1c2e3fd61b6bd7b0553f1e69 SHA512 cf276e946d0fd65bfa8f8cf420319a152d87b069f0e1d233d74bd8e3f1f966b6f46793959ec4aaac8ebdd70700c41bc5514fa757677d172a7a1f8d89c6f4f68b
DIST codex-0.155.1.tar.gz 14487526 BLAKE2B df09e2f2b063c9144975549af23a5c89ed41fa270b4bd144a1609d26dfe05fd28d50cec089a84a7cd6e46d595de38864baf53edb4fe52a37edd2f44b294c359d SHA512 222a0652740ce05e8bb1e87db86ba90572efcc77c40963d4428c36b72b81a4361b4f6d93c32bae00a23b30f08e228ea011925f720f133c1cfd9138b4c90cf2f3
DIST codex-0.156.0.tar.gz 15838789 BLAKE2B 2a5a198d8fd66abf39f5f82ae7d2d810875970f31fb49b2032e7be9b69fef42153f2ffe4663f7d1174eada52f85080e2c22bdd6410d02da1ddeb660ba73ce73e SHA512 e50430d2fab4898feaeeda5c51e790c38f55b2837c087ac7c5b5a552add491276c9cfecc4c72927a2d68b89eafcab2a933a390910f7752dcfc9ac3ddcc84fa5a
DIST codex-rust-v0.155.0-crates.tar.xz 157941648 BLAKE2B fd3afda982a21c614e0eb96fc2f37aad83b4bc01a815c1664341d05d88e7a0eb52ef5259c3b60e2669ccf4daa6aebada9e74de79f993c1255919d9bf432866e6 SHA512 9939652cf897eae7178785aca31c8cde52facc38425e496eca7904f6263f96b5cf64f815fa3d368b322ea8d241bc8737ecd1dd25b1d01e51364811ded7c2dc29
DIST codex-rust-v0.155.1-crates.tar.xz 157941648 BLAKE2B fd3afda982a21c614e0eb96fc2f37aad83b4bc01a815c1664341d05d88e7a0eb52ef5259c3b60e2669ccf4daa6aebada9e74de79f993c1255919d9bf432866e6 SHA512 9939652cf897eae7178785aca31c8cde52facc38425e496eca7904f6263f96b5cf64f815fa3d368b322ea8d241bc8737ecd1dd25b1d01e51364811ded7c2dc29
DIST codex-rust-v0.156.0-crates.tar.xz 158178052 BLAKE2B 878048fd7831cab2e226d72370246d86e8eba923aff2b04dda017bc843c3b35d284ace60ea1f75d9c986e3c1c3d405da25430c9236b9bddb08a9aa8578de44f5 SHA512 1f3d8195db2fd4968e125b551ef2ef28cc7c64b46ddcba36c87df5be30767f02f1397f653967757f86606f654a1f21f4579c2d7072db89be524a8e6a9ae98c46
DIST crossterm-45fecb9508105988f42fe6ff0441783ed3717f92.gh.tar.gz 144786 BLAKE2B 18577acd2586a50723657e77b304d7bd309208d7ce597d315d13d7e36c90ac08f15510053ad1e927798b0edabc75fc8e54f1f2ac4978215084c0cf84573193e8 SHA512 aa5fd475a306000032fa0a68c758d81056920c68fd001ce632e0fbc11d70efd37def5786a677f3f4cd2e17b76672eda6bb53a517ba90a18e8dc312c390987786
DIST h3-e07e69412876f7e26f026bd75a48b2704d8c8283.gh.tar.gz 244832 BLAKE2B bea2d550925b09b3fd0a33aef734a26a7457d91dc0a89fe72cd6de684dd2f2a37de5ac615691e7d92cc47fa7aaad4ab13c253dd30eaa3287f7d62e139f77d07a SHA512 9dc2589b2ea013f6bb79c05fb515fdf236834116241ecb33c783b64102e3904c11beea7d75ad12d3fd48b66276387da96c162657010292eae5a8c84260ef94d2
DIST mxc-6cd3d58f05d3447e67109cfb75e042803b843ca4.gh.tar.gz 5985947 BLAKE2B f2c48e8d16586407986dee718cc2aa9bc58174e6e9e1a13b36bcc5a9aae7d9f033863479d077e2e579a21d07914043fcac52d0981feb9230109336675fe28485 SHA512 ac2ce0b3a30a0e0faff40a31fea16d44a7eea1c40cce3bbb8fa98319d221a04b5ab27085620c1929d4c1d17b3cefea1e3e0586a8246a8569199e417e804ddbba
DIST nucleo-4253de9faabb4e5c6d81d946a5e35a90f87347ee.gh.tar.gz 86782 BLAKE2B a812a2d2f08df818ac7b13b800f51c4229ea1f968668b1224fbc1fd82fb4e045f6b2c536ec6d2647a579097efbddaf041f4b7b356107679156aaa3ca5a9d4068 SHA512 354061278efce55defb30b9ee2ef5cdab745ab56d7d113f6f47a8ac174b4215ec6efe15c15bef0e3d907350182c0d189071e9d7d17d40e807d4db5361682f4e0
DIST rules_rust-b56cbaa8465e74127f1ea216f813cd377295ad81.gh.tar.gz 3951333 BLAKE2B e369b7ccc25326726340fced4c8f8f9181f02f45be9d5f24d00201999a2b11c42d010e7623429b1910db7fdfdf4c202e061a5ba5db722d3126ee26d9597d7e0d SHA512 3f2ef3d7940096fa34b85ee0d9979085fe99c7d2ae8c5ed9399bd5cf8370a31fa93d16c752f22166b42d30c2b7f9f921f7a963928519592e3ffd588644d3b1c7
+155
View File
@@ -0,0 +1,155 @@
# Copyright 2025-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
# NOTE: This package uses a pre-built crate tarball instead of listing individual
# crates in CRATES="". This approach is required because:
# 1. Codex has 800+ crate dependencies, which triggers Portage QA warnings:
# "QA Notice: This package uses a very large number of CRATES. Please provide
# a crate tarball instead and fetch it via SRC_URI."
# 2. Stricter ebuild QA checks (e.g., in CI pipelines) fail with too many crates.
#
# The crate tarball is auto-generated by GitHub Actions at:
# https://github.com/gentoo-zh-drafts/codex/
# Workflow source code for auditing:
# https://github.com/gentoo-zh-drafts/codex/blob/crate-dist/.github/workflows/crates.yml
# This allows anyone to review and verify the crate packaging process.
CRATES="
"
declare -A GIT_CRATES=(
[appcontainer_common]='https://github.com/microsoft/mxc;6cd3d58f05d3447e67109cfb75e042803b843ca4;mxc-%commit%/src/backends/appcontainer/common'
[crossterm]='https://github.com/openai-oss-forks/crossterm;45fecb9508105988f42fe6ff0441783ed3717f92;crossterm-%commit%'
[learning_mode_windows]='https://github.com/microsoft/mxc;6cd3d58f05d3447e67109cfb75e042803b843ca4;mxc-%commit%/src/backends/learning_mode/windows'
[nucleo-matcher]='https://github.com/helix-editor/nucleo;4253de9faabb4e5c6d81d946a5e35a90f87347ee;nucleo-%commit%/matcher'
[nucleo]='https://github.com/helix-editor/nucleo;4253de9faabb4e5c6d81d946a5e35a90f87347ee;nucleo-%commit%'
[runfiles]='https://github.com/dzbarsky/rules_rust;b56cbaa8465e74127f1ea216f813cd377295ad81;rules_rust-%commit%/rust/runfiles'
[tokio-tungstenite]='https://github.com/openai-oss-forks/tokio-tungstenite;0e5b2d73aa18dd9f0a50ee9ff199d5aef7594186;tokio-tungstenite-%commit%'
[tungstenite]='https://github.com/openai-oss-forks/tungstenite-rs;4fffad30fe373adbdcffab9545e9e9bf4f2fc19f;tungstenite-rs-%commit%'
[wxc_common]='https://github.com/microsoft/mxc;6cd3d58f05d3447e67109cfb75e042803b843ca4;mxc-%commit%/src/core/wxc_common'
)
RUST_MIN_VER="1.95.0"
# python3 .github/scripts/rusty_v8_bazel.py resolved-v8-crate-version
RUSTY_V8_TAG="150.4.0"
inherit cargo check-reqs toolchain-funcs
CHECKREQS_MEMORY="15G"
CHECKREQS_DISK_BUILD="20G"
DESCRIPTION="Codex CLI - OpenAI's AI-powered coding agent"
HOMEPAGE="https://github.com/openai/codex"
# The crate tarball URL uses ${PV} so it auto-updates when bumping versions.
# This tarball is generated by: https://github.com/gentoo-zh-drafts/codex/
# See .github/workflows/crates.yml for the generation process.
SRC_URI="
https://github.com/openai/${PN}/archive/rust-v${PV}.tar.gz -> ${P}.tar.gz
https://github.com/gentoo-zh-drafts/codex/releases/download/rust-v${PV}/codex-rust-v${PV}-crates.tar.xz
amd64? (
https://github.com/openai/codex/releases/download/rusty-v8-v${RUSTY_V8_TAG}/librusty_v8_release_x86_64-unknown-linux-musl.a.gz
-> rusty_v8_${RUSTY_V8_TAG}_librusty_v8_release_x86_64-unknown-linux-musl.a.gz
https://github.com/openai/codex/releases/download/rusty-v8-v${RUSTY_V8_TAG}/src_binding_release_x86_64-unknown-linux-musl.rs
-> rusty_v8_${RUSTY_V8_TAG}_src_binding_release_x86_64-unknown-linux-musl.rs
)
arm64? (
https://github.com/openai/codex/releases/download/rusty-v8-v${RUSTY_V8_TAG}/librusty_v8_release_aarch64-unknown-linux-musl.a.gz
-> rusty_v8_${RUSTY_V8_TAG}_librusty_v8_release_aarch64-unknown-linux-musl.a.gz
https://github.com/openai/codex/releases/download/rusty-v8-v${RUSTY_V8_TAG}/src_binding_release_aarch64-unknown-linux-musl.rs
-> rusty_v8_${RUSTY_V8_TAG}_src_binding_release_aarch64-unknown-linux-musl.rs
)
${CARGO_CRATE_URIS}
"
S="${WORKDIR}/${PN}-rust-v${PV}/codex-rs"
LICENSE="Apache-2.0"
# Dependent crate licenses
LICENSE+="
Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD-2 BSD Boost-1.0
CC0-1.0 CDLA-Permissive-2.0 ISC MIT MPL-2.0 Unicode-3.0 ZLIB
"
SLOT="0"
KEYWORDS="-* ~amd64 ~arm64"
# Tests fail due to ring crate conflicts with system OpenSSL
RESTRICT="test"
DEPEND="
dev-libs/openssl:=
sys-apps/dbus
"
RDEPEND="${DEPEND}
>=sys-apps/bubblewrap-0.11.2
"
BDEPEND="virtual/pkgconfig"
# rust does not use *FLAGS from make.conf, silence portage warning
QA_FLAGS_IGNORED="usr/bin/${PN}"
pkg_pretend() {
check-reqs_pkg_pretend
}
pkg_setup() {
check-reqs_pkg_setup
rust_pkg_setup
if tc-is-lto; then
export CARGO_PROFILE_RELEASE_LTO=thin
else
export CARGO_PROFILE_RELEASE_LTO=false
fi
}
gen_git_crate_dir() {
# https://github.com/gentoo/gentoo/blob/b09dd88412fe2d5eee5a8891e08bfa2d67848da3/eclass/cargo.eclass#L442
IFS=';' read -r crate_uri commit crate_dir <<<"${GIT_CRATES[$1]}"
echo "${WORKDIR}/${crate_dir//%commit%/${commit}}"
}
src_prepare() {
default
# Fix tokio-tungstenite's git dependency on tungstenite
sed -i '/^\[dependencies\.tungstenite\]/,/^$/{
s|git = "https://github.com/openai-oss-forks/tungstenite-rs"|path = "'"$(gen_git_crate_dir tungstenite)"'"|
/^rev = /d
}' "$(gen_git_crate_dir tokio-tungstenite)/Cargo.toml" || die
# Remove the [patch.crates-io] section and add path-based patches
sed -i '/^\[patch\.crates-io\]/,/^$/d' "${S}/Cargo.toml" || die
sed -i '/^\[patch\."ssh:\/\/git@github\.com/,/^$/d' "${S}/Cargo.toml" || die
# Add new patch section with local paths
cat >> "${S}/Cargo.toml" <<-EOF || die
[patch.crates-io]
crossterm = { path = "$(gen_git_crate_dir crossterm)" }
tokio-tungstenite = { path = "$(gen_git_crate_dir tokio-tungstenite)" }
tungstenite = { path = "$(gen_git_crate_dir tungstenite)" }
EOF
}
src_compile() {
local rusty_v8_triple
use amd64 && rusty_v8_triple=x86_64-unknown-linux-musl
use arm64 && rusty_v8_triple=aarch64-unknown-linux-musl
# codex-core trait resolution overflows rustc's default 8MiB stack
export RUST_MIN_STACK=16777216
RUSTY_V8_ARCHIVE="${DISTDIR}/rusty_v8_${RUSTY_V8_TAG}_librusty_v8_release_${rusty_v8_triple}.a.gz" \
RUSTY_V8_SRC_BINDING_PATH="${DISTDIR}/rusty_v8_${RUSTY_V8_TAG}_src_binding_release_${rusty_v8_triple}.rs" \
cargo_src_compile \
--bin codex \
--bin codex-code-mode-host
}
src_install() {
dobin "$(cargo_target_dir)/codex"
dobin "$(cargo_target_dir)/codex-code-mode-host"
einstalldocs
}
+159
View File
@@ -0,0 +1,159 @@
# Copyright 2025-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
# NOTE: This package uses a pre-built crate tarball instead of listing individual
# crates in CRATES="". This approach is required because:
# 1. Codex has 800+ crate dependencies, which triggers Portage QA warnings:
# "QA Notice: This package uses a very large number of CRATES. Please provide
# a crate tarball instead and fetch it via SRC_URI."
# 2. Stricter ebuild QA checks (e.g., in CI pipelines) fail with too many crates.
#
# The crate tarball is auto-generated by GitHub Actions at:
# https://github.com/gentoo-zh-drafts/codex/
# Workflow source code for auditing:
# https://github.com/gentoo-zh-drafts/codex/blob/crate-dist/.github/workflows/crates.yml
# This allows anyone to review and verify the crate packaging process.
CRATES="
"
declare -A GIT_CRATES=(
[appcontainer_common]='https://github.com/microsoft/mxc;6cd3d58f05d3447e67109cfb75e042803b843ca4;mxc-%commit%/src/backends/appcontainer/common'
[crossterm]='https://github.com/openai-oss-forks/crossterm;45fecb9508105988f42fe6ff0441783ed3717f92;crossterm-%commit%'
[h3]='https://github.com/hyperium/h3;e07e69412876f7e26f026bd75a48b2704d8c8283;h3-%commit%/h3'
[h3-quinn]='https://github.com/hyperium/h3;e07e69412876f7e26f026bd75a48b2704d8c8283;h3-%commit%/h3-quinn'
[learning_mode_windows]='https://github.com/microsoft/mxc;6cd3d58f05d3447e67109cfb75e042803b843ca4;mxc-%commit%/src/backends/learning_mode/windows'
[nucleo-matcher]='https://github.com/helix-editor/nucleo;4253de9faabb4e5c6d81d946a5e35a90f87347ee;nucleo-%commit%/matcher'
[nucleo]='https://github.com/helix-editor/nucleo;4253de9faabb4e5c6d81d946a5e35a90f87347ee;nucleo-%commit%'
[runfiles]='https://github.com/dzbarsky/rules_rust;b56cbaa8465e74127f1ea216f813cd377295ad81;rules_rust-%commit%/rust/runfiles'
[tokio-tungstenite]='https://github.com/openai-oss-forks/tokio-tungstenite;0e5b2d73aa18dd9f0a50ee9ff199d5aef7594186;tokio-tungstenite-%commit%'
[tungstenite]='https://github.com/openai-oss-forks/tungstenite-rs;4fffad30fe373adbdcffab9545e9e9bf4f2fc19f;tungstenite-rs-%commit%'
[wxc_common]='https://github.com/microsoft/mxc;6cd3d58f05d3447e67109cfb75e042803b843ca4;mxc-%commit%/src/core/wxc_common'
)
RUST_MIN_VER="1.95.0"
# python3 .github/scripts/rusty_v8_bazel.py resolved-v8-crate-version
RUSTY_V8_TAG="150.4.0"
inherit cargo check-reqs toolchain-funcs
CHECKREQS_MEMORY="15G"
CHECKREQS_DISK_BUILD="20G"
DESCRIPTION="Codex CLI - OpenAI's AI-powered coding agent"
HOMEPAGE="https://github.com/openai/codex"
# The crate tarball URL uses ${PV} so it auto-updates when bumping versions.
# This tarball is generated by: https://github.com/gentoo-zh-drafts/codex/
# See .github/workflows/crates.yml for the generation process.
SRC_URI="
https://github.com/openai/${PN}/archive/rust-v${PV}.tar.gz -> ${P}.tar.gz
https://github.com/gentoo-zh-drafts/codex/releases/download/rust-v${PV}/codex-rust-v${PV}-crates.tar.xz
amd64? (
https://github.com/openai/codex/releases/download/rusty-v8-v${RUSTY_V8_TAG}/librusty_v8_release_x86_64-unknown-linux-musl.a.gz
-> rusty_v8_${RUSTY_V8_TAG}_librusty_v8_release_x86_64-unknown-linux-musl.a.gz
https://github.com/openai/codex/releases/download/rusty-v8-v${RUSTY_V8_TAG}/src_binding_release_x86_64-unknown-linux-musl.rs
-> rusty_v8_${RUSTY_V8_TAG}_src_binding_release_x86_64-unknown-linux-musl.rs
)
arm64? (
https://github.com/openai/codex/releases/download/rusty-v8-v${RUSTY_V8_TAG}/librusty_v8_release_aarch64-unknown-linux-musl.a.gz
-> rusty_v8_${RUSTY_V8_TAG}_librusty_v8_release_aarch64-unknown-linux-musl.a.gz
https://github.com/openai/codex/releases/download/rusty-v8-v${RUSTY_V8_TAG}/src_binding_release_aarch64-unknown-linux-musl.rs
-> rusty_v8_${RUSTY_V8_TAG}_src_binding_release_aarch64-unknown-linux-musl.rs
)
${CARGO_CRATE_URIS}
"
S="${WORKDIR}/${PN}-rust-v${PV}/codex-rs"
PATCHES=( "${FILESDIR}"/${PN}-0.156.0-recursion-limit.patch )
LICENSE="Apache-2.0"
# Dependent crate licenses
LICENSE+="
Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD-2 BSD Boost-1.0
CC0-1.0 CDLA-Permissive-2.0 ISC MIT MPL-2.0 Unicode-3.0 ZLIB
"
SLOT="0"
KEYWORDS="-* ~amd64 ~arm64"
# Tests fail due to ring crate conflicts with system OpenSSL
RESTRICT="test"
DEPEND="
dev-libs/openssl:=
sys-apps/dbus
"
RDEPEND="${DEPEND}
>=sys-apps/bubblewrap-0.11.2
"
BDEPEND="virtual/pkgconfig"
# rust does not use *FLAGS from make.conf, silence portage warning
QA_FLAGS_IGNORED="usr/bin/${PN}"
pkg_pretend() {
check-reqs_pkg_pretend
}
pkg_setup() {
check-reqs_pkg_setup
rust_pkg_setup
if tc-is-lto; then
export CARGO_PROFILE_RELEASE_LTO=thin
else
export CARGO_PROFILE_RELEASE_LTO=false
fi
}
gen_git_crate_dir() {
# https://github.com/gentoo/gentoo/blob/b09dd88412fe2d5eee5a8891e08bfa2d67848da3/eclass/cargo.eclass#L442
IFS=';' read -r crate_uri commit crate_dir <<<"${GIT_CRATES[$1]}"
echo "${WORKDIR}/${crate_dir//%commit%/${commit}}"
}
src_prepare() {
default
# Fix tokio-tungstenite's git dependency on tungstenite
sed -i '/^\[dependencies\.tungstenite\]/,/^$/{
s|git = "https://github.com/openai-oss-forks/tungstenite-rs"|path = "'"$(gen_git_crate_dir tungstenite)"'"|
/^rev = /d
}' "$(gen_git_crate_dir tokio-tungstenite)/Cargo.toml" || die
# Remove the [patch.crates-io] section and add path-based patches
sed -i '/^\[patch\.crates-io\]/,/^$/d' "${S}/Cargo.toml" || die
sed -i '/^\[patch\."ssh:\/\/git@github\.com/,/^$/d' "${S}/Cargo.toml" || die
# Add new patch section with local paths
cat >> "${S}/Cargo.toml" <<-EOF || die
[patch.crates-io]
crossterm = { path = "$(gen_git_crate_dir crossterm)" }
tokio-tungstenite = { path = "$(gen_git_crate_dir tokio-tungstenite)" }
tungstenite = { path = "$(gen_git_crate_dir tungstenite)" }
EOF
}
src_compile() {
local rusty_v8_triple
use amd64 && rusty_v8_triple=x86_64-unknown-linux-musl
use arm64 && rusty_v8_triple=aarch64-unknown-linux-musl
# codex-core trait resolution overflows rustc's default 8MiB stack
export RUST_MIN_STACK=16777216
RUSTY_V8_ARCHIVE="${DISTDIR}/rusty_v8_${RUSTY_V8_TAG}_librusty_v8_release_${rusty_v8_triple}.a.gz" \
RUSTY_V8_SRC_BINDING_PATH="${DISTDIR}/rusty_v8_${RUSTY_V8_TAG}_src_binding_release_${rusty_v8_triple}.rs" \
cargo_src_compile \
--bin codex \
--bin codex-code-mode-host
}
src_install() {
dobin "$(cargo_target_dir)/codex"
dobin "$(cargo_target_dir)/codex-code-mode-host"
einstalldocs
}
@@ -0,0 +1,8 @@
--- a/chatgpt/src/lib.rs
+++ b/chatgpt/src/lib.rs
@@ -1,3 +1,5 @@
+#![recursion_limit = "256"]
+
pub mod apply_command;
mod chatgpt_client;
pub mod connectors;