#4 Remove 00178-dont-duplicate-flags-in-sysconfig.patch
Merged 3 years ago by churchyard. Opened 3 years ago by vstinner.
rpms/ vstinner/python3.6 sysconfig  into  master

@@ -1,48 +0,0 @@ 

- From e2f8cf627e31970ddb5134ade1d049ef0a5d8b96 Mon Sep 17 00:00:00 2001

- From: Bohuslav Kabrda <bkabrda@redhat.com>

- Date: Fri, 19 Jun 2020 16:11:14 +0200

- Subject: [PATCH] 00178: Don't duplicate various FLAGS in sysconfig values

- 

- http://bugs.python.org/issue17679

- 

- Co-Authored-By: Bohuslav Kabrda <bkabrda@redhat.com>

- ---

-  Lib/distutils/sysconfig.py | 5 ++++-

-  Lib/sysconfig.py           | 5 ++++-

-  2 files changed, 8 insertions(+), 2 deletions(-)

- 

- diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py

- index ff0b131df2..2013efaa8b 100644

- --- a/Lib/distutils/sysconfig.py

- +++ b/Lib/distutils/sysconfig.py

- @@ -356,7 +356,10 @@ def parse_makefile(fn, g=None):

-                      done[n] = item = ""

-                  if found:

-                      after = value[m.end():]

- -                    value = value[:m.start()] + item + after

- +                    value = value[:m.start()]

- +                    if item.strip() not in value:

- +                        value += item

- +                    value += after

-                      if "$" in after:

-                          notdone[name] = value

-                      else:

- diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py

- index 8168e9c5a9..240bb6608a 100644

- --- a/Lib/sysconfig.py

- +++ b/Lib/sysconfig.py

- @@ -294,7 +294,10 @@ def _parse_makefile(filename, vars=None):

-  

-                  if found:

-                      after = value[m.end():]

- -                    value = value[:m.start()] + item + after

- +                    value = value[:m.start()]

- +                    if item.strip() not in value:

- +                        value += item

- +                    value += after

-                      if "$" in after:

-                          notdone[name] = value

-                      else:

- -- 

- 2.26.2

- 

file modified
+6 -8
@@ -17,7 +17,7 @@ 

  %global prerel rc1

  %global upstream_version %{general_version}%{?prerel}

  Version: %{general_version}%{?prerel:~%{prerel}}

- Release: 1%{?dist}

+ Release: 2%{?dist}

  License: Python

  

  
@@ -311,12 +311,6 @@ 

  # See https://bugzilla.redhat.com/show_bug.cgi?id=614680

  Patch170: 00170-gc-assertions.patch

  

- # 00178 #

- # Don't duplicate various FLAGS in sysconfig values

- # http://bugs.python.org/issue17679

- # Does not affect python2 AFAICS (different sysconfig values initialization)

- Patch178: 00178-dont-duplicate-flags-in-sysconfig.patch

- 

  # 00189 #

  # Instead of bundled wheels, use our RPM packaged wheels from

  # /usr/share/python-wheels
@@ -639,7 +633,6 @@ 

  %patch160 -p1

  %patch163 -p1

  %patch170 -p1

- %patch178 -p1

  

  %if %{with rpmwheels}

  %patch189 -p1
@@ -1535,6 +1528,11 @@ 

  # ======================================================

  

  %changelog

+ * Thu Jun 25 2020 Victor Stinner <vstinner@python.org> - 3.6.11~rc1-2

+ - Remove downstream 00178-dont-duplicate-flags-in-sysconfig.patch which

+   introduced a bug on distutils.sysconfig.get_config_var('LIBPL')

+   (rhbz#1851008).

+ 

  * Fri Jun 19 2020 Petr Viktorin <pviktori@redhat.com> - 3.6.11-1

  - Update to 3.6.11rc1

  

Remove downstream 00178-dont-duplicate-flags-in-sysconfig.patch which
introduced a bug on distutils.sysconfig.get_config_var('LIBPL').

Resolves: rhbz#1851008

Build failed.

======================================================================
ERROR: test_protocol_sslv23 (test.test_ssl.ThreadedTests)
Connecting to an SSLv23 server with various client options
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/Python-3.6.11rc1/Lib/test/test_ssl.py", line 178, in f
    return func(*args, **kwargs)
  File "/builddir/build/BUILD/Python-3.6.11rc1/Lib/test/test_ssl.py", line 2696, in test_protocol_sslv23
    try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_TLSv1, 'TLSv1')
  File "/builddir/build/BUILD/Python-3.6.11rc1/Lib/test/test_ssl.py", line 2385, in try_protocol_combo
    chatty=False, connectionchatty=False)
  File "/builddir/build/BUILD/Python-3.6.11rc1/Lib/test/test_ssl.py", line 2310, in server_params_test
    s.connect((HOST, server.port))
  File "/builddir/build/BUILD/Python-3.6.11rc1/Lib/ssl.py", line 1065, in connect
    self._real_connect(addr, False)
  File "/builddir/build/BUILD/Python-3.6.11rc1/Lib/ssl.py", line 1056, in _real_connect
    self.do_handshake()
  File "/builddir/build/BUILD/Python-3.6.11rc1/Lib/ssl.py", line 1033, in do_handshake
    self._sslobj.do_handshake()
  File "/builddir/build/BUILD/Python-3.6.11rc1/Lib/ssl.py", line 645, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLError: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:877)
======================================================================
ERROR: test_protocol_tlsv1_1 (test.test_ssl.ThreadedTests)
Connecting to a TLSv1.1 server with various client options.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/Python-3.6.11rc1/Lib/test/test_ssl.py", line 178, in f
    return func(*args, **kwargs)
  File "/builddir/build/BUILD/Python-3.6.11rc1/Lib/test/test_ssl.py", line 2771, in test_protocol_tlsv1_1
    try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_TLSv1_1, 'TLSv1.1')
  File "/builddir/build/BUILD/Python-3.6.11rc1/Lib/test/test_ssl.py", line 2385, in try_protocol_combo
    chatty=False, connectionchatty=False)
  File "/builddir/build/BUILD/Python-3.6.11rc1/Lib/test/test_ssl.py", line 2310, in server_params_test
    s.connect((HOST, server.port))
  File "/builddir/build/BUILD/Python-3.6.11rc1/Lib/ssl.py", line 1065, in connect
    self._real_connect(addr, False)
  File "/builddir/build/BUILD/Python-3.6.11rc1/Lib/ssl.py", line 1056, in _real_connect
    self.do_handshake()
  File "/builddir/build/BUILD/Python-3.6.11rc1/Lib/ssl.py", line 1033, in do_handshake
    self._sslobj.do_handshake()
  File "/builddir/build/BUILD/Python-3.6.11rc1/Lib/ssl.py", line 645, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLError: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:877)
----------------------------------------------------------------------
Ran 135 tests in 2.293s
FAILED (errors=2, skipped=9)
1 test failed again:
    test_ssl
== Tests result: FAILURE then FAILURE ==

======================================================================
ERROR: test_protocol_sslv23 (test.test_ssl.ThreadedTests)
Connecting to an SSLv23 server with various client options


Traceback (most recent call last):
File "/builddir/build/BUILD/Python-3.6.11rc1/Lib/test/test_ssl.py", line 178, in f
return func(args, *kwargs)
File "/builddir/build/BUILD/Python-3.6.11rc1/Lib/test/test_ssl.py", line 2696, in test_protocol_sslv23
try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_TLSv1, 'TLSv1')
File "/builddir/build/BUILD/Python-3.6.11rc1/Lib/test/test_ssl.py", line 2385, in try_protocol_combo
chatty=False, connectionchatty=False)
File "/builddir/build/BUILD/Python-3.6.11rc1/Lib/test/test_ssl.py", line 2310, in server_params_test
s.connect((HOST, server.port))
File "/builddir/build/BUILD/Python-3.6.11rc1/Lib/ssl.py", line 1065, in connect
self._real_connect(addr, False)
File "/builddir/build/BUILD/Python-3.6.11rc1/Lib/ssl.py", line 1056, in _real_connect
self.do_handshake()
File "/builddir/build/BUILD/Python-3.6.11rc1/Lib/ssl.py", line 1033, in do_handshake
self._sslobj.do_handshake()
File "/builddir/build/BUILD/Python-3.6.11rc1/Lib/ssl.py", line 645, in do_handshake
self._sslobj.do_handshake()
ssl.SSLError: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:877)
======================================================================
ERROR: test_protocol_tlsv1_1 (test.test_ssl.ThreadedTests)
Connecting to a TLSv1.1 server with various client options.


Traceback (most recent call last):
File "/builddir/build/BUILD/Python-3.6.11rc1/Lib/test/test_ssl.py", line 178, in f
return func(args, *kwargs)
File "/builddir/build/BUILD/Python-3.6.11rc1/Lib/test/test_ssl.py", line 2771, in test_protocol_tlsv1_1
try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_TLSv1_1, 'TLSv1.1')
File "/builddir/build/BUILD/Python-3.6.11rc1/Lib/test/test_ssl.py", line 2385, in try_protocol_combo
chatty=False, connectionchatty=False)
File "/builddir/build/BUILD/Python-3.6.11rc1/Lib/test/test_ssl.py", line 2310, in server_params_test
s.connect((HOST, server.port))
File "/builddir/build/BUILD/Python-3.6.11rc1/Lib/ssl.py", line 1065, in connect
self._real_connect(addr, False)
File "/builddir/build/BUILD/Python-3.6.11rc1/Lib/ssl.py", line 1056, in _real_connect
self.do_handshake()
File "/builddir/build/BUILD/Python-3.6.11rc1/Lib/ssl.py", line 1033, in do_handshake
self._sslobj.do_handshake()
File "/builddir/build/BUILD/Python-3.6.11rc1/Lib/ssl.py", line 645, in do_handshake
self._sslobj.do_handshake()
ssl.SSLError: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:877)


Ran 135 tests in 2.293s
FAILED (errors=2, skipped=9)
1 test failed again:
test_ssl
== Tests result: FAILURE then FAILURE ==

That is weird. Did the package got rebuilt at any point since openssl got updated?

Build failed.

Build failed.

Comparing to the latest successful build:

-crypto-policies-20200610-1.git7f9d474.fc33.noarch
+crypto-policies-20200625-1.gitb298a9e.fc33.noarch

https://src.fedoraproject.org/rpms/crypto-policies/c/27fbe5e64d2085b58517d0ef7f1daddb2baf25e9?branch=master

Most noticeably:

DEFAULT policy: Drop DH < 2048 bits, TLS 1.0, 1.1, SHA-1

Heh.

rebased onto 97479f1

3 years ago

Build succeeded.

It works. I'd say go ahead and merge it :)

Pull-Request has been merged by churchyard

3 years ago

Building python3.6-3.6.11~rc1-2.fc33 for rawhide
Created task: 46354106
Task info: https://koji.fedoraproject.org/koji/taskinfo?taskID=46354106

Also removed the patch from https://github.com/fedora-python/cpython/commits/fedora-3.6