Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package diffoscope for openSUSE:Factory 
checked in at 2023-08-06 16:29:33
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/diffoscope (Old)
 and      /work/SRC/openSUSE:Factory/.diffoscope.new.22712 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "diffoscope"

Sun Aug  6 16:29:33 2023 rev:42 rq:1102459 version:242

Changes:
--------
--- /work/SRC/openSUSE:Factory/diffoscope/diffoscope.changes    2023-05-04 
17:11:09.060567472 +0200
+++ /work/SRC/openSUSE:Factory/.diffoscope.new.22712/diffoscope.changes 
2023-08-06 16:29:47.387784481 +0200
@@ -1,0 +2,12 @@
+Sat Aug  5 07:58:48 UTC 2023 - Sebastian Wagner <se...@sebix.at>
+
+- 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.
+
+-------------------------------------------------------------------

Old:
----
  diffoscope-241.tar.bz2
  diffoscope-241.tar.bz2.asc

New:
----
  diffoscope-242.tar.bz2
  diffoscope-242.tar.bz2.asc
  fix-file-5.45.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ diffoscope.spec ++++++
--- /var/tmp/diff_new_pack.LeiGw0/_old  2023-08-06 16:29:48.183789306 +0200
+++ /var/tmp/diff_new_pack.LeiGw0/_new  2023-08-06 16:29:48.187789330 +0200
@@ -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 @@
 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 @@
 
 %prep
 %setup -q
+%patch0 -p1
 sed -i '0,/#!\/usr\/bin\/env/ d' diffoscope/main.py
 
 %build

++++++ diffoscope-241.tar.bz2 -> diffoscope-242.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/diffoscope-241/debian/changelog 
new/diffoscope-242/debian/changelog
--- old/diffoscope-241/debian/changelog 2023-04-21 10:26:18.000000000 +0200
+++ new/diffoscope-242/debian/changelog 2023-05-05 21:05:32.000000000 +0200
@@ -1,3 +1,13 @@
+diffoscope (242) unstable; urgency=medium
+
+  * 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.
+
+ -- Chris Lamb <la...@debian.org>  Fri, 05 May 2023 12:05:28 -0700
+
 diffoscope (241) unstable; urgency=medium
 
   [ Chris Lamb ]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/diffoscope-241/diffoscope/__init__.py 
new/diffoscope-242/diffoscope/__init__.py
--- old/diffoscope-241/diffoscope/__init__.py   2023-04-21 10:26:18.000000000 
+0200
+++ new/diffoscope-242/diffoscope/__init__.py   2023-05-05 21:05:32.000000000 
+0200
@@ -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 = "241"
+VERSION = "242"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/diffoscope-241/diffoscope/comparators/binwalk.py 
new/diffoscope-242/diffoscope/comparators/binwalk.py
--- old/diffoscope-241/diffoscope/comparators/binwalk.py        2023-04-21 
10:26:18.000000000 +0200
+++ new/diffoscope-242/diffoscope/comparators/binwalk.py        2023-05-05 
21:05:32.000000000 +0200
@@ -1,7 +1,7 @@
 #
 # diffoscope: in-depth comparison of files, archives, and directories
 #
-# Copyright © 2017-2020, 2022 Chris Lamb <la...@debian.org>
+# Copyright © 2017-2020, 2022-2023 Chris Lamb <la...@debian.org>
 #
 # diffoscope is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -21,7 +21,10 @@
 import glob
 import logging
 
-from diffoscope.tools import python_module_missing
+from diffoscope.tools import (
+    python_module_missing,
+    get_comment_for_missing_python_module,
+)
 from diffoscope.tempfiles import get_temporary_directory
 
 from .utils.file import File
@@ -70,10 +73,11 @@
 
     @classmethod
     def recognizes(cls, file):
-        if binwalk is None:
+        if not super().recognizes(file):
             return False
 
-        if not super().recognizes(file):
+        if binwalk is None:
+            file.add_comment(get_comment_for_missing_python_module("binwalk"))
             return False
 
         # RPM files are .cpio, but let's always leave it to the RPM comparator.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/diffoscope-241/diffoscope/comparators/fsimage.py 
new/diffoscope-242/diffoscope/comparators/fsimage.py
--- old/diffoscope-241/diffoscope/comparators/fsimage.py        2023-04-21 
10:26:18.000000000 +0200
+++ new/diffoscope-242/diffoscope/comparators/fsimage.py        2023-05-05 
21:05:32.000000000 +0200
@@ -24,7 +24,7 @@
 from diffoscope.difference import Difference
 from diffoscope.tools import python_module_missing
 from diffoscope.profiling import profile
-from diffoscope.tools import get_package_provider
+from diffoscope.tools import get_comment_for_missing_python_module
 
 from .utils.file import File
 from .utils.archive import Archive
@@ -129,9 +129,5 @@
                 )
             )
         if not guestfs:
-            pkg = get_package_provider("guestfs")
-            infix = f" from the '{pkg}' package " if pkg else " "
-            self.add_comment(
-                f"Installing the 'guestfs' Python module{infix}may produce a 
better output."
-            )
+            self.add_comment(get_comment_for_missing_python_module("guestfs"))
         return differences
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/diffoscope-241/diffoscope/tools.py 
new/diffoscope-242/diffoscope/tools.py
--- old/diffoscope-241/diffoscope/tools.py      2023-04-21 10:26:18.000000000 
+0200
+++ new/diffoscope-242/diffoscope/tools.py      2023-05-05 21:05:32.000000000 
+0200
@@ -1,7 +1,7 @@
 #
 # diffoscope: in-depth comparison of files, archives, and directories
 #
-# Copyright © 2016-2017, 2019-2022 Chris Lamb <la...@debian.org>
+# Copyright © 2016-2017, 2019-2023 Chris Lamb <la...@debian.org>
 #
 # diffoscope is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -191,4 +191,11 @@
     python_module_missing.modules.add(name)
 
 
+def get_comment_for_missing_python_module(name):
+    pkg = get_package_provider(name)
+    infix = f" from the '{pkg}' package " if pkg else " "
+
+    return f"Installing the '{name}' Python module{infix}may produce a better 
output."
+
+
 python_module_missing.modules = set()


++++++ fix-file-5.45.patch ++++++
>From 435a8fe9a201a7e74e705e06cc56b66fa6cb4af9 Mon Sep 17 00:00:00 2001
From: Chris Lamb <la...@debian.org>
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

Reply via email to