lure-sh / lure

The community repository missing from your Linux distro
https://lure.sh
GNU General Public License v3.0
408 stars 7 forks source link

Parse mandatory runtime deps from binaries and libraries #32

Closed JamiKettunen closed 2 years ago

JamiKettunen commented 2 years ago

This is neat as then you don't have to manually always type these deps out for each package that are mandatory based on linked libraries, just ones that appear to be required on runtime if they're e.g. called from a shell script.

A database like this also avoids duplicating known names for certain packages on different distros across a bunch of lure.sh's.

This could work similar to what Void's xbps-src does with 04-generate-runtime-deps.sh and 06-shlib-provides pre-pkg hooks; for this we would at least need to map out each library .so*'s (seen in e.g. objdump / ldd output of binaries) to package names for each distro in some way (while ideally avoiding duplicating .so* -> package names for each distro/arch if possible), for example here's how Void does it.

On Arch PKGBUILDs you can also do e.g. depends+=(libmount.so libffi.so) or provides+=(libgio-2.0.so libglib-2.0.so libgmodule-2.0.so libgobject-2.0.so libgthread-2.0.so) which mapping out the provided package names -> .so*s could also enable.

Elara6331 commented 2 years ago

This does seem like a good idea, but a very complicated one that doesn't seem to be within the scope of this project, You'd need to maintain a database of library files to package names for every supported distro, and even that wouldn't really handle anything but dynamic library dependencies.

JamiKettunen commented 2 years ago

I guess yeah... I'll close this, just wanted to share the idea