Package: dlib
Version: 18.18-2

Hi,

Currently the SONAME version number of dlib in Debian is the same as the
package's version number:

> $ cat debian/patches/fix-soname.patch 
> Set the libdlib soname to libdlib.so.18
> --- a/dlib/CMakeLists.txt
> +++ b/dlib/CMakeLists.txt
> @@ -413,7 +413,8 @@
>         if(UNIX)
>             set_target_properties(dlib-shared PROPERTIES
>                                          OUTPUT_NAME dlib 
> -                                        VERSION ${VERSION})
> +                                        VERSION ${VERSION}
> +                                        SOVERSION 
> ${CPACK_PACKAGE_VERSION_MAJOR})
>             install(TARGETS dlib dlib-shared
>                     EXPORT dlib 
>                     RUNTIME DESTINATION bin # Windows (including cygwin) 
> considers .dll to be runtime artifacts

While I am not an expert in packaging of shared libraries, this looks
like a bad practice. The Debian Library Packaging guide[0] states:

>  In most cases, if a package version matches the SONAME, it is a sign
>  that there is a problem with the versioning scheme. Scrap it, and
>  bash the upstream with the libtool manual. It is usually a good sign
>  that either he has not read the manual thoroughly, or he has not
>  understood it, or both. 

Going through the history of the git repository, it looks like you
introduced this patch in order to fix the following lintian warning:

> W: dlib: package-name-doesnt-match-sonames libdlib18.18.0
> N:
> N:    The package name of a library package should usually reflect the soname
> N:    of the included library. The package name can determined from the
> N:    library file name with the following code snippet:
> N:
> N:     $ objdump -p /path/to/libfoo-bar.so.1.2.3 | sed -n 
> -e's/^[[:space:]]*SONAME[[:space:]]*//p' | \
> N:         sed -r -e's/([0-9])\.so\./\1-/; s/\.so(\.|$)//; y/_/-/;s/(.*)/\L&/'
> N:
> N:    Severity: normal, Certainty: possible
> N:
> N:    Check: binaries, Type: binary, udeb

IMO a correct fix would rather be to change binary package name to
libdlib18.18-0, instead of changing the SONAME.

I'm currently working on the next Debian release of dlib, see
#894118[1].

Regards,
 Hugo

[0] https://www.netfort.gr.jp/~dancer/column/libpkg-guide/libpkg-guide.html
[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=894118

-- 
             Hugo Lefeuvre (hle)    |    www.owl.eu.com
4096/ 9C4F C8BF A4B0 8FC5 48EB 56B8 1962 765B B9A8 BACA

Attachment: signature.asc
Description: PGP signature

Reply via email to