10 Commits

Author SHA256 Message Date
b3baaa13bc Accepting request 1269237 from devel:languages:python
- Add tests.patch to fix (some) tests with setuptools 77
- Skip license tests failing with setuptools 77

OBS-URL: https://build.opensuse.org/request/show/1269237
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-wheel?expand=0&rev=40
2025-04-16 18:37:11 +00:00
78fc0b693c yanked again, https://github.com/pypa/wheel/issues/662
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-wheel?expand=0&rev=87
2025-04-14 10:56:13 +00:00
3a395b2652 - Update to version 0.46.0
* Dropped support for Python 3.8
  * Removed the bdist_wheel setuptools command implementation and entry point.
    The wheel.bdist_wheel module is now just an alias to setuptools.command.bdist_wheel,
    emitting a deprecation warning on import.
  * Removed vendored packaging in favor of a run-time dependency on it.
  * Made the wheel.metadata module private (with a deprecation warning if it's imported).
  * Made the wheel.cli package private (no deprecation warning).
  * Fixed an exception when calling the convert command with an empty description field.
- Drop tests.patch and unskip other fixed tests

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-wheel?expand=0&rev=86
2025-04-11 07:13:09 +00:00
e17558968f - Add tests.patch to fix (some) tests with setuptools 77
- Skip license tests failing with setuptools 77

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-wheel?expand=0&rev=85
2025-04-03 12:43:24 +00:00
9674396ea6 Accepting request 1225987 from devel:languages:python
- update to 0.45.1:
  * Fixed pure Python wheels converted from eggs and wininst
    files having the ABI tag in the file name

OBS-URL: https://build.opensuse.org/request/show/1225987
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-wheel?expand=0&rev=39
2024-11-26 19:55:20 +00:00
04e74b45a0 - update to 0.45.1:
* Fixed pure Python wheels converted from eggs and wininst
    files having the ABI tag in the file name

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-wheel?expand=0&rev=83
2024-11-23 11:03:57 +00:00
a00383486e Accepting request 1224397 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1224397
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-wheel?expand=0&rev=38
2024-11-15 14:38:23 +00:00
f0ec3ae336 Accepting request 1224391 from home:glaubitz:branches:devel:languages:python
- Update to 0.45.0
  * Refactored the ``convert`` command to not need setuptools to be installed
  * Don't configure setuptools logging unless running ``bdist_wheel``
  * Added a redirection from ``wheel.bdist_wheel.bdist_wheel`` to
    ``setuptools.command.bdist_wheel.bdist_wheel`` to improve compatibility with
    ``setuptools``' latest fixes.

OBS-URL: https://build.opensuse.org/request/show/1224391
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-wheel?expand=0&rev=81
2024-11-15 08:44:13 +00:00
5d2ef98fc8 Accepting request 1199462 from devel:languages:python
- update to 0.44.0:
  * Canonicalized requirements in METADATA file
  * Deprecated the bdist_wheel module, as the code was migrated
    to setuptools itself

- Update to version 0.38.3
- Resync the upstream tarball
- actually, _really_ test this module:

OBS-URL: https://build.opensuse.org/request/show/1199462
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-wheel?expand=0&rev=37
2024-09-15 10:32:47 +00:00
f58e61f702 - update to 0.44.0:
* Canonicalized requirements in METADATA file
  * Deprecated the bdist_wheel module, as the code was migrated
    to setuptools itself
- Update to version 0.38.3
- Resync the upstream tarball
- actually, _really_ test this module:

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-wheel?expand=0&rev=79
2024-09-08 13:42:59 +00:00
3 changed files with 1 additions and 134 deletions

View File

@@ -1,126 +0,0 @@
From 7a7d2de96b22a9adf9208afcc9547e1001569fef Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Alex=20Gr=C3=B6nholm?= <alex.gronholm@nextday.fi>
Date: Thu, 22 Jan 2026 01:41:14 +0200
Subject: [PATCH] Fixed security issue around wheel unpack (#675)
A maliciously crafted wheel could cause the permissions of a file outside the unpack tree to be altered.
Fixes CVE-2026-24049.
---
docs/news.rst | 2 ++
src/wheel/_commands/unpack.py | 4 ++--
tests/commands/test_unpack.py | 23 +++++++++++++++++++++++
3 files changed, 27 insertions(+), 2 deletions(-)
Index: wheel-0.42.0/src/wheel/cli/unpack.py
===================================================================
--- wheel-0.42.0.orig/src/wheel/cli/unpack.py
+++ wheel-0.42.0/src/wheel/cli/unpack.py
@@ -19,12 +19,12 @@ def unpack(path: str, dest: str = ".") -
destination = Path(dest) / namever
print(f"Unpacking to: {destination}...", end="", flush=True)
for zinfo in wf.filelist:
- wf.extract(zinfo, destination)
+ target_path = Path(wf.extract(zinfo, destination))
# Set permissions to the same values as they were set in the archive
# We have to do this manually due to
# https://github.com/python/cpython/issues/59999
permissions = zinfo.external_attr >> 16 & 0o777
- destination.joinpath(zinfo.filename).chmod(permissions)
+ target_path.chmod(permissions)
print("OK")
Index: wheel-0.42.0/tests/cli/test_unpack.py
===================================================================
--- wheel-0.42.0.orig/tests/cli/test_unpack.py
+++ wheel-0.42.0/tests/cli/test_unpack.py
@@ -8,6 +8,7 @@ import pytest
from wheel.cli.unpack import unpack
from wheel.wheelfile import WheelFile
+from .util import run_command
def test_unpack(wheel_paths, tmp_path):
"""
@@ -34,3 +35,26 @@ def test_unpack_executable_bit(tmp_path)
unpack(str(wheel_path), str(tmp_path))
assert not script_path.is_dir()
assert stat.S_IMODE(script_path.stat().st_mode) == 0o755
+
+
+@pytest.mark.skipif(
+ platform.system() == "Windows", reason="Windows does not support chmod()"
+)
+def test_chmod_outside_unpack_tree(tmp_path_factory: TempPathFactory) -> None:
+ wheel_path = tmp_path_factory.mktemp("build") / "test-1.0-py3-none-any.whl"
+ with WheelFile(wheel_path, "w") as wf:
+ wf.writestr(
+ "test-1.0.dist-info/METADATA",
+ "Metadata-Version: 2.4\nName: test\nVersion: 1.0\n",
+ )
+ wf.writestr("../../system-file", b"malicious data")
+
+ extract_root_path = tmp_path_factory.mktemp("extract")
+ system_file = extract_root_path / "system-file"
+ extract_path = extract_root_path / "subdir"
+ system_file.write_bytes(b"important data")
+ system_file.chmod(0o755)
+ run_command("unpack", "--dest", extract_path, wheel_path)
+
+ assert system_file.read_bytes() == b"important data"
+ assert stat.S_IMODE(system_file.stat().st_mode) == 0o755
Index: wheel-0.42.0/tests/cli/util.py
===================================================================
--- /dev/null
+++ wheel-0.42.0/tests/cli/util.py
@@ -0,0 +1,43 @@
+from __future__ import annotations
+
+import sys
+from io import StringIO
+from os import PathLike
+from subprocess import CalledProcessError
+from unittest.mock import patch
+
+import pytest
+
+from wheel.cli import main
+
+
+def run_command(
+ command: str, *args: str | PathLike, catch_systemexit: bool = True
+) -> str:
+ returncode = 0
+ stdout = StringIO()
+ stderr = StringIO()
+ args = ("wheel", command) + tuple(str(arg) for arg in args)
+ with (
+ patch.object(sys, "argv", args),
+ patch.object(sys, "stdout", stdout),
+ patch.object(sys, "stderr", stderr),
+ ):
+ try:
+ main()
+ except SystemExit as exc:
+ if not catch_systemexit:
+ raise CalledProcessError(
+ exc.code, args, stdout.getvalue(), stderr.getvalue()
+ ) from exc
+
+ returncode = exc.code
+
+ if returncode:
+ pytest.fail(
+ f"'wheel {command}' exited with return code {returncode}\n"
+ f"arguments: {args}\n"
+ f"error output:\n{stderr.getvalue()}"
+ )
+
+ return stdout.getvalue()
Index: wheel-0.42.0/tests/cli/__init__.py
===================================================================
--- /dev/null
+++ wheel-0.42.0/tests/cli/__init__.py
@@ -0,0 +1 @@
+

View File

@@ -1,8 +1,3 @@
-------------------------------------------------------------------
Wed Jan 28 09:12:46 UTC 2026 - Nico Krapp <nico.krapp@suse.com>
- Add CVE-2026-24049.patch to fix CVE-2026-24049 (bsc#1257100)
-------------------------------------------------------------------
Thu Mar 27 10:29:43 UTC 2025 - Markéta Machová <mmachova@suse.com>

View File

@@ -40,9 +40,7 @@ Group: Development/Languages/Python
URL: https://github.com/pypa/wheel
Source: https://github.com/pypa/wheel/archive/%{version}.tar.gz#/wheel-%{version}.tar.gz
# PATCH-FIX-UPSTREAM https://github.com/pypa/wheel/pull/651 fix test failures
Patch0: tests.patch
# PATCH-FIX-UPSTREAM CVE-2026-24049.patch bsc#1257100 gh#pypa/wheel@7a7d2de
Patch1: CVE-2026-24049.patch
Patch: tests.patch
# Bootstrap: Don't BuildRequire setuptools or pip here!
BuildRequires: %{python_module base >= 3.8}
BuildRequires: %{python_module flit-core}