From patchwork Tue Oct 24 09:22:52 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Kellermann X-Patchwork-Id: 829831 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=solectrix.de header.i=@solectrix.de header.b="kgwwFPuN"; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yLnr30Zgsz9sBd for ; Tue, 24 Oct 2017 20:23:15 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id C754C301BA; Tue, 24 Oct 2017 09:23:11 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id PcGuyzvh12yN; Tue, 24 Oct 2017 09:23:10 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 0B296301B0; Tue, 24 Oct 2017 09:23:10 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id F25491BF54B for ; Tue, 24 Oct 2017 09:23:07 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id E533C87B02 for ; Tue, 24 Oct 2017 09:23:07 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id uCJGqkCuSnZw for ; Tue, 24 Oct 2017 09:23:06 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from smtp2.normanzi.de (smtp2.normanzi.de [194.150.191.214]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 254BB87B93 for ; Tue, 24 Oct 2017 09:23:04 +0000 (UTC) X-Virus-Scanned: by SpamTitan at normanzi.de DKIM-Filter: OpenDKIM Filter v2.9.2 zimbra.solectrix.de D92C5C40345 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=solectrix.de; s=4B3F345A-BFBF-11E3-99A9-21BB46A75F48; t=1508836981; bh=0JdKjapnFdZR6InxsVJ8uKEjBVcruZANIkzQtBu8sxc=; h=From:To:Subject:Date:Message-Id; b=kgwwFPuN9OmxXNLaY9ADr5Hl9yAj3dHMB3tToQv4YS1iVUQU1PLux7v6aMZ5pgLTC CeAu+4omWV7/FgudMQh+cXvnKvOnY0adUgroj0B8yErd9VO/EFL6CqF863E7AeG7nc plVywvqfak6dEEDyY0MK7Fps4mrWxi4g/pDtJUNQ= X-Virus-Scanned: amavisd-new at solectrix.de Received: from networker.simp.solectrix.de (unknown [192.168.2.2]) by zimbra.solectrix.de (Postfix) with ESMTPS id C48D1C400DF; Tue, 24 Oct 2017 11:23:01 +0200 (CEST) Received: from sx4173-linuxdev.solectrix.de (dhcp-152.simp.solectrix.de [192.168.227.152]) by networker.simp.solectrix.de (Postfix) with ESMTP id C02732650B; Tue, 24 Oct 2017 11:23:01 +0200 (CEST) Received: from localhost (sx4173-linuxdev.solectrix.de [local]) by sx4173-linuxdev.solectrix.de (OpenSMTPD) with ESMTPA id 6216337c; Tue, 24 Oct 2017 09:23:01 +0000 (UTC) From: Christian Kellermann To: buildroot@buildroot.org Date: Tue, 24 Oct 2017 11:22:52 +0200 Message-Id: <20171024092252.21506-1-christian.kellermann@solectrix.de> X-Mailer: git-send-email 2.12.1 In-Reply-To: <20171018173732.368ed195@windsurf.home> References: <20171018173732.368ed195@windsurf.home> Cc: Christian Kellermann Subject: [Buildroot] [PATCH v1] samba4: Make python2 dependency for waf explicit X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Without this patch the build environment will pick up host-python3 binaries if host-python3 is a dependency for other packages. Currently waf does not support python3. Signed-off-by: Christian Kellermann --- Changelog: v0 -> v1 - Patch samba Makefile to explicitly use python2 instead of patching samba4.mk --- ...ake-python-2.7-dependency-in-waf-explicit.patch | 27 +++++++++++++++++++++ .../samba4/0003-Force-python2-in-Makefile.patch | 28 ++++++++++++++++++++++ package/samba4/samba4.mk | 3 ++- 3 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 package/samba4/0002-Make-python-2.7-dependency-in-waf-explicit.patch create mode 100644 package/samba4/0003-Force-python2-in-Makefile.patch diff --git a/package/samba4/0002-Make-python-2.7-dependency-in-waf-explicit.patch b/package/samba4/0002-Make-python-2.7-dependency-in-waf-explicit.patch new file mode 100644 index 0000000000..2a0d3696cd --- /dev/null +++ b/package/samba4/0002-Make-python-2.7-dependency-in-waf-explicit.patch @@ -0,0 +1,27 @@ +From f7295def3f04d8d8c2d62d9525c0f741ef2f964b Mon Sep 17 00:00:00 2001 +From: Christian Kellermann +Date: Wed, 18 Oct 2017 14:00:36 +0200 +Subject: [PATCH] Make python 2.7 dependency in waf explicit + +This prevents picking the wrong python during build as a Python3 +dependency will clobber the python symlink. Python3 is not +supported (yet) in the samba4 build system. + +Signed-off-by: Christian Kellermann +--- + buildtools/bin/waf | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/buildtools/bin/waf b/buildtools/bin/waf +index 1b0f4662a56..f66b992e78c 100755 +--- a/buildtools/bin/waf ++++ b/buildtools/bin/waf +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python2 + # encoding: ISO-8859-1 + # Thomas Nagy, 2005-2010 + +-- +2.12.1 + diff --git a/package/samba4/0003-Force-python2-in-Makefile.patch b/package/samba4/0003-Force-python2-in-Makefile.patch new file mode 100644 index 0000000000..e68da98adb --- /dev/null +++ b/package/samba4/0003-Force-python2-in-Makefile.patch @@ -0,0 +1,28 @@ +From 716d7a780ba2403f84c6ea4220305d698c6a14f4 Mon Sep 17 00:00:00 2001 +From: Christian Kellermann +Date: Tue, 24 Oct 2017 10:19:01 +0200 +Subject: [PATCH] Force python2 in Makefile + +waf does not work with python3-host packages, so make it use python2 +explicitly. + +Signed-off-by: Christian Kellermann +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index 5cc90771000..1496918b6de 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,6 +1,6 @@ + # simple makefile wrapper to run waf + +-PYTHON?=python ++PYTHON?=python2 + WAF_BINARY=$(PYTHON) ./buildtools/bin/waf + WAF=WAF_MAKE=1 $(WAF_BINARY) + +-- +2.12.1 + diff --git a/package/samba4/samba4.mk b/package/samba4/samba4.mk index f8001bbe7f..4b9cc64b4c 100644 --- a/package/samba4/samba4.mk +++ b/package/samba4/samba4.mk @@ -89,11 +89,12 @@ define SAMBA4_CONFIGURE_CMDS cp package/samba4/samba4-cache.txt $(@D)/cache.txt; echo 'Checking uname machine type: $(BR2_ARCH)' >>$(@D)/cache.txt; (cd $(@D); \ - PYTHON_CONFIG="$(STAGING_DIR)/usr/bin/python-config" \ + PYTHON_CONFIG="$(STAGING_DIR)/usr/bin/python2-config" \ python_LDFLAGS="" \ python_LIBDIR="" \ $(TARGET_CONFIGURE_OPTS) \ $(SAMBA4_CONF_ENV) \ + PYTHON=python2 \ ./buildtools/bin/waf configure \ --prefix=/usr \ --sysconfdir=/etc \