On Fri, 28 Aug 2026 at 08:37, Bruno Haible <[email protected]> wrote:
>
> Hi Luca,
>
> Regarding the meaning of the priorities "recommended" and "suggested"
> in the spec [1]: They depend on what "the binary will work" means. We
> have seen that this can be subject to discussion.
>
> There is the complementary view: What are the effects of such a
> priority? You have mentioned that there is a tool that will translate
> the embedded dlopen notes to package dependency kinds:
>   - "Requires",
>   - "Recommends",
>   - "Suggests".
> I have investigated how these dependency kinds map to behaviour of the
> package manager [2]. The missing part now is how said tool maps priorities
> to dependency kinds.
>
> Does it map
>   - "required" → "Requires",
>   - "recommended" → "Recommends",
>   - "suggested" → "Suggests"?
>
> Can you point us to the sources of said tool, please?

Yes, that's the mapping used for both rpm and deb packages, both of
which have those 3 levels of dependency "strength" (mandatory ->
optional installed by default -> optional not installed by default).
The scripts and macros/tools to parse them and use them for package
builds can be found on the following repo, and are packaged in Ubuntu,
Fedora and other rpm/deb distros:

https://github.com/systemd/package-notes
https://github.com/systemd/package-notes/blob/main/dlopen-notes.py
https://github.com/systemd/package-notes/blob/main/rpm/dlopen_notes.attr
https://github.com/systemd/package-notes/blob/main/debian/dh_dlopenlibdeps

For example on a deb distro building packages using
debhelper-compat-14, the only change a packager needs to do is add a
build dependency on dh-sequence-dlopenlibdeps, and everything else
will be taken care of automagically.

I think distros using formats other than deb/rpm (arch/nix) were
looking into this at some point, but I'm not sure of the current
status and what was implemented, if anything.

Reply via email to