[python] 2.7.3-32: add workaround for ENOPROTOOPT seen running selftests in Koji (rhbz#913732)
dmalcolm
dmalcolm at fedoraproject.org
Mon Mar 4 21:18:28 UTC 2013
commit d542bae2c2089f4a13f6aca59f0ea962997db1cf
Author: David Malcolm <dmalcolm at redhat.com>
Date: Mon Mar 4 16:18:16 2013 -0500
2.7.3-32: add workaround for ENOPROTOOPT seen running selftests in Koji (rhbz#913732)
* Mon Mar 4 2013 David Malcolm <dmalcolm at redhat.com> - 2.7.3-32
- add workaround for ENOPROTOOPT seen running selftests in Koji
(rhbz#913732)
00173-workaround-ENOPROTOOPT-in-bind_port.patch | 13 +++++++++++++
python.spec | 12 +++++++++++-
2 files changed, 24 insertions(+), 1 deletions(-)
---
diff --git a/00173-workaround-ENOPROTOOPT-in-bind_port.patch b/00173-workaround-ENOPROTOOPT-in-bind_port.patch
new file mode 100644
index 0000000..eb34610
--- /dev/null
+++ b/00173-workaround-ENOPROTOOPT-in-bind_port.patch
@@ -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!")
diff --git a/python.spec b/python.spec
index 8db914d..2514b6d 100644
--- a/python.spec
+++ b/python.spec
@@ -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 at redhat.com> - 2.7.3-32
+- add workaround for ENOPROTOOPT seen running selftests in Koji
+(rhbz#913732)
+
* Mon Mar 4 2013 David Malcolm <dmalcolm at redhat.com> - 2.7.3-31
- remove config flag from /etc/rpm/macros.python2
More information about the scm-commits
mailing list