diff --git a/PR-459.patch b/PR-459.patch new file mode 100644 index 0000000..bf2087e --- /dev/null +++ b/PR-459.patch @@ -0,0 +1,39 @@ +From 6ad13590aff7d6544443e6646555d949bd316796 Mon Sep 17 00:00:00 2001 +From: Ralf Haferkamp +Date: Fri, 12 Jan 2018 13:48:09 +0100 +Subject: [PATCH] greendns: Treat /etc/hosts entries case-insensitive + +Hostname in /etc/hosts are not case-sensitive, this fixes +HostsResolver() accordingly. + +eventlet#458 + +Co-Authored-By: Thomas Bechtold +--- + eventlet/support/greendns.py | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/eventlet/support/greendns.py b/eventlet/support/greendns.py +index cff0581c..140388ec 100644 +--- a/eventlet/support/greendns.py ++++ b/eventlet/support/greendns.py +@@ -222,9 +222,10 @@ def _load(self): + ipmap = self._v6 + else: + continue +- cname = parts.pop(0) ++ cname = parts.pop(0).lower() + ipmap[cname] = ip + for alias in parts: ++ alias = alias.lower() + ipmap[alias] = ip + self._aliases[alias] = cname + self._last_load = time.time() +@@ -251,6 +252,7 @@ def query(self, qname, rdtype=dns.rdatatype.A, rdclass=dns.rdataclass.IN, + qname = dns.name.from_text(qname) + else: + name = str(qname) ++ name = name.lower() + rrset = dns.rrset.RRset(qname, rdclass, rdtype) + rrset.ttl = self._last_load + self.interval - now + if rdclass == dns.rdataclass.IN and rdtype == dns.rdatatype.A: diff --git a/python-eventlet.changes b/python-eventlet.changes index 1003a76..ba90eb9 100644 --- a/python-eventlet.changes +++ b/python-eventlet.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Jan 12 12:57:09 UTC 2018 - tbechtold@suse.com + +- Add PR-459.patch. + Hostname in /etc/hosts are not case-sensitive, this fixes + HostsResolver() accordingly. + ------------------------------------------------------------------- Sun Dec 10 20:33:20 UTC 2017 - dmueller@suse.com diff --git a/python-eventlet.spec b/python-eventlet.spec index 82972a4..f0fa761 100644 --- a/python-eventlet.spec +++ b/python-eventlet.spec @@ -1,7 +1,7 @@ # # spec file for package python-eventlet # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -26,6 +26,8 @@ Group: Development/Languages/Python Url: http://eventlet.net Source: https://files.pythonhosted.org/packages/source/e/eventlet/eventlet-%{version}.tar.gz Patch0: 0001-Fix-SSL-connection-reset-errors.patch +# PATCH-FIX-UPSTREAM PR-459.patch -- https://github.com/eventlet/eventlet/pull/459 +Patch1: PR-459.patch BuildRequires: %{python_module Sphinx} BuildRequires: %{python_module devel} BuildRequires: %{python_module greenlet} @@ -62,6 +64,7 @@ for Python that allows changing how code is run. %prep %setup -q -n eventlet-%{version} %patch0 -p1 +%patch1 -p1 sed -i '/enum.compat/d' setup.py # crude way to drop the strange "enum-compat" requirement sed -i "s|^#!.*||" eventlet/support/greendns.py # Fix non-executable script