Bug 408621 - tar -vf /dev/stdout produces corrupted tar archives
Summary: tar -vf /dev/stdout produces corrupted tar archives
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: tar
Version: 9
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Ondrej Vasik
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-12-03 13:52 UTC by Alexander Todorov
Modified: 2008-05-26 16:57 UTC (History)
0 users

Fixed In Version: tar-1.17-5.fc9
Clone Of:
Environment:
Last Closed: 2008-05-26 16:57:45 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Alexander Todorov 2007-12-03 13:52:27 UTC
Description of problem:
When using -v (verbose) and -f (output file) options and specifying /dev/stdout
as argument tar produces corrupted archive.

Version-Release number of selected component (if applicable):
tar (GNU tar) 1.15.1
tar-1.15.1-23.0.1.el5

How reproducible:
Always

Steps to Reproduce:
1. tar -cvf /dev/stdout [files or dirs] > output.tar
  
Actual results:
resulting file is not a valid tar archive. the file listing is mixed with actual
content.

Expected results:


Additional info:
Long description of the problem:
http://www.redhatmagazine.com/2007/10/24/tips-from-an-rhce-splitting-tar-archives-on-the-fly/#comment-36513

When using -f file listing is printed on stdout. Tar is not checking if the
argument to -f is "/dev/stdout". When not using -f standard output is assumed by
default and tar will send file listing to stderr.

That's bug either in code or documentation. I haven't seen manual page
indicating that -v and -f may lead to corrupted archives. The "-f /dev/stdout"
is not really necessary but it's used to make the command more human friendly.

Comment 2 RHEL Program Management 2007-12-03 20:48:06 UTC
This request was evaluated by Red Hat Product Management for
inclusion, but this component is not scheduled to be updated in
the current Red Hat Enterprise Linux release.  This request will
be reviewed for a future Red Hat Enterprise Linux release.

Comment 8 Bug Zapper 2008-05-14 04:04:41 UTC
Changing version to '9' as part of upcoming Fedora 9 GA.
More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 9 Ondrej Vasik 2008-05-26 16:57:45 UTC
As I'm new tar maintainer - and as the fixed manpage is part of F9/Rawhide tar,
closing that bugzilla RAWHIDE. Feel free to add any comments if you have
something to discuss about that issue.


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