From 757869be540409c5c49ff9e2cdf11d6074f05b7c Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Sat, 6 Jan 2024 10:39:12 +0100 Subject: [PATCH] update to 1.3.2 patch for use with python-ipaddress with python2 [release 1.3.2-1mamba;Thu Dec 10 2015] --- pypolicy-spf-1.3.2-python2.patch | 12 ++++++++++++ pypolicyd-spf.spec | 13 ++++++++++--- 2 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 pypolicy-spf-1.3.2-python2.patch diff --git a/pypolicy-spf-1.3.2-python2.patch b/pypolicy-spf-1.3.2-python2.patch new file mode 100644 index 0000000..5407dbd --- /dev/null +++ b/pypolicy-spf-1.3.2-python2.patch @@ -0,0 +1,12 @@ +diff -Nru pypolicyd-spf-1.3.2.orig/policyd-spf pypolicyd-spf-1.3.2/policyd-spf +--- pypolicyd-spf-1.3.2.orig/policyd-spf 2015-08-13 04:45:08.000000000 +0200 ++++ pypolicyd-spf-1.3.2/policyd-spf 2015-12-10 13:43:29.323754410 +0100 +@@ -39,6 +39,8 @@ + import policydspfsupp + try: + import ipaddress ++ if bytes is str: ++ from ipaddress import Bytes + except ImportError: + import ipaddr as ipaddress + try: diff --git a/pypolicyd-spf.spec b/pypolicyd-spf.spec index b2480bf..efbcdc9 100644 --- a/pypolicyd-spf.spec +++ b/pypolicyd-spf.spec @@ -1,5 +1,6 @@ +%define majver %(echo %version | cut -d. -f1-2) Name: pypolicyd-spf -Version: 1.3.1 +Version: 1.3.2 Release: 1mamba Summary: A Postfix policy engine for Sender Policy Framework (SPF) checking Group: System/Libraries @@ -7,14 +8,15 @@ Vendor: openmamba Distribution: openmamba Packager: Silvan Calarco URL: https://launchpad.net/pypolicyd-spf/ -Source: https://launchpad.net/pypolicyd-spf/%{version}.3.1/+download/pypolicyd-spf-%{version}.tar.gz +Source: https://launchpad.net/pypolicyd-spf/%{majver}/%{version}/+download/pypolicyd-spf-%{version}.tar.gz +Patch0: pypolicy-spf-1.3.2-python2.patch License: GPL, Apache License 2.0 ## AUTOBUILDREQ-BEGIN BuildRequires: libpython-devel ## AUTOBUILDREQ-END Requires: python >= %python_version Requires: pyspf -Requires: python-ipaddr +Requires: python-ipaddress BuildRoot: %{_tmppath}/%{name}-%{version}-root %description @@ -23,6 +25,7 @@ It is implemented in pure Python and uses the python-spf (pyspf) module. Updated %prep %setup -q +%patch0 -p1 %build CFLAGS="%{optflags}" %{__python} setup.py build @@ -43,5 +46,9 @@ sed -i "\,\.egg-info/,d;s,.*/man/.*,&.gz," %{name}.filelist %doc COPYING %changelog +* Thu Dec 10 2015 Silvan Calarco 1.3.2-1mamba +- update to 1.3.2 +- patch for use with python-ipaddress with python2 + * Wed May 20 2015 Silvan Calarco 1.3.1-1mamba - package created using the webbuild interface