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 1muzJQ-0007Sr-9N for pgsql-committers@arkaria.postgresql.org; Wed, 08 Dec 2021 15:56:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1muzJP-0001Lw-3e for pgsql-committers@arkaria.postgresql.org; Wed, 08 Dec 2021 15:56:55 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1muzJO-0001L5-ST for pgsql-committers@lists.postgresql.org; Wed, 08 Dec 2021 15:56:54 +0000 Received: from relay11.mail.gandi.net ([217.70.178.231]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1muzJL-0000xl-SZ for pgsql-committers@lists.postgresql.org; Wed, 08 Dec 2021 15:56:54 +0000 Received: (Authenticated sender: adsend@dunslane.net) by relay11.mail.gandi.net (Postfix) with ESMTPSA id 33058100004; Wed, 8 Dec 2021 15:56:48 +0000 (UTC) Message-ID: <2e118a11-6936-21ec-6782-e9dbb20972c2@dunslane.net> Date: Wed, 8 Dec 2021 10:56:46 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0 Subject: Re: pgsql: Check that we have a working tar before trying to use it Content-Language: en-US To: Tom Lane Cc: pgsql-committers@lists.postgresql.org References: <3655283.1638977975@sss.pgh.pa.us> From: Andrew Dunstan In-Reply-To: <3655283.1638977975@sss.pgh.pa.us> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 12/8/21 10:39, Tom Lane wrote: > Andrew Dunstan writes: >> Check that we have a working tar before trying to use it > I don't like the way you did this: > > + || system_log($tar, '--version') != 0); > > ISTM that effectively restricts the test to only running > on machines with GNU tar, which basically removes all the > interest of it. We know what GNU tar does ... it's the > weird legacy tar versions that might teach us something. > See 57b5a9646 for a recent example of the sort of bug > this test can no longer find. > > I tested on a freebsd system before I did this for that reason. It's not using GNU tar: user@freebsd:~ $ tar --version bsdtar 3.5.1 - libarchive 3.5.1 zlib/1.2.11 liblzma/5.2.5 bz2lib/1.0.8 Do you have an alternative test we could use? This is almost exactly what we use to test for lz4. cheers andrew -- Andrew Dunstan EDB: https://www.enterprisedb.com