From acfd2a239b616e376df1674c87a7fddd8f3e71d5e7168335919897befe47b927 Mon Sep 17 00:00:00 2001 From: Sebastian Wagner Date: Sat, 5 Aug 2023 08:02:12 +0000 Subject: [PATCH] - Add fix-file-5.45.patch to fix compatibility with file version 5.45 https://salsa.debian.org/reproducible-builds/diffoscope/-/issues/346 - update to version 242: - If the binwalk Python module is not available, ensure the user knows they may be missing more differences in, for example, concatenated .cpio archives. - Factor out routine to generate a human-readable comments when Python modules are missing. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/diffoscope?expand=0&rev=88 --- diffoscope-241.tar.bz2 | 3 -- diffoscope-241.tar.bz2.asc | 16 ------ diffoscope-242.tar.bz2 | 3 ++ diffoscope-242.tar.bz2.asc | 16 ++++++ diffoscope.changes | 12 +++++ diffoscope.spec | 5 +- fix-file-5.45.patch | 103 +++++++++++++++++++++++++++++++++++++ 7 files changed, 138 insertions(+), 20 deletions(-) delete mode 100644 diffoscope-241.tar.bz2 delete mode 100644 diffoscope-241.tar.bz2.asc create mode 100644 diffoscope-242.tar.bz2 create mode 100644 diffoscope-242.tar.bz2.asc create mode 100644 fix-file-5.45.patch diff --git a/diffoscope-241.tar.bz2 b/diffoscope-241.tar.bz2 deleted file mode 100644 index 80a7588..0000000 --- a/diffoscope-241.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:509455caed32cf432884c4bcc31363752ff81041acdc72916f587ee9f1694c09 -size 3087560 diff --git a/diffoscope-241.tar.bz2.asc b/diffoscope-241.tar.bz2.asc deleted file mode 100644 index 5aa602d..0000000 --- a/diffoscope-241.tar.bz2.asc +++ /dev/null @@ -1,16 +0,0 @@ ------BEGIN PGP SIGNATURE----- - -iQIzBAABCAAdFiEEwv5L0nHBObhsUz5GHpU+J9QxHlgFAmRCSOoACgkQHpU+J9Qx -HlhW+A/7BoMQTjOCRc8J+MeSnFHEki/RhJPWnI36vdDukrokJQmUrAPOtpRZy/QD -dvKIRqxqdi6U7fX3wFfygsKQQt6xHeqpOZ5xPPISF+FkXYDBE4a9dBELMedITYQJ -bWi0+cuFalSTXSpF63xW013FN364h4G45w8n+ibtuxsHAGunxCiLii2JRYJuJN+y -qfhGJ7icaDXnfktgBoGD6IYRbbPwU/6F034ovfVzcbpHnXtq4nFExYWYj+3fDMgo -eW7a74R+3wfBkPO0OY/Vjq0igeXH/44+TV9XmeO4oGq3u99skKEXnrJvxH+ANNd5 -Dco+Of65om4oNFmJl28W7lSlc9OLKUNgQS29la1fe6uKEtGtx6QoM3T3Hz9J3YZD -C7PXRvpMIRoAwa+BYKaQ1ehi18arsXQAodUpkV4ZjgisY6mH94QMnUX+eok1pZ6W -toPl3f1QdQiyqLEmWKp9a/ledjHYFxBHdGZbZTnvK6PwX6Tnj3Z+nlgJdENv5Tyq -dKHVukUcsWH0+ge0ULj9Dn7zhWy/chliYgHt4jlrhLtMzmpY3iS/ZRa5WIvmVje+ -wM5Wzs7CoZbimPXMqD2ybe00f9emDWnyihXRYMc85A/MN+npa4vdMErw4i/W4wbQ -kYpiGvoiCV3yd1Iz/nw2cTRT11uJy3y7lnlO8YP/gvAbLtzCSns= -=IFbu ------END PGP SIGNATURE----- diff --git a/diffoscope-242.tar.bz2 b/diffoscope-242.tar.bz2 new file mode 100644 index 0000000..7778759 --- /dev/null +++ b/diffoscope-242.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:12640cffdc027912aabdf17f18e744b4401970bc150e7bf0bcebdc578654c1e1 +size 3088079 diff --git a/diffoscope-242.tar.bz2.asc b/diffoscope-242.tar.bz2.asc new file mode 100644 index 0000000..058f482 --- /dev/null +++ b/diffoscope-242.tar.bz2.asc @@ -0,0 +1,16 @@ +-----BEGIN PGP SIGNATURE----- + +iQIzBAABCAAdFiEEwv5L0nHBObhsUz5GHpU+J9QxHlgFAmRVU5kACgkQHpU+J9Qx +HlhWYg//bw180WwB+ZiwmCXfF4L4WZUJo6YlAHdeA2G+dvZ1j32etJ1d7Bq5D5a9 +TJXijycPbkzz3YPzdp9paVLSbIH3fXWPteqTJym3HDCoWrj5tqWxdu3lbfLlPekE +lCXDJorHwrJoKIxXEkgTm4of4fC0iJg5nhrEmx/djgCeIs2dxOuL9oDO5Me0CHc1 +hjg1YA5ifzCvPXBlspTWImC6MZxg0wWwa5yMTDkabqnyk15tTlvTihqAvBYds0TJ +t8OfOAVNCrWoKtXS4k4SJyuRdgijFlwgUjVn0+FSJGgSQ3q+Fyb0Xp5bQJsypmAL +6M+MPVCcjQ+rVsq5osFkp5o0uRfYtMHucu2YHfdmbI53QI9tfUYNUSEm6z+p/Exb +Eg20z2+YzxmKmF27a/OY7VVWrplFYaVCExziDzsWEbqvv1rA2X5UOZY4gBi9sZhr +LFKBTmPzbswE0x31TAo4njFuu77gipJYia+QOFXEvlvoiyhkUB7ssISZyzxWrEGj +sWCwN+6UZZAdY6yDS9+NdSJDvocbiFkb6zgor1UuSxJM2jjbWVJ/okIeYFrH8MEb +8N/Go1znWmALZS/ZNVpnnz6SMsrHYa8cVPixfm/XMeDzukwS2GoCOXyVQ08d+rdf +wAkOrfrRu8VTMrggZb7A1YI7D3W4gvF+HndbapaFB/vQvBZ7Nck= +=Bb8v +-----END PGP SIGNATURE----- diff --git a/diffoscope.changes b/diffoscope.changes index 182bd50..135392e 100644 --- a/diffoscope.changes +++ b/diffoscope.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Sat Aug 5 07:58:48 UTC 2023 - Sebastian Wagner + +- Add fix-file-5.45.patch to fix compatibility with file version 5.45 + https://salsa.debian.org/reproducible-builds/diffoscope/-/issues/346 +- update to version 242: + - If the binwalk Python module is not available, ensure the user knows they + may be missing more differences in, for example, concatenated .cpio + archives. + - Factor out routine to generate a human-readable comments when + Python modules are missing. + ------------------------------------------------------------------- Wed May 3 19:25:34 UTC 2023 - Dirk Müller diff --git a/diffoscope.spec b/diffoscope.spec index a5084a3..3d61daf 100644 --- a/diffoscope.spec +++ b/diffoscope.spec @@ -17,7 +17,7 @@ Name: diffoscope -Version: 241 +Version: 242 Release: 0 Summary: In-depth comparison of files, archives, and directories License: GPL-3.0-or-later @@ -26,6 +26,8 @@ URL: https://diffoscope.org/ Source0: https://diffoscope.org/archive/diffoscope-%{version}.tar.bz2 Source1: https://diffoscope.org/archive/diffoscope-%{version}.tar.bz2.asc Source2: diffoscope.keyring +# PATCH-FIX-UPSTREAM fix-file-5.45.patch -- fix compatibility with file version 5.45, see https://salsa.debian.org/reproducible-builds/diffoscope/-/issues/346 +Patch0: https://salsa.debian.org/reproducible-builds/diffoscope/-/commit/435a8fe9a201a7e74e705e06cc56b66fa6cb4af9.patch#/fix-file-5.45.patch BuildRequires: fdupes BuildRequires: python-rpm-macros BuildRequires: python3-base >= 3.7 @@ -111,6 +113,7 @@ debbindiff. %prep %setup -q +%patch0 -p1 sed -i '0,/#!\/usr\/bin\/env/ d' diffoscope/main.py %build diff --git a/fix-file-5.45.patch b/fix-file-5.45.patch new file mode 100644 index 0000000..12cc6b9 --- /dev/null +++ b/fix-file-5.45.patch @@ -0,0 +1,103 @@ +From 435a8fe9a201a7e74e705e06cc56b66fa6cb4af9 Mon Sep 17 00:00:00 2001 +From: Chris Lamb +Date: Tue, 1 Aug 2023 11:11:13 +0100 +Subject: [PATCH] Fix compataibility with file 5.45. (Closes: + reproducible-builds/diffoscope#346) + +--- + tests/comparators/test_cpio.py | 19 ++++++++++++------- + tests/comparators/test_uimage.py | 20 +++++++++++++------- + 2 files changed, 25 insertions(+), 14 deletions(-) + +diff --git a/tests/comparators/test_cpio.py b/tests/comparators/test_cpio.py +index fce0b9b3..022aede7 100644 +--- a/tests/comparators/test_cpio.py ++++ b/tests/comparators/test_cpio.py +@@ -22,7 +22,10 @@ import pytest + from diffoscope.comparators.cpio import CpioFile + + from ..utils.data import load_fixture, get_data +-from ..utils.tools import skip_unless_tools_exist ++from ..utils.tools import ( ++ skip_unless_tools_exist, ++ skip_unless_file_version_is_at_least, ++) + from ..utils.nonexisting import assert_non_existing + + cpio1 = load_fixture("test1.cpio") +@@ -51,19 +54,21 @@ def test_listing(differences): + + + @skip_unless_tools_exist("cpio") ++@skip_unless_file_version_is_at_least("5.45") + def test_symlink(differences): +- assert differences[1].source1 == "dir/link" +- assert differences[1].comment == "symlink" ++ assert differences[2].source1 == "dir/link" ++ assert differences[2].comment == "symlink" + expected_diff = get_data("symlink_expected_diff") +- assert differences[1].unified_diff == expected_diff ++ assert differences[2].unified_diff == expected_diff + + + @skip_unless_tools_exist("cpio") ++@skip_unless_file_version_is_at_least("5.45") + def test_compressed_files(differences): +- assert differences[2].source1 == "dir/text" +- assert differences[2].source2 == "dir/text" ++ assert differences[3].source1 == "dir/text" ++ assert differences[3].source2 == "dir/text" + expected_diff = get_data("text_ascii_expected_diff") +- assert differences[2].unified_diff == expected_diff ++ assert differences[3].unified_diff == expected_diff + + + @skip_unless_tools_exist("cpio") +diff --git a/tests/comparators/test_uimage.py b/tests/comparators/test_uimage.py +index 9ffcdc6f..2a8574ff 100644 +--- a/tests/comparators/test_uimage.py ++++ b/tests/comparators/test_uimage.py +@@ -24,7 +24,11 @@ from diffoscope.comparators.uimage import UimageFile + from diffoscope.comparators.utils.specialize import specialize + + from ..utils.data import load_fixture, get_data, assert_diff +-from ..utils.tools import skip_unless_tools_exist, file_version_is_lt ++from ..utils.tools import ( ++ skip_unless_tools_exist, ++ file_version_is_lt, ++ skip_unless_file_version_is_at_least, ++) + from ..utils.nonexisting import assert_non_existing + + cpio1 = load_fixture("test1.cpio") +@@ -113,19 +117,21 @@ def test_nested_listing(nested_differences): + + + @skip_unless_tools_exist("cpio") ++@skip_unless_file_version_is_at_least("5.45") + def test_nested_symlink(nested_differences): +- assert nested_differences[1].source1 == "dir/link" +- assert nested_differences[1].comment == "symlink" ++ assert nested_differences[2].source1 == "dir/link" ++ assert nested_differences[2].comment == "symlink" + expected_diff = get_data("symlink_expected_diff") +- assert nested_differences[1].unified_diff == expected_diff ++ assert nested_differences[2].unified_diff == expected_diff + + + @skip_unless_tools_exist("cpio") ++@skip_unless_file_version_is_at_least("5.45") + def test_nested_compressed_files(nested_differences): +- assert nested_differences[2].source1 == "dir/text" +- assert nested_differences[2].source2 == "dir/text" ++ assert nested_differences[3].source1 == "dir/text" ++ assert nested_differences[3].source2 == "dir/text" + expected_diff = get_data("text_ascii_expected_diff") +- assert nested_differences[2].unified_diff == expected_diff ++ assert nested_differences[3].unified_diff == expected_diff + + + @skip_unless_tools_exist("cpio") +-- +GitLab +