2.7.3-32: add workaround for ENOPROTOOPT seen running selftests in Koji (rhbz#913732)

* Mon Mar  4 2013 David Malcolm <dmalcolm@redhat.com> - 2.7.3-32
- add workaround for ENOPROTOOPT seen running selftests in Koji
(rhbz#913732)
This commit is contained in:
David Malcolm 2013-03-04 16:18:16 -05:00
parent 6b3f9096ed
commit d542bae2c2
2 changed files with 24 additions and 1 deletions

View File

@ -0,0 +1,13 @@
diff -up Python-2.7.3/Lib/test/test_support.py.rhbz913732 Python-2.7.3/Lib/test/test_support.py
--- Python-2.7.3/Lib/test/test_support.py.rhbz913732 2013-03-04 16:11:53.757315921 -0500
+++ Python-2.7.3/Lib/test/test_support.py 2013-03-04 16:12:11.331314722 -0500
@@ -304,7 +304,8 @@ def bind_port(sock, host=HOST):
if sock.getsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR) == 1:
raise TestFailed("tests should never set the SO_REUSEADDR " \
"socket option on TCP/IP sockets!")
- if hasattr(socket, 'SO_REUSEPORT'):
+ if hasattr(socket, 'SO_REUSEPORT') \
+ and 'WITHIN_PYTHON_RPM_BUILD' not in os.environ: # rhbz#913732
if sock.getsockopt(socket.SOL_SOCKET, socket.SO_REUSEPORT) == 1:
raise TestFailed("tests should never set the SO_REUSEPORT " \
"socket option on TCP/IP sockets!")

View File

@ -106,7 +106,7 @@ Summary: An interpreted, interactive, object-oriented programming language
Name: %{python}
# Remember to also rebase python-docs when changing this:
Version: 2.7.3
Release: 31%{?dist}
Release: 32%{?dist}
License: Python
Group: Development/Languages
Requires: %{python}-libs%{?_isa} = %{version}-%{release}
@ -805,6 +805,11 @@ Patch171: 00171-raise-correct-exception-when-dev-urandom-is-missing.patch
#(rhbz#849992; http://bugs.python.org/issue10527)
Patch172: 00172-use-poll-for-multiprocessing-socket-connection.patch
# 00173 #
# Workaround for ENOPROTOOPT seen in Koji within
# test.test_support.bind_port()
# (rhbz#913732)
Patch173: 00173-workaround-ENOPROTOOPT-in-bind_port.patch
# (New patches go here ^^^)
#
@ -1145,6 +1150,7 @@ mv Modules/cryptmodule.c Modules/_cryptmodule.c
%patch170 -p1
%patch171 -p1 -b .raise-correct-exception-when-dev-urandom-is-missing
%patch172 -p1
%patch173 -p1
# This shouldn't be necesarry, but is right now (2.2a3)
@ -1977,6 +1983,10 @@ rm -fr %{buildroot}
# ======================================================
%changelog
* Mon Mar 4 2013 David Malcolm <dmalcolm@redhat.com> - 2.7.3-32
- add workaround for ENOPROTOOPT seen running selftests in Koji
(rhbz#913732)
* Mon Mar 4 2013 David Malcolm <dmalcolm@redhat.com> - 2.7.3-31
- remove config flag from /etc/rpm/macros.python2