Hi,

 Following is a fix for shared library versioning.  Currently the full
version number is used as a part of shared libraries SONAMEs.  As a result
subsequent library revisions are marked as incompatible and all the
programs linked against these libraries must get rebuilt.  This way e.g
version 0.9.5a is incompatible to version 0.9.6b.  This completely defeats
the shared libraries versioning system -- you may equally well not include
a version number in SONAMEs.  There is no point in making lib*.so.0
symlinks in this case as well -- they are never used. 

 If you intend minor releases and revisions to remain compatible, you have
to include a part of the version number in SONAMEs only.  The following
patch does exactly this -- it includes a major version in SONAMEs.  As a
result only if you bump the major number the shared libraries get marked
as incompatible.

 I'm mainly writing of ELF libraries here.  However I'm somewhat aware of
the OSF/1's ECOFF library versioning, thus I've fixed all the shared
library creation backends. 

  Maciej

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: [EMAIL PROTECTED], PGP key available        +

openssl-0.9.6b-shlib_ver.patch
diff -up --recursive --new-file openssl-0.9.6b.macro/Makefile.org 
openssl-0.9.6b/Makefile.org
--- openssl-0.9.6b.macro/Makefile.org   Mon Jul  9 14:08:41 2001
+++ openssl-0.9.6b/Makefile.org Fri Oct 26 18:30:36 2001
@@ -256,7 +256,7 @@ do_linux-shared: do_gnu-shared
 do_gnu-shared:
        libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
        ( set -x; ${CC}  -shared -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
-               -Wl,-S,-soname=lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
+               -Wl,-S,-soname=lib$$i.so.${SHLIB_MAJOR} \
                -Wl,--whole-archive lib$$i.a \
                -Wl,--no-whole-archive $$libs ${EX_LIBS} -lc ) || exit 1; \
        libs="$$libs -l$$i"; \
@@ -266,7 +266,7 @@ do_gnu-shared:
 do_tru64-shared:
        libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
        ( set -x; ${CC}  -shared -no_archive -o lib$$i.so \
-               -set_version "${SHLIB_VERSION_HISTORY}${SHLIB_VERSION_NUMBER}" \
+               -set_version "${SHLIB_VERSION_HISTORY}${SHLIB_MAJOR}" \
                -all lib$$i.a -none $$libs ${EX_LIBS} -lc ) || exit 1; \
        libs="$$libs -l$$i"; \
        done
@@ -276,7 +276,7 @@ do_solaris-shared:
        libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
        ( PATH=/usr/ccs/bin:$$PATH ; export PATH; \
          set -x; ${CC}  -G -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
-               -h lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
+               -h lib$$i.so.${SHLIB_MAJOR} \
                -z allextract lib$$i.a $$libs ${EX_LIBS} -lc ) || exit 1; \
        libs="$$libs -l$$i"; \
        done

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to