[Openais] [corosync] - lib versioning

Jan Friesse jfriesse at redhat.com
Wed Mar 31 06:47:31 PDT 2010


Attached patch solves today very unpleasant situation about libraries
version (those files from trunk/lib/*).

Current situation looks like this:
- Main number configure.ac - Used for all libraries -> problem if some
library added function (changed API)
- There is workaround for cpg and confdb. Sadly this workaround is
really ugly, need too much code duplicity, need changes in configure.ac
and Makefile.am after any API change.

So main criteria for new system are following:
- Allow easy change of library version
- No change of configure.ac (we are changing library NOT configure system)
- No change in Makefile.am (again, we are changing library)
- No code duplicity

Patch has two main parts:
- configure.ac part + *.verso. This one is able to:
  * read version from lib$(LIB).verso file
  * exports $(LIB)_SONAME with content from the file
  * displays result in format $(LIB) Library SONAME = $(version)
- Makefile.am has ability to detect $(LIB)_SONAME and use version from
that variable or use SONAME if not such variable found.

In other words, everything what developer must do for changing library
version is to change lib$(LIB).verso file and make maintainer-clean +
autogen.sh && configure && make.

With this patch, only cpg and confdb are there, but adding new library
means only add LIB_SONAME_IMPORT([lib]) to configure.ac and create of
lib$(LIB).verso.

Patch is tested on current trunk on Fedora 11 & FreeBSD 8.0, where it
produces correct build. Sadly, I'm not able to test Solaris and Darwin
build.

Regards,
  Honza
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 2010-03-31-verso.patch
Url: http://lists.linux-foundation.org/pipermail/openais/attachments/20100331/e701d830/attachment.txt 


More information about the Openais mailing list