Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-libarchive-c for 
openSUSE:Factory checked in at 2024-11-14 16:07:58
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-libarchive-c (Old)
 and      /work/SRC/openSUSE:Factory/.python-libarchive-c.new.2017 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-libarchive-c"

Thu Nov 14 16:07:58 2024 rev:9 rq:1223788 version:5.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-libarchive-c/python-libarchive-c.changes  
2024-03-17 22:13:49.823613949 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-libarchive-c.new.2017/python-libarchive-c.changes
        2024-11-14 16:08:17.461776028 +0100
@@ -1,0 +2,5 @@
+Tue Nov 12 12:33:08 UTC 2024 - Markéta Machová <mmach...@suse.com>
+
+- Add upstream libarchive.patch to fix tests
+
+-------------------------------------------------------------------

New:
----
  libarchive.patch

BETA DEBUG BEGIN:
  New:
- Add upstream libarchive.patch to fix tests
BETA DEBUG END:

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

Other differences:
------------------
++++++ python-libarchive-c.spec ++++++
--- /var/tmp/diff_new_pack.CLN5S9/_old  2024-11-14 16:08:17.925795487 +0100
+++ /var/tmp/diff_new_pack.CLN5S9/_new  2024-11-14 16:08:17.925795487 +0100
@@ -18,7 +18,6 @@
 
 %define requires_file() %( readlink -f '%*' | LC_ALL=C xargs -r rpm -q --qf 
'Requires: %%{name} >= %%{epoch}:%%{version}\\n' -f | sed -e 's/ (none):/ /' -e 
's/ 0:/ /' | grep -v "is not")
 
-%{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-libarchive-c
 Version:        5.1
 Release:        0
@@ -27,6 +26,8 @@
 Group:          Development/Languages/Python
 URL:            https://github.com/Changaco/python-libarchive-c
 Source:         
https://files.pythonhosted.org/packages/source/l/libarchive-c/libarchive-c-%{version}.tar.gz
+# PATCH-FIX-UPSTREAM https://github.com/Changaco/python-libarchive-c/pull/131 
Handle new libarchive versions
+Patch0:         libarchive.patch
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
@@ -63,5 +64,6 @@
 %files %{python_files}
 %doc README.rst
 %license LICENSE.md
-%{python_sitelib}/*
+%{python_sitelib}/libarchive
+%{python_sitelib}/libarchive_c-%{version}*info
 

++++++ libarchive.patch ++++++
>From a56e9402c76c2fb9631651de7bae07b5fbb0b624 Mon Sep 17 00:00:00 2001
From: "Charly C." <chang...@changaco.oy.lc>
Date: Sun, 29 Sep 2024 13:43:13 +0200
Subject: [PATCH] update a test failing with new libarchive versions (#131)

fixes #130
---
 tests/test_entry.py | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/tests/test_entry.py b/tests/test_entry.py
index 419cecb..34543a5 100644
--- a/tests/test_entry.py
+++ b/tests/test_entry.py
@@ -9,7 +9,7 @@
 
 import pytest
 
-from libarchive import memory_reader, memory_writer
+from libarchive import ArchiveError, memory_reader, memory_writer
 from libarchive.entry import ArchiveEntry, ConsumedArchiveEntry, 
PassedArchiveEntry
 
 from . import data_dir, get_entries, get_tarinfos
@@ -64,7 +64,13 @@ def test_check_ArchiveEntry_against_TarInfo():
 
 
 def test_check_archiveentry_using_python_testtar():
-    check_entries(join(data_dir, 'testtar.tar'))
+    # This test behaves differently depending on the libarchive version:
+    # 3.5, 3.6 and presumably all future versions reject the archive as 
damaged,
+    # whereas older versions accepted it.
+    try:
+        check_entries(join(data_dir, 'testtar.tar'))
+    except ArchiveError as e:
+        assert e.msg == "Damaged tar archive"
 
 
 def test_check_archiveentry_with_unicode_and_binary_entries_tar():

Reply via email to