All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Andreas Müller" <schnitzeltony@gmail.com>
To: openembedded-devel@lists.openembedded.org
Subject: [PATCH 01/19] itstool: rework native shebang and add class to make native itstool work
Date: Mon, 28 Oct 2019 00:35:27 +0100	[thread overview]
Message-ID: <20191027233545.4146-2-schnitzeltony@gmail.com> (raw)
In-Reply-To: <20191027233545.4146-1-schnitzeltony@gmail.com>

itstool was reworked in [1] to not use host's python. This patch introduced the
'-S' option for coreutils's env [2]. Unfortunately that option is relatively
young [3] and elder build-host don't support it [4].

The only way to get around this is:
* remove '-S' and -s' from native shebang
* add a class itstool.bbclass. This class depends itstool-native and creates a
  valid python3 runtime environment. Most notable in the environment is
  export PYTHONNOUSERSITE = "1"
  which does same as '-s' option: force python to avoid adding (host) user sites.

[1] http://cgit.openembedded.org/meta-openembedded/commit/meta-oe/recipes-support/itstool/itstool/0001-Don-t-use-build-time-hardcoded-python-binary-path.patch?id=e5ac325b7974a346b218d1f43b92d06f5b0dd078
[2] http://cgit.openembedded.org/meta-openembedded/tree/meta-oe/recipes-support/itstool/itstool/0001-Don-t-use-build-time-hardcoded-python-binary-path.patch
[3] https://github.com/coreutils/coreutils/commit/668306ed86c8c79b0af0db8b9c882654ebb66db2#diff-83d9d52b1f12ac589739ab1334ae4f30
[4] https://errors.yoctoproject.org/Errors/Details/274743/

Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
---
 meta-oe/classes/itstool.bbclass               |  5 +++
 ...-build-time-hardcoded-python-binary-.patch | 35 +++++++++++++++++++
 ...d-time-hardcoded-python-binary-path.patch} |  0
 .../recipes-support/itstool/itstool_2.0.6.bb  |  6 ++--
 4 files changed, 44 insertions(+), 2 deletions(-)
 create mode 100644 meta-oe/classes/itstool.bbclass
 create mode 100644 meta-oe/recipes-support/itstool/itstool/0001-Native-Don-t-use-build-time-hardcoded-python-binary-.patch
 rename meta-oe/recipes-support/itstool/itstool/{0001-Don-t-use-build-time-hardcoded-python-binary-path.patch => 0002-Don-t-use-build-time-hardcoded-python-binary-path.patch} (100%)

diff --git a/meta-oe/classes/itstool.bbclass b/meta-oe/classes/itstool.bbclass
new file mode 100644
index 000000000..45e3fb839
--- /dev/null
+++ b/meta-oe/classes/itstool.bbclass
@@ -0,0 +1,5 @@
+# helper class to prepare correct environment for native itstool
+
+inherit python3native
+
+DEPENDS_append = " itstool-native"
diff --git a/meta-oe/recipes-support/itstool/itstool/0001-Native-Don-t-use-build-time-hardcoded-python-binary-.patch b/meta-oe/recipes-support/itstool/itstool/0001-Native-Don-t-use-build-time-hardcoded-python-binary-.patch
new file mode 100644
index 000000000..19a858bd7
--- /dev/null
+++ b/meta-oe/recipes-support/itstool/itstool/0001-Native-Don-t-use-build-time-hardcoded-python-binary-.patch
@@ -0,0 +1,35 @@
+From 335ef14fc801c9dfbe7e5692dc71cfbe72049d2b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
+Date: Sun, 27 Oct 2019 16:38:52 +0100
+Subject: [PATCH] Native: Don't use build time hardcoded python binary path.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This is same patch as used for target build except that we do not use the
+'-S' and '-s' option because '-S' is relatively young [1] and elder build-host
+don't support it [2]
+
+[1] https://github.com/coreutils/coreutils/commit/668306ed86c8c79b0af0db8b9c882654ebb66db2#diff-83d9d52b1f12ac589739ab1334ae4f30
+[2] https://errors.yoctoproject.org/Errors/Details/274743/
+
+Upstream-Status: Inappropriate [OE specific]
+
+Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
+---
+ itstool.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/itstool.in b/itstool.in
+index e64cd34..05d264f 100755
+--- a/itstool.in
++++ b/itstool.in
+@@ -1,4 +1,4 @@
+-#!@PYTHON@ -s
++#!/usr/bin/env python3
+ #
+ # Copyright (c) 2010-2018 Shaun McCance <shaunm@gnome.org>
+ #
+-- 
+2.21.0
+
diff --git a/meta-oe/recipes-support/itstool/itstool/0001-Don-t-use-build-time-hardcoded-python-binary-path.patch b/meta-oe/recipes-support/itstool/itstool/0002-Don-t-use-build-time-hardcoded-python-binary-path.patch
similarity index 100%
rename from meta-oe/recipes-support/itstool/itstool/0001-Don-t-use-build-time-hardcoded-python-binary-path.patch
rename to meta-oe/recipes-support/itstool/itstool/0002-Don-t-use-build-time-hardcoded-python-binary-path.patch
diff --git a/meta-oe/recipes-support/itstool/itstool_2.0.6.bb b/meta-oe/recipes-support/itstool/itstool_2.0.6.bb
index b4b37aa01..8290c5e58 100644
--- a/meta-oe/recipes-support/itstool/itstool_2.0.6.bb
+++ b/meta-oe/recipes-support/itstool/itstool_2.0.6.bb
@@ -7,8 +7,10 @@ inherit autotools python3native
 
 DEPENDS = "libxml2-native"
 
-SRC_URI = "http://files.itstool.org/${BPN}/${BPN}-${PV}.tar.bz2 \
-           file://0001-Don-t-use-build-time-hardcoded-python-binary-path.patch"
+SRC_URI = "http://files.itstool.org/${BPN}/${BPN}-${PV}.tar.bz2"
+SRC_URI_append_class-native = " file://0001-Native-Don-t-use-build-time-hardcoded-python-binary-.patch"
+SRC_URI_append_class-target = " file://0002-Don-t-use-build-time-hardcoded-python-binary-path.patch"
+
 SRC_URI[md5sum] = "4306eeba4f4aee6b393d14f9c3c57ca1"
 SRC_URI[sha256sum] = "6233cc22726a9a5a83664bf67d1af79549a298c23185d926c3677afa917b92a9"
 
-- 
2.21.0



  reply	other threads:[~2019-10-27 23:35 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-27 23:35 [PATCH 00/19] next gnome batch Andreas Müller
2019-10-27 23:35 ` Andreas Müller [this message]
2019-10-27 23:35 ` [PATCH 02/19] yelp-tools: use itstools.bbclass Andreas Müller
2019-10-27 23:35 ` [PATCH 03/19] yelp-xsl: use itstool.bbclass Andreas Müller
2019-10-27 23:35 ` [PATCH 04/19] yelp: " Andreas Müller
2019-10-27 23:35 ` [PATCH 05/19] gnome-help.bbclass: Handle gnome-help files with new distro feature 'helpfiles' Andreas Müller
2019-10-27 23:35 ` [PATCH 06/19] zenity: rework recipe Andreas Müller
2019-10-27 23:35 ` [PATCH 07/19] colord: initial add 1.4.4 Andreas Müller
2019-10-28 20:08   ` Khem Raj
2019-10-28 20:50     ` Andreas Müller
2019-10-28 21:40       ` Khem Raj
2019-10-27 23:35 ` [PATCH 08/19] colord-gtk: initial add 0.2.0 Andreas Müller
2019-10-27 23:35 ` [PATCH 09/19] dconf: extend to native build for upcoming gdm Andreas Müller
2019-10-27 23:35 ` [PATCH 10/19] dconf-editor: upgrade 3.32.0 -> 3.34.0 Andreas Müller
2019-10-27 23:35 ` [PATCH 11/19] gtksourceview4: upgrade 4.2.0 -> 4.4.0 Andreas Müller
2019-10-27 23:35 ` [PATCH 12/19] gnome-menus3: upgrade 3.10.1 -> 3.32.0 Andreas Müller
2019-10-27 23:35 ` [PATCH 13/19] gnome-desktop3: upgrade 3.34.0 -> 3.34.1 Andreas Müller
2019-10-27 23:35 ` [PATCH 14/19] gnome-bluetooth: upgrade 3.32.1 -> 3.34.0 Andreas Müller
2019-10-27 23:35 ` [PATCH 15/19] glade3: upgrade 3.8.5 -> 3.8.6 Andreas Müller
2019-10-28 20:08   ` Khem Raj
2019-10-28 21:11     ` Andreas Müller
2019-10-27 23:35 ` [PATCH 16/19] gspell: upgrade 1.8.1 -> 1.8.2 Andreas Müller
2019-10-27 23:35 ` [PATCH 17/19] gnome-system-monitor: upgrade 3.32.0 -> 3.32.1 Andreas Müller
2019-10-27 23:35 ` [PATCH 18/19] network-manager-applet: upgrade 1.8.22 -> 1.8.23 / build with meson / cleanup Andreas Müller
2019-10-27 23:35 ` [PATCH 19/19] ibus: initial add 1.5.21 Andreas Müller
2019-10-27 23:59   ` Andreas Müller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191027233545.4146-2-schnitzeltony@gmail.com \
    --to=schnitzeltony@gmail.com \
    --cc=openembedded-devel@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.