FreshPorts / freshports

The website part of FreshPorts
http://www.freshports.org/
BSD 2-Clause "Simplified" License
68 stars 24 forks source link

Consider runtime dependency variations for cases such as graphics/drm-kmod #207

Open grahamperrin opened 3 years ago

grahamperrin commented 3 years ago

For example, https://www.freshports.org/graphics/drm-kmod/#requiredrun lists one runtime dependency:

  1. drm.ko : graphics/drm-fbsd12.0-kmod

The actual dependency varies according to the ABI e.g.

% date ; uname -v
Sun 31 Jan 2021 00:22:14 GMT
FreeBSD 14.0-CURRENT #84 main-53729367d3: Sat Jan 30 18:47:56 GMT 2021     root@mowa219-gjp4-8570p:/usr/obj/usr/src/amd64.amd64/sys/GENERIC-NODEBUG 
% pkg rquery '%do %R' drm-kmod
graphics/drm-current-kmod FreeBSD
graphics/drm-current-kmod poudriere
% 

Do we assume that readers will know to not take the runtime dependency line too literally?

(In the drm-kmod case, there's https://www.freshports.org/graphics/drm-kmod/#description a suitably explanatory description.)


Or is there some way of signalling that sometimes, a listed dependency may be not always true?

dlangille commented 3 years ago

Can you figure out a way to fake the ABI we are running on?

grahamperrin commented 3 years ago

… with a view to telling whether responses vary for multiple ABI-specific pkg-rquery(8) queries for a single port?

dlangille commented 3 years ago

Yes. I think we have to first detect if there is any difference between ABI. How do we do that? Perhaps we fake the current ABI. Most information is extracted via 'make -V' - and this is done in a chroot. Maybe that holds the solution.

grahamperrin commented 3 years ago

I also thought of chroot.

My uneducated guess (before your comment) was a jail (?) for each ABI then within each jail, some use of pkg rquery (with --no-repo-update).

If a make command can get what's required, this is surely preferable to querying a remote server ☑

grahamperrin commented 3 years ago

As a side note, I wonder whether graphics/xpdf will be a comparable case, given:

Prepare to hide this comment as off-topic. I may be confusing myself …