Bug 908322

Summary: virt-tar fails on non-existent directory names "error in chunked encoding at /home/rjones/d/libguestfs/tools/virt-tar line 272."
Product: [Community] Virtualization Tools Reporter: Richard W.M. Jones <rjones>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED UPSTREAM QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: bfan, dyasny, leiwang, mbooth, moli, qguan, wshi
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 908255 Environment:
Last Closed: 2013-02-06 14:57:32 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 908255    

Description Richard W.M. Jones 2013-02-06 12:36:27 UTC
+++ This bug was initially created as a clone of Bug #908255 +++

Description of problem:

[root@hp-z220-01 images]# virt-tar -x rhel6.32bit /boot/gurb grub.tar
                                                  ^^^^^^^^^^^ 
grub.tar: error in chunked encoding at /usr/bin/virt-tar line 272.


Simple reproducer from within the libguestfs source tree:

$ ./run ./tools/virt-tar -x ./tests/guests/fedora.img /foo /dev/null
/dev/null: error in chunked encoding at /home/rjones/d/libguestfs/tools/virt-tar line 272.

Comment 1 Richard W.M. Jones 2013-02-06 14:57:32 UTC
The new error is:

tar_out: stat: /foo: No such file or directory at /home/rjones/d/libguestfs/tools/virt-tar line 272.

or if you point to something which exists but is not a directory:

tar_out: /etc/fstab: not a directory at /home/rjones/d/libguestfs/tools/virt-tar line 272.

I also fixed the base64-out command in a similar manner.

Upstream commit:
https://github.com/libguestfs/libguestfs/commit/c78ec7e085e99bfddd0509dece72bf6a8d0188ce