[apparmor] [patch] libapparmor: libtool versioning
Steve Beattie
steve at nxnw.org
Tue Feb 25 08:35:29 UTC 2014
On Mon, Feb 24, 2014 at 11:17:59PM -0800, Steve Beattie wrote:
> On Mon, Feb 24, 2014 at 11:13:23PM -0800, Steve Beattie wrote:
> > On Mon, Feb 24, 2014 at 04:23:13PM -0800, Seth Arnold wrote:
> > > In the course of building updated apparmor 2.8.95 packages for Ubuntu, I
> > > updated the libtool variables to:
> > >
> > > AA_LIB_CURRENT = 2
> > > AA_LIB_REVISION = 0
> > > AA_LIB_AGE = 0
> > >
> > > To match the new '2' version we need to update the
> > > libraries/libapparmor/configure.ac to know that this is libapparmor2.
> > >
> > > I propose this patch for trunk.
> >
> > I'm not happy about the .so version bump, but since that appears to be
> > what we've done, we need to make the library name consistent.
> >
> > > Signed-of-by: Seth Arnold <seth.arnold at canonical.com>
> >
> > Signed-off-by: Steve Beattie <steve at nxnw.org>
>
> Sorry, that should be: Acked-by: Steve Beattie <steve at nxnw.org>
Actually, NACK.
I think we all have agreed that the library changes that have occurred
on trunk should be considered as having added only new interfaces
over 2.8. Given that, we should not be bumping the SO version.
Part of the confusion on our part extends from not understanding the
libtool versioning and how it translates into the library version
and the SONAME. Our rules in libapparmor/src/Makefile.am should be
stepped through without selectively applying them. Also, the resulting
library version is:
(AA_LIB_CURRENT - AA_LIB_AGE).AA_LIB_AGE.AA_LIB_REVISION
For more details, see:
http://www.gnu.org/software/libtool/manual/html_node/Libtool-versioning.html
http://openbooks.sourceforge.net/books/wga/dealing-with-libraries.html
(see the section A Note about Version Numbers)
The following patch adjusts the trunk libtool versions in accordance
with the outlined rules. It also adds clarifying text to the
documentation comment to explain how to use the rules and what the
resulting outcome is. Finally, it removes a bogus argument to linker
to forcibly set the SONAME in the library, as libtool will do this
automatically (and override the passed argument).
Signed-off-by: Steve Beattie <steve at nxnw.org>
---
libraries/libapparmor/src/Makefile.am | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
Index: b/libraries/libapparmor/src/Makefile.am
===================================================================
--- a/libraries/libapparmor/src/Makefile.am
+++ b/libraries/libapparmor/src/Makefile.am
@@ -1,7 +1,7 @@
INCLUDES = $(all_includes)
# variables to set the library versions used by libtool
-# Use these rules to update the library version.
+# Step through these rules IN ORDER to update the library version.
# 1. Update the version information only immediately before a public release
# of your software. More frequent updates are unnecessary, and only
# guarantee that the current interface number gets larger faster.
@@ -18,9 +18,17 @@ INCLUDES = $(all_includes)
# release, then
# - set AA_LIB_AGE to 0.
#
+# The resulting library version triplet will be:
+# (AA_LIB_CURRENT - AA_LIB_AGE).AA_LIB_AGE.AA_LIB_REVISION
+# and the SONAME will be:
+# libapparmor.so.(AA_LIB_CURRENT - AA_LIB_AGE)
+#
+# For more information, see:
+# http://www.gnu.org/software/libtool/manual/html_node/Libtool-versioning.html
+#
AA_LIB_CURRENT = 2
AA_LIB_REVISION = 0
-AA_LIB_AGE = 0
+AA_LIB_AGE = 1
SUFFIXES = .pc.in .pc
@@ -42,7 +50,7 @@ noinst_HEADERS = grammar.h parser.h scan
libapparmor_la_SOURCES = grammar.y libaalogparse.c kernel_interface.c scanner.c
libapparmor_la_LDFLAGS = -version-info $(AA_LIB_CURRENT):$(AA_LIB_REVISION):$(AA_LIB_AGE) -XCClinker -dynamic -pthread \
- -Wl,--version-script=$(top_srcdir)/src/libapparmor.map -Wl,-soname=libapparmor.so.1
+ -Wl,--version-script=$(top_srcdir)/src/libapparmor.map
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libapparmor.pc
--
Steve Beattie
<sbeattie at ubuntu.com>
http://NxNW.org/~steve/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20140225/0e60ec1e/attachment.pgp>
More information about the AppArmor
mailing list