[PATCH try2] Re: Disabling Python Modules

Ian Stakenvicius axs at gentoo.org
Wed Jan 25 00:50:56 UTC 2017


> On Jan 24, 2017, at 7:38 PM, Jeremy Allison <jra at samba.org> wrote:
> 
>> On Mon, Jan 23, 2017 at 11:51:33AM -0500, Ian Stakenvicius wrote:
>>> On 23/01/17 11:13 AM, Ian Stakenvicius wrote:
>>>> On 20/01/17 01:45 PM, Ian Stakenvicius wrote:
>>>>> On 18/01/17 08:03 PM, Jeremy Allison wrote:
>>>>>> On Wed, Jan 18, 2017 at 03:05:58PM -0500, Ian Stakenvicius wrote:
>>>>>> [...]
>>>>>> I'll work on separating things out into appropriate segments, and
>>>>>> getting the patches into git locally so they can be committed as-is
>>>>>> later on.
>>>>> 
>>>>> Hi Ian, that's fantasic news ! Thanks for helping us with that !
>>>>> 
>>>>> Can you send us in an email as described here:
>>>>> 
>>>>> https://www.samba.org/samba/devel/copyright-policy.html
>>>>> [..]
>>>> 
>>>> Done.
>>>> 
>>>> OK, the patchset is prepared for email; there's 27 (edit: 28) commits in it, and
>>>> I've provided the titles below.  Should some of these be squashed
>>>> together before I send them or should they remain separate?
>>> 
>>> Received advice from #samba-technical.  Please find attached the
>>> patchset as previously linked and described.
>>> 
>>> Regards,
>>> Ian
>> 
>> New version attached for review, with proper signoffs in place.
> 
> Thanks a *LOT* for this Ian !
> 
> However, in master, when I apply this patchset and configure
> using:
> 
> buildtools/bin/waf configure --enable-pthreadpool --with-acl-support --enable-developer --picky-developer --disable-python
> 
> and then do:
> 
> make -j
> 
> I get:
> 
> WAF_MAKE=1 python ./buildtools/bin/waf build
> Waf: Entering directory `/space/jra/src/samba/git/merge-1/bin'
>    Selected embedded Heimdal build
> symlink: samba-tool -> ./samba-tool
> symlink: samba_dnsupdate -> ./samba_dnsupdate
> symlink: samba_spnupdate -> ./samba_spnupdate
> symlink: samba_kcc -> ./samba_kcc
> symlink: samba_upgradeprovision -> ./samba_upgradeprovision
> symlink: samba_upgradedns -> ./samba_upgradedns
> symlink: smbaddshare -> ./smbaddshare
> symlink: smbchangeshare -> ./smbchangeshare
> symlink: smbdeleteshare -> ./smbdeleteshare
> Checking project rules ...
> Unknown dependency 'LIBPYTHON' in 'service_web.objlist'
> make: *** [all] Error 1
> 
> So I think there's another patch needed for:
> 
> source4/web_server/wscript_build
> 
> but my python isn't good enough to create it yet,
> sorry.
> 
> Jeremy.
> 

That part I can do; Gentoo has never built samba in "developer" mode so there may be a number of modules that still expect Python.  I'll give it a shot locally and add a commit or more, as a separate email.

FYI, for anyone that may want to try this, in wscript_build you just have to wrap Python-needing modules by prepending  'if not bld.env.disable_python:'

In wscript it's similar (conf.env.disable_python) but there are a couple more steps.

Lots of examples abound in the patch set, as that's more or less all I did.  The real work is in chasing down module dependencies to know which build lines to disable.



More information about the samba-technical mailing list