[Bug-tar] compressed archives within tar files

2014-03-15 Thread e-letter
Readers,

What is the risk of data corruption if a zip archive is added to a tarball?

If there is in-sufficient space on the local disk that contains the
zip archive, can the zip file be extracted and 'piped' to the tarball
on the storage disk (accessible via USB connection to the local disk)?



Re: [Bug-tar] compressed archives within tar files

2014-03-15 Thread Pavel Raiskup
Hello,

On Saturday, March 15, 2014 09:13:08 e-letter wrote:
 Readers,

 What is the risk of data corruption if a zip archive is added to a tarball?

 If there is in-sufficient space on the local disk that contains the
 zip archive, can the zip file be extracted and 'piped' to the tarball
 on the storage disk (accessible via USB connection to the local disk)?

No IMO, you may not pipe the product of extraction (files, directories
..).  I am not sure I understand your use case correctly.  You basically
want convert Zip-standard archive to tar/pax?  I am not aware of any
converter like this.  Still, I don't see any risk of data corruption
(until your tools are not buggy and we accept that some attributes may be
lost) when you do this in two steps:

  * Firstly unzip the file into your USB disk and
  * then archive the resulting files into tarball

Both actions taking into account that your source drive is full.  Of
course, you'll need most probably more then twice as much space as the
archive occupies on the target USB disk.

Pavel




Re: [Bug-tar] compressed archives within tar files

2014-03-15 Thread e-letter
On 15/03/2014, Pavel Raiskup prais...@redhat.com wrote:

 No IMO, you may not pipe the product of extraction (files, directories
 ..).  I am not sure I understand your use case correctly.  You basically
 want convert Zip-standard archive to tar/pax?  I am not aware of any
 converter like this.  Still, I don't see any risk of data corruption
 (until your tools are not buggy and we accept that some attributes may be
 lost) when you do this in two steps:

   * Firstly unzip the file into your USB disk and
   * then archive the resulting files into tarball


To clarify further, no, the requirement is not convert an archive
format. The question was whether it is OK/safe/good protocol to:

directory contents:
textfile1
textfile2
archive.zip

tar -cvf tarball.tar *

In other words, the tarball contains an archive.



Re: [Bug-tar] compressed archives within tar files

2014-03-15 Thread Paul Eggert

e-letter wrote:

In other words, the tarball contains an archive.


Tarballs can contain any regular files, of any format.  There are no 
restrictions.