From 0d6c9a039a48bc068c2638aad68470a4c98ee447 Mon Sep 17 00:00:00 2001 From: Adrian Bonpin Date: Wed, 5 Aug 2026 21:22:28 +0800 Subject: [PATCH] fix(release): correct $ORIGIN rpath and awk field ref in pg-tools step MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - patchelf was passed '\$ORIGIN' (backslash-dollar inside single quotes), so the ELF rpath was a literal \$ORIGIN path — the loader never expanded it and the tools couldn't find libpq at runtime. Use '$ORIGIN'. - macOS awk program had \$1, which awk rejects as a syntax error; use $1 (verified locally: otool -> install_name_tool -> all 3 tools run). --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a4e9923..944a372 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -91,7 +91,7 @@ jobs: # the app's resource dir via $ORIGIN rpath. cp src/interfaces/libpq/libpq.so.5 "$OUT"/libpq.so.5 for b in pg_dump pg_restore psql; do - patchelf --set-rpath '\$ORIGIN' "$OUT/$b" + patchelf --set-rpath '$ORIGIN' "$OUT/$b" done ;; macos-latest|macos-15-intel) @@ -108,7 +108,7 @@ jobs: # Rewrite the absolute /tmp/pgbuild libpq install_name to a # relative @loader_path so the tools find libpq next to themselves. for b in pg_dump pg_restore psql; do - libpq=$(otool -L "$OUT/$b" | awk '/libpq/ {print \$1; exit}') + libpq=$(otool -L "$OUT/$b" | awk '/libpq/ {print $1; exit}') install_name_tool -change "$libpq" "@loader_path/libpq.5.dylib" "$OUT/$b" done ;;