Hi all.
Debian 12.10, postgresql-common-277.pgdg120+1.

There is still a bug in the pg_buildext, function run_psql
 
Errors (when build oracle_fdw):
/usr/bin/pg_buildext: line 221: cd: build-%v: No such file or directory
 
Patch is
--- postgresql-common-277.pgdg120+1/pg_buildext 2025-04-09 13:17:57.000000000 +0300
+++ postgresql-common-277.pgdg120+interfax1/pg_buildext 2025-04-10 17:26:01.943333192 +0300
@@ -217,8 +217,8 @@
     fi
 
     (
-        if [ "$target" ] && [ "$target" != "." ]; then # if target is given, use it, else stay in the top source dir
-            cd $target
+        if [ "$vtarget" ] && [ "$vtarget" != "." ]; then # if target is given, use it, else stay in the top source dir
+            cd $vtarget
         fi
         pg_virtualenv ${PKGARGS:-} ${PG_VIRTUALENV_ARGS:-} -v $1 \
             psql -Xe -v ON_ERROR_STOP=1 < $PSQLTMP