Bug 972775 - txz-out command produces a bzip2-compressed file (should be xz-compressed)
Summary: txz-out command produces a bzip2-compressed file (should be xz-compressed)
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libguestfs   
(Show other bugs)
Version: unspecified
Hardware: Unspecified Unspecified
Target Milestone: ---
Assignee: Richard W.M. Jones
QA Contact:
Keywords: Regression
Depends On:
Blocks: 972413 972776
TreeView+ depends on / blocked
Reported: 2013-06-10 14:56 UTC by Richard W.M. Jones
Modified: 2013-06-10 15:13 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 972413
Last Closed: 2013-06-10 15:13:37 UTC
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

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:

$ ./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

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