forked from pool/python-libarchive-c
Accepting request 1223660 from home:mcalabkova:branches:devel:languages:python
- Add upstream libarchive.patch to fix tests OBS-URL: https://build.opensuse.org/request/show/1223660 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-libarchive-c?expand=0&rev=17
This commit is contained in:
38
libarchive.patch
Normal file
38
libarchive.patch
Normal file
@@ -0,0 +1,38 @@
|
||||
From a56e9402c76c2fb9631651de7bae07b5fbb0b624 Mon Sep 17 00:00:00 2001
|
||||
From: "Charly C." <changaco@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():
|
||||
@@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Nov 12 12:33:08 UTC 2024 - Markéta Machová <mmachova@suse.com>
|
||||
|
||||
- Add upstream libarchive.patch to fix tests
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Mar 15 21:09:39 UTC 2024 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
|
||||
@@ -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 @@ License: CC0-1.0
|
||||
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,6 +64,7 @@ export LANG="en_US.UTF-8"
|
||||
%files %{python_files}
|
||||
%doc README.rst
|
||||
%license LICENSE.md
|
||||
%{python_sitelib}/*
|
||||
%{python_sitelib}/libarchive
|
||||
%{python_sitelib}/libarchive_c-%{version}*info
|
||||
|
||||
%changelog
|
||||
|
||||
Reference in New Issue
Block a user