Re: did tar(1) loose xz compression support in 11?

From: Chris H <bsd-lists_at_bsdforge.com>
Date: Wed, 27 Aug 2014 07:02:27 -0700 (PDT)
>
> On Aug 26, 2014, at 11:05 AM, Chris H <bsd-lists_at_bsdforge.com> wrote:
>
>> Greetings,
>> I'm currently testing 11. My build / install is from about 2 days ago.
>> I generally use xz compression, when creating archives. But when I
>> attempt the following:
>>
>> tar -cvJ --options xz:9 -f ./archive-name.tar.xz ./file
>>
>> it returns the following:
>>
>> tar: Undefined option: `xz:9'
>>
>> This has always worked in previous versions. Has the syntax changed,
>> and the man(1) pages just haven't caught up?
>
> I can’t see any evidence in libarchive’s source that this ever worked.
>
> However, there was some work done recently to improve error reporting from the options
> processor.  It’s quite possible that —options xz:9 used to just be ignored and now it’s
> reporting an error.
>
> Tim
On a hunch. I performed a similar test.
I added STAGE to the following port. So I'll test here.

# tar -cvJ --options xz:9 -f posadis-xz9.tar.xz ./posadis/
a ./posadis
a ./posadis/files
a ./posadis/pkg-plist
a ./posadis/Makefile
a ./posadis/distinfo
a ./posadis/pkg-descr
a ./posadis/files/patch-Makefile.in
a ./posadis/files/patch-configure.in

# tar -cvJ --options xz:1 -f posadis-xz1.tar.xz ./posadis/
a ./posadis
a ./posadis/files
a ./posadis/pkg-plist
a ./posadis/Makefile
a ./posadis/distinfo
a ./posadis/pkg-descr
a ./posadis/files/patch-Makefile.in
a ./posadis/files/patch-configure.in

unlike the previous examples, and arguments. I used the v switch.
Presuming that would provide feedback on any anomalous usage.
However. The following proves otherwise:

# ls -la

-rw-r--r--  1 root  wheel  2380 Aug 27 06:47 posadis-xz1.tar.xz
-rw-r--r--  1 root  wheel  2380 Aug 27 06:47 posadis-xz9.tar.xz

(performed on a RELENG_9 box)

As one can see, nothing (compression level(s)) were UNchanged.

So the verdict is in; the _recent_ changes provide the needed
feedback where anomalous usage is concerned.
Short version; tar now works correctly -- it's fixed. :)

Humble opinion; the man(1) pages could be somewhat more concise.

Humble request; would it be possible to make [bsd]tar(1) honor
the short-hand version of options?

Thank you, Tim, and everyone else, for all your thoughtful replies.

--Chris

>
> _______________________________________________
> freebsd-current_at_freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscribe_at_freebsd.org"
>
>
Received on Wed Aug 27 2014 - 12:01:26 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:51 UTC