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 1902720 - HOME=/root osinfo-query os fails with Error loading OS data: Unexpected file type
Summary: HOME=/root osinfo-query os fails with Error loading OS data: Unexpected file ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: libosinfo
Version: ---
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: rc
: 8.0
Assignee: Victor Toso
QA Contact: Radek Duda
URL:
Whiteboard:
Depends On:
Blocks: 1942431 1989971
TreeView+ depends on / blocked
 
Reported: 2020-11-30 13:53 UTC by Richard W.M. Jones
Modified: 2022-05-10 14:46 UTC (History)
7 users (show)

Fixed In Version: libosinfo-1.9.0-2.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1942431 1989971 (view as bug list)
Environment:
Last Closed: 2022-05-10 14:17:40 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2022:1914 0 None None None 2022-05-10 14:17:47 UTC

Description Richard W.M. Jones 2020-11-30 13:53:07 UTC
Description of problem:

Quite simply if you run libosinfo / osinfo utility with a bogus
or unreadable $HOME environment variable then it fails like this:

$ HOME=/root osinfo-query os
Error loading OS data: Unexpected file type

Version-Release number of selected component (if applicable):

This happens upstream, eg:
libosinfo-1.8.0-3.fc33.x86_64

and also in RHEL 8 with eg:
libosinfo-1.8.0-1.el8.x86_64

How reproducible:

100%

Steps to Reproduce:

See above.

Comment 1 Richard W.M. Jones 2021-03-22 11:11:37 UTC
For a bit of background see comments on this bug
https://bugzilla.redhat.com/show_bug.cgi?id=1901423
especially
https://bugzilla.redhat.com/show_bug.cgi?id=1901423#c18

Comment 4 John Ferlan 2021-10-18 15:24:17 UTC
Reassign Fabiano's bugs to Victor for libosinfo & osinfo-db

Comment 6 Radek Duda 2022-01-10 17:58:17 UTC
I reproduced the bug with ibosinfo-1.9.0-1.el8:
 HOME=/root osinfo-query os
Error loading OS data: Unexpected file type

Installed  ibosinfo-1.9.0-2.el8:
HOME=/root osinfo-query os
Error loading OS data: Can't read path /root/.config/osinfo

Just to be sure I've launched:
#osinfo-query os
which gives then a list of OSes.

As per https://bugzilla.redhat.com/show_bug.cgi?id=1942431#c7 I believe this solves the bug.

Comment 12 errata-xmlrpc 2022-05-10 14:17:40 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 (libosinfo 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/RHBA-2022:1914


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