Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be available on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 1574743 - zcat fails to do what it should
Summary: zcat fails to do what it should
Alias: None
Product: Fedora
Classification: Fedora
Component: gzip
Version: 28
Hardware: x86_64
OS: Linux
Target Milestone: ---
Assignee: Petr Stodulka
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2018-05-04 00:01 UTC by Ray Holme
Modified: 2018-05-04 12:31 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2018-05-04 12:31:28 UTC
Type: Bug

Attachments (Terms of Use)

Description Ray Holme 2018-05-04 00:01:15 UTC
Description of problem: using zcat to uncompress multiple files and send to a pipe is a disaster for the pipe reader

Version-Release number of selected component (if applicable):

How reproducible: 100%

Steps to Reproduce:
1. use "dump" to backup a file system that is big enough to exceed 4MB when zipped; use -z to zip it and pipe to split with 2GB file sizes --I did /home
    cd /someplace_on_another_FS
    dump -u0 -f - -L home /home | split -b 2GB -d - home.dmp
2. try to restore ANYTHING from the directory you backed up to elsewhere
   zcat home.dmp* | (cd /tmp/fubar ; restore -if -)
3. you will see all the filenames and directories as they are probably in first
   logical extent but after selecting someting (add ...); 
   try "extract" to get the error

Actual results: pre-mature end of file message

Expected results: it should work nicely

Additional info:

 to fix above, separate the concatenation from the unzipping

  cat home.dmp* | gunzip | ((cd /tmp/fubar; restore -if -)

 That works.

Comment 1 Jakub Martisko 2018-05-04 07:52:59 UTC
Hello Ray,

I might be missing something, but it seems to me, that what you are doing is:
compress some files -> split the archive -> try to uncompress parts of this splitted archive.

The fix you mention on the other hand does:
compress some files -> split the archive -> merge the archive parts back into single file -> uncompress it

Are you sure you are not misinterpretting what is zcat used for? From the manpage: 
"...zcat uncompresses either a list of files on the command line or its standard input and writes the uncompressed data on standard output."


Comment 2 Ray Holme 2018-05-04 12:31:28 UTC

I guess I assumed wrong. I thought zcat was supposed to cat like "cat" but uncompress along the way. Using cat is OK, but I thought zcat was targeted to also work like cat (which concatenates to standard output) not uncompress multiple files.



Note You need to log in before you can comment on or make changes to this bug.