From b1ebe7a62dbdfb0aa1a967ea65532510e78356e9 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Jun 29 2019 20:36:53 +0000 Subject: Add patch for socket tests in python 3.8. Fixes bug #1695802 --- diff --git a/b7089121e305ef29dee9b72bfdb8b1496ffed48c.patch b/b7089121e305ef29dee9b72bfdb8b1496ffed48c.patch new file mode 100644 index 0000000..2004500 --- /dev/null +++ b/b7089121e305ef29dee9b72bfdb8b1496ffed48c.patch @@ -0,0 +1,24 @@ +From b7089121e305ef29dee9b72bfdb8b1496ffed48c Mon Sep 17 00:00:00 2001 +From: Ben Finney +Date: Apr 04 2019 08:05:19 +0000 +Subject: Create the socket and catch “non-socket” errors. + + +--- + +diff --git a/daemon/daemon.py b/daemon/daemon.py +index 1a75bc4..df2d3a8 100644 +--- a/daemon/daemon.py ++++ b/daemon/daemon.py +@@ -761,9 +761,8 @@ def is_socket(fd): + """ + result = False + +- file_socket = socket.fromfd(fd, socket.AF_INET, socket.SOCK_RAW) +- + try: ++ file_socket = socket.fromfd(fd, socket.AF_INET, socket.SOCK_RAW) + file_socket.getsockopt(socket.SOL_SOCKET, socket.SO_TYPE) + except socket.error as exc: + exc_errno = exc.args[0] + diff --git a/python-daemon.spec b/python-daemon.spec index 42dfb3a..c2edf75 100644 --- a/python-daemon.spec +++ b/python-daemon.spec @@ -10,14 +10,15 @@ Name: python-daemon Version: 2.2.3 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Library to implement a well-behaved Unix daemon process # Some build scripts and test franework are licensed GPLv3+ but htose aren't shipped License: ASL2.0 URL: http://pypi.python.org/pypi/python-daemon/ Source0: https://files.pythonhosted.org/packages/source/p/%{name}/%{name}-%{version}.tar.gz - +# Fix python3.8 socket tests. Already upstream. +Patch0: https://pagure.io/python-daemon/c/b7089121e305ef29dee9b72bfdb8b1496ffed48c.patch BuildArch: noarch BuildRequires: python2-devel, python2-setuptools @@ -64,7 +65,7 @@ This is the python3 version of the library. %endif %prep -%setup -q +%autosetup -p1 %if 0%{?with_python3} rm -rf %{py3dir} @@ -114,6 +115,9 @@ PYTHONPATH=$(pwd) %{__python3} -m unittest discover %endif %changelog +* Sat Jun 29 2019 Kevin Fenzi - 2.2.3-2 +- Add patch for socket tests in python 3.8. Fixes bug #1695802 + * Tue Feb 12 2019 Alfredo Moralejo - 2.2.3-1 - Update to 2.2.3