[SSSD] [PATCHES][ding-libs] Bump versions for 0.4.0 release

Lukas Slebodnik lslebodn at redhat.com
Fri May 9 06:37:42 UTC 2014


On (08/05/14 10:08), Stephen Gallagher wrote:
>On 04/14/2014 02:42 AM, Lukas Slebodnik wrote:
>> ehlo,
>> 
>> release blocked by: 
>> https://lists.fedorahosted.org/pipermail/sssd-devel/2014-April/019043.html
>>
>>  Two patches are attachd.
>> 
>> My notes: basicobject     no ABI change new function added
>> simplebuffer_get_vbuf libref_array    no ABI change function
>> ref_array_debug added to public header ref_array.h
>> 
>> libcollection version-info should be 4:0:0, but there would be big
>> jump in soname libcollection.so.2.1.0 -> libcollection.so.4.0.0
>> 
>> -function removed from ABI: col_allocate_item (declared in
>> collection_priv.h)
>> 
>> libini_config version-info should be 5:0:0, but there would be big
>> jump in soname libini_config.so.3.1.0 -> libini_config.so.5.0.0
>> 
>> -functions removed from ABI:collect_metadata, empty_section, 
>> ini_boundary_cb, ini_cleanup_cb, ini_comment_cb,
>> ini_get_error_str,is_allowed_spaces. is_just_spaces, parser_run,
>> prepare_metadata, print_grammar_errors, print_validation_errors,
>> read_line, valid_collision_flags //were declared in internal
>> ini_metadata.h or ini_config_priv.h
>> 
>
>Patch 0001:
>
>libpath_utils: ack
>libdhash: ack
>libcollection: I had a discussion with Lukas on IRC about this. This
>was a premature optimization. We should follow the version-info update
>rules here, regardless of the jump in soname to so.4. The reason for
>this is that the meaning of the previous 2.1.0 version was this: "This
>library can support clients that are talking version 2 of the ABI as
>well as version 3 (the second value is the number of additional
>interface revisions beyond it).
>
>However, when we created ABI version 4, we *removed* some functions.
>This means we are no longer capable of meeting the needs of clients
>expecting versions 2 and 3, so we have to set the minimum version to 4
>and re-set the second value to zero (for future use if we add an ABI
>version 5). In theory, we could someday go from 4.99.0 directly to
>103.0.0, which would be a much larger jump and it would still be a
>*correct* answer.
>
>So the correct version-info here is 4:0:0
fixed

>
>Also, I'm not familiar enough with symbol table files. Why are you
>moving col_destroy_collection_with_cb out of a separate section in the
>symbol table? Shouldn't they remain distinct for historical reasons?
If you link program with some library without version symbols
the linker requires only SONAME

sh$ objdump -p /usr/sbin/sssd
//snip
Dynamic Section:
  NEEDED               libtevent.so.0
  NEEDED               libtalloc.so.2
  NEEDED               libpopt.so.0
  NEEDED               libldb.so.1
...

The version symbol files are usefull if you want to require newer version of
library, which didn't change SONAME (only minor version was updated)

If SONAME was bumped you have to recompile your program with newer version of
library otherwise you will not be able to start program. The symbol versioning
will not help in this case, you can merge all symbols to the one version.

sh$ objdump -p /usr/sbin/sssd
//snip
Version References:
  required from libtalloc.so.2:
    0x0ea30422 0x00 04 TALLOC_2.0.2
  required from libkeyutils.so.1:
    0x0ae3c993 0x00 06 KEYUTILS_0.3
  required from libpthread.so.0:
    0x09691a75 0x00 05 GLIBC_2.2.5
  required from libc.so.6:
    0x0d696913 0x00 11 GLIBC_2.3
    0x09691a75 0x00 03 GLIBC_2.2.5
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
functions with two different version of glibc are required.
It is automatically detected by linker.

//side note.
It is possible to do backward incompatible change with symbol versioning.
But we didn't released ding-libs with them yet, therefore we can modify them
without any probelm

sh$ objdump -T /lib64/libc.so.6 | grep " realpath"
0000003ce1d302b0 g    DF .text  0000000000000021 (GLIBC_2.2.5) realpath
0000003ce1c42e50 g    DF .text  0000000000000523  GLIBC_2.3   realpath

>Maybe I just don't understand this area enough.
More about symbol versioning
http://www.redhat.com/f/summitfiles/presentation/June2/Developer%20Tools/Drepper_Writing%20Shared%20Libraries.pdf
http://www.akkadia.org/drepper/dsohowto.pdf

>
>
>
>ini_config: we need to be using 5:0:0 for version-info.
fixed.

Thank you very much for review.
New patches are attached.

LS
-------------- next part --------------
>From 188506e667dde56e9ea0c314ad240431bc81afb6 Mon Sep 17 00:00:00 2001
From: Lukas Slebodnik <lslebodn at redhat.com>
Date: Mon, 14 Apr 2014 08:28:49 +0200
Subject: [PATCH 1/2] Bump version-info

The soname of libcollection is changed, we can unify versions in version script
---
 Makefile.am                  | 12 ++++++------
 collection/libcollection.sym |  9 ++-------
 contrib/ding-libs.spec.in    | 16 ++++++++--------
 3 files changed, 16 insertions(+), 21 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 7bca2d25155be726c4f0890983c6965284f371bb..f2dd43aee20ed688f4b17fba611ce0b3acbc54bd 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -65,7 +65,7 @@ dist_include_HEADERS += path_utils/path_utils.h
 libpath_utils_la_SOURCES = path_utils/path_utils.c
 libpath_utils_la_DEPENDENCIES = path_utils/libpath_utils.sym
 libpath_utils_la_LDFLAGS = \
-    -version-info 1:0:0 \
+    -version-info 1:1:0 \
     -Wl,--version-script=$(top_srcdir)/path_utils/libpath_utils.sym
 
 if HAVE_CHECK
@@ -100,7 +100,7 @@ dist_include_HEADERS += dhash/dhash.h
 libdhash_la_SOURCES = dhash/dhash.c
 libdhash_la_DEPENDENCIES = dhash/libdhash.sym
 libdhash_la_LDFLAGS = \
-    -version-info 1:1:0 \
+    -version-info 1:2:0 \
     -Wl,--version-script=$(top_srcdir)/dhash/libdhash.sym
 
 check_PROGRAMS += dhash_test dhash_example
@@ -142,7 +142,7 @@ libcollection_la_SOURCES = \
     trace/trace.h
 libcollection_la_DEPENDENCIES = collection/libcollection.sym
 libcollection_la_LDFLAGS = \
-    -version-info 3:0:1 \
+    -version-info 4:0:0 \
     -Wl,--version-script=$(top_srcdir)/collection/libcollection.sym
 
 check_PROGRAMS += \
@@ -180,7 +180,7 @@ libref_array_la_SOURCES = \
     trace/trace.h
 libref_array_la_DEPENDENCIES = refarray/libref_array.sym
 libref_array_la_LDFLAGS = \
-    -version-info 2:0:1 \
+    -version-info 3:0:2 \
     -Wl,--version-script=$(top_srcdir)/refarray/libref_array.sym
 
 check_PROGRAMS += ref_array_ut
@@ -209,7 +209,7 @@ libbasicobjects_la_SOURCES = \
     trace/trace.h
 libbasicobjects_la_DEPENDENCIES = basicobjects/libbasicobjects.sym
 libbasicobjects_la_LDFLAGS = \
-    -version-info 0:0:0 \
+    -version-info 1:0:1 \
     -Wl,--version-script=$(top_srcdir)/basicobjects/libbasicobjects.sym
 
 check_PROGRAMS += simplebuffer_ut
@@ -263,7 +263,7 @@ libini_config_la_LIBADD = \
     libref_array.la \
     libbasicobjects.la
 libini_config_la_LDFLAGS = \
-    -version-info 4:0:1 \
+    -version-info 5:0:0 \
     -Wl,--version-script=$(top_srcdir)/ini/libini_config.sym
 
 dist_noinst_DATA += \
diff --git a/collection/libcollection.sym b/collection/libcollection.sym
index e526636151f459af98dc0f45319439a7f49006ed..9110cae513482564cf43e1b7892a5a208d32a2d0 100644
--- a/collection/libcollection.sym
+++ b/collection/libcollection.sym
@@ -1,8 +1,9 @@
-COLLECTION_0.6.0 {
+COLLECTION_0.6.2 {
 global:
     /* collection.h */
     col_create_collection;
     col_destroy_collection;
+    col_destroy_collection_with_cb;
     col_copy_collection_with_cb;
     col_copy_collection;
     col_add_collection_to_collection;
@@ -142,9 +143,3 @@ global:
 local:
     *;
 };
-
-COLLECTION_0.6.2 {
-global:
-    /* collection.h */
-    col_destroy_collection_with_cb;
-} COLLECTION_0.6.0;
diff --git a/contrib/ding-libs.spec.in b/contrib/ding-libs.spec.in
index d5da0aa2df313be37ad13c7bad5b5b6a248dcc37..206ee846f262777294cd139f60747d6603730b22 100644
--- a/contrib/ding-libs.spec.in
+++ b/contrib/ding-libs.spec.in
@@ -87,7 +87,7 @@ Utility functions to manipulate filesystem pathnames
 %defattr(-,root,root,-)
 %doc COPYING COPYING.LESSER
 %{_libdir}/libpath_utils.so.1
-%{_libdir}/libpath_utils.so.1.0.0
+%{_libdir}/libpath_utils.so.1.0.1
 
 %files -n libpath_utils-devel
 %defattr(-,root,root,-)
@@ -130,7 +130,7 @@ time properties
 %defattr(-,root,root,-)
 %doc COPYING COPYING.LESSER
 %{_libdir}/libdhash.so.1
-%{_libdir}/libdhash.so.1.0.1
+%{_libdir}/libdhash.so.1.0.2
 
 %files -n libdhash-devel
 %defattr(-,root,root,-)
@@ -173,8 +173,8 @@ and serialization
 %defattr(-,root,root,-)
 %doc COPYING
 %doc COPYING.LESSER
-%{_libdir}/libcollection.so.2
-%{_libdir}/libcollection.so.2.1.0
+%{_libdir}/libcollection.so.3
+%{_libdir}/libcollection.so.3.0.0
 
 %files -n libcollection-devel
 %defattr(-,root,root,-)
@@ -218,7 +218,7 @@ A dynamically-growing, reference-counted array
 %doc COPYING
 %doc COPYING.LESSER
 %{_libdir}/libref_array.so.1
-%{_libdir}/libref_array.so.1.1.0
+%{_libdir}/libref_array.so.1.2.0
 
 %files -n libref_array-devel
 %defattr(-,root,root,-)
@@ -259,7 +259,7 @@ Basic object types
 %doc COPYING
 %doc COPYING.LESSER
 %{_libdir}/libbasicobjects.so.0
-%{_libdir}/libbasicobjects.so.0.0.0
+%{_libdir}/libbasicobjects.so.0.1.0
 
 %files -n libbasicobjects-devel
 %defattr(-,root,root,-)
@@ -302,8 +302,8 @@ structure
 %defattr(-,root,root,-)
 %doc COPYING
 %doc COPYING.LESSER
-%{_libdir}/libini_config.so.3
-%{_libdir}/libini_config.so.3.1.0
+%{_libdir}/libini_config.so.4
+%{_libdir}/libini_config.so.4.0.0
 
 %files -n libini_config-devel
 %defattr(-,root,root,-)
-- 
1.9.0

-------------- next part --------------
>From b122bc0ca243a6682a68ddc49a1304abd8254ea6 Mon Sep 17 00:00:00 2001
From: Lukas Slebodnik <lslebodn at redhat.com>
Date: Mon, 14 Apr 2014 08:32:40 +0200
Subject: [PATCH 2/2] Bump versions for 0.4.0 release

Versions in .sym files should not be changed between releases, they can be
added. ding-libs wasn't released with them yet, therefore we can modify them.
This patch fixes initial version of .sym files and keeps the same name
as the version of the libraries in version.m4
---
 ini/libini_config.sym     | 2 +-
 refarray/libref_array.sym | 2 +-
 version.m4                | 8 ++++----
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/ini/libini_config.sym b/ini/libini_config.sym
index d0035f28f93cad09a3e357574f1e2f8f1ad93491..3ca15bb53b597f22d5ae625d6ec8a4be04f14131 100644
--- a/ini/libini_config.sym
+++ b/ini/libini_config.sym
@@ -1,4 +1,4 @@
-INI_CONFIG_1.0.0 {
+INI_CONFIG_1.1.0 {
 global:
     /* ini_config.h */
     config_from_file;
diff --git a/refarray/libref_array.sym b/refarray/libref_array.sym
index 3a1d434587061ba2adf5f8f92c22d0b57baccc2b..73775d7e42fd0aec7579de90faef49ef478e2d15 100644
--- a/refarray/libref_array.sym
+++ b/refarray/libref_array.sym
@@ -18,7 +18,7 @@ local:
     *;
 };
 
-REF_ARRAY_0.1.3 {
+REF_ARRAY_0.1.4 {
 global:
     ref_array_copy;
 } REF_ARRAY_0.1.1;
diff --git a/version.m4 b/version.m4
index 76b8a0d66d9f3e09d22960aac4f2577725e16a10..e2cb104931b33a2e90c675984df764f3b237f78f 100644
--- a/version.m4
+++ b/version.m4
@@ -1,5 +1,5 @@
 # Primary version number
-m4_define([VERSION_NUMBER], [0.3.0.1])
+m4_define([VERSION_NUMBER], [0.4.0])
 
 # If the PRERELEASE_VERSION_NUMBER is set, we'll append
 # it to the release tag when creating an RPM or SRPM
@@ -13,6 +13,6 @@ m4_define([PRERELEASE_VERSION_NUMBER], [])
 m4_define([PATH_UTILS_VERSION_NUMBER], [0.2.1])
 m4_define([DHASH_VERSION_NUMBER], [0.4.3])
 m4_define([COLLECTION_VERSION_NUMBER], [0.6.2])
-m4_define([REF_ARRAY_VERSION_NUMBER], [0.1.3])
-m4_define([BASICOBJECTS_VERSION_NUMBER], [0.1.0])
-m4_define([INI_CONFIG_VERSION_NUMBER], [1.0.0.1])
+m4_define([REF_ARRAY_VERSION_NUMBER], [0.1.4])
+m4_define([BASICOBJECTS_VERSION_NUMBER], [0.1.1])
+m4_define([INI_CONFIG_VERSION_NUMBER], [1.1.0])
-- 
1.9.0



More information about the sssd-devel mailing list