Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package diffoscope for openSUSE:Factory checked in at 2022-03-12 17:15:21 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/diffoscope (Old) and /work/SRC/openSUSE:Factory/.diffoscope.new.25692 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "diffoscope" Sat Mar 12 17:15:21 2022 rev:30 rq:961132 version:207 Changes: -------- --- /work/SRC/openSUSE:Factory/diffoscope/diffoscope.changes 2022-02-21 17:48:58.723636507 +0100 +++ /work/SRC/openSUSE:Factory/.diffoscope.new.25692/diffoscope.changes 2022-03-12 17:16:00.818342848 +0100 @@ -1,0 +2,24 @@ +Fri Mar 4 18:59:10 UTC 2022 - Sebastian Wagner <sebix+novell....@sebix.at> + +- - update to version 207: + - Fix a gnarly regression when comparing directories against non-directories. + (Closes: reproducible-builds/diffoscope#292) + - Use our assert_diff utility where we can within test_directory.py +- update to version 206: + - Also allow "Unicode text, UTF-8 text" as well as "UTF-8 Unicode text" to + match for .buildinfo files too. + - Add a test for recent file(1) issue regarding .changes files. + (Re: reproducible-builds/diffoscope#291) + - Drop "_PATH" suffix from some module-level globals that are not paths. + +------------------------------------------------------------------- +Fri Feb 25 20:08:22 UTC 2022 - Sebastian Wagner <sebix+novell....@sebix.at> + +- - update to version 206: + - Also allow "Unicode text, UTF-8 text" as well as "UTF-8 Unicode text" to + match for .buildinfo files too. + - Add a test for recent file(1) issue regarding .changes files. + (Re: reproducible-builds/diffoscope#291) + - Drop "_PATH" suffix from some module-level globals that are not paths. + +------------------------------------------------------------------- Old: ---- diffoscope-205.tar.bz2 diffoscope-205.tar.bz2.asc New: ---- diffoscope-207.tar.bz2 diffoscope-207.tar.bz2.asc ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ diffoscope.spec ++++++ --- /var/tmp/diff_new_pack.HwqMQf/_old 2022-03-12 17:16:01.254343352 +0100 +++ /var/tmp/diff_new_pack.HwqMQf/_new 2022-03-12 17:16:01.262343361 +0100 @@ -17,7 +17,7 @@ Name: diffoscope -Version: 205 +Version: 207 Release: 0 Summary: In-depth comparison of files, archives, and directories License: GPL-3.0-or-later ++++++ diffoscope-205.tar.bz2 -> diffoscope-207.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/diffoscope-205/debian/changelog new/diffoscope-207/debian/changelog --- old/diffoscope-205/debian/changelog 2022-02-19 23:58:59.000000000 +0100 +++ new/diffoscope-207/debian/changelog 2022-03-04 13:55:28.000000000 +0100 @@ -1,3 +1,21 @@ +diffoscope (207) unstable; urgency=medium + + * Fix a gnarly regression when comparing directories against non-directories. + (Closes: reproducible-builds/diffoscope#292) + * Use our assert_diff utility where we can within test_directory.py + + -- Chris Lamb <la...@debian.org> Fri, 04 Mar 2022 12:55:26 +0000 + +diffoscope (206) unstable; urgency=medium + + * Also allow "Unicode text, UTF-8 text" as well as "UTF-8 Unicode text" to + match for .buildinfo files too. + * Add a test for recent file(1) issue regarding .changes files. + (Re: reproducible-builds/diffoscope#291) + * Drop "_PATH" suffix from some module-level globals that are not paths. + + -- Chris Lamb <la...@debian.org> Fri, 25 Feb 2022 08:03:04 +0000 + diffoscope (205) unstable; urgency=medium * Fix a file(1)-related regression where .changes files that contained diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/diffoscope-205/diffoscope/__init__.py new/diffoscope-207/diffoscope/__init__.py --- old/diffoscope-205/diffoscope/__init__.py 2022-02-19 23:58:59.000000000 +0100 +++ new/diffoscope-207/diffoscope/__init__.py 2022-03-04 13:55:28.000000000 +0100 @@ -17,4 +17,4 @@ # You should have received a copy of the GNU General Public License # along with diffoscope. If not, see <https://www.gnu.org/licenses/>. -VERSION = "205" +VERSION = "207" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/diffoscope-205/diffoscope/comparators/debian.py new/diffoscope-207/diffoscope/comparators/debian.py --- old/diffoscope-205/diffoscope/comparators/debian.py 2022-02-19 23:58:59.000000000 +0100 +++ new/diffoscope-207/diffoscope/comparators/debian.py 2022-03-04 13:55:28.000000000 +0100 @@ -336,7 +336,7 @@ CONTAINER_CLASSES = [DotBuildinfoContainer] FILE_EXTENSION_SUFFIX = {".buildinfo"} FILE_TYPE_RE = re.compile( - r"^(ASCII text|UTF-8 Unicode text|PGP signed message)" + r"^(ASCII text|UTF-8 Unicode text|Unicode text, UTF-8 text|PGP signed message)" ) @classmethod diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/diffoscope-205/diffoscope/comparators/utils/compare.py new/diffoscope-207/diffoscope/comparators/utils/compare.py --- old/diffoscope-205/diffoscope/comparators/utils/compare.py 2022-02-19 23:58:59.000000000 +0100 +++ new/diffoscope-207/diffoscope/comparators/utils/compare.py 2022-03-04 13:55:28.000000000 +0100 @@ -82,9 +82,11 @@ # DESCRIPTION attributes either, as the specialize() call above may not # have returned a specific instance. if difference is None and str(type(file1)) != str(type(file2)): - difference = Difference(file1.name, file2.name) - difference.add_comment( - "Types of files differ; human-readable metadata may match literal file contents." + return Difference.from_text( + "type: {}".format(file1.file_type), + "type: {}".format(file2.file_type), + file1.name, + file2.name, ) return difference @@ -136,6 +138,11 @@ ): return file1.compare_bytes(file2, source) with profile("compare_files (cumulative)", file1): + if file2.is_directory(): + difference = file2.compare(file1, source) + if difference is not None: + difference = difference.get_reverse() + return difference return file1.compare(file2, source) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/diffoscope-205/tests/comparators/test_debian.py new/diffoscope-207/tests/comparators/test_debian.py --- old/diffoscope-205/tests/comparators/test_debian.py 2022-02-19 23:58:59.000000000 +0100 +++ new/diffoscope-207/tests/comparators/test_debian.py 2022-03-04 13:55:28.000000000 +0100 @@ -26,7 +26,7 @@ from diffoscope.comparators.missing_file import MissingFile from diffoscope.comparators.utils.specialize import specialize -from ..utils.data import data, get_data +from ..utils.data import data, get_data, load_fixture from ..utils.tools import skip_unless_module_exists from ..utils.nonexisting import assert_non_existing @@ -44,24 +44,26 @@ DotBuildinfoFile, ) -TEST_DOT_CHANGES_FILE1_PATH = data("test1.changes") -TEST_DOT_CHANGES_FILE2_PATH = data("test2.changes") -TEST_DOT_CHANGES_FILE3_PATH = data("test3.changes") -TEST_DOT_CHANGES_FILE4_PATH = data("test4.changes") -TEST_DOT_BUILDINFO_FILE1_PATH = data("test1.buildinfo") -TEST_DOT_BUILDINFO_FILE2_PATH = data("test2.buildinfo") -TEST_DEB_FILE1_PATH = data("test1.deb") -TEST_DEB_FILE2_PATH = data("test2.deb") +TEST_DOT_CHANGES_FILE1 = data("test1.changes") +TEST_DOT_CHANGES_FILE2 = data("test2.changes") +TEST_DOT_CHANGES_FILE3 = data("test3.changes") +TEST_DOT_CHANGES_FILE4 = data("test4.changes") +TEST_DOT_BUILDINFO_FILE1 = data("test1.buildinfo") +TEST_DOT_BUILDINFO_FILE2 = data("test2.buildinfo") +TEST_DEB_FILE1 = data("test1.deb") +TEST_DEB_FILE2 = data("test2.deb") + +changes5 = load_fixture("test5.changes") @pytest.fixture def dot_changes1(tmpdir): tmpdir.mkdir("a") dot_changes_path = str(tmpdir.join("a/test_1.changes")) - shutil.copy(TEST_DOT_CHANGES_FILE1_PATH, dot_changes_path) - shutil.copy(TEST_DEB_FILE1_PATH, str(tmpdir.join("a/test_1_all.deb"))) + shutil.copy(TEST_DOT_CHANGES_FILE1, dot_changes_path) + shutil.copy(TEST_DEB_FILE1, str(tmpdir.join("a/test_1_all.deb"))) shutil.copy( - TEST_DOT_BUILDINFO_FILE1_PATH, str(tmpdir.join("a/test_1.buildinfo")) + TEST_DOT_BUILDINFO_FILE1, str(tmpdir.join("a/test_1.buildinfo")) ) return specialize(FilesystemFile(dot_changes_path)) @@ -70,10 +72,10 @@ def dot_changes2(tmpdir): tmpdir.mkdir("b") dot_changes_path = str(tmpdir.join("b/test_1.changes")) - shutil.copy(TEST_DOT_CHANGES_FILE2_PATH, dot_changes_path) - shutil.copy(TEST_DEB_FILE2_PATH, str(tmpdir.join("b/test_1_all.deb"))) + shutil.copy(TEST_DOT_CHANGES_FILE2, dot_changes_path) + shutil.copy(TEST_DEB_FILE2, str(tmpdir.join("b/test_1_all.deb"))) shutil.copy( - TEST_DOT_BUILDINFO_FILE2_PATH, str(tmpdir.join("b/test_2.buildinfo")) + TEST_DOT_BUILDINFO_FILE2, str(tmpdir.join("b/test_2.buildinfo")) ) return specialize(FilesystemFile(dot_changes_path)) @@ -82,10 +84,10 @@ def dot_changes3(tmpdir): tmpdir.mkdir("c") dot_changes_path = str(tmpdir.join("c/test_3.changes")) - shutil.copy(TEST_DOT_CHANGES_FILE3_PATH, dot_changes_path) - shutil.copy(TEST_DEB_FILE1_PATH, str(tmpdir.join("c/test_1_all.deb"))) + shutil.copy(TEST_DOT_CHANGES_FILE3, dot_changes_path) + shutil.copy(TEST_DEB_FILE1, str(tmpdir.join("c/test_1_all.deb"))) shutil.copy( - TEST_DOT_BUILDINFO_FILE2_PATH, str(tmpdir.join("c/test_2.buildinfo")) + TEST_DOT_BUILDINFO_FILE2, str(tmpdir.join("c/test_2.buildinfo")) ) return specialize(FilesystemFile(dot_changes_path)) @@ -94,10 +96,10 @@ def dot_changes4(tmpdir): tmpdir.mkdir("d") dot_changes_path = str(tmpdir.join("d/test_4.changes")) - shutil.copy(TEST_DOT_CHANGES_FILE4_PATH, dot_changes_path) - shutil.copy(TEST_DEB_FILE2_PATH, str(tmpdir.join("d/test_1_all.deb"))) + shutil.copy(TEST_DOT_CHANGES_FILE4, dot_changes_path) + shutil.copy(TEST_DEB_FILE2, str(tmpdir.join("d/test_1_all.deb"))) shutil.copy( - TEST_DOT_BUILDINFO_FILE1_PATH, str(tmpdir.join("d/test_2.buildinfo")) + TEST_DOT_BUILDINFO_FILE1, str(tmpdir.join("d/test_2.buildinfo")) ) return specialize(FilesystemFile(dot_changes_path)) @@ -110,7 +112,7 @@ def test_dot_changes_invalid(tmpdir): tmpdir.mkdir("a") dot_changes_path = str(tmpdir.join("a/test_1.changes")) - shutil.copy(TEST_DOT_CHANGES_FILE1_PATH, dot_changes_path) + shutil.copy(TEST_DOT_CHANGES_FILE1, dot_changes_path) # we don't copy the referenced .deb identified = specialize(FilesystemFile(dot_changes_path)) # ... but it is identified regardless @@ -201,18 +203,18 @@ ) -TEST_DOT_DSC_FILE1_PATH = data("test1.dsc") -TEST_DOT_DSC_FILE2_PATH = data("test2.dsc") -TEST_DEB_SRC1_PATH = data("test1.debsrc.tar.gz") -TEST_DEB_SRC2_PATH = data("test2.debsrc.tar.gz") +TEST_DOT_DSC_FILE1 = data("test1.dsc") +TEST_DOT_DSC_FILE2 = data("test2.dsc") +TEST_DEB_SRC1 = data("test1.debsrc.tar.gz") +TEST_DEB_SRC2 = data("test2.debsrc.tar.gz") @pytest.fixture def dot_dsc1(tmpdir): tmpdir.mkdir("a") dot_dsc_path = str(tmpdir.join("a/test_1.dsc")) - shutil.copy(TEST_DOT_DSC_FILE1_PATH, dot_dsc_path) - shutil.copy(TEST_DEB_SRC1_PATH, str(tmpdir.join("a/test_1.tar.gz"))) + shutil.copy(TEST_DOT_DSC_FILE1, dot_dsc_path) + shutil.copy(TEST_DEB_SRC1, str(tmpdir.join("a/test_1.tar.gz"))) return specialize(FilesystemFile(dot_dsc_path)) @@ -220,8 +222,8 @@ def dot_dsc2(tmpdir): tmpdir.mkdir("b") dot_dsc_path = str(tmpdir.join("b/test_1.dsc")) - shutil.copy(TEST_DOT_DSC_FILE2_PATH, dot_dsc_path) - shutil.copy(TEST_DEB_SRC2_PATH, str(tmpdir.join("b/test_1.tar.gz"))) + shutil.copy(TEST_DOT_DSC_FILE2, dot_dsc_path) + shutil.copy(TEST_DEB_SRC2, str(tmpdir.join("b/test_1.tar.gz"))) return specialize(FilesystemFile(dot_dsc_path)) @@ -233,7 +235,7 @@ def test_dot_dsc_no_associated_tar_gz(tmpdir, dot_dsc2): tmpdir.mkdir("a") dot_dsc_path = str(tmpdir.join("a/test_1.dsc")) - shutil.copy(TEST_DOT_CHANGES_FILE1_PATH, dot_dsc_path) + shutil.copy(TEST_DOT_CHANGES_FILE1, dot_dsc_path) # we don't copy the referenced .tar.gz identified = specialize(FilesystemFile(dot_dsc_path)) assert isinstance(identified, DotDscFile) @@ -267,9 +269,9 @@ def dot_buildinfo1(tmpdir): tmpdir.mkdir("a") dot_buildinfo_path = str(tmpdir.join("a/test_1.buildinfo")) - shutil.copy(TEST_DOT_BUILDINFO_FILE1_PATH, dot_buildinfo_path) - shutil.copy(TEST_DOT_DSC_FILE1_PATH, str(tmpdir.join("a/test_1.dsc"))) - shutil.copy(TEST_DEB_FILE1_PATH, str(tmpdir.join("a/test_1_all.deb"))) + shutil.copy(TEST_DOT_BUILDINFO_FILE1, dot_buildinfo_path) + shutil.copy(TEST_DOT_DSC_FILE1, str(tmpdir.join("a/test_1.dsc"))) + shutil.copy(TEST_DEB_FILE1, str(tmpdir.join("a/test_1_all.deb"))) return specialize(FilesystemFile(dot_buildinfo_path)) @@ -277,9 +279,9 @@ def dot_buildinfo2(tmpdir): tmpdir.mkdir("b") dot_buildinfo_path = str(tmpdir.join("b/test_1.buildinfo")) - shutil.copy(TEST_DOT_BUILDINFO_FILE2_PATH, dot_buildinfo_path) - shutil.copy(TEST_DOT_DSC_FILE2_PATH, str(tmpdir.join("b/test_1.dsc"))) - shutil.copy(TEST_DEB_FILE2_PATH, str(tmpdir.join("b/test_1_all.deb"))) + shutil.copy(TEST_DOT_BUILDINFO_FILE2, dot_buildinfo_path) + shutil.copy(TEST_DOT_DSC_FILE2, str(tmpdir.join("b/test_1.dsc"))) + shutil.copy(TEST_DEB_FILE2, str(tmpdir.join("b/test_1_all.deb"))) return specialize(FilesystemFile(dot_buildinfo_path)) @@ -291,7 +293,7 @@ def test_dot_buildinfo_no_deb(tmpdir): tmpdir.mkdir("a") dot_buildinfo_path = str(tmpdir.join("a/test_1.buildinfo")) - shutil.copy(TEST_DOT_BUILDINFO_FILE1_PATH, dot_buildinfo_path) + shutil.copy(TEST_DOT_BUILDINFO_FILE1, dot_buildinfo_path) # we don't copy the referenced .deb identified = specialize(FilesystemFile(dot_buildinfo_path)) assert isinstance(identified, DotBuildinfoFile) @@ -351,3 +353,13 @@ assert file1.compare(file1) is None assert file2.compare(file2) is None assert file1.compare(file2).unified_diff == get_data(expected_diff) + + +def test_unicode_identification(changes5): + # .changes can be identified by file(1) as: + # + # * "ASCII text" + # * "UTF-8 Unicode text" (older versions of file) + # * "Unicode text, UTF-8 text" + # * "data" (files with broken Unicode: reproducible-builds/diffoscope#286) + assert isinstance(changes5, DotChangesFile) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/diffoscope-205/tests/comparators/test_directory.py new/diffoscope-207/tests/comparators/test_directory.py --- old/diffoscope-205/tests/comparators/test_directory.py 2022-02-19 23:58:59.000000000 +0100 +++ new/diffoscope-207/tests/comparators/test_directory.py 2022-03-04 13:55:28.000000000 +0100 @@ -23,9 +23,10 @@ from diffoscope.comparators.binary import FilesystemFile from diffoscope.comparators.directory import compare_directories +from diffoscope.comparators.utils.compare import compare_root_paths from diffoscope.comparators.utils.specialize import specialize -from ..utils.data import data, get_data +from ..utils.data import data, get_data, assert_diff TEST_FILE1_PATH = data("text_ascii1") @@ -83,14 +84,14 @@ a = specialize(FilesystemFile(str(tmpdir.mkdir("dir")))) b = specialize(FilesystemFile(path)) - assert a.compare(b).unified_diff == get_data("test_directory_file_diff") + assert_diff(a.compare(b), "test_directory_file_diff") def test_compare_to_device(tmpdir): a = specialize(FilesystemFile(str(tmpdir.mkdir("dir")))) b = specialize(FilesystemFile("/dev/null")) - assert a.compare(b).unified_diff == get_data("test_directory_device_diff") + assert_diff(a.compare(b), "test_directory_device_diff") def test_compare_to_symlink(tmpdir): @@ -100,7 +101,7 @@ a = specialize(FilesystemFile(str(tmpdir.mkdir("dir")))) b = specialize(FilesystemFile(path)) - assert a.compare(b).unified_diff == get_data("test_directory_symlink_diff") + assert_diff(a.compare(b), "test_directory_symlink_diff") def test_compare_to_dangling_symlink(tmpdir): @@ -110,17 +111,17 @@ a = specialize(FilesystemFile(str(tmpdir.mkdir("dir")))) b = specialize(FilesystemFile(path)) - assert a.compare(b).unified_diff == get_data("test_directory_symlink_diff") + assert_diff(a.compare(b), "test_directory_symlink_diff") -@pytest.mark.xfail(strict=False) def test_compare_both_ways(tmpdir): """ Comparing a directory with a file shouldn't crash, but nor should as comparing a file with a directory either. (Re: #292) """ - a = specialize(FilesystemFile(str(tmpdir))) - b = specialize(FilesystemFile(TEST_FILE1_PATH)) - a.compare(b) - b.compare(a) + a = str(tmpdir) + b = TEST_FILE1_PATH + + assert_diff(compare_root_paths(a, b), "test_directory_a_b_diff") + assert_diff(compare_root_paths(b, a), "test_directory_b_a_diff") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/diffoscope-205/tests/data/test5.changes new/diffoscope-207/tests/data/test5.changes --- old/diffoscope-205/tests/data/test5.changes 1970-01-01 01:00:00.000000000 +0100 +++ new/diffoscope-207/tests/data/test5.changes 2022-03-04 13:55:28.000000000 +0100 @@ -0,0 +1,26 @@ +Format: 1.8 +Date: Sat, 04 Apr 2015 18:30:48 +0200 +Source: test +Binary: test +Architecture: source all +Version: 1 +Distribution: unstable +Urgency: low +Maintainer: Someone Else ???? ???? ???? <u...@example.org> +Changed-By: Someone Else ???? ???? ???? <u...@example.org> +Description: + test - just a simple test package +Changes: + test (1) unstable; urgency=low + . + * Test package. + * Unicode test: ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ????. +Checksums-Sha1: + 70982664db2015334bff6441b429d7e3c58dbecb 2388 test_1_all.deb + 91d2cc6aadddb4a24b0c2f8f24d558ce0e07f9cd 3765 test_2.buildinfo +Checksums-Sha256: + 2f2e45ee3a5fdacd9b30133ec728121588bf9b97af3b947b3882b2b28a0555da 2388 test_1_all.deb + 917d8b5c3ade2bde26fe2b7476481537f32a0c07f10e5e44c0ca7a02c8bfa9d8 3765 test_2.buildinfo +Files: + d323c454462407fe3bfde31a74b23eba 2388 devel optional test_1_all.deb + 9972d7c394228311ba92cbcbfe2d6cd9 3765 web optional test_2.buildinfo diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/diffoscope-205/tests/data/test_directory_a_b_diff new/diffoscope-207/tests/data/test_directory_a_b_diff --- old/diffoscope-205/tests/data/test_directory_a_b_diff 1970-01-01 01:00:00.000000000 +0100 +++ new/diffoscope-207/tests/data/test_directory_a_b_diff 2022-03-04 13:55:28.000000000 +0100 @@ -0,0 +1,3 @@ +@@ -1 +1 @@ +-type: directory ++type: file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/diffoscope-205/tests/data/test_directory_b_a_diff new/diffoscope-207/tests/data/test_directory_b_a_diff --- old/diffoscope-205/tests/data/test_directory_b_a_diff 1970-01-01 01:00:00.000000000 +0100 +++ new/diffoscope-207/tests/data/test_directory_b_a_diff 2022-03-04 13:55:28.000000000 +0100 @@ -0,0 +1,3 @@ +@@ -1 +1 @@ ++type: directory +-type: file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/diffoscope-205/tests/test_source.py new/diffoscope-207/tests/test_source.py --- old/diffoscope-205/tests/test_source.py 2022-02-19 23:58:59.000000000 +0100 +++ new/diffoscope-207/tests/test_source.py 2022-03-04 13:55:28.000000000 +0100 @@ -218,6 +218,7 @@ "test4.changes", "test4.gif", "test4.pdf", + "test5.changes", "test_comment1.zip", "test_comment2.zip", "test_invalid.json",