[arch-general] announce libraries in provides=()
arch at eckner.net
Wed May 15 12:43:59 UTC 2019
-----BEGIN PGP SIGNED MESSAGE-----
I would like to encourage adding provided libraries of a package to its
"provides=()" array in the PKGBUILD.
Updating the system libraries may break manually compiled packages. Having
the version of the system libraries fixed in the dependencies of the
manually compiled package, this could be avoided, because then pacman
would refuse to replace the system library.
The current behaviour can be annoying if the manually compiled package is
vital (e.g. a mail server), requires some time for compilation and/or
fails to build for unrelated reasons.
If the libraries are added to the provides array, makepkg will
automatically version those dependencies.
libvorbis, for example has
provides=('libvorbis.so' 'libvorbisenc.so' 'libvorbisfile.so')
in the PKGBUILD which becomes
Provides: libvorbis.so=0-64 libvorbisenc.so=2-64 libvorbisfile.so=3-64
in the package.
This way, external packages can pick up versioned dependencies on the
library by using "depends=()".
Since my proposal got denied for a single package, I currently have a
horrible hack in place which manually adds depends= entries in the
package() function looking at the compiled binaries with objdump. Because
I can only add dependencies based on the $pkgver of the package, but not
on the soname version of the library, I have to recompile for each version
change - not only the ones which actually change soname. The only current
alternative would be to manually build the required libraries, too (with
the provides=() entries added) - which is obviously also a bad idea.
Can we please have a todo list of packages that provide libraries in
/usr/lib but not announce them in the metadata?
Or should we enable makepkg to automatically search through the library
directory? (Probably not a good idea, as there might be differing
locations, libraries which should deliberately not be announced, etc. ...)
Or is my approach flawed from the beginning? How should I else circumvent
breaking the linking?
-----BEGIN PGP SIGNATURE-----
-----END PGP SIGNATURE-----
More information about the arch-general