[PATCHES] Generate shorter name for extra python files

Lukas Slebodnik lslebodn at redhat.com
Fri Jul 7 12:30:12 UTC 2017


On (07/07/17 10:18), Andrew Bartlett wrote:
>On Thu, 2017-07-06 at 13:52 +0200, Lukas Slebodnik wrote:
>> On (06/07/17 22:44), Andrew Bartlett wrote:
>> > On Thu, 2017-07-06 at 12:28 +0200, Lukas Slebodnik wrote:
>> > > 
>> > > It solved also libraries and not only pkgconfig files
>> > > 
>> > > /usr/lib64/libpyldb-util3.6.so
>> > > /usr/lib64/pkgconfig/pyldb-util3.6.pc
>> > > 
>> > > And we need to have different name for library because
>> > > libpyldb-util3.6.so is linked against python3.6 and have to be
>> > > used
>> > > only by python module for 3.6.
>> > > 
>> > > Standard libpyldb-util.so is linked with standard python (usually
>> > > 2.7)
>> > > 
>> > > I am open to another suggestion for names. Maybe libpyldb-util-
>> > > 3.6.so
>> > > but that's minimal change.
>> > > 
>> > > Could you describe what kind of packaging problems did you have
>> > > on debian?
>> > > It is not obvious for me from that commit.
>> > 
>> > Here is the thread:
>> > 
>> > https://lists.alioth.debian.org/pipermail/pkg-samba-maint/2016-Apri
>> > l/018139.html
>> > 
>> > It looks like I suggested following Fedora, so I'll generally stick
>> > to
>> > that position.
>> > 
>> > When reading the thread and trying to read symbol versions,
>> > remember
>> > the mail archiver has changed @ to _at_ just to confuse
>> > you/spammers.
>> > 
>> 
>> Most of the thread there was discussion about changed version symbols
>> in library which is not related to python3 work.
>
>No, it is very related.  That is my point.  Debian was trying to work
>around the same things, but it ended badly.  We need to solve it all,
>not just bits of it. 
>
>> The only think which I do not understand is following sentence
>>   "I've tried changing the SAMBA_LIBRARY code
>>    to match, but I still get .py3 and -py3 mixups"
>> 
>> And I do not think that was solved by this patchset.
>
>OK.  Please continue working until it is.
>
>The things we need:
>
>Remove both cpython-35m-x86_64-linux-gnu and 3.5 from
> - ABI/*.sigs files
>

I am not sure whether I understand problem correctly.

Here is an output of objdump with **my patches**.
SONAME is obviously different.

[root at e71533851f88 ~]# objdump -p /usr/lib64/libpyldb-util.so | grep SONAME
  SONAME               libpyldb-util.so.1
[root at e71533851f88 ~]# objdump -p /usr/lib64/libpyldb-util3.5.so | grep SONAME
  SONAME               libpyldb-util3.5.so.1


Python3 version of library libpyldb-util has only version from 1.2.0
Python2 version of library libpyldb-util has all version since 1.1.2

[root at e71533851f88 ~]# objdump -p /usr/lib64/libpyldb-util3.5.so | sed -ne '/Version definitions/,/Version References/p'
Version definitions:
1 0x01 0x0c4f47b1 libpyldb-util3.5.so.1
2 0x00 0x064f6b10 PYLDB_UTIL3.5_1.2.0

Version References:
[root at e71533851f88 ~]# objdump -p /usr/lib64/libpyldb-util.so | sed -ne '/Version definitions/,/Version References/p'
Version definitions:
1 0x01 0x0a7956b1 libpyldb-util.so.1
2 0x00 0x0aa3e6f2 PYLDB_UTIL_1.1.2
3 0x02 0x0aa3e6f3 PYLDB_UTIL_1.1.3
        PYLDB_UTIL_1.1.2 
4 0x02 0x0aa3e6f4 PYLDB_UTIL_1.1.4
        PYLDB_UTIL_1.1.3 
5 0x02 0x0aa3e6f5 PYLDB_UTIL_1.1.5
        PYLDB_UTIL_1.1.4 
6 0x02 0x0aa3e6f6 PYLDB_UTIL_1.1.6
        PYLDB_UTIL_1.1.5 
7 0x02 0x0aa3e6f7 PYLDB_UTIL_1.1.7
        PYLDB_UTIL_1.1.6 
8 0x02 0x0aa3e6f8 PYLDB_UTIL_1.1.8
        PYLDB_UTIL_1.1.7 
9 0x02 0x0aa3e6f9 PYLDB_UTIL_1.1.9
        PYLDB_UTIL_1.1.8 
10 0x02 0x0a3e6fe0 PYLDB_UTIL_1.1.10
        PYLDB_UTIL_1.1.9 
11 0x02 0x0a3e6fe1 PYLDB_UTIL_1.1.11
        PYLDB_UTIL_1.1.10 
12 0x02 0x0a3e6fe2 PYLDB_UTIL_1.1.12
        PYLDB_UTIL_1.1.11 
13 0x02 0x0a3e6fe3 PYLDB_UTIL_1.1.13
        PYLDB_UTIL_1.1.12 
14 0x02 0x0a3e6fe4 PYLDB_UTIL_1.1.14
        PYLDB_UTIL_1.1.13 
15 0x02 0x0a3e6fe5 PYLDB_UTIL_1.1.15
        PYLDB_UTIL_1.1.14 
16 0x02 0x0a3e6fe6 PYLDB_UTIL_1.1.16
        PYLDB_UTIL_1.1.15 
17 0x02 0x0a3e6fe7 PYLDB_UTIL_1.1.17
        PYLDB_UTIL_1.1.16 
18 0x02 0x0a3e6fe8 PYLDB_UTIL_1.1.18
        PYLDB_UTIL_1.1.17 
19 0x02 0x0a3e6fe9 PYLDB_UTIL_1.1.19
        PYLDB_UTIL_1.1.18 
20 0x02 0x0a3e6ff0 PYLDB_UTIL_1.1.20
        PYLDB_UTIL_1.1.19 
21 0x02 0x0a3e6ff1 PYLDB_UTIL_1.1.21
        PYLDB_UTIL_1.1.20 
22 0x02 0x0a3e6ff2 PYLDB_UTIL_1.1.22
        PYLDB_UTIL_1.1.21 
23 0x02 0x0a3e6ff3 PYLDB_UTIL_1.1.23
        PYLDB_UTIL_1.1.22 
24 0x02 0x0a3e6ff4 PYLDB_UTIL_1.1.24
        PYLDB_UTIL_1.1.23 
25 0x02 0x0a3e6ff5 PYLDB_UTIL_1.1.25
        PYLDB_UTIL_1.1.24 
26 0x02 0x0a3e6ff6 PYLDB_UTIL_1.1.26
        PYLDB_UTIL_1.1.25 
27 0x02 0x0a3e6ff7 PYLDB_UTIL_1.1.27
        PYLDB_UTIL_1.1.26 
28 0x02 0x0a3e6ff8 PYLDB_UTIL_1.1.28
        PYLDB_UTIL_1.1.27 
29 0x02 0x0a3e6ff9 PYLDB_UTIL_1.1.29
        PYLDB_UTIL_1.1.28 
30 0x02 0x0a3e6fc0 PYLDB_UTIL_1.1.30
        PYLDB_UTIL_1.1.29 
31 0x02 0x0a3e6fc1 PYLDB_UTIL_1.1.31
        PYLDB_UTIL_1.1.30 
32 0x00 0x0aa3e3f0 PYLDB_UTIL_1.2.0

Version References:

[root at e71533851f88 ~]# objdump -T /usr/lib64/libpyldb-util.so | grep PYLDB_UTIL | sort
0000000000000000 g    DO *ABS*  0000000000000000  PYLDB_UTIL_1.1.10 PYLDB_UTIL_1.1.10
0000000000000000 g    DO *ABS*  0000000000000000  PYLDB_UTIL_1.1.11 PYLDB_UTIL_1.1.11
0000000000000000 g    DO *ABS*  0000000000000000  PYLDB_UTIL_1.1.12 PYLDB_UTIL_1.1.12
0000000000000000 g    DO *ABS*  0000000000000000  PYLDB_UTIL_1.1.13 PYLDB_UTIL_1.1.13
0000000000000000 g    DO *ABS*  0000000000000000  PYLDB_UTIL_1.1.14 PYLDB_UTIL_1.1.14
0000000000000000 g    DO *ABS*  0000000000000000  PYLDB_UTIL_1.1.15 PYLDB_UTIL_1.1.15
0000000000000000 g    DO *ABS*  0000000000000000  PYLDB_UTIL_1.1.16 PYLDB_UTIL_1.1.16
0000000000000000 g    DO *ABS*  0000000000000000  PYLDB_UTIL_1.1.17 PYLDB_UTIL_1.1.17
0000000000000000 g    DO *ABS*  0000000000000000  PYLDB_UTIL_1.1.18 PYLDB_UTIL_1.1.18
0000000000000000 g    DO *ABS*  0000000000000000  PYLDB_UTIL_1.1.19 PYLDB_UTIL_1.1.19
0000000000000000 g    DO *ABS*  0000000000000000  PYLDB_UTIL_1.1.2 PYLDB_UTIL_1.1.2
0000000000000000 g    DO *ABS*  0000000000000000  PYLDB_UTIL_1.1.20 PYLDB_UTIL_1.1.20
0000000000000000 g    DO *ABS*  0000000000000000  PYLDB_UTIL_1.1.21 PYLDB_UTIL_1.1.21
0000000000000000 g    DO *ABS*  0000000000000000  PYLDB_UTIL_1.1.22 PYLDB_UTIL_1.1.22
0000000000000000 g    DO *ABS*  0000000000000000  PYLDB_UTIL_1.1.23 PYLDB_UTIL_1.1.23
0000000000000000 g    DO *ABS*  0000000000000000  PYLDB_UTIL_1.1.24 PYLDB_UTIL_1.1.24
0000000000000000 g    DO *ABS*  0000000000000000  PYLDB_UTIL_1.1.25 PYLDB_UTIL_1.1.25
0000000000000000 g    DO *ABS*  0000000000000000  PYLDB_UTIL_1.1.26 PYLDB_UTIL_1.1.26
0000000000000000 g    DO *ABS*  0000000000000000  PYLDB_UTIL_1.1.27 PYLDB_UTIL_1.1.27
0000000000000000 g    DO *ABS*  0000000000000000  PYLDB_UTIL_1.1.28 PYLDB_UTIL_1.1.28
0000000000000000 g    DO *ABS*  0000000000000000  PYLDB_UTIL_1.1.29 PYLDB_UTIL_1.1.29
0000000000000000 g    DO *ABS*  0000000000000000  PYLDB_UTIL_1.1.3 PYLDB_UTIL_1.1.3
0000000000000000 g    DO *ABS*  0000000000000000  PYLDB_UTIL_1.1.30 PYLDB_UTIL_1.1.30
0000000000000000 g    DO *ABS*  0000000000000000  PYLDB_UTIL_1.1.31 PYLDB_UTIL_1.1.31
0000000000000000 g    DO *ABS*  0000000000000000  PYLDB_UTIL_1.1.4 PYLDB_UTIL_1.1.4
0000000000000000 g    DO *ABS*  0000000000000000  PYLDB_UTIL_1.1.5 PYLDB_UTIL_1.1.5
0000000000000000 g    DO *ABS*  0000000000000000  PYLDB_UTIL_1.1.6 PYLDB_UTIL_1.1.6
0000000000000000 g    DO *ABS*  0000000000000000  PYLDB_UTIL_1.1.7 PYLDB_UTIL_1.1.7
0000000000000000 g    DO *ABS*  0000000000000000  PYLDB_UTIL_1.1.8 PYLDB_UTIL_1.1.8
0000000000000000 g    DO *ABS*  0000000000000000  PYLDB_UTIL_1.1.9 PYLDB_UTIL_1.1.9
0000000000000000 g    DO *ABS*  0000000000000000  PYLDB_UTIL_1.2.0 PYLDB_UTIL_1.2.0
00000000000014c0 g    DF .text  00000000000000c4  PYLDB_UTIL_1.1.2 pyldb_Object_AsDn
0000000000001590 g    DF .text  0000000000000081  PYLDB_UTIL_1.1.2 pyldb_Dn_FromDn
[root at e71533851f88 ~]# objdump -T /usr/lib64/libpyldb-util3.5.so | grep PYLDB_UTIL | sort
0000000000000000 g    DO *ABS*  0000000000000000  PYLDB_UTIL3.5_1.2.0 PYLDB_UTIL3.5_1.2.0
0000000000000b00 g    DF .text  00000000000000e4  PYLDB_UTIL3.5_1.2.0 pyldb_Object_AsDn
0000000000000bf0 g    DF .text  0000000000000081  PYLDB_UTIL3.5_1.2.0 pyldb_Dn_FromDn


I am not really sure how are symbols generated in libldb with waf
from files in directory lib/ldb/ABI/ because I am used to different definition
of version symbols in libraries http://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_node/ld_25.html
But IIRC it does not work on all UNIX like systems which are supported by samba.

Could you describe what is a problematic? Why it is problematic?
And how it should look like?


>Then remove at least the cpython-* stuff from
> - the pkgconfig files
> - the installed library names
>
Already done in patchset

[root at e71533851f88 ~]# cat /usr/lib64/pkgconfig/pyldb-util
pyldb-util.pc     pyldb-util3.5.pc  
[root at e71533851f88 ~]# cat /usr/lib64/pkgconfig/pyldb-util*
prefix=/usr
exec_prefix=${prefix}
libdir=${prefix}/lib64
includedir=${prefix}/include
modulesdir=${prefix}/lib64/ldb/modules/ldb

Name: pyldb-util2.7
Description: Python bindings for LDB
Version: 1.2.0
Requires: ldb
Libs:  -L${libdir} -lpyldb-util
Cflags: -I${includedir}
URL: http://ldb.samba.org/
prefix=/usr
exec_prefix=${prefix}
libdir=${prefix}/lib64
includedir=${prefix}/include
modulesdir=${prefix}/lib64/ldb/modules/ldb

Name: pyldb-util3.5
Description: Python bindings for LDB
Version: 1.2.0
Requires: ldb
Libs:  -L${libdir} -lpyldb-util3.5
Cflags: -I${includedir}
URL: http://ldb.samba.org/


>I'm not sure what to do with the .vscript files
>
>The problem with the current patch is that it now puts more version
>info in than we had before, the Samba ABI/*.sigs files are now being
>generated per python version.
>

And you would like to remove dumplication of files. Is it correct?
sh$ ls lib/ldb/ABI/pyldb-util*
lib/ldb/ABI/pyldb-util-1.1.10.sigs  lib/ldb/ABI/pyldb-util-1.1.30.sigs
lib/ldb/ABI/pyldb-util-1.1.11.sigs  lib/ldb/ABI/pyldb-util-1.1.31.sigs
lib/ldb/ABI/pyldb-util-1.1.12.sigs  lib/ldb/ABI/pyldb-util-1.1.3.sigs
lib/ldb/ABI/pyldb-util-1.1.13.sigs  lib/ldb/ABI/pyldb-util-1.1.4.sigs
lib/ldb/ABI/pyldb-util-1.1.14.sigs  lib/ldb/ABI/pyldb-util-1.1.5.sigs
lib/ldb/ABI/pyldb-util-1.1.15.sigs  lib/ldb/ABI/pyldb-util-1.1.6.sigs
lib/ldb/ABI/pyldb-util-1.1.16.sigs  lib/ldb/ABI/pyldb-util-1.1.7.sigs
lib/ldb/ABI/pyldb-util-1.1.17.sigs  lib/ldb/ABI/pyldb-util-1.1.8.sigs
lib/ldb/ABI/pyldb-util-1.1.18.sigs  lib/ldb/ABI/pyldb-util-1.1.9.sigs
lib/ldb/ABI/pyldb-util-1.1.19.sigs  lib/ldb/ABI/pyldb-util-1.2.0.sigs
lib/ldb/ABI/pyldb-util-1.1.20.sigs  lib/ldb/ABI/pyldb-util.py3-1.1.23.sigs
lib/ldb/ABI/pyldb-util-1.1.21.sigs  lib/ldb/ABI/pyldb-util.py3-1.1.24.sigs
lib/ldb/ABI/pyldb-util-1.1.22.sigs  lib/ldb/ABI/pyldb-util.py3-1.1.25.sigs
lib/ldb/ABI/pyldb-util-1.1.23.sigs  lib/ldb/ABI/pyldb-util.py3-1.1.26.sigs
lib/ldb/ABI/pyldb-util-1.1.24.sigs  lib/ldb/ABI/pyldb-util.py3-1.1.27.sigs
lib/ldb/ABI/pyldb-util-1.1.25.sigs  lib/ldb/ABI/pyldb-util.py3-1.1.28.sigs
lib/ldb/ABI/pyldb-util-1.1.26.sigs  lib/ldb/ABI/pyldb-util.py3-1.1.29.sigs
lib/ldb/ABI/pyldb-util-1.1.27.sigs  lib/ldb/ABI/pyldb-util.py3-1.1.30.sigs
lib/ldb/ABI/pyldb-util-1.1.28.sigs  lib/ldb/ABI/pyldb-util.py3-1.1.31.sigs
lib/ldb/ABI/pyldb-util-1.1.29.sigs  lib/ldb/ABI/pyldb-util.py3-1.2.0.sigs
lib/ldb/ABI/pyldb-util-1.1.2.sigs

Could you point me to the code where these files are processed?

LS



More information about the samba-technical mailing list