You are not logged in.

#1 Today 10:22:48

zse
Member
Registered: 2024-05-28
Posts: 57

Question about soname dependencies

I don't understand the usage of soname dependencies as an explicit dependency in the 'depends' field of a package, and I'd like to ask if there is a clear explanation resp. guideline when and why to use them in addition to or instead of regular dependencies.

I have seen packages that use soname dependencies instead of regular deps (example), and also packages that use them in addition to the dep where the shared libs come from (example). The documentation on the other hand does not add the soname in the provided example at the end to the application's depends field at all.

Finally, it seems to me soname deps can be used in the same way as virtual dependencies, so I'd appreciate some insight into the relation of soname deps and virtual ones as well.

Thanks

Offline

#2 Today 12:17:08

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 15,589

Re: Question about soname dependencies

man alpm-soname wrote:

For implementers it is strongly suggested to make this behavior configurable, as soname detection may fail or rely on soname data that may not be advisable under certain conditions. See OPTIONS of makepkg.conf for details on the autodeps feature and LIB_DIRS of makepkg.conf for details on prefix and lookup directory definitions for makepkg.

Archlinux devs disable autodeps by default in makepkg.conf . This has resulted in archlinux packagers only using them when necessary .

Both the pcsclite and libcamera-ipa PKGBUILDs use the sodep to ensure a change in soname version of the dep will cause a conflict.
That usecase is the most common one for depending on sodeps.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#3 Today 14:23:19

zse
Member
Registered: 2024-05-28
Posts: 57

Re: Question about soname dependencies

I don't get though when that is "necessary" - I believe most packages would break when any dependent library changes its soname, yet many packages do not use soname dependencies.

Unless I'm missing something, there do not seem to be hard rules when to really use that kind of dependency, and a packager can just use them whenever they feel like it. Am I wrong?

Offline

#4 Today 15:21:25

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 79,047

Re: Question about soname dependencies

In part to assert the version, in part to allow alternative resolutions, https://aur.archlinux.org/packages?O=0&K=libcamera
Could also be leftovers from previous alternatives (eg. when eudev was still in the AUR for the udev objects)

The rule is that your package ideally defines a flexible, complete and collision free list of dependencies - whatever it takes wink

Offline

#5 Today 18:40:29

loqs
Member
Registered: 2014-03-06
Posts: 19,138

Re: Question about soname dependencies

zse wrote:

I don't get though when that is "necessary" - I believe most packages would break when any dependent library changes its soname, yet many packages do not use soname dependencies.

You are correct assuming upstream only bumps when required which most do.  Adding all sodeps would require a mass rebuild and autodeps should do it automatically if it can be made to work with Arch.  This has lead to sodep depends being added on an ad-hoc basis by maintainers when they feel it appropriate.

Offline

Board footer

Powered by FluxBB