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 1s32aN-008hax-4l for pgsql-general@arkaria.postgresql.org; Fri, 03 May 2024 23:45:02 +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 1s32aJ-00D7di-Vt for pgsql-general@arkaria.postgresql.org; Fri, 03 May 2024 23:45:00 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s32aJ-00D7dZ-L1 for pgsql-general@lists.postgresql.org; Fri, 03 May 2024 23:45:00 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s32aF-001PwT-UQ for pgsql-general@lists.postgresql.org; Fri, 03 May 2024 23:44:58 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 443NisOj2770931; Fri, 3 May 2024 19:44:54 -0400 From: Tom Lane To: AJ ONeal cc: "pgsql-general@lists.postgresql.org" Subject: Re: How to Build Postgres in a Portable / Relocatable fashion? In-reply-to: References: Comments: In-reply-to AJ ONeal message dated "Fri, 03 May 2024 23:27:12 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <2770929.1714779894.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Fri, 03 May 2024 19:44:54 -0400 Message-ID: <2770930.1714779894@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk AJ ONeal writes: > What I want to create (and provide) is a portable tarball that has > most of all what it needs in the tarball and will look for relevant > libraries relative to itself. See https://www.postgresql.org/docs/current/installation.html particularly the discussion of installation relocatability under https://www.postgresql.org/docs/current/install-make.html#CONFIGURE-OPTION= S-LOCATIONS In short, you have to specify an installation path, but as long as you don't muck with the relative locations of the subdirectories it should be possible to move the whole tree to a different installation location. > Something that Just Works=E2=84=A2 *almost* anywhere (Ubuntu, Debian, Re= dHat, Suse... maybe even Alpine). That's a little harder, mainly because the shared libraries for dependencies like openssl etc may not be 100% compatible across all those platforms. Different versions, different build options, yadda yadda. Maybe you should be thinking in terms of a docker container or the like? regards, tom lane