14
0

- Add PR-459.patch.

Hostname in /etc/hosts are not case-sensitive, this fixes
  HostsResolver() accordingly.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-eventlet?expand=0&rev=45
This commit is contained in:
Thomas Bechtold
2018-01-12 13:07:54 +00:00
committed by Git OBS Bridge
parent cb26afc3cb
commit a828d77da7
3 changed files with 50 additions and 1 deletions

39
PR-459.patch Normal file
View File

@@ -0,0 +1,39 @@
From 6ad13590aff7d6544443e6646555d949bd316796 Mon Sep 17 00:00:00 2001
From: Ralf Haferkamp <rhafer@suse.de>
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 <tbechtold@suse.com>
---
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:

View File

@@ -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 Sun Dec 10 20:33:20 UTC 2017 - dmueller@suse.com

View File

@@ -1,7 +1,7 @@
# #
# spec file for package python-eventlet # 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 # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@@ -26,6 +26,8 @@ Group: Development/Languages/Python
Url: http://eventlet.net Url: http://eventlet.net
Source: https://files.pythonhosted.org/packages/source/e/eventlet/eventlet-%{version}.tar.gz Source: https://files.pythonhosted.org/packages/source/e/eventlet/eventlet-%{version}.tar.gz
Patch0: 0001-Fix-SSL-connection-reset-errors.patch 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 Sphinx}
BuildRequires: %{python_module devel} BuildRequires: %{python_module devel}
BuildRequires: %{python_module greenlet} BuildRequires: %{python_module greenlet}
@@ -62,6 +64,7 @@ for Python that allows changing how code is run.
%prep %prep
%setup -q -n eventlet-%{version} %setup -q -n eventlet-%{version}
%patch0 -p1 %patch0 -p1
%patch1 -p1
sed -i '/enum.compat/d' setup.py # crude way to drop the strange "enum-compat" requirement 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 sed -i "s|^#!.*||" eventlet/support/greendns.py # Fix non-executable script