Description of problem: Execute inspect-get-icon failed on RHEL7 guest. Others okay. How reproducible: 100% Steps to Reproduce: ><fs> list-filesystems /dev/sda1: xfs /dev/rhel_dhcp-11-144/root: xfs /dev/rhel_dhcp-11-144/swap: swap ><fs> inspect-os /dev/rhel_dhcp-11-144/root ><fs> mount /dev/rhel_dhcp-11-144/root / ><fs> df Filesystem 1K-blocks Used Available Use% Mounted on tmpfs 97876 120 97756 1% /run /dev 242296 0 242296 0% /dev /dev/mapper/rhel_dhcp--11--144-root 7022592 3996264 3026328 57% /sysroot ><fs> trace 1 ><fs> inspect-get-icon /dev/rhel_dhcp-11-144/root libguestfs: trace: inspect_get_icon "/dev/rhel_dhcp-11-144/root" libguestfs: trace: is_file "/etc/favicon.png" "followsymlinks:true" libguestfs: trace: is_file = 1 libguestfs: trace: file "/etc/favicon.png" libguestfs: trace: file = "symbolic link" libguestfs: trace: is_file "/usr/share/pixmaps/redhat/shadowman-transparent.png" "followsymlinks:true" libguestfs: trace: is_file = 0 libguestfs: trace: inspect_get_icon = "" Actual results: Failed. Expected results: Should pass. Additional info: inspect-get-icon get file /etc/favicon.png and /usr/share/pixmaps/redhat/shadowman-transparent.png from the guest as the icon of the guest operating system, but in rhel7 there is no /usr/share/pixmaps/redhat/shadowman-transparent.png, so from the trace you can see: libguestfs: trace: is_file "/usr/share/pixmaps/redhat/shadowman-transparent.png" "followsymlinks:true" libguestfs: trace: is_file = 0 due to this guestfish failed to get the icon. But when ' /usr/share/pixmaps/redhat/shadowman-transparent.png' is not available it should choose /etc/favicon.png as the icon. (See 'help inspect-get-icon') Also you can display the icon by this way: # yum install -y ImageMagick In guestfish: ><fs> inspect-get-icon /dev/VolGroup/lv_root | display -
There are two bugs here: (1) For RHEL 7 we've assumed there will be a shadowman icon in /sysroot/usr/share/pixmaps/redhat/shadowman-transparent.png but this is not present in RHEL 7 (or possibly requires extra packages -- still investigating). (2) When we request a favicon, /etc/favicon.png isn't being read, even though it's a valid symlink pointing to a png file.
https://github.com/libguestfs/libguestfs/commit/c8a608ecf8576bb754749db982714fa35cedfbe4 https://github.com/libguestfs/libguestfs/commit/42391913287d935e582b0c67571a17e657aa8e2e
><fs> inspect-get-icon /dev/rhel_dhcp-11-144/root �PNG �����9��:�Ӣ���{�s�s9We��@3�/m3��d��TG�!3p�+m^L��)�j�@ڤ��"p�u.C�w�)k�MJ��V���UԢ �MQ-CqԅJ p������MD;0������v�A�Cx��x�X� |O��:d��c@v8q*�Q���AHk��������h�zX9����y��f�e�t� >�:�����<\u�l&JE��,�u�J�z�M�$���� ��^���cνH#0Rtp89骧��b��2��p�Zc<kU�g ���z�}ڑ�7��n�[�vn����o��V�C����������si��EJT�$i�<ʦy�S��LY[��L׃#-������X,& �K'��|�B��ŕ��P��)4�J�z�@"��h��d��EDZD�(5d۶�����ƆLOM-�A�T��}�˓8\��o"� ���I����Ȉgc}}*>;�-_BD�����BDd6�8t����vBD���F�ʀ2䮈X��l����|D����� m�~` x,���k�K�!K��G�>IEND�B`�><fs> Verified as above.
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, 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://rhn.redhat.com/errata/RHBA-2015-0303.html