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 806176 - libguestfs doesn't use the external tools (wrestool ...) to get icon even these tools are installed
Summary: libguestfs doesn't use the external tools (wrestool ...) to get icon even the...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libguestfs
Version: 6.3
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: rc
: ---
Assignee: Richard W.M. Jones
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 840699
TreeView+ depends on / blocked
 
Reported: 2012-03-23 05:57 UTC by Yuyu Zhou
Modified: 2012-08-10 13:00 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-08-10 13:00:33 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Yuyu Zhou 2012-03-23 05:57:34 UTC
Description of problem:
Fail to inspect-get-icon for windows guests

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

How reproducible:
100%

Steps to Reproduce:
1. download a pre-installed Windows guest image
2. Inspect the icon of Windows guests as following:
# guestfish
$ trace 1
$ add Win7-32-hvm..raw
$ run
$ inspect-os
/dev/vda1
$ mount /dev/vda1 /
$ inspect-get-icon /dev/vda1
libguestfs: trace: inspect_get_icon "/dev/vda1"
libguestfs: trace: case_sensitive_path "/etc/favicon.png"
libguestfs: trace: case_sensitive_path = NULL (error)
libguestfs: trace: exists "/etc/favicon.png"
libguestfs: trace: exists = 0
libguestfs: trace: inspect_get_icon = ""

Actual results:
At step2
$ inspect-get-icon /dev/vda1
A zero-length buffer is returned.

Expected results:
At Step2
$ inspect-get-icon /dev/vda1
A buffer containing a PNG image should be returned.

Additional info:
1. In fact, on previous version: libguestfs-1.16.8-1.el6.x86_64
We can get icon from Windows XP 32 bit guest, and Win7 32 bit guest.

In the new vesrion, none of them work.
It seems libguestfs doesn't try the external tools on host to get the os icon even they are installed.
It has:
#if defined(WRESTOOL) && defined(BMPTOPNM) && defined(PNMTOPNG) && \
    defined(PAMCUT)
#define CAN_DO_WINDOWS 1
#endif
but these values (WRESTOOL, BMPTOPNM, PNMTOPNG, PAMCUT) are defined while it's building, so if the build system did have these external tools installed, then the rpm which was built on that host will disable this feature

2. For Win7 64bit guest, it fail even on libguestfs-1.16.8-1.el6.x86_64 as following:
><fs> inspect-get-icon /dev/vda1
libguestfs: trace: list_devices
libguestfs: trace: list_devices = ["/dev/vda"]
libguestfs: trace: list_partitions
libguestfs: trace: list_partitions = ["/dev/vda1"]
libguestfs: trace: lvs
libguestfs: trace: lvs = []
libguestfs: trace: list_dm_devices
libguestfs: trace: list_dm_devices = []
libguestfs: trace: list_md_devices
libguestfs: trace: list_md_devices = []
libguestfs: trace: readdir "/dev"
libguestfs: trace: readdir = NULL (error)
libguestfs: trace: inspect_get_icon "/dev/vda1"
libguestfs: trace: case_sensitive_path "/etc/favicon.png"
libguestfs: trace: case_sensitive_path = NULL (error)
libguestfs: trace: exists "/etc/favicon.png"
libguestfs: trace: exists = 0
libguestfs: trace: case_sensitive_path "/Windows/explorer.exe"
libguestfs: trace: case_sensitive_path = "/Windows/explorer.exe"
libguestfs: trace: filesize "/Windows/explorer.exe"
libguestfs: trace: filesize = 2868224
libguestfs: trace: download "/Windows/explorer.exe" "/dev/fd/3"
libguestfs: trace: download = 0
wrestool: /tmp/libguestfsAb9Zoi/0-explorer: file contains no resources
bmptopnm: Standard Input: read error
pamcut: Error reading magic number from Netpbm image stream.  Most often, this means your input file is empty.
pnmtopng: Error reading magic number from Netpbm image stream.  Most often, this means your input file is empty.
libguestfs: trace: inspect_get_icon = ""

Comment 2 Richard W.M. Jones 2012-03-23 09:26:10 UTC
Removing the 'Regression' keyword:

This isn't a regression because the feature was only added
in libguestfs 1.12, and the previous version of RHEL had
libguestfs 1.8.

---

icoutils isn't in RHEL 6, so to add this feature we would
have to add this package to RHEL, which is uncertain and
probably unlikely.

Comment 4 Richard W.M. Jones 2012-08-10 13:00:33 UTC
Closing because:

(a) We're not likely to add icoutils to RHEL 6.

(b) libguestfs shouldn't use external (ie. unsupported) packages
to parse icons etc.


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