Bug 824716 - compress-device-out didn't support bzip2
Summary: compress-device-out didn't support bzip2
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libguestfs
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Richard W.M. Jones
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-05-24 03:55 UTC by Mohua Li
Modified: 2012-05-24 07:50 UTC (History)
7 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2012-05-24 07:50:18 UTC
Embargoed:


Attachments (Terms of Use)

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.


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