Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m6H5X-0001tV-HO for pgsql-docs@arkaria.postgresql.org; Wed, 21 Jul 2021 18:36:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1m6H5W-0000kJ-Fl for pgsql-docs@arkaria.postgresql.org; Wed, 21 Jul 2021 18:36:58 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m6H5W-0000hl-9g for pgsql-docs@lists.postgresql.org; Wed, 21 Jul 2021 18:36:58 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m6H5T-0001RF-Vy; Wed, 21 Jul 2021 18:36:57 +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 16LIanCG715020; Wed, 21 Jul 2021 14:36:49 -0400 From: Tom Lane To: Peter Eisentraut cc: Alvaro Herrera , "Jonathan S. Katz" , "Daniel Westermann (DWE)" , "pgsql-docs@lists.postgresql.org" Subject: Re: Link t the souce code In-reply-to: <064d5f63-116d-3291-0d5d-88748464b448@enterprisedb.com> References: <202107211721.pnmoavcgidqb@alvherre.pgsql> <064d5f63-116d-3291-0d5d-88748464b448@enterprisedb.com> Comments: In-reply-to Peter Eisentraut message dated "Wed, 21 Jul 2021 20:09:00 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <715018.1626892609.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Wed, 21 Jul 2021 14:36:49 -0400 Message-ID: <715019.1626892609@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Peter Eisentraut writes: > On 21.07.21 19:21, Alvaro Herrera wrote: >> Oh, so the current `tar x` knows to uncompress the file without any >> additional options? I've been pointlessly adding 'z', 'j', 'a' for yea= rs ... >> That means we can remove the `gunzip` line and replace it with nothing. > Unless you want to assume GNU tar, the gunzip is still necessary. That seems overly conservative. On my Mac, Apple has kindly provided $ tar --version bsdtar 3.3.2 - libarchive 3.3.2 zlib/1.2.11 liblzma/5.0.5 bz2lib/1.0.6 and in case the mentioned libraries aren't enough clue, it does indeed seem to work like GNU tar for this purpose: $ tar tf postgresql-10.16.tar.bz2 | head -5 postgresql-10.16/ postgresql-10.16/.dir-locals.el postgresql-10.16/contrib/ postgresql-10.16/contrib/tcn/ postgresql-10.16/contrib/tcn/tcn.control A nearby FreeBSD box provides similar results. So the proposed instructions probably work fine on most *BSD machines. I also looked on Solaris 11, and here's what "man tar" has to say there: j c mode only. Compress the resulting archive with bzip2. In ext= ract or list modes, this option is ignored. The implementation re= cog- nizes bzip2 compression type automatically when reading archi= ves. Upgrade/replace first decompresses and then applies the same me= cha- nism to compress the archive automatically. I think this is another case of a GNUism that's become close enough to universal that we don't need to be pedantic about it. regards, tom lane