[PATCH] Allows tar to extract from archives with pax extensions

Rob Landley rob at landley.net
Thu Jul 6 20:31:21 UTC 2006


On Thursday 06 July 2006 3:29 pm, Erik Frederiksen wrote:
> This patch allows busybox tar to extract tar archives that use the pax
> extensions.  I noticed that old versions of GNU tar extract the
> pax_global_header file as a regular file and duplicated that behaviour.
>
> Here's a few of Linus' thoughts on the situation.
> http://lkml.org/lkml/2005/6/18/5
>
> I originally wrote this for 1.0, but the patch applied to 1.2 with no
> problems.  I look forward to hearing your comments.
>
> Erik Frederiksen
> Firmware Design Engineer Co-op
> PMC-Sierra Saskatoon

Ooh!

My comment is "Applied", although I'm going to tweak it a bit first.

Combining Linus's comment with the pax spec:
http://www.opengroup.org/onlinepubs/009695399/utilities/pax.html

The question is what to do about 'x' records?

>         case 'x':
> +               bb_error_msg_and_die( "pax is not tar" );
> +               break;
>         case 'g':
> -               bb_error_msg_and_die("pax is not tar");
> +               bb_error_msg(
> +             "%s: Unknown file type '%c', treating as a regular file.",
> +                       file_header->name,
> +                       tar.formated.typeflag
> +               );
> +               file_header->mode |= S_IFREG;

Ideally I think we just want to ignore them...

http://busybox.net/downloads/patches/svn-15660.patch

And if that works for everybody else, it's going into 1.2.1. :)

Rob
-- 
Never bet against the cheap plastic solution.



More information about the busybox mailing list