diff --git a/0127-pccsadmin-migrate-from-deprecated-pkg_resources.patch b/0127-pccsadmin-migrate-from-deprecated-pkg_resources.patch new file mode 100644 index 0000000..21a676e --- /dev/null +++ b/0127-pccsadmin-migrate-from-deprecated-pkg_resources.patch @@ -0,0 +1,49 @@ +From 31e6a050cfa430b6d3deef77a7cab165acae4aee Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= +Date: Tue, 6 Jan 2026 18:03:36 +0100 +Subject: [PATCH] [PCS Client Tool] Migrate from deprecated pkg_resources to + packaging +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Version 14.0 is the first version that had the Version class. + +Ref: https://setuptools.pypa.io/en/latest/pkg_resources.html + +Signed-off-by: Miro HronĨok +--- + tools/PccsAdminTool/lib/intelsgx/pcs.py | 2 +- + tools/PccsAdminTool/requirements.txt | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/tools/PccsAdminTool/lib/intelsgx/pcs.py b/tools/PccsAdminTool/lib/intelsgx/pcs.py +index dd4eba4..7596708 100644 +--- a/tools/PccsAdminTool/lib/intelsgx/pcs.py ++++ b/tools/PccsAdminTool/lib/intelsgx/pcs.py +@@ -39,7 +39,7 @@ if system() == 'Windows': + from lib.intelsgx.credential import Credentials + from requests.adapters import HTTPAdapter + from urllib3.util import Retry +-from pkg_resources import parse_version ++from packaging.version import Version as parse_version + + certBegin= '-----BEGIN CERTIFICATE-----' + certEnd= '-----END CERTIFICATE-----' +diff --git a/tools/PccsAdminTool/requirements.txt b/tools/PccsAdminTool/requirements.txt +index 8a73667..65f6bf5 100644 +--- a/tools/PccsAdminTool/requirements.txt ++++ b/tools/PccsAdminTool/requirements.txt +@@ -1,8 +1,8 @@ + asn1>=2.4.1 + cryptography>=41.0.7 + keyring>=23.0.0 ++packaging>=14.0 + pyOpenSSL>=23.2.0,<24.3.0 + pypac>=0.14.0 + Requests>=2.31.0 +-setuptools>=65.5.1 + urllib3>=1.26.18 +-- +2.52.0 + diff --git a/linux-sgx.spec b/linux-sgx.spec index 11bca04..902112f 100644 --- a/linux-sgx.spec +++ b/linux-sgx.spec @@ -374,6 +374,8 @@ Patch0123: 0123-pccsadmin-use-more-of-pycryptography-instead-of-pyop.patch Patch0124: 0124-pccsadmin-prefer-pycryptography-over-pyopenssl.patch Patch0125: 0125-pccsadmin-add-fallback-for-when-pyopenssl-is-not-ava.patch Patch0126: 0126-pccsadmin-ignore-errors-trying-to-clear-the-keyring.patch +# https://github.com/intel/confidential-computing.tee.dcap/pull/485 +Patch0127: 0127-pccsadmin-migrate-from-deprecated-pkg_resources.patch # 0200-0299 -> against intel-sgx-ssl.git Patch0200: 0200-Enable-pointing-sgxssl-build-to-alternative-glibc-he.patch @@ -541,7 +543,7 @@ Requires: python3-keyring %endif Requires: python3-requests Requires: python3-urllib3 -Requires: python3-setuptools +Requires: python3-packaging %if 0%{?rhel} Requires: openssl %endif