Re: Link t the souce code

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Link t the souce code
Дата
Msg-id 715019.1626892609@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Link t the souce code  (Peter Eisentraut <peter.eisentraut@enterprisedb.com>)
Список pgsql-docs
Peter Eisentraut <peter.eisentraut@enterprisedb.com> 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 years ...
>> 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  extract
           or  list  modes,  this option is ignored. The implementation recog-
           nizes bzip2 compression type automatically when  reading  archives.
           Upgrade/replace first decompresses and then applies the same mecha-
           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



В списке pgsql-docs по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Link t the souce code
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Link t the souce code