diff --git a/fix-4-file-5.40.patch b/fix-4-file-5.40.patch new file mode 100644 index 0000000..6b4c743 --- /dev/null +++ b/fix-4-file-5.40.patch @@ -0,0 +1,15 @@ +--- + test/test.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- test/test.py ++++ test/test.py 2021-04-16 12:54:00.275731435 +0000 +@@ -87,7 +87,7 @@ class MagicTest(unittest.TestCase): + try: + self.assert_values(m, { + 'magic._pyc_': 'python 2.4 byte-compiled', +- 'test.pdf': 'PDF document, version 1.2', ++ 'test.pdf': 'PDF document, version 1.2, 2 pages', + 'test.gz': + ('gzip compressed data, was "test", from Unix, last ' + 'modified: Sun Jun 29 01:32:52 2008', diff --git a/python-python-magic.changes b/python-python-magic.changes index fd721f8..c1efe1a 100644 --- a/python-python-magic.changes +++ b/python-python-magic.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Apr 16 13:00:57 UTC 2021 - Dr. Werner Fink + +- Add patch fix-4-file-5.40.patch to support file 5.40 (boo#1184881) + ------------------------------------------------------------------- Sat Jul 25 14:46:39 UTC 2020 - Sebastian Wagner diff --git a/python-python-magic.spec b/python-python-magic.spec index 6a0d4d8..b62c851 100644 --- a/python-python-magic.spec +++ b/python-python-magic.spec @@ -1,7 +1,7 @@ # # spec file for package python-python-magic # -# 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 @@ -29,6 +29,7 @@ Source: https://github.com/ahupp/python-magic/archive/%{version}.tar.gz #PATCH-FIX-OPENSUSE fix-test.patch -- adapt file outputs to opensuse Patch0: fix-test.patch Patch1: fix-test-tumbleweed.patch +Patch2: fix-4-file-5.40.patch BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: file @@ -58,6 +59,9 @@ supports both textual and MIME-type output. # Leap 15.2 and older %patch0 -p1 %endif +%if %{?pkg_vcmp:%{pkg_vcmp file >= 5.40}}%{!?pkg_vcmp:0} +%patch2 -p0 +%endif %build %python_build