On Mon, 2013-06-10 at 11:37 -0500, Mike Ray wrote:
> Andrew-
> 
> After git-building the package with your debian directory (as it was
> at about 9:00 AM UTC-0600), I installed it and started comparing it to
> the package I had crafted.
> 
> There are a large number of differences, but almost all of them seem
> to stem from the work-arounds I implemented to cope with my lack of
> knowledge in package crafting. For instance, with the samba4_4.0.3
> +dfsg1-0.1 debian that we started with, certain variables and paths
> were not expanding properly which led to build failures; I remedied
> this problem by changing the install paths and associated rules.
> 
> It was barbaric methodology, but it did eventually pan out. Other than
> that though, our packages seem to both function (though one morning of
> light usage is not a fair trial); though I'm glad to have a proper
> install thanks to the git tree you linked.
> 
> One difference though that will matter is that wafsamba.py does not
> properly expand python as an environment variable when it preforms
> substitution on the interpreter line for samba_dnsupdate, samba_kcc,
> samba_spnupdate and samba_upgradedns. The interpreter line as is, will
> read "#!/usr/bin/python2.7# vim: expandtab" which causes the 'bad
> interpreter' error when invoked. 
> Changing wafsamba.py as follows seems to fix the issue:
> 
>      if task.env["PYTHON"][0] == "/":
> -        replacement_shebang = "#!%s" % task.env["PYTHON"]
> +        replacement_shebang = "#!%s\n" % task.env["PYTHON"]
>      else:
> -        replacement_shebang = "#!/usr/bin/env %s" %
> task.env["PYTHON"]
> +        replacement_shebang = "#!/usr/bin/env %s\n" %
> task.env["PYTHON"]

This was noticed recently, and will be fixed in the next 4.0 release.
The official patch is attached for curiosity, I'll ensure it's added
into the debian patches in the meantime. 

> I'm rebuilding the package I made available previously with the
> up-to-date debian folder as well as that newline fix and my unofficial
> exclude ip patch.
> 
> Thanks much for the help,
> Mike Ray

I'm very glad to help.  What we need from here is to finish the TODO
items listed in debian/TODO, and try and move this package to
experimental!  Please join the debian list and help out:
http://lists.alioth.debian.org/mailman/listinfo/pkg-samba-maint

Andrew Bartlett

-- 
Andrew Bartlett                                http://samba.org/~abartlet/
Authentication Developer, Samba Team           http://samba.org

>From 0996e95c00ffc468e6482877f21bae3a0f01abe9 Mon Sep 17 00:00:00 2001
From: Michael Adam <ob...@samba.org>
Date: Tue, 28 May 2013 12:19:34 +0200
Subject: [PATCH] build: Add missing new line to replaced python shebang line.
 (Fix bug #9909)

When configuring with a non-standard python specified in
the PYTHON environment variable, the shebang lines in various
python tools like samba-tool and samba_dnsupdate get replaced.

This replace line for the shebang was missing a newline
which joined the shebang line with the following line,
rendereing those scripts with a nonempty second line unusuable,
for example samba_dnsupdate.

This patch fixes this bug which is bug #9909 on bugzilla.

Pair-Programmed-With: Karolin Seeger <ksee...@samba.org>

Signed-off-by: Michael Adam <ob...@samba.org>
Signed-off-by: Karolin Seeger <ksee...@samba.org>

Reviewed-by: Andrew Bartlett <abart...@samba.org>

Autobuild-User(master): Michael Adam <ob...@samba.org>
Autobuild-Date(master): Wed May 29 13:21:51 CEST 2013 on sn-devel-104
(cherry picked from commit 3f24d694e7e2190d30a17bc13a79a36b49711531)
---
 buildtools/wafsamba/wafsamba.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/buildtools/wafsamba/wafsamba.py b/buildtools/wafsamba/wafsamba.py
index 3559cc1..8eace08 100644
--- a/buildtools/wafsamba/wafsamba.py
+++ b/buildtools/wafsamba/wafsamba.py
@@ -699,9 +699,9 @@ sys.path.insert(1, "%s")""" % (task.env["PYTHONARCHDIR"], task.env["PYTHONDIR"])
     shebang = None
 
     if task.env["PYTHON"][0] == "/":
-        replacement_shebang = "#!%s" % task.env["PYTHON"]
+        replacement_shebang = "#!%s\n" % task.env["PYTHON"]
     else:
-        replacement_shebang = "#!/usr/bin/env %s" % task.env["PYTHON"]
+        replacement_shebang = "#!/usr/bin/env %s\n" % task.env["PYTHON"]
 
     installed_location=task.outputs[0].bldpath(task.env)
     source_file = open(task.inputs[0].srcpath(task.env))
-- 
1.7.11.7

-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba

Reply via email to