From patchwork Wed Oct 18 16:55:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matt Weber X-Patchwork-Id: 827751 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=) 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 3yHJ8k22vFz9t3h for ; Thu, 19 Oct 2017 03:55:33 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 483613018E; Wed, 18 Oct 2017 16:55:29 +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 3bsOzqecXmz1; Wed, 18 Oct 2017 16:55:27 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 2A0C030187; Wed, 18 Oct 2017 16:55:27 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id F24331C1111 for ; Wed, 18 Oct 2017 16:55:25 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id EB30E88765 for ; Wed, 18 Oct 2017 16:55:25 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id McIiF8f3vK4k for ; Wed, 18 Oct 2017 16:55:25 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from ch3vs03.rockwellcollins.com (ch3vs03.rockwellcollins.com [205.175.226.47]) by whitealder.osuosl.org (Postfix) with ESMTPS id CE2C088758 for ; Wed, 18 Oct 2017 16:55:24 +0000 (UTC) Received: from ofwch3n02.rockwellcollins.com (HELO ciulimr02.rockwellcollins.com) ([205.175.226.14]) by ch3vs03.rockwellcollins.com with ESMTP; 18 Oct 2017 11:55:24 -0500 X-Received: from linuxtest5810.rockwellcollins.com (linuxtest5810.rockwellcollins.com [131.199.101.22]) by ciulimr02.rockwellcollins.com (Postfix) with ESMTP id DE0EE20070; Wed, 18 Oct 2017 11:55:23 -0500 (CDT) From: Matt Weber To: buildroot@buildroot.org Date: Wed, 18 Oct 2017 11:55:23 -0500 Message-Id: <20171018165523.13145-1-matthew.weber@rockwellcollins.com> X-Mailer: git-send-email 2.14.2.746.g8fb8a94 Subject: [Buildroot] [PATCH] python-config.sh: don't reassign ${prefix} 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" When prefix is set to a path like /usr during crossbuild the sed operations end up executing twice, once for the prefix reassignment and another for includedir if it is set as a string including the ${prefix} variable. This results in an issue when building on a machine that mounts local storage under /usr. This patch updates the remaining location which uses the prefix variable to also sed and update to use the real path. Upstream bug report: https://bugs.python.org/issue31713 Buildroot bug: https://bugs.busybox.net/show_bug.cgi?id=10361 Fixes failures like the following: python-gobject-2.28.6 | NOK | http://autobuild.buildroot.net/results/ac6cf59125ba57402f926e6c65ffe19e065001b5 dbus-python-1.2.4 | NOK | http://autobuild.buildroot.net/results/0d1459155ab6ad2e126e0845ecf6ba2f9381ec8b Signed-off-by: Matthew Weber --- ...29-python-config.sh-don-t-reassign-prefix.patch | 54 ++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 package/python3/0029-python-config.sh-don-t-reassign-prefix.patch diff --git a/package/python3/0029-python-config.sh-don-t-reassign-prefix.patch b/package/python3/0029-python-config.sh-don-t-reassign-prefix.patch new file mode 100644 index 0000000..6a9df14 --- /dev/null +++ b/package/python3/0029-python-config.sh-don-t-reassign-prefix.patch @@ -0,0 +1,54 @@ +From 21f787cb9bf0c1440981262f03bc881c5b77c0d8 Mon Sep 17 00:00:00 2001 +From: Matt Weber +Date: Fri, 6 Oct 2017 09:54:15 -0500 +Subject: [PATCH] python-config.sh: don't reassign ${prefix} + +When prefix is set to a path like /usr during crossbuild +the sed operations end up executing twice, once for the prefix +reassignment and another for includedir if it is set as a string +including the ${prefix} variable. This results in an issue +when building on a machine that mounts local storage under /usr. + +This patch updates the remaining location which uses the prefix +variable to also sed and update to use the real path. + +Upstream bug report: +https://bugs.python.org/issue31713 + +Buildroot bug: +https://bugs.busybox.net/show_bug.cgi?id=10361 + +Fixes failures like the following: +python-gobject-2.28.6 | NOK | http://autobuild.buildroot.net/results/ac6cf59125ba57402f926e6c65ffe19e065001b5 +dbus-python-1.2.4 | NOK | http://autobuild.buildroot.net/results/0d1459155ab6ad2e126e0845ecf6ba2f9381ec8b + +Signed-off-by: Matthew Weber +--- + Misc/python-config.sh.in | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/Misc/python-config.sh.in b/Misc/python-config.sh.in +index f905a71..e06be0f 100644 +--- a/Misc/python-config.sh.in ++++ b/Misc/python-config.sh.in +@@ -29,7 +29,7 @@ prefix_real=$(installed_prefix "$0") + + # Use sed to fix paths from their built-to locations to their installed-to + # locations. +-prefix=$(echo "$prefix_build" | sed "s#^$prefix_build#$prefix_real#") ++prefix=$prefix_build + exec_prefix_build="@exec_prefix@" + exec_prefix=$(echo "$exec_prefix_build" | sed "s#^$exec_prefix_build#$prefix_real#") + includedir=$(echo "@includedir@" | sed "s#^$prefix_build#$prefix_real#") +@@ -47,7 +46,7 @@ LINKFORSHARED="@LINKFORSHARED@" + OPT="@OPT@" + PY_ENABLE_SHARED="@PY_ENABLE_SHARED@" + LDVERSION="@LDVERSION@" +-LIBDEST=${prefix}/lib/python${VERSION} ++LIBDEST=$( echo "${prefix}/lib/python${VERSION}" | sed "s#^$prefix_build#$prefix_real#") + LIBPL=$(echo "@LIBPL@" | sed "s#^$prefix_build#$prefix_real#") + SO="@EXT_SUFFIX@" + PYTHONFRAMEWORK="@PYTHONFRAMEWORK@" +-- +1.8.3.1 +