diff --git a/ciscoconfparse-1.5.24.tar.gz b/ciscoconfparse-1.5.24.tar.gz new file mode 100644 index 0000000..94591c8 --- /dev/null +++ b/ciscoconfparse-1.5.24.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:55ece212945a67c257bfa77e14f128c8d57e289695559caf809a35dd40c56176 +size 138368 diff --git a/ciscoconfparse-1.5.6.tar.gz b/ciscoconfparse-1.5.6.tar.gz deleted file mode 100644 index fc64b22..0000000 --- a/ciscoconfparse-1.5.6.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:252c576b1589a90688a08cdd8083061ef3d2d1399d9c60a35a42836bb22cf86b -size 135769 diff --git a/python-ciscoconfparse.changes b/python-ciscoconfparse.changes index 99e37c7..70972c8 100644 --- a/python-ciscoconfparse.changes +++ b/python-ciscoconfparse.changes @@ -1,3 +1,31 @@ +------------------------------------------------------------------- +Fri Jan 22 15:01:09 UTC 2021 - Benjamin Greiner + +- Update to 1.5.24 + * Fix Github Issue #178 +- Changes for 1.5.23 + * Prevent find_object_branches() from using None +- Changes for 1.5.22 + * Fix Github issue #186 (replace variables named input) +- Changes for 1.5.21 + * Fix Github issue #187 +- Changes for 1.5.20 + * Fix Github issue #185 +- Changes for 1.5.19 + * Add __ne__() support to IPv4Obj and IPv6Obj +- Changes for 1.5.18 + * Fix Github issue #180 - IPv4Obj() and IPv6Obj() cannot + use logical compare ops with certain Python objects +- Changes for 1.5.17 + * Fix Python 2.7 packaging +- Changes for 1.5.7 + * Revise IPv4Obj & IPv6Obj __lt__(), __gt__(), and + __contains__() methods (impacts sorting behavior); + reformatted documentation to latest numpydoc format. + Add version number as json data instead of raw text... +- Add remove-mock.patch -- gh#mpenning/ciscoconfparse#194 +- Add test-lists.patch -- gh#mpenning/ciscoconfparse#195 + ------------------------------------------------------------------- Sun Jun 28 09:41:20 UTC 2020 - Martin Hauke diff --git a/python-ciscoconfparse.spec b/python-ciscoconfparse.spec index c0d4938..4cd1020 100644 --- a/python-ciscoconfparse.spec +++ b/python-ciscoconfparse.spec @@ -1,7 +1,7 @@ # # spec file for package python-ciscoconfparse # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -19,29 +19,33 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} %bcond_without python2 Name: python-ciscoconfparse -Version: 1.5.6 +Version: 1.5.24 Release: 0 Summary: Library for parsing, querying and modifying Cisco IOS-style configurations License: GPL-3.0-or-later URL: https://github.com/mpenning/ciscoconfparse Source: https://files.pythonhosted.org/packages/source/c/ciscoconfparse/ciscoconfparse-%{version}.tar.gz +# PATCH-FIX-UPSTREAM remove-mock.patch -- gh#mpenning/ciscoconfparse#194 +Patch0: remove-mock.patch +# PATCH-FIX-UPSTREAM test-lists.patch -- gh#mpenning/ciscoconfparse#195 +Patch1: test-lists.patch BuildRequires: %{python_module colorama} BuildRequires: %{python_module dnspython} -BuildRequires: %{python_module ipaddr} -BuildRequires: %{python_module mock} BuildRequires: %{python_module passlib} BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros -Requires: python-colorama -Requires: python-dnspython -Requires: python-ipaddr -BuildArch: noarch %if %{with python2} -BuildRequires: python2-ipaddress +BuildRequires: python2-ipaddr >= 2.1.11 BuildRequires: python2-mock %endif +Requires: python-colorama +Requires: python-dnspython +%ifpython2 +Requires: python-ipaddr >= 2.1.11 +%endif +BuildArch: noarch %python_subpackages %description @@ -58,7 +62,7 @@ parent / child relationships. You can perform complex queries about these relationships. %prep -%setup -q -n ciscoconfparse-%{version} +%autosetup -p1 -n ciscoconfparse-%{version} %build %python_build @@ -68,7 +72,8 @@ relationships. %python_expand %fdupes %{buildroot}%{$python_sitelib} %check -%pytest +# no online dns (and /etc/resolv.conf) available +%pytest -k "not (test_dns_lookup or test_reverse_dns_lookup)" %files %{python_files} %license LICENSE diff --git a/remove-mock.patch b/remove-mock.patch new file mode 100644 index 0000000..a53cdf6 --- /dev/null +++ b/remove-mock.patch @@ -0,0 +1,16 @@ +Index: ciscoconfparse-1.5.24/tests/test_CiscoConfParse.py +=================================================================== +--- ciscoconfparse-1.5.24.orig/tests/test_CiscoConfParse.py ++++ ciscoconfparse-1.5.24/tests/test_CiscoConfParse.py +@@ -1,7 +1,10 @@ + from operator import attrgetter + from itertools import repeat + from copy import deepcopy +-from mock import patch ++try: ++ from unittest.mock import patch ++except ImportError: ++ from mock import patch + import platform + import sys + import re diff --git a/test-lists.patch b/test-lists.patch new file mode 100644 index 0000000..67df6b1 --- /dev/null +++ b/test-lists.patch @@ -0,0 +1,29 @@ +Index: ciscoconfparse-1.5.24/tests/test_Ccp_Util.py +=================================================================== +--- ciscoconfparse-1.5.24.orig/tests/test_Ccp_Util.py ++++ ciscoconfparse-1.5.24/tests/test_Ccp_Util.py +@@ -99,13 +99,13 @@ def testL4Object_asa_eq02(): + def testL4Object_asa_range01(): + pp = L4Object(protocol="tcp", port_spec="range smtp 32", syntax="asa") + assert pp.protocol == "tcp" +- assert pp.port_list == range(25, 33) ++ assert pp.port_list == list(range(25, 33)) + + + def testL4Object_asa_lt01(): + pp = L4Object(protocol="tcp", port_spec="lt echo", syntax="asa") + assert pp.protocol == "tcp" +- assert pp.port_list == range(1, 7) ++ assert pp.port_list == list(range(1, 7)) + + + @pytest.mark.xfail( +@@ -115,7 +115,7 @@ def testL4Object_asa_lt01(): + def testL4Object_asa_lt02(): + pp = L4Object(protocol="tcp", port_spec="lt 7", syntax="asa") + assert pp.protocol == "tcp" +- assert pp.port_list == range(1, 7) ++ assert pp.port_list == list(range(1, 7)) + + + def testIPv4Obj_contain():