Bug 972775

Summary: txz-out command produces a bzip2-compressed file (should be xz-compressed)
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, qguan, wshi
Target Milestone: ---Keywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 972413 Environment:
Last Closed: 2013-06-10 15:13:37 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: 972413, 972776    

Description Richard W.M. Jones 2013-06-10 14:56:50 UTC
+++ This bug was initially created as a clone of Bug #972413 +++

Description of problem:
txz-in unpack the tarball,which is packed by txz-out, failed.
though it is marked as "deprecated" in its help output, it is still provided.  

Simple reproducer:

$ guestfish -N fs -m /dev/sda1 mkdir /test : touch /test/1.txt : txz-out /test test.txz
$ file test.txz
test.txz.out: bzip2 compressed data, block size = 900k

(Note that the type of 'test.txz' should not be bzip2-compressed.
It should be xz-compressed)

Comment 1 Richard W.M. Jones 2013-06-10 15:13:21 UTC
Fixed upstream:
https://github.com/libguestfs/libguestfs/commit/546b3f3fce38874239161484b74aa90560a399dc

$ ./run ./fish/guestfish -N fs -m /dev/sda1

Welcome to guestfish, the guest filesystem shell for
editing virtual machine filesystems and disk images.

Type: 'help' for help on commands
      'man' to read the manual
      'quit' to quit the shell

><fs> mkdir /test
><fs> touch /test/1.txt
><fs> txz-out /test /tmp/test.txz
><fs> !file /tmp/test.txz
/tmp/test.txz: XZ compressed data
><fs> !ls -l /tmp/test.txz
-rw-rw-r--. 1 rjones rjones 184 Jun 10 16:11 /tmp/test.txz
><fs> mkdir /new
><fs> txz-in /tmp/test.txz /new
><fs> ll /new
total 2
drwxr-xr-x 2 root root 1024 Jun 10 16:11 .
drwxr-xr-x 5 root root 1024 Jun 10 16:11 ..
-rw-r--r-- 1 root root    0 Jun 10 16:11 1.txt