Samba python deps management (was: Re: [Patch]Correcting the error message of 'samba-tool domain schemaupgrade')

Andrew Bartlett abartlet at samba.org
Tue Sep 3 02:35:41 UTC 2019


G'Day Amit,

I'm going to write here because you have opened mulitple MR, sent a
mail to samba-techncial and filed bugs and this converstation is
already a bit too spread out.

Samba's python code has dependencies.  These are documented in
our bootstrap system (finally), but of course many users don't use that
(because it really is built for the CI runners).

So, we have a problem at runtime when things like 'patch' or Python
Markdown are not installed.

My view is that, as pointed out so well by AB, we must not print
distro-specific package instructions at runtime.  That just ends in
madness.

https://gitlab.com/samba-team/samba/merge_requests/758#note_211145140

We do, in configure, suggest the typical RPM and DEB package name for
things we need, but given the proliferation of tools (apt-get, yum,
dnf, zypper) we certainly don't want to go for full commands.

What we need is a check at configure time that the python and system
tools we need are present.  Perhaps some way to use the standard python
requirements.txt would be nice, but could also cause more problems.

I realise that due to the nature of python (and calling executables)
that these can diverge between build and install time (of the binaries)
so I'm all ears on how to solve that also (beyond saying that it a
distributor problem).

However, I don't want this put into scatter-gut exception handling all
over the codebase.  It needs to be in one spot, and consistent. 

As we move away from using third_party for this we need to do this
once, and right.

Andrew Bartlett

-- 
Andrew Bartlett
https://samba.org/~abartlet/
Authentication Developer, Samba Team         https://samba.org
Samba Development and Support, Catalyst IT   
https://catalyst.net.nz/services/samba







More information about the samba-technical mailing list