[Bug 297995] misc/codex too slow to build during staging phase using poudriere on 15.1 stable amd64

From: <bugzilla-noreply_at_freebsd.org>
Date: Thu, 27 Aug 2026 15:31:59 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=297995

            Bug ID: 297995
           Summary: misc/codex too slow to build during staging phase
                    using poudriere on 15.1 stable amd64
           Product: Ports & Packages
           Version: Latest
          Hardware: amd64
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: tagattie@FreeBSD.org
          Reporter: transitive@gmail.com
             Flags: maintainer-feedback?(tagattie@FreeBSD.org)
          Assignee: tagattie@FreeBSD.org

Created attachment 274181
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=274181&action=edit
Makefile patch for codex fixing my issue

The port misc/codex takes an inordinately long time to finish the staging phase
on my system running 15.1 stable amd64. It took two hours to finish building on
my machine. I have just recently noticed this issue occurring with this port. 
And it appears during staging phase it is redoing the build sequence again
instead of copying/installing files.

I changed my Makefile to prevent this and now it builds within 50 minutes. Not
sure if it is the correct solution to the problem but I will paste the diff
below as well as attach it.

 cat codex.patch                                                               
           ✔  at 11:30:17  
diff --git a/misc/codex/Makefile b/misc/codex/Makefile
index c68df0b12..44d332263 100644
--- a/misc/codex/Makefile
+++ b/misc/codex/Makefile
@@ -56,10 +56,8 @@ CARGO_CARGOTOML=     ${BUILD_WRKSRC}/Cargo.toml
 CARGO_CARGOLOCK=       ${BUILD_WRKSRC}/Cargo.lock
 CARGO_BUILD_ARGS=      --bin ${PORTNAME} \
                        --bin ${PORTNAME}-code-mode-host \
-                       --bin ${PORTNAME}-responses-api-proxy
-CARGO_INSTALL_PATH=    codex-rs/cli \
-                       codex-rs/code-mode-host \
-                       codex-rs/responses-api-proxy
+                       --bin ${PORTNAME}-responses-api-proxy \
+                       --bin logs_client
 CARGO_TEST_ARGS=       --all-features --no-fail-fast
 CARGO_ENV=             OPENSSL_NO_VENDOR=1 \
                        V8_FROM_SOURCE=1 \
@@ -192,10 +190,21 @@ post-patch:
 post-build-COMPLETIONS-on:
        @${MKDIR} ${WRKSRC}/completions
 .for sh in bash fish zsh
-       ${CARGO_TARGET_DIR}/*/${PORTNAME} completion ${sh} > \
+       ${CARGO_TARGET_DIR}/release/${PORTNAME} completion ${sh} > \
                ${WRKSRC}/completions/${PORTNAME}.${sh}
 .endfor

+do-install:
+       @${MKDIR} ${STAGEDIR}${PREFIX}/bin
+       ${INSTALL_PROGRAM} ${CARGO_TARGET_DIR}/release/${PORTNAME} \
+               ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
+       ${INSTALL_PROGRAM}
${CARGO_TARGET_DIR}/release/${PORTNAME}-code-mode-host \
+               ${STAGEDIR}${PREFIX}/bin/${PORTNAME}-code-mode-host
+       ${INSTALL_PROGRAM}
${CARGO_TARGET_DIR}/release/${PORTNAME}-responses-api-proxy \
+               ${STAGEDIR}${PREFIX}/bin/${PORTNAME}-responses-api-proxy
+       ${INSTALL_PROGRAM} ${CARGO_TARGET_DIR}/release/logs_client \
+               ${STAGEDIR}${PREFIX}/bin/logs_client
+
 post-install:
 .for prog in ${PLIST_FILES:Mbin/*}
        @${STRIP_CMD} ${STAGEDIR}${PREFIX}/${prog}

    /hdd/p/ports/Default/misc/codex  on   local ?1 

-- 
You are receiving this mail because:
You are the assignee for the bug.