Bug 2184391 - wxGetLinuxDistributionInfo needs lsb_release, which is not typically available
Summary: wxGetLinuxDistributionInfo needs lsb_release, which is not typically available
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: wxGTK
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
Assignee: Scott Talbert
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-04-04 14:08 UTC by Steven A. Falco
Modified: 2023-10-14 02:03 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2023-07-28 15:47:46 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Steven A. Falco 2023-04-04 14:08:59 UTC
Description of problem:

wxGetLinuxDistributionInfo() is used by the KiCad package to gather release information for bug reports.

wxGetLinuxDistributionInfo() uses /usr/bin/lsb_release to get that data, but /usr/bin/lsb_release is owned by the redhat-lsb-core package, which is not generally installed on user's machines.

I've added a weak dependency in KiCad to pull in redhat-lsb-core, but that pulls in a vast amount of other unnecessary things, like a sendmail provider, which is causing complaints among KiCad users.

As suggested on the devel mailing list [1], wxGetLinuxDistributionInfo() could be altered to instead read the information directly from os-release(5).

I don't know if that is something the wxGTK upstream would consider, or if it could be a patch on the Fedora wxGTK package.

I'm willing to help out with this proposal.

[1] https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/WE55P2AVNHQEEIAFUTKTRWVOCMUVULGB/

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


How reproducible: 100%


Steps to Reproduce:
1. Call wxGetLinuxDistributionInfo() without having redhad-lsb-core installed
2. Notice that the distribution information is blank

Actual results:


Expected results:


Additional info:

Comment 1 Dan Horák 2023-04-04 14:57:04 UTC
FWIW the code in wxGetLinuxDistributionInfo() is from 2013, when LSB was still a thing, so I think upstream might be willing to modernize it :-)

Comment 2 Sergio Basto 2023-04-11 14:07:55 UTC
Hi, 
I will provide redhad-lsb-core soon in epel 9, redhat-lsb-4.1-61.fc39  was built Mon, 10 Apr 2023

I hope start supporting lsb-5.0

man lsb_release for more information , I also have a couple of tickets to review ...

Comment 3 Scott Talbert 2023-07-14 16:17:38 UTC
Submitted PR upstream: https://github.com/wxWidgets/wxWidgets/pull/23712

Comment 4 Scott Talbert 2023-07-28 15:47:46 UTC
This has been implemented in Rawhide.

Comment 5 Steven A. Falco 2023-07-28 19:48:27 UTC
Thank you, Scott - I appreciate your help!

Comment 6 Sergio Basto 2023-10-14 02:03:12 UTC
FYI 
lsb-5.0 is arriving to epel9 https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2023-336dbb57e0


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