Re: pgsql: Check that we have a working tar before trying to use it

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: Check that we have a working tar before trying to use it
Date: 2021-12-08 15:56:46
Message-ID: 2e118a11-6936-21ec-6782-e9dbb20972c2@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers


On 12/8/21 10:39, Tom Lane wrote:
> Andrew Dunstan <andrew(at)dunslane(dot)net> 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(at)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

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2021-12-08 16:15:49 Re: pgsql: Check that we have a working tar before trying to use it
Previous Message Tom Lane 2021-12-08 15:39:35 Re: pgsql: Check that we have a working tar before trying to use it