Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1u4OXD-001WIs-UA for pgsql-hackers@arkaria.postgresql.org; Mon, 14 Apr 2025 18:27:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1u4OXA-0049Nj-9t for pgsql-hackers@arkaria.postgresql.org; Mon, 14 Apr 2025 18:27:53 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1u4OX9-0049NS-SC for pgsql-hackers@lists.postgresql.org; Mon, 14 Apr 2025 18:27:52 +0000 Received: from dd25110.kasserver.com ([85.13.146.49]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1u4OX8-0003wX-0E for pgsql-hackers@postgresql.org; Mon, 14 Apr 2025 18:27:51 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=technowledgy.de; s=kas202308201259; t=1744655267; bh=2EW7uETv64X/lBMB50VsyCDNNHlkPF4D0BXt3PUo4kA=; h=Date:Subject:From:To:Cc:References:In-Reply-To:From; b=Osdl4f0E3m5vFklmATjDlSAbYIM3+a7zg8ajA7Xe06ckH3RSj28eQ4FJT97p3/lVz jmv6u0T+3b2Ae0ox3mNL9E+KX9WfE/cvtuiCguEqWwZ2ctNL1ikgl0o9IIZ3+0oamm p5RHamqptIrODq8FKOqNs8Mip0BjOv/xAZxA7ncnLgUOV8/Dn1Pg9OU1Ur7vdGVkiZ r+5tjSc0dflI0BbntHLDJG6GvWUOgScwKP3acwRyHyr1LiW7iA+IeLFOZZHJJn/hm3 ITdAjkxB09hrVN29Q+vsPTVwXpdFfq6w4qoXuMkV6Rd8rQlHnUP9ZkegokzJAOZwLF sxRE7bh33UEmQ== Received: from [192.168.0.102] (ip-037-201-153-223.um10.pools.vodafone-ip.de [37.201.153.223]) by dd25110.kasserver.com (Postfix) with ESMTPSA id 43CDBE1A01A8; Mon, 14 Apr 2025 20:27:47 +0200 (CEST) Message-ID: Date: Mon, 14 Apr 2025 20:27:46 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PoC] Federated Authn/z with OAUTHBEARER Content-Language: en-US From: Wolfgang Walther To: Jacob Champion Cc: Jelte Fennema-Nio , Christoph Berg , Peter Eisentraut , Andres Freund , Tom Lane , Bruce Momjian , PostgreSQL Hackers , Daniel Gustafsson , Thomas Munro , Nazir Bilal Yavuz , Antonin Houska References: <5bec3d4f-613f-425b-88c4-59e71c70f7d6@eisentraut.org> <487dacec-6d8d-46c0-a36f-d5b8c81a56f1@technowledgy.de> <012b6a4a-aead-411a-a9db-c6c7b25e1dcc@technowledgy.de> In-Reply-To: <012b6a4a-aead-411a-a9db-c6c7b25e1dcc@technowledgy.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spamd-Bar: - List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Wolfgang Walther: > So yes, not related to your patch. I do understand that PostgreSQL's > autoconf build system is not designed for "static only", I am certainly > not expecting you to fix that. > > I think meson will do better here, but I was not able to make that work, > yet. I did a basic meson build. Full postgresql package, not libpq-only. The static-only build just works. On master that is. Same as the regular build. So yes, meson will handle the static stuff much better. > I just tried the same thing on the bigger postgresql package, where the > full build is run and not only libpq / libpq-oauth. It fails with the > same error. No rule for oauth-curl.o. Applying the v5 patch to the above meson build, will give me a different error. This time for both the static-only and the regular build: src/interfaces/libpq-oauth/meson.build:18:22: ERROR: File oauth-curl.c does not exist. This.. clears it up, because that file is indeed missing for me on disk. I assume that's because this file is tracked as a rename in the v5 patch. I can apply this with git, but not directly in the nix build system. TIL, I need to use "fetchpatch2" instead of "fetchpatch" for that. Sure thing. So, with the patch applied correctly, I get the following: 1. Meson regular build: libpq-oauth-18.so libpq.so libpq.so.5 libpq.so.5.18 The libpq.so file has references to dlopen and libpq-auth-18.so, cool. 2. Meson static-only build: libpq.a libpq-oauth-18.a The libpq.a file has no references to dlopen, but plenty of references to curl stuff. I'm not sure what the libpq-oauth-18.a file is for. 3. Back to the lipq-only build with autoconf, from where I started. I only need to add the following line: make -C src/interfaces/libpq-oauth install and get this: libpq-oauth-18.so libpq.so libpq.so.5 libpq.so.5.18 Sweet! 4. Of course the static-only build does not work with autoconf, but that's expected. So, sorry for the noise before. Now, that I know how to apply patches with renames, I will try your next patch as well. Best, Wolfgang