Bug 824716

Summary: compress-device-out didn't support bzip2
Product: [Community] Virtualization Tools Reporter: Mohua Li <moli>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED UPSTREAM QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: dyasny, leiwang, mbooth, qguan, qwan, virt-maint, yuzhou
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-05-24 07:50:18 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:

Description Mohua Li 2012-05-24 03:55:39 UTC
Description of problem:
compress-device-out could support gzip/xz, but didn't support bzip2, reported as unsupported type, which is supported in el6, 
 
 ><fs> compress-device-out  bzip2 /dev/vda1 /tmp/compress_device
libguestfs: error: compress_device_out: compression type bzip2 is not supported
 
 checked the 1.6 branch, as following,

 daemon/compress.c, 
 136   else if (STREQ (ctype, "bzip2")) {
 137     CHECK_SUPPORTED ("bzip2");
 138     if (level == -1)
 139       snprintf (ret, n, "bzip2 -c");
 140     else if (level >= 1 && level <= 9)
 141       snprintf (ret, n, "bzip2 -c -%d", level);
 142     else {
 143       reply_with_error ("bzip2: incorrect value for level parameter");
 144       return -1;
 145     }
 146     return 0;
 
didn't find the api on 1.8 branch, 


Version-Release number of selected component (if applicable):
libguestfs-1.17.43-1.el7.x86_64


How reproducible:
always

Steps to Reproduce:
1.guestfish -N fs compress-device-out bzip2 /dev/vda1 compress
2.
3.
  
Actual results:
didn't support bzip2 for compress out 

Expected results:


Additional info:

Comment 1 Richard W.M. Jones 2012-05-24 07:46:04 UTC
The cause of this is that /usr/bin/bzip2 is not copied into
the appliance, because the package name is missing from
appliance/packagelist.in.  This is an upstream bug, so I will
change the component.  Once fixed upstream, the fix will
trickle into F17/RHEL7 by the normal means.

Comment 2 Richard W.M. Jones 2012-05-24 07:50:18 UTC
Fixed in commit f904fa822316ff793e71d4d4ff7dc79e608dcb25.