mirror of
https://github.com/openai/codex.git
synced 2026-11-17 14:58:36 +00:00
Support voice-aware configuration and version-skew builds (#39953)
## What changed - Add `chat.toggle_voice_mute` to the configurable TUI keymap and generated configuration schema. - Let the exec-server version-skew harness build the voice-enabled CLI on Debian-like Linux hosts without preinstalled development metadata by assembling a temporary package sysroot. - Preserve the existing build path on other Linux environments when the Debian package tools are unavailable. ## Testing - Add a shell test that verifies a non-Debian Linux environment without voice metadata still proceeds to the Cargo build. GitOrigin-RevId: 95c5ebc3f85d152a5217dee561286f2be662f79a
This commit is contained in:
1 parent
054588acfe
commit
d446960657
4 files changed
+91
-2
No files matched your search
@@ -29,6 +29,40 @@ case "$(uname -s):$(uname -m)" in
|
||||
esac
|
||||
|
||||
asset="codex-${target}.tar.gz"
|
||||
|
||||
if [[ "$(uname -s)" == "Linux" ]] \
|
||||
&& command -v apt-get >/dev/null \
|
||||
&& command -v dpkg-deb >/dev/null \
|
||||
&& command -v dpkg-architecture >/dev/null \
|
||||
&& ! pkg-config --exists alsa glib-2.0 gobject-2.0 gio-2.0; then
|
||||
# Debian-like hosts can download development metadata without sudo. The
|
||||
# temporary sysroot still relies on runtime libraries installed on the host.
|
||||
voice_package_directory="${release_directory}/voice-packages"
|
||||
voice_sysroot="${release_directory}/voice-sysroot"
|
||||
mkdir -p "${voice_package_directory}" "${voice_sysroot}"
|
||||
(
|
||||
cd "${voice_package_directory}"
|
||||
apt-get download libasound2-dev libglib2.0-dev libcap-dev libffi-dev libmount-dev \
|
||||
libpcre2-dev libselinux1-dev zlib1g-dev libblkid-dev libsepol-dev
|
||||
)
|
||||
for package in "${voice_package_directory}"/*.deb; do
|
||||
dpkg-deb --extract "${package}" "${voice_sysroot}"
|
||||
done
|
||||
|
||||
voice_multiarch="$(dpkg-architecture -qDEB_HOST_MULTIARCH)"
|
||||
voice_library_directory="${voice_sysroot}/usr/lib/${voice_multiarch}"
|
||||
for library in "${voice_library_directory}"/*.so; do
|
||||
[[ -L "${library}" ]] || continue
|
||||
library_target="$(readlink "${library}")"
|
||||
if [[ ! -e "${voice_library_directory}/${library_target}" && -e "/usr/lib/${voice_multiarch}/${library_target}" ]]; then
|
||||
ln -s "/usr/lib/${voice_multiarch}/${library_target}" "${voice_library_directory}/${library_target}"
|
||||
fi
|
||||
done
|
||||
|
||||
export PKG_CONFIG_PATH="${voice_library_directory}/pkgconfig${PKG_CONFIG_PATH:+:${PKG_CONFIG_PATH}}"
|
||||
export PKG_CONFIG_SYSROOT_DIR="${voice_sysroot}"
|
||||
fi
|
||||
|
||||
cd "${repo_root}/codex-rs"
|
||||
cargo build -p codex-cli --bin codex
|
||||
export CODEX_TEST_CURRENT_CODEX="${CARGO_TARGET_DIR:-${repo_root}/codex-rs/target}/debug/codex"
|
||||
|
||||
Reference in new issue
Block a user