Index | Thread | Search

From:
Stuart Henderson <stu@spacehopper.org>
Subject:
Re: NEW: devel/codex
To:
Chris Cappuccio <chris@nmedia.net>
Cc:
ports@openbsd.org
Date:
Fri, 16 Jan 2026 12:39:19 +0000

Download raw body.

Thread
On 2026/01/15 20:07, Chris Cappuccio wrote:
> This is the Codex LLM agent from OpenAI.

I have some tweaks, will send out a tar later as it needs to finish
building before I make some WANTLIB fixes for the flavour. Quoted diff
below with commentary in-line.

What is the flavour for? I'd prefer to drop it unless it's really
important. (if kept it needs mentioning in DESCR).


| diff -uNp -r codex-/Makefile codex/Makefile
| --- codex-/Makefile	Fri Jan 16 03:02:46 2026
| +++ codex/Makefile	Fri Jan 16 12:14:10 2026
| @@ -1,5 +1,5 @@
| -# $OpenBSD$

we dropped rcs ids in ports a few years ago

| +# ring-v0.17 does not support this arch
| +NOT_FOR_ARCHS = sparc64
|  
|  COMMENT =	OpenAI terminal-based coding agent
|  
| @@ -8,21 +8,11 @@ V =		0.82.0
|  GH_ACCOUNT =	openai
|  GH_PROJECT =	codex
|  GH_TAGNAME =	rust-v${V}
| +PKGNAME =	codex-${V}
|  
| -DISTNAME =	${GH_PROJECT}-${GH_TAGNAME}
| -PKGNAME =	${GH_PROJECT}-${V}
| +DIST_TUPLE += github nornagon crossterm 87db8bfa6dc99427fd3b071681b07fc31c6ce995 ../crossterm
| +DIST_TUPLE += github nornagon ratatui 9b2ad1298408c45918ee9f8241a6f95498cdbed2 ../ratatui
|  
| -# distfiles for git-based crossterm, ratatui
| -CROSSTERM_COMMIT =	87db8bfa6dc99427fd3b071681b07fc31c6ce995
| -RATATUI_COMMIT =	9b2ad1298408c45918ee9f8241a6f95498cdbed2
| -DISTFILES =		${DISTNAME}.tar.gz
| -
| -SITES.crossterm =	https://github.com/nornagon/crossterm/archive/
| -DISTFILES.crossterm =	crossterm-${CROSSTERM_COMMIT}{${CROSSTERM_COMMIT}}${EXTRACT_SUFX}
| -
| -SITES.ratatui =		https://github.com/nornagon/ratatui/archive/
| -DISTFILES.ratatui =	ratatui-${RATATUI_COMMIT}{${RATATUI_COMMIT}}${EXTRACT_SUFX}

this is exactly what DIST_TUPLE is for (I avoided it for the main
distfile because portroach doesn't handle it)

|  MODCARGO_INSTALL_TARGET_PATHS = cli
|  
| -FLAVORS =	openssl3
| +FLAVORS =	openssl

doesn't seem any point to include the version here 

|  FLAVOR ?=
|  
|  WANTLIB +=	${MODCARGO_WANTLIB}
|  WANTLIB +=	crypto ssl
|  
| -.if ${FLAVOR:Mopenssl3}
| -LIB_DEPENDS +=	security/openssl/3.2
| +.if ${FLAVOR:Mopenssl}
| +LIB_DEPENDS +=	security/openssl/3.5

3.2 is not in ports any more, 3.5 is the usual version used in the
few ports that really need openssl

|  MAKE_ENV +=	OPENSSL_DIR=${LOCALBASE}
|  MAKE_ENV +=	OPENSSL_LIB_DIR=${LOCALBASE}/lib
|  MAKE_ENV +=	OPENSSL_INCLUDE_DIR=${LOCALBASE}/include

there will also be some changes needed around WANTLIB here, I'll send
an update when builds have finished

| diff -uNp -r codex-/distinfo codex/distinfo
| --- codex-/distinfo	Fri Jan 16 00:20:39 2026
| +++ codex/distinfo	Fri Jan 16 12:15:02 2026
..snip.. (changed for DIST_TUPLE filenames)

| --- codex-/patches/patch-codex-rs_Cargo_toml	Thu Jan 15 20:03:21 2026
| +++ codex/patches/patch-codex-rs_Cargo_toml	Fri Jan 16 12:12:54 2026
| @@ -1,13 +1,14 @@
| ---- codex-rs/Cargo.toml.orig	Thu Jan 15 11:59:24 2026
| -+++ codex-rs/Cargo.toml	Thu Jan 15 12:00:25 2026
| -@@ -301,8 +301,8 @@
| +Index: codex-rs/Cargo.toml
| +--- codex-rs/Cargo.toml.orig
| ++++ codex-rs/Cargo.toml

use "make port-lib-depends-check" to generate these

| +@@ -301,8 +301,8 @@ opt-level = 0
|   [patch.crates-io]
|   # Uncomment to debug local changes.
|   # ratatui = { path = "../../ratatui" }
|  -crossterm = { git = "https://github.com/nornagon/crossterm", branch = "nornagon/color-query" }
|  -ratatui = { git = "https://github.com/nornagon/ratatui", branch = "nornagon-v0.29.0-patch" }
| -+crossterm = { path = "../../crossterm-87db8bfa6dc99427fd3b071681b07fc31c6ce995" }
| -+ratatui = { path = "../../ratatui-9b2ad1298408c45918ee9f8241a6f95498cdbed2" }
| ++crossterm = { path = "../../crossterm" }
| ++ratatui = { path = "../../ratatui" }

simpler path from DIST_TUPLE