Message ID | 20161122131109.4459-1-nicolas.cavallari@green-communications.fr |
---|---|
State | Accepted |
Headers | show |
On 22-11-16 14:11, Nicolas Cavallari wrote: > host-python3 currently detect if there is an usable OpenSSL installation > and conditionnaly compiles the 'ssl', '_ssl' and '_hashlib' modules. > This may break compilation if the system's OpenSSL has been updated to > 1.1.0 because of a bug in python, see https://bugs.python.org/issue26470 > for details. > > Unlike Python 2.7, Python 3 unconditionnaly compiles fallbacks for > common hash algorithm, so disabling OpenSSL will still leave Python 3 > with implementations of common hash algorithm. > > This adds a patch to configure.ac patch to implement a --disable-openssl > option. You didn't add your Signed-off-by here. > --- > .../0031-Add-an-option-to-disable-openssl.patch | 23 ++++++++++++++++++++++ > package/python3/python3.mk | 3 ++- > 2 files changed, 25 insertions(+), 1 deletion(-) > create mode 100644 package/python3/0031-Add-an-option-to-disable-openssl.patch > > diff --git a/package/python3/0031-Add-an-option-to-disable-openssl.patch b/package/python3/0031-Add-an-option-to-disable-openssl.patch > new file mode 100644 > index 0000000..d437520 > --- /dev/null > +++ b/package/python3/0031-Add-an-option-to-disable-openssl.patch > @@ -0,0 +1,23 @@ > +From: Nicolas Cavallari <nicolas.cavallari@green-communications.fr> Funny, an almost-git-formatted patch :-) Since I assume you based this on python's 111-optional-ssl.patch, I think you really should keep Thomas's authorship (and signed-off-by of course) That said: Tested-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> This is really needed for 2016.11. I can't build host-python3 without it. Regards, Arnout > +Subject: [PATCH] Add an option to disable openssl support. > + > +Signed-off-by: Nicolas Cavallari <nicolas.cavallari@green-communications.fr> > +--- > + configure.ac | 6 ++++++ > + 1 file changed, 6 insertions(+) > + > +--- a/configure.ac > ++++ b/configure.ac > +@@ -3027,6 +3027,12 @@ > + DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} unicodedata" > + fi]) > + > ++AC_ARG_ENABLE(openssl, > ++ AS_HELP_STRING([--disable-openssl], [disable openssl support]), > ++ [ if test "$enableval" = "no"; then > ++ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} ssl _ssl _hashlib" > ++ fi]) > ++ > + AC_SUBST(TK) > + AC_ARG_ENABLE(tk, > + AS_HELP_STRING([--disable-tk], [disable tk]), > diff --git a/package/python3/python3.mk b/package/python3/python3.mk > index f355ae9..8bfae79 100644 > --- a/package/python3/python3.mk > +++ b/package/python3/python3.mk > @@ -36,7 +36,8 @@ HOST_PYTHON3_CONF_OPTS += \ > --enable-unicodedata \ > --disable-test-modules \ > --disable-idle3 \ > - --disable-ossaudiodev > + --disable-ossaudiodev \ > + --disable-openssl > > # Make sure that LD_LIBRARY_PATH overrides -rpath. > # This is needed because libpython may be installed at the same time that >
On 24/11/2016 23:46, Arnout Vandecappelle wrote: > > > On 22-11-16 14:11, Nicolas Cavallari wrote: >> host-python3 currently detect if there is an usable OpenSSL installation >> and conditionnaly compiles the 'ssl', '_ssl' and '_hashlib' modules. >> This may break compilation if the system's OpenSSL has been updated to >> 1.1.0 because of a bug in python, see https://bugs.python.org/issue26470 >> for details. >> >> Unlike Python 2.7, Python 3 unconditionnaly compiles fallbacks for >> common hash algorithm, so disabling OpenSSL will still leave Python 3 >> with implementations of common hash algorithm. >> >> This adds a patch to configure.ac patch to implement a --disable-openssl >> option. > > You didn't add your Signed-off-by here. Oops, i'll put it here just in case someone want to apply it anyway: Signed-off-by: Nicolas Cavallari <nicolas.cavallari@green-communications.fr> >> --- >> .../0031-Add-an-option-to-disable-openssl.patch | 23 ++++++++++++++++++++++ >> package/python3/python3.mk | 3 ++- >> 2 files changed, 25 insertions(+), 1 deletion(-) >> create mode 100644 package/python3/0031-Add-an-option-to-disable-openssl.patch >> >> diff --git a/package/python3/0031-Add-an-option-to-disable-openssl.patch b/package/python3/0031-Add-an-option-to-disable-openssl.patch >> new file mode 100644 >> index 0000000..d437520 >> --- /dev/null >> +++ b/package/python3/0031-Add-an-option-to-disable-openssl.patch >> @@ -0,0 +1,23 @@ >> +From: Nicolas Cavallari <nicolas.cavallari@green-communications.fr> > > Funny, an almost-git-formatted patch :-) > > Since I assume you based this on python's 111-optional-ssl.patch, I think you > really should keep Thomas's authorship (and signed-off-by of course) I didn't base this on 111-optional-ssl.patch, i just copy-pasted some lines nearby. The buildroot patches for python 3 are not really the same compared to the python 2.7 patches. I think would be rude to indicate Thomas signed off this patch without ever seeing it. It was already a bit rude to keep the signoff while modifying 111-optional-ssl.patch, but i received no comments on that. > That said: > Tested-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> > > This is really needed for 2016.11. I can't build host-python3 without it. I'll wait for further comments before resubmitting.
Hello, On Tue, 22 Nov 2016 14:11:09 +0100, Nicolas Cavallari wrote: > host-python3 currently detect if there is an usable OpenSSL installation > and conditionnaly compiles the 'ssl', '_ssl' and '_hashlib' modules. > This may break compilation if the system's OpenSSL has been updated to > 1.1.0 because of a bug in python, see https://bugs.python.org/issue26470 > for details. > > Unlike Python 2.7, Python 3 unconditionnaly compiles fallbacks for > common hash algorithm, so disabling OpenSSL will still leave Python 3 > with implementations of common hash algorithm. > > This adds a patch to configure.ac patch to implement a --disable-openssl > option. > --- > .../0031-Add-an-option-to-disable-openssl.patch | 23 ++++++++++++++++++++++ > package/python3/python3.mk | 3 ++- > 2 files changed, 25 insertions(+), 1 deletion(-) > create mode 100644 package/python3/0031-Add-an-option-to-disable-openssl.patch Applied to master, thanks. A useful improvement (for next) would be to use --enable-ssl/--disable-ssl for the target variant of python3, depending on the value of BR2_PACKAGE_PYTHON3_SSL. Thanks! Thomas
diff --git a/package/python3/0031-Add-an-option-to-disable-openssl.patch b/package/python3/0031-Add-an-option-to-disable-openssl.patch new file mode 100644 index 0000000..d437520 --- /dev/null +++ b/package/python3/0031-Add-an-option-to-disable-openssl.patch @@ -0,0 +1,23 @@ +From: Nicolas Cavallari <nicolas.cavallari@green-communications.fr> +Subject: [PATCH] Add an option to disable openssl support. + +Signed-off-by: Nicolas Cavallari <nicolas.cavallari@green-communications.fr> +--- + configure.ac | 6 ++++++ + 1 file changed, 6 insertions(+) + +--- a/configure.ac ++++ b/configure.ac +@@ -3027,6 +3027,12 @@ + DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} unicodedata" + fi]) + ++AC_ARG_ENABLE(openssl, ++ AS_HELP_STRING([--disable-openssl], [disable openssl support]), ++ [ if test "$enableval" = "no"; then ++ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} ssl _ssl _hashlib" ++ fi]) ++ + AC_SUBST(TK) + AC_ARG_ENABLE(tk, + AS_HELP_STRING([--disable-tk], [disable tk]), diff --git a/package/python3/python3.mk b/package/python3/python3.mk index f355ae9..8bfae79 100644 --- a/package/python3/python3.mk +++ b/package/python3/python3.mk @@ -36,7 +36,8 @@ HOST_PYTHON3_CONF_OPTS += \ --enable-unicodedata \ --disable-test-modules \ --disable-idle3 \ - --disable-ossaudiodev + --disable-ossaudiodev \ + --disable-openssl # Make sure that LD_LIBRARY_PATH overrides -rpath. # This is needed because libpython may be installed at the same time that