fix(ext): pin supautils's stat() to its legacy-host glibc floor (#2523) · supabase/postgres@7ee80b2 · GitHub
Skip to content

Commit 7ee80b2

Browse files
brainrakemmlb
andauthored
fix(ext): pin supautils's stat() to its legacy-host glibc floor (#2523)
* fix(nix): pin glibc-versioned symbols for 2.31 floor compliance Shared compat shim (symver pins + dlvsym resolution) for dlopen/dlsym/ dlerror/dlclose, sem_*, shm_*, pthread_sigmask, pthread_getattr_np, fcntl/fcntl64, stat/fstat/lstat family, strtol/strtoul/sscanf/fscanf. Wired into orioledb, supabase-groonga, pgbouncer, pgbackrest. goss and packer instead set CGO_ENABLED=0: confirmed fully static, no glibc dependency at all. Refs: MPG-1326 * Revert unnecessary glibc remediation, repurpose for supautils/gatekeeper Everything previously here (shim wiring for orioledb, supabase-groonga, pgbouncer, pgbackrest; CGO_ENABLED=0 for goss, packer) addressed packages that turned out not to need a glibc floor: postgres core and every extension share one glibc from the same build closure, so glibc-version-check no longer checks them (see #2437). Neither this nor the removed changes ever touched supautils or gatekeeper, the two packages that actually still fail the 2.31 floor (MPG-1326) since they're loaded outside that closure. Repurposing this branch to fix those instead. Refs: MPG-1326 * fix(ext): pin supautils's stat() to GLIBC_2.2.5/2.17 extension_custom_scripts.c calls stat() directly, which resolves to GLIBC_2.33 (y2038 refactor) — above supautils's compat floor for legacy pre-nix hosts. struct stat's layout didn't change on 64-bit archs, so __xstat@<floor> is equivalent (same approach already used for atoi/strtol in this same patch, same compat version per arch). Verified: supautils.so's max glibc requirement drops from 2.33 to 2.17 on aarch64-linux (built, linked, and checked against the real 2.31 floor — passes). x86_64's GLIBC_2.2.5 branch mirrors the existing atoi fix's own per-arch structure and is confirmed to exist in glibc's symbol table, but no x86_64-linux builder was available to build/link it here — worth confirming in CI. Refs: MPG-1326 * docs(ext): note removal condition for supautils glibc compat patch Refs: MPG-1326 --------- Co-authored-by: Manuel Mendez <708570+mmlb@users.noreply.github.com>
1 parent 9379d56 commit 7ee80b2

2 files changed

Lines changed: 28 additions & 0 deletions

File tree

‎nix/ext/patches/supautils-strtol-glibc-compat.patch‎

Lines changed: 27 additions & 0 deletions

‎nix/ext/supautils.nix‎

Lines changed: 1 addition & 0 deletions

0 commit comments

Comments
 (0)