Bug 252282

Summary: sysutils/hw-probe runtime dependencies
Product: Ports & Packages Reporter: Graham Perrin <grahamperrin>
Component: Individual Port(s)Assignee: Alexey Dokuchaev <danfe>
Status: Closed FIXED    
Severity: Affects Some People CC: andrewponomarenko, danfe
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
URL: https://www.freshports.org/sysutils/hw-probe/#dependencies

Description Graham Perrin freebsd_committer freebsd_triage 2020-12-30 13:01:20 UTC
https://svnweb.freebsd.org/ports/head/sysutils/hw-probe/Makefile?revision=536978&view=markup does not specify sysutils/usbutils but if I understand correctly: 

* usbutils is required for lsusb(8). 

Context
=======

Consider including things such as lsblk and usbutils, at least during the early stages of development of helloSystem · Issue #63 · helloSystem/ISO
<https://github.com/helloSystem/ISO/issues/63> 

– closed with https://github.com/helloSystem/ISO/commit/913ef5f9af88a7fab35fe698d36b5ef180182850

https://github.com/helloSystem/ISO/commit/913ef5f9af88a7fab35fe698d36b5ef180182850#diff-ba48011d35001eeaa41235c7a115fc5007325aacc87366e0858bf10e3c5fb456L93 hw-probe is already there.
Comment 1 Graham Perrin freebsd_committer freebsd_triage 2021-07-16 23:34:28 UTC
<https://github.com/linuxhw/hw-probe/issues/101#issuecomment-859363330>

> This should be done downstream: …

Please consider adding these dependencies: 

sysutils/pciutils
sysutils/usbutils


% pkg provides /usr/local/bin/lspci
Name    : pciutils-3.7.0
Desc    : PCI configuration utilities
Repo    : FreeBSD
Filename: usr/local/bin/lspci
% pkg provides /usr/local/sbin/lsusb
Name    : usbutils-0.91
Desc    : Utility for listing USB devices
Repo    : FreeBSD
Filename: usr/local/sbin/lsusb
% 

Without these, a first probe of an HP ProBook 440 G7 lacked detail: 

<https://bsd-hardware.info/?probe=d2866f01b5#Logs>

The second was better: 

<https://bsd-hardware.info/?probe=b73eb50747#Logs>
Comment 2 Graham Perrin freebsd_committer freebsd_triage 2021-07-16 23:37:38 UTC
Also: 

sysutils/lsblk

% pkg provides usr/local/sbin/lsblk
Name    : lsblk-3.5
Desc    : Lists information about block devices in the system
Repo    : FreeBSD
Filename: usr/local/sbin/lsblk
%
Comment 4 Andrey P. 2021-09-08 10:42:59 UTC
(In reply to Graham Perrin from comment #3)

sysutils/hwstat is recommended for FreeBSD installations newer than 8.1.

sysutils/pciutils and sysutils/usbutils are not recommended because we have pciconf and usbconfig instead in the system by default.

sysutils/lsblk is recommended.

For future: make sure new dependency is available on all architectures.
Comment 5 Graham Perrin freebsd_committer freebsd_triage 2021-09-12 12:45:24 UTC
(In reply to Andrey P. from comment #4)

> sysutils/pciutils and sysutils/usbutils are not recommended

What about the resulting lack of detail?
Comment 6 Andrey P. 2021-09-15 08:16:25 UTC
(In reply to Graham Perrin from comment #5)

What particular info is missed?
Comment 7 Alexey Dokuchaev freebsd_committer freebsd_triage 2022-01-24 09:41:23 UTC
So, what's the resolution here?  Now in version 1.6.1, the following programs are used on FreeBSD:

- curl
- dmidecode (on x86)
- hwstat
- lscpu (on x86)
- smartctl

All of them are listed as port's dependencies.  According to the upstream (comment #4), sysutils/pciutils are sysutils/usbutils are not used because there are pciconf(8) and usbconfig(8) in the base system which can be used instead.

> sysutils/lsblk is recommended.
Indeed, installing it fixed "dual_boot_win:1" (was zero) and `logs/lsblk' file is generated now.
Comment 8 commit-hook freebsd_committer freebsd_triage 2022-01-24 09:49:25 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=db70ca99c9e449325a55c78ab685d4e84c46fe10

commit db70ca99c9e449325a55c78ab685d4e84c46fe10
Author:     Alexey Dokuchaev <danfe@FreeBSD.org>
AuthorDate: 2022-01-24 09:47:24 +0000
Commit:     Alexey Dokuchaev <danfe@FreeBSD.org>
CommitDate: 2022-01-24 09:47:24 +0000

    sysutils/hw-probe: add run-time dependency on `sysutils/lsblk' port

    Helps to get more complete and accurate probe, e.g. `dual_boot_win'
    property should be set correctly now.

    PR:     252282

 sysutils/hw-probe/Makefile | 1 +
 1 file changed, 1 insertion(+)
Comment 9 Alexey Dokuchaev freebsd_committer freebsd_triage 2022-05-18 06:35:05 UTC
(In reply to Graham Perrin from comment #5)
> What about the resulting lack of detail?
I've looked at both HP ProBook 440 G7 probes in comment #1 and did find any omissions.  Our base system utilities return the same data as the `sysutils/{pci,usb}utils' ports, just formatted in a slightly different way.  The only really missing dependency on `sysutils/lsblk' port had been added earlier, hence I'm closing this PR.