* [Buildroot] [PATCH/next 1/2] python: do not use hg or svn when available
@ 2016-08-31 20:38 Thomas Petazzoni
2016-08-31 20:38 ` [Buildroot] [PATCH/next 2/2] python3: " Thomas Petazzoni
2016-09-18 15:13 ` [Buildroot] [PATCH/next 1/2] python: " Thomas Petazzoni
0 siblings, 2 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2016-08-31 20:38 UTC (permalink / raw)
To: buildroot
During the execution of its configure script, Python tries to find an
available "hg" and "svn" installation, and if available, will try to use
them to get information from the version control system. To do this, it
tries to communicate over the network, potentially over ports that are
blocked, causing the build to halt. This was reported by a user as part
of bug #7802.
To solve this, we simply make the Python script use /bin/false as the
"hg" and "svn" programs.
Fixes bug #7802 for the python package.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
package/python/python.mk | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/package/python/python.mk b/package/python/python.mk
index 9026703..cc65376 100644
--- a/package/python/python.mk
+++ b/package/python/python.mk
@@ -39,8 +39,12 @@ HOST_PYTHON_CONF_OPTS += \
# Make sure that LD_LIBRARY_PATH overrides -rpath.
# This is needed because libpython may be installed at the same time that
# python is called.
+# Make python believe we don't have 'hg' and 'svn', so that it doesn't
+# try to communicate over the network during the build.
HOST_PYTHON_CONF_ENV += \
- LDFLAGS="$(HOST_LDFLAGS) -Wl,--enable-new-dtags"
+ LDFLAGS="$(HOST_LDFLAGS) -Wl,--enable-new-dtags" \
+ ac_cv_prog_HAS_HG=/bin/false \
+ ac_cv_prog_SVNVERSION=/bin/false
# Building host python in parallel sometimes triggers a "Bus error"
# during the execution of "./python setup.py build" in the
@@ -126,11 +130,15 @@ else
PYTHON_CONF_OPTS += --disable-ossaudiodev
endif
+# Make python believe we don't have 'hg' and 'svn', so that it doesn't
+# try to communicate over the network during the build.
PYTHON_CONF_ENV += \
ac_cv_have_long_long_format=yes \
ac_cv_file__dev_ptmx=yes \
ac_cv_file__dev_ptc=yes \
- ac_cv_working_tzset=yes
+ ac_cv_working_tzset=yes \
+ ac_cv_prog_HAS_HG=/bin/false \
+ ac_cv_prog_SVNVERSION=/bin/false
PYTHON_CONF_OPTS += \
--without-cxx-main \
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH/next 2/2] python3: do not use hg or svn when available
2016-08-31 20:38 [Buildroot] [PATCH/next 1/2] python: do not use hg or svn when available Thomas Petazzoni
@ 2016-08-31 20:38 ` Thomas Petazzoni
2016-09-18 15:13 ` Thomas Petazzoni
2016-09-18 15:13 ` [Buildroot] [PATCH/next 1/2] python: " Thomas Petazzoni
1 sibling, 1 reply; 4+ messages in thread
From: Thomas Petazzoni @ 2016-08-31 20:38 UTC (permalink / raw)
To: buildroot
During the execution of its configure script, Python 3 tries to find an
available "hg" installation, and if available, will try to use it to get
information from the version control system. To do this, it tries to
communicate over the network, potentially over ports that are blocked,
causing the build to halt. This was reported by a user as part of bug
7802.
To solve this, we simply make the Python script use /bin/false as the
"hg" program.
Fixes bug #7802 for the python3 package.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
package/python3/python3.mk | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/package/python3/python3.mk b/package/python3/python3.mk
index 34e1297..393b9fb 100644
--- a/package/python3/python3.mk
+++ b/package/python3/python3.mk
@@ -41,8 +41,11 @@ HOST_PYTHON3_CONF_OPTS += \
# Make sure that LD_LIBRARY_PATH overrides -rpath.
# This is needed because libpython may be installed at the same time that
# python is called.
+# Make python believe we don't have 'hg', so that it doesn't try to
+# communicate over the network during the build.
HOST_PYTHON3_CONF_ENV += \
- LDFLAGS="$(HOST_LDFLAGS) -Wl,--enable-new-dtags"
+ LDFLAGS="$(HOST_LDFLAGS) -Wl,--enable-new-dtags" \
+ ac_cv_prog_HAS_HG=/bin/false
PYTHON3_DEPENDENCIES = host-python3 libffi
@@ -110,11 +113,14 @@ else
PYTHON3_CONF_OPTS += --disable-ossaudiodev
endif
+# Make python believe we don't have 'hg', so that it doesn't try to
+# communicate over the network during the build.
PYTHON3_CONF_ENV += \
ac_cv_have_long_long_format=yes \
ac_cv_file__dev_ptmx=yes \
ac_cv_file__dev_ptc=yes \
- ac_cv_working_tzset=yes
+ ac_cv_working_tzset=yes \
+ ac_cv_prog_HAS_HG=/bin/false
# uClibc is known to have a broken wcsftime() implementation, so tell
# Python 3 to fall back to strftime() instead.
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH/next 2/2] python3: do not use hg or svn when available
2016-08-31 20:38 ` [Buildroot] [PATCH/next 2/2] python3: " Thomas Petazzoni
@ 2016-09-18 15:13 ` Thomas Petazzoni
0 siblings, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2016-09-18 15:13 UTC (permalink / raw)
To: buildroot
Hello,
On Wed, 31 Aug 2016 22:38:29 +0200, Thomas Petazzoni wrote:
> During the execution of its configure script, Python 3 tries to find an
> available "hg" installation, and if available, will try to use it to get
> information from the version control system. To do this, it tries to
> communicate over the network, potentially over ports that are blocked,
> causing the build to halt. This was reported by a user as part of bug
> 7802.
>
> To solve this, we simply make the Python script use /bin/false as the
> "hg" program.
>
> Fixes bug #7802 for the python3 package.
>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ---
> package/python3/python3.mk | 10 ++++++++--
> 1 file changed, 8 insertions(+), 2 deletions(-)
Applied after fixing the commit title to not mention svn, since python3
never tried to use svn (contrary to python 2.x).
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH/next 1/2] python: do not use hg or svn when available
2016-08-31 20:38 [Buildroot] [PATCH/next 1/2] python: do not use hg or svn when available Thomas Petazzoni
2016-08-31 20:38 ` [Buildroot] [PATCH/next 2/2] python3: " Thomas Petazzoni
@ 2016-09-18 15:13 ` Thomas Petazzoni
1 sibling, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2016-09-18 15:13 UTC (permalink / raw)
To: buildroot
Hello,
On Wed, 31 Aug 2016 22:38:28 +0200, Thomas Petazzoni wrote:
> During the execution of its configure script, Python tries to find an
> available "hg" and "svn" installation, and if available, will try to use
> them to get information from the version control system. To do this, it
> tries to communicate over the network, potentially over ports that are
> blocked, causing the build to halt. This was reported by a user as part
> of bug #7802.
>
> To solve this, we simply make the Python script use /bin/false as the
> "hg" and "svn" programs.
>
> Fixes bug #7802 for the python package.
>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ---
> package/python/python.mk | 12 ++++++++++--
> 1 file changed, 10 insertions(+), 2 deletions(-)
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-09-18 15:13 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-31 20:38 [Buildroot] [PATCH/next 1/2] python: do not use hg or svn when available Thomas Petazzoni
2016-08-31 20:38 ` [Buildroot] [PATCH/next 2/2] python3: " Thomas Petazzoni
2016-09-18 15:13 ` Thomas Petazzoni
2016-09-18 15:13 ` [Buildroot] [PATCH/next 1/2] python: " Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox