deb-python-eventlet/bin/pull-dnspython
Jakub Stasiak 9a13405598 Upgrade bundled dnspython to fix DNS resolution
The version introduced in commit [1] ([2]) has a major bug - "The DNS
resolver doesn't return any records and under some circumstances throws
KeyError exceptions from within dnspython" [3]. dnspython commit [4]
fixes it so let's update to the latest development version.

Simple script to reproduce:

    import eventlet
    eventlet.monkey_patch(all=True)

    import socket
    print(socket.gethostbyname('google.co.uk'))

Before this change it'd raise an exception, after - it produces
a result.

[1] 52b09becac
[2] 188aa701a6
[3] https://github.com/rthalley/dnspython/issues/206
[4] 292995db18
2016-09-27 11:44:11 +01:00

14 lines
500 B
Bash
Executable File

#!/bin/bash -eux
cd "$( dirname "${BASH_SOURCE[0]}" )/.."
version=${1-bb0c9f21f4a6f56f2fe8d7c1fc991080ef89d223}
upstream_path=./dnspython-${version}
if [[ ! -d "${upstream_path}" ]]; then
curl -L -odnspython.zip "https://github.com/rthalley/dnspython/archive/${version}.zip"
unzip dnspython.zip
rm dnspython.zip
fi
rm -rf eventlet/support/dns
# patch --directory=eventlet/support -p1 --normal --forward -r/dev/null <./dns.patch
mv ${upstream_path}/dns eventlet/support/
rm -rf ${upstream_path}