Versioning of kdeinit libraries

Modestas Vainius modestas at vainius.eu
Mon Dec 17 20:11:18 GMT 2007


Hi,

Currently kdeinit libraries (plugins?) in KDE4 (and similary in KDE3) are named
as libkdeinit4_{name}.so The problem is that this name (and therefore SONAME)
is unversioned in general sence (i.e. does not follow *.so.{version} notation),
but those kdeinit libraries get installed to public library location
(e.g. /usr/lib). Since recently such configuration has been discouraged in Debian.

So generally there are two solutions:

1) Move libkdeinit* to private location (e.g. /usr/lib/kde4). I think, it's not
viable because there are "dummy kdeinit executables" linking against them.

2) Another solution would be to properly version kdeinit libraries. I was thinking
if it was possible to add SOVERSION for all kdeinit libraries so libkdeinit* stuff
would end up like (kdelibs case):

---
libkdeinit4_kbuildsycoca4.so -> libkdeinit4_kbuildsycoca4.so.4
libkdeinit4_kbuildsycoca4.so.4
libkdeinit4_kconf_update.so -> libkdeinit4_kconf_update.so.4
libkdeinit4_kconf_update.so.4
libkdeinit4_kded4.so -> libkdeinit4_kded4.so.4
libkdeinit4_kded4.so.4
libkdeinit4_kio_http_cache_cleaner.so -> libkdeinit4_kio_http_cache_cleaner.so.4
libkdeinit4_kio_http_cache_cleaner.so.4
libkdeinit4_klauncher.so -> libkdeinit4_klauncher.so.4
libkdeinit4_klauncher.so.4
---
with SONAME being libkdeinit4_{name}.so.4 (i.e. correctly versioned). Symlinks
may seem to be redundant, but they might be used for backwards(?) compatibility.

The effect demonstrated above is achieved by applying the following
patch:

--- kdelibs-3.97.0/cmake/modules/KDE4Macros.cmake      2007-11-27 19:17:09.000000000 +0200
+++ kde4libs-3.97.0/cmake/modules/KDE4Macros.cmake     2007-12-17 18:38:07.000000000 +0200
@@ -713,6 +713,7 @@

    kde4_handle_rpath_for_library(kdeinit_${_target_NAME})
    set_target_properties(kdeinit_${_target_NAME} PROPERTIES OUTPUT_NAME kdeinit4_${_target_NAME})
+   set_target_properties(kdeinit_${_target_NAME} PROPERTIES SOVERSION ${GENERIC_LIB_SOVERSION})

    configure_file(${KDE4_MODULE_DIR}/kde4init_dummy.cpp.in ${CMAKE_CURRENT_BINARY_DIR}/${_target_NAME}_dummy.cpp)
    kde4_add_executable(${_target_NAME} "${_nogui}" "${_uninst}" ${CMAKE_CURRENT_BINARY_DIR}/${_target_NAME}_dummy.cpp)


Would this change have any negative side effects and what do you think
about it? Any other ideas?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20071217/ee72a71d/attachment.sig>


More information about the kde-core-devel mailing list