diff --git a/SPECS/photon-os-installer/fix-pkg-resources.patch b/SPECS/photon-os-installer/fix-pkg-resources.patch new file mode 100644 index 0000000000..61ab04bea5 --- /dev/null +++ b/SPECS/photon-os-installer/fix-pkg-resources.patch @@ -0,0 +1,30 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Factory AI Bot +Date: Mon, 30 Mar 2026 20:00:00 +0200 +Subject: [PATCH] Replace deprecated pkg_resources with importlib.metadata + +Python 3.14 deprecates pkg_resources. Use importlib.metadata.version() +instead, matching the fix already present in upstream master. + +--- + photon_installer/__init__.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/photon_installer/__init__.py b/photon_installer/__init__.py +--- a/photon_installer/__init__.py ++++ b/photon_installer/__init__.py +@@ -5,7 +5,7 @@ + + import sys + import glob +-import pkg_resources ++from importlib.metadata import version as _get_version + from os.path import dirname, basename, isfile, join + + +@@ -13,4 +13,4 @@ modules = glob.glob(join(dirname(__file__), "*.py")) + __all__ = [ basename(f)[:-3] for f in modules if isfile(f) and not f.endswith('__init__.py')] + sys.path.append(dirname(__file__)) + +-__version__ = pkg_resources.get_distribution(__name__).version ++__version__ = _get_version(__name__) diff --git a/SPECS/photon-os-installer/photon-os-installer.spec b/SPECS/photon-os-installer/photon-os-installer.spec index 22dc4df6f1..9c65f82289 100644 --- a/SPECS/photon-os-installer/photon-os-installer.spec +++ b/SPECS/photon-os-installer/photon-os-installer.spec @@ -5,7 +5,7 @@ Summary: Photon OS Installer Name: photon-os-installer Version: 2.7 -Release: 5%{?dist} +Release: 6%{?dist} Group: System Environment/Base Vendor: VMware, Inc. Distribution: Photon @@ -16,6 +16,7 @@ Source1: license.txt %include %{SOURCE1} Patch0: 0001-Use-mkpasswd-to-generate-password-hash.patch +Patch1: fix-pkg-resources.patch BuildRequires: python3-devel BuildRequires: python3-pyinstaller @@ -70,6 +71,8 @@ rm -rf %{buildroot} %{_bindir}/photon-iso-builder %changelog +* Mon Apr 13 2026 Factory AI Bot 2.7-6 +- Replace deprecated pkg_resources with importlib.metadata * Tue Mar 24 2026 Shreenidhi Shedi 2.7-5 - Use mkpasswd to generate password * Wed Mar 18 2026 Prashant S Chauhan 2.7-4