To Require or not to Require?

Simo Sorce simo at redhat.com
Fri Aug 12 16:08:50 UTC 2011


On Fri, 2011-08-12 at 16:40 +0100, Matthew Garrett wrote:
> On Fri, Aug 12, 2011 at 08:27:13AM -0700, Toshio Kuratomi wrote:
> 
> > Rightly or wrongly, upstream libfoo-1.0 has some additional utilities that
> > access the PrivateData.  Because the utilities are built from the libfoo
> > source, they can include the fooprivate.h header file and do this.  When
> > libfoo goes to 1.0.1, upstream changes the definition of PrivateData and
> > updates the utilities to work with the new datastructure.  Since the public
> > ABI stayed the same, the SONAME doesn't change and external programs
> > compiled against libfoo-1.0 continue to work but the utilities built as
> > a subpackage would be broken without stricter versioning.
> 
> Upstream can change the ABI as much as they want without bumping the 
> SONAME providing that the old interfaces are also present. It's entirely 
> possible to end up with a situation where external binaries built 
> against 1.0.1 won't run on 1.0.0 - the problem isn't limited to 
> subpackages.

If rpmbuild does not add an implicit requires with libraryX >= <version
we built against> then it is certainly broken.

ABI *additions* w/o change of the SONAME happens every day in every
library.

If you do not want to set a require on the fedora package version, then
you could check what is the highest symbol version for all symbols in
the lib and require that. Unfortunately not all libraries do symbol
versioning so that would not work in many cases.

Simo.

-- 
Simo Sorce * Red Hat, Inc * New York



More information about the devel mailing list