On Tue, Apr 15, 2025 at 2:38 PM Jelte Fennema-Nio <postg...@jeltef.nl> wrote: > libpq_append_conn_error(conn, "no custom OAuth flows are available, > and libpq-oauth could not be loaded library could not be loaded. Try > installing the libpq-oauth package from the same source that you > installed libpq from");
Thanks! I think that's a little too prescriptive for packagers, personally, but I agree that the current message isn't correct anymore. I've gone with "no custom OAuth flows are available, and the builtin flow is not installed". (I suppose packagers could patch in a platform-specific message if they really wanted?) -- Other changes in v7: - The option name remains --with-libcurl. - Daniel and I have tweaked the documentation, and a draft commit message is up - Removed the ENABLE_NLS-mismatch assertion in oauth-utils.c; we don't need to care anymore - Added an initialization mutex I was feeling paranoid about injecting dependency pointers concurrently to their use in another thread. They're _supposed_ to be constant... but I have no doubt that someone somewhere knows of a platform/compiler/linker combo where that blows up anyway. Initialization is now run once, under pthread_mutex protection. - Fixed module load on macOS The green CI was masking a bug with its use of DYLD_LIBRARY_PATH: we don't make use of RPATH on macOS, so after installing libpq, it lost the ability to find libpq-oauth. (A stale installation due to SIP weirdness was masking this on my local machine; sorry for not catching it before.) I have swapped to using an absolute path on Mac only, because unlike LD_LIBRARY_PATH on *nix, DYLD_LIBRARY_PATH can still override absolute paths in dlopen()! Whee. I could use a sanity check from a native Mac developer, but I believe this mirrors the expected behavior for a "typical" runtime dependency: libraries point directly to the things they depend on. With those, I have no more TODOs and I believe this is ready for a final review round. Thanks, --Jacob
v7-0001-oauth-Move-the-builtin-flow-into-a-separate-modul.patch
Description: Binary data