From d0bb7fcc8c03a32877304933699da93b47efe0c5183f100984bf50b020732986 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Thu, 7 Dec 2023 22:22:36 +0000 Subject: [PATCH] - update to 5.0: * It is now possible to specify a codec for archive entry metadata (`pathname`, `linkpath`, `uname` and `gname`) * **BREAKING:** If you use the `archive_read_class` and `archive_write_class` arguments, the classes you provide will receive a codec name as a second positional argument. * The `timestamp_nsec` arguments of the legacy `ArchiveEntry.set_{a,c,m}time` methods are now optional * Removed obsolete dependencies (`mock` and `six`) from `tox.ini` (#119). * Always use `UTF-8` when reading the `PKG-INFO` and `README.rst` files (#120). * Replaced `pytest-xdist` with `pytest-forked` in `tox.ini` - drop python-libarchive-c-no-mock.patch (upstream) BREAKING & SECURITY: The archive extraction functions now pass 3 security flags (SECURE_NODOTDOT, SECURE_NOABSOLUTEPATHS OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-libarchive-c?expand=0&rev=13 --- libarchive-c-4.0.tar.gz | 3 --- libarchive-c-5.0.tar.gz | 3 +++ python-libarchive-c-no-mock.patch | 23 ----------------------- python-libarchive-c.changes | 20 +++++++++++++++++++- python-libarchive-c.spec | 9 +++------ 5 files changed, 25 insertions(+), 33 deletions(-) delete mode 100644 libarchive-c-4.0.tar.gz create mode 100644 libarchive-c-5.0.tar.gz delete mode 100644 python-libarchive-c-no-mock.patch diff --git a/libarchive-c-4.0.tar.gz b/libarchive-c-4.0.tar.gz deleted file mode 100644 index 6f201fd..0000000 --- a/libarchive-c-4.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a5b41ade94ba58b198d778e68000f6b7de41da768de7140c984f71d7fa8416e5 -size 51171 diff --git a/libarchive-c-5.0.tar.gz b/libarchive-c-5.0.tar.gz new file mode 100644 index 0000000..f72d18f --- /dev/null +++ b/libarchive-c-5.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d673f56673d87ec740d1a328fa205cafad1d60f5daca4685594deb039d32b159 +size 52186 diff --git a/python-libarchive-c-no-mock.patch b/python-libarchive-c-no-mock.patch deleted file mode 100644 index 3610d1f..0000000 --- a/python-libarchive-c-no-mock.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff --git a/tests/test_rwx.py b/tests/test_rwx.py -index 6b819ae..5daf201 100644 ---- a/tests/test_rwx.py -+++ b/tests/test_rwx.py -@@ -7,7 +7,7 @@ - from libarchive.entry import format_time - from libarchive.extract import EXTRACT_OWNER, EXTRACT_PERM, EXTRACT_TIME - from libarchive.write import memory_writer --from mock import patch -+from unittest.mock import patch - import pytest - - from . import check_archive, in_dir, treestat -diff --git a/tox.ini b/tox.ini -index 9c0a989..ab68c84 100644 ---- a/tox.ini -+++ b/tox.ini -@@ -13,4 +13,3 @@ deps= - pytest-cov - pytest-xdist - six -- mock - diff --git a/python-libarchive-c.changes b/python-libarchive-c.changes index ada61ef..26cc8f3 100644 --- a/python-libarchive-c.changes +++ b/python-libarchive-c.changes @@ -1,3 +1,21 @@ +------------------------------------------------------------------- +Thu Dec 7 22:21:33 UTC 2023 - Dirk Müller + +- update to 5.0: + * It is now possible to specify a codec for archive entry + metadata (`pathname`, `linkpath`, `uname` and `gname`) + * **BREAKING:** If you use the `archive_read_class` and + `archive_write_class` arguments, the classes you provide will + receive a codec name as a second positional argument. + * The `timestamp_nsec` arguments of the legacy + `ArchiveEntry.set_{a,c,m}time` methods are now optional + * Removed obsolete dependencies (`mock` and `six`) from + `tox.ini` (#119). + * Always use `UTF-8` when reading the `PKG-INFO` and + `README.rst` files (#120). + * Replaced `pytest-xdist` with `pytest-forked` in `tox.ini` +- drop python-libarchive-c-no-mock.patch (upstream) + ------------------------------------------------------------------- Thu Jun 2 12:48:05 UTC 2022 - Marcus Rueckert @@ -19,7 +37,7 @@ Wed Mar 23 13:50:58 UTC 2022 - pgajdos@suse.com - version update to 4.0 4.0 --- - BREAKING & SECURITY: The archive extraction functions now pass 3 security flags (SECURE_NODOTDOT, SECURE_NOABSOLUTEPATHS + BREAKING & SECURITY: The archive extraction functions now pass 3 security flags (SECURE_NODOTDOT, SECURE_NOABSOLUTEPATHS and SECURE_SYMLINKS) to libarchive by default, unless the current directory is the root. BREAKING: The ArchiveEntry properties atime, mtime, ctime, birthtime and size now have the value None instead of 0 when they're unset. BREAKING: The ArchiveEntry.pathname property now attempts to decode bytes using UTF-8. This breaks reading archives that diff --git a/python-libarchive-c.spec b/python-libarchive-c.spec index 164add8..87dba29 100644 --- a/python-libarchive-c.spec +++ b/python-libarchive-c.spec @@ -1,7 +1,7 @@ # # spec file for package python-libarchive-c # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -20,15 +20,13 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-libarchive-c -Version: 4.0 +Version: 5.0 Release: 0 Summary: Python interface to libarchive 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 -# https://github.com/Changaco/python-libarchive-c/commit/13b904e2b046db25a42cd63557d259b3d3998323 -Patch0: python-libarchive-c-no-mock.patch BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros @@ -49,8 +47,7 @@ A Python interface to libarchive. It uses the standard ctypes_ module to dynamically load and access the C library. %prep -%setup -q -n libarchive-c-%{version} -%patch0 -p1 +%autosetup -p1 -n libarchive-c-%{version} %build %python_build