14
0

Accepting request 1275107 from devel:languages:python

Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/1275107
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-libarchive-c?expand=0&rev=10
This commit is contained in:
2025-05-07 17:19:07 +00:00
committed by Git OBS Bridge
5 changed files with 22 additions and 50 deletions

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7bcce24ea6c0fa3bc62468476c6d2f6264156db2f04878a372027c10615a2721
size 52279

View File

@@ -1,38 +0,0 @@
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():

3
libarchive_c-5.2.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:fd44a8e28509af6e78262c98d1a54f306eabd2963dfee57bf298977de5057417
size 52474

View File

@@ -1,3 +1,13 @@
-------------------------------------------------------------------
Wed Apr 30 06:22:55 UTC 2025 - Dirk Müller <dmueller@suse.com>
- update to 5.2:
* Change to the library: fix inoperative `pathname` argument of
`add_files` method (#135), by @nvinson.
* Change to the tests: update a test to handle new libarchive
versions (#131).
- drop libarchive.patch (upstream)
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Nov 12 12:33:08 UTC 2024 - Markéta Machová <mmachova@suse.com> Tue Nov 12 12:33:08 UTC 2024 - Markéta Machová <mmachova@suse.com>

View File

@@ -1,7 +1,7 @@
# #
# spec file for package python-libarchive-c # spec file for package python-libarchive-c
# #
# Copyright (c) 2024 SUSE LLC # Copyright (c) 2025 SUSE LLC
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@@ -19,16 +19,16 @@
%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") %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")
Name: python-libarchive-c Name: python-libarchive-c
Version: 5.1 Version: 5.2
Release: 0 Release: 0
Summary: Python interface to libarchive Summary: Python interface to libarchive
License: CC0-1.0 License: CC0-1.0
Group: Development/Languages/Python Group: Development/Languages/Python
URL: https://github.com/Changaco/python-libarchive-c URL: https://github.com/Changaco/python-libarchive-c
Source: https://files.pythonhosted.org/packages/source/l/libarchive-c/libarchive-c-%{version}.tar.gz 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 BuildRequires: %{python_module pip}
Patch0: libarchive.patch
BuildRequires: %{python_module setuptools} BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: python-rpm-macros BuildRequires: python-rpm-macros
%if %{with libarchive_dynamically} %if %{with libarchive_dynamically}
@@ -48,13 +48,13 @@ A Python interface to libarchive. It uses the standard ctypes_ module to
dynamically load and access the C library. dynamically load and access the C library.
%prep %prep
%autosetup -p1 -n libarchive-c-%{version} %autosetup -p1 -n libarchive_c-%{version}
%build %build
%python_build %pyproject_wheel
%install %install
%python_install %pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib} %python_expand %fdupes %{buildroot}%{$python_sitelib}
%check %check
@@ -65,6 +65,6 @@ export LANG="en_US.UTF-8"
%doc README.rst %doc README.rst
%license LICENSE.md %license LICENSE.md
%{python_sitelib}/libarchive %{python_sitelib}/libarchive
%{python_sitelib}/libarchive_c-%{version}*info %{python_sitelib}/libarchive_c-%{version}.dist-info
%changelog %changelog