Bug 7305 - Feature request: Scripts header (shebang) should use the python binary picked up by configure
Summary: Feature request: Scripts header (shebang) should use the python binary picked...
Alias: None
Product: Samba 4.0
Classification: Unclassified
Component: Build (show other bugs)
Version: unspecified
Hardware: x86 Solaris
: P5 enhancement (vote)
Target Milestone: ---
Assignee: Andrew Tridgell
QA Contact: samba4-qa@samba.org
Depends on:
Reported: 2010-03-29 04:54 UTC by Bernd Markgraf
Modified: 2014-04-06 23:03 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Bernd Markgraf 2010-03-29 04:54:15 UTC
configure tries to pick up the highest version of python. all python scripts should be using the version found by configure. i.e. if configure picks up /usr/bin/python2.6 scripts like provision and net should not try to run '/usr/bin/env python'  but rather '/usr/bin/env python2.6' as python is not always a link to the version configure picked up.
Comment 1 Bernd Markgraf 2010-03-29 05:25:18 UTC
samba_dnsupdate is also bitten by this one
Comment 2 Matthias Dieter Wallnöfer 2010-03-30 07:36:54 UTC
Well, I mark this as enhancement, since
1.) on standard installations with only one python installed you aren't affected
2.) only when you have more than one environments the problem appears. But you can always work-around by starting the script using the right python binary.

I will discuss this with Jelmer but don't really know yet if we provide a solution (since the "shebang" header of python scripts is static).
Comment 3 Bernd Markgraf 2010-03-30 15:20:40 UTC
you would hit this one too, when you happen to update to a newer python version (well in that case you would be completely borked I suppose). but since the install creates $SAMBAHOME/lib/pythonX.Y/site-packages which depends on the python version it wouldn't hurt to sed the correct python binary into the scripts.
Comment 4 Jelmer Vernooij 2010-10-29 01:47:30 UTC
I think we've started doing this with the waf build. Can somebody verify?
Comment 5 Matthias Dieter Wallnöfer 2012-03-27 14:39:05 UTC
Jelmer, considering your comment: has this been fixed?
Comment 6 Jelmer Vernooij 2012-03-27 14:52:17 UTC
Hi Matthias,

Please don't assign me to random bugs. 

(In reply to comment #5)
> Jelmer, considering your comment: has this been fixed?
I think it has been (see my last comment), but it would be great if somebody who is actually having this issue could verify that we do this in all situations.
Comment 7 Andrew Bartlett 2014-04-06 23:03:37 UTC
This is fixed in current releases.