[PATCHES] Generate shorter name for extra python files

Petr Viktorin pviktori at redhat.com
Tue Aug 22 09:25:00 UTC 2017

On 08/17/2017 09:33 PM, Andrew Bartlett via samba-technical wrote:
> On Wed, 2017-08-16 at 13:54 +0200, Andreas Schneider wrote:
>> On Wednesday, 16 August 2017 12:51:59 CEST Lukas Slebodnik via samba-technical
>> wrote:
>>> On (16/08/17 10:02), Andrew Bartlett wrote:
>>>> On Tue, 2017-08-15 at 14:22 +0200, Lukas Slebodnik wrote:
>>>>> On (22/07/17 13:43), Andrew Bartlett via samba-technical wrote:
>>>>>> On Fri, 2017-07-21 at 15:46 +0200, Stefan Metzmacher via samba-
>>>>>> technical wrote:
>>>>>>> Hi Lukas,
>>>>>>>>> as this will take a bit to discuss, I'll prepare new talloc,
>>>>>>>>> tevent
>>>>>>>>> and ldb releases without this.
>>>>>>>>> We need an ldb release for 4.7.0rc3 which is planed for next
>>>>>>>>> Tuesday.
>>>>>>>> I thought I answer all questions and Abrew wrote that:
>>>>>>>> "(in that respect, I've not done a full review)"
>>>>>>>> I am not sure how to move this forward. Or where is a problem.
>>>>>>>> But I would really appreciate solution which works for upstream
>>>>>>>> and all downstream debian, fedora ...
>>>>>>> It's just time, some people are/will be on vacation, so it takes
>>>>>>> a bit
>>>>>>> of time to have a solid solution.
>>>>>>> We should not rush this into the release on Thursday. There will
>>>>>>> be at least 1 or 2 rc's before 4.7.0.
>>>>>>> But the most important thing is that we should not add a solution
>>>>>>> to ldb-1.2.1, which we than have to revert for ldb-1.2.2.
>>>>>> I agree, we need to get this right.  Skipping it for rc3 should be
>>>>>> fine.
>>>>> And we skipped rc4 as well. But I hope it is still possible
>>>>> to get patches to final 4.7.0 :-)
>>>> Perhaps.  Sadly we are all busy, but this is still our aim.  Is there a
>>>> particular need for this in 4.7?
>>> ATM current version of libraries (with architecture in names for python3)
>>> are not widely used among distributions (only fedora 27 which is in devel
>>> phase) But official samba 4.7.0 might be adopted quite fast due to
>>> samba-ad-dc with MIT krb5. This is a reason why I would prefer to solve
>>> this till official 4.7.0. And I would prefer solution which is acceptable
>>> for most of distributions. Downstream only patches are bad.
>> I agree we NEED to fix this for 4.7. It will be a pain changing it later!
>> I would argue that this is a blocker for the 4.7 release.
> Can you help out on this?  The work has been stalled waiting for:
>   - A comment from Petr on the original design intent

I'm sorry for missing this thread; my vacation-mode filtering is too eager.

As for the original design, "extra python" allows building two versions 
of Python by a single `make` invocation. Building for both 2 and 3 at 
once was a requirement to get the Python3 patches in.
To make this work, I've reused the mechanism Python uses to allow binary 
files for multiple versions to co-exist. The "ABI tag" contains just the 
information needed to distinguish between ABI-incompatible versions.

Note that "/usr/lib64/pkgconfig/pyldb-util36.pc" does not include all 
relevant information: the "m" in "cpython-36m-x86_64-linux-gnu" encodes 
build-time configuration; "dm" would mean a debug build with 
incompatible ABI.
See [PEP 3149] if you want details.

Using the ABI tag as-is essentially puts the burden of distinguishing 
ABI incompatibilities on Python developers/distributors. It's also quite 
easy to ask Python for it [0], so, hopefully, buildsystems of packages 
that depend on the utils can be made to support this.

That said, I'm not familiar with pkg-config or multilib packaging 
outside of Python, or across distros. This is the Python way to do it; 
please adjust if it makes sense.

Another note on the original design intent: generally, the "extra 
python" needs to be version 3, and the "normal" Python could be either 2 
*or* a different version of 3. It's never been tested with py3 as the 
non-extra Python, and I'm sure it doesn't actually work now, but at some 
point it'll be necessary to make the "non-extra" Python be Python 3, 
preferably with the relevant name mangling. Please don't assume that 
"not extra-python" implies Python 2.

[PEP 3149]: https://www.python.org/dev/peps/pep-3149/
[0] import sysconfig; sysconfig.get_config_var('SOABI')

Petr Viktorin

More information about the samba-technical mailing list