RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2117004 - RFE: Add support for Zstandard compression to guestfs_file_architecture API
Summary: RFE: Add support for Zstandard compression to guestfs_file_architecture API
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: libguestfs
Version: 9.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Richard W.M. Jones
QA Contact: YongkuiGuo
URL:
Whiteboard:
Depends On:
Blocks: 2116811
TreeView+ depends on / blocked
 
Reported: 2022-08-09 17:57 UTC by Richard W.M. Jones
Modified: 2022-11-15 10:13 UTC (History)
6 users (show)

Fixed In Version: libguestfs-1.48.4-2.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-11-15 09:52:35 UTC
Type: Feature Request
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-130687 0 None None None 2022-08-09 18:09:41 UTC
Red Hat Product Errata RHSA-2022:7958 0 None None None 2022-11-15 09:52:44 UTC

Description Richard W.M. Jones 2022-08-09 17:57:09 UTC
This bug was initially created as a copy of Bug #2116811

Description:

The guestfs_file_architecture API:
https://libguestfs.org/guestfs.3.html#guestfs_file_architecture
can currently unpack binaries in various compressed formats such
as .gz and .xz.  We require this because this API can be used on
Linux kernel modules which are commonly compressed.

Recently (bug 2116811) we have found kernels using zstd
compression for kernel modules (.ko.zst).  To be able to
process these guests in virt-v2v we need libguestfs to add
support for zstd-compression to this API.

Comment 3 Richard W.M. Jones 2022-08-11 11:48:42 UTC
To test this you could try:

  $ cd /var/tmp
  $ cp /usr/bin/ls ls
  $ zstd ls
  ls                   : 47.13%   (   143 KiB =>   67.3 KiB, ls.zst)
  $ ls -l ls.zst 
  -rwxr-xr-x. 1 rjones rjones 68873 Aug 11 12:46 ls.zst

  $ guestfish -N fs -m /dev/sda1 upload ls.zst /ls.zst : file-architecture /ls.zst

Before this change you would see:

  libguestfs: error: file_architecture: unknown architecture: /ls.zst

After this change you would see:

  x86_64

(or whatever your local architecture is).

Comment 4 YongkuiGuo 2022-08-11 12:09:04 UTC
(In reply to Richard W.M. Jones from comment #3)
> To test this you could try:
> 
>   $ cd /var/tmp
>   $ cp /usr/bin/ls ls
>   $ zstd ls
>   ls                   : 47.13%   (   143 KiB =>   67.3 KiB, ls.zst)
>   $ ls -l ls.zst 
>   -rwxr-xr-x. 1 rjones rjones 68873 Aug 11 12:46 ls.zst
> 
>   $ guestfish -N fs -m /dev/sda1 upload ls.zst /ls.zst : file-architecture
> /ls.zst
> 
> Before this change you would see:
> 
>   libguestfs: error: file_architecture: unknown architecture: /ls.zst
> 
> After this change you would see:
> 
>   x86_64
> 
> (or whatever your local architecture is).

Thanks for providing the test steps.

On rhel9.1 host:

$ cd /var/tmp
$ cp /usr/bin/ls ls
$ zstd ls
ls                   : 45.98%   (   139 KiB =>   63.8 KiB, ls.zst)
$ ls -l ls.zst 
-rwxr-xr-x. 1 yoguo yoguo 65372 Aug 11 07:53 ls.zst
$ rpm -q libguestfs
libguestfs-1.48.4-1.el9.x86_64
$ guestfish -N fs -m /dev/sda1 upload ls.zst /ls.zst : file-architecture /ls.zst
libguestfs: error: file_architecture: unknown architecture: /ls.zst

$ yum update libguestfs
$ rpm -q libguestfs
libguestfs-1.48.4-2.el9.x86_64
$ guestfish -N fs -m /dev/sda1 upload ls.zst /ls.zst : file-architecture /ls.zst
x86_64

Comment 8 YongkuiGuo 2022-08-15 01:48:22 UTC
Verified this bug since the test case for this bug has been automated and passed in the latest nightly compose test.

Comment 10 errata-xmlrpc 2022-11-15 09:52:35 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Low: libguestfs security, bug fix, and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2022:7958


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