From 168c54c0601ef65019e757596e66695df43d5081 Mon Sep 17 00:00:00 2001 From: Bojan Smojver Date: Feb 20 2020 23:01:35 +0000 Subject: Relax and replace LF with space (bug #1573072, pb at bieringer dot de). --- diff --git a/pyspf-2.0.14-newlines.patch b/pyspf-2.0.14-newlines.patch new file mode 100644 index 0000000..135572b --- /dev/null +++ b/pyspf-2.0.14-newlines.patch @@ -0,0 +1,12 @@ +diff -ruN pyspf-2.0.14-v/spf.py pyspf-2.0.14/spf.py +--- pyspf-2.0.14-v/spf.py 2020-01-02 08:02:26.000000000 +1100 ++++ pyspf-2.0.14/spf.py 2020-02-21 09:54:05.593137592 +1100 +@@ -594,6 +594,8 @@ + if not spf: + spf = self.dns_spf(self.d) + if self.verbose: self.log("top",self.d,spf) ++ # some records contain LF, be relaxed and replace with space ++ spf = spf.replace('\n', ' ') + if self.libspf_local and spf: + spf = insert_libspf_local_policy( + spf, self.libspf_local) diff --git a/python-pyspf.spec b/python-pyspf.spec index f221159..359e287 100644 --- a/python-pyspf.spec +++ b/python-pyspf.spec @@ -2,13 +2,14 @@ Name: python-%{srcname} Version: 2.0.14 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Python module and programs for SPF (Sender Policy Framework) License: Python URL: http://pypi.python.org/pypi/pyspf # Also see http://bmsi.com/python/milter.html Source0: https://files.pythonhosted.org/packages/source/p/%{srcname}/%{srcname}-%{version}.tar.gz +Patch0: pyspf-2.0.14-newlines.patch BuildArch: noarch @@ -44,6 +45,7 @@ This package provides Python 3 build of %{srcname}. %prep %setup -qn %{srcname}-%{version} +%patch0 -p1 -b .newlines %build %py3_build @@ -68,6 +70,9 @@ sed -i -e '/^#!\//, 1d' %{buildroot}%{python3_sitelib}/*.py %{python3_sitelib}/pyspf-%{version}-py*.egg-info %changelog +* Fri Feb 21 2020 Bojan Smojver - 2.0.14-2 +- relax and replace LF with space (bug #1573072, pb at bieringer dot de) + * Fri Feb 7 2020 Bojan Smojver - 2.0.14-1 - Update to 2.0.14 - Should fix bug #1770636