Skip to content

Commit 611ed25

Browse files
rootfactory-droid[bot]
andcommitted
photon-os-installer: add btrfs-progs, fix pkg_resources deprecation
- Add btrfs-progs to target system packages when btrfs filesystem is selected. Without it, dracut cannot include the btrfs module in the initramfs and the system fails to boot. - Replace deprecated pkg_resources with importlib.metadata (Python 3.14 removes pkg_resources). The btrfs-progs source change is in the photon-os-installer repository: vmware/photon-os-installer#40 Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
1 parent b83ee23 commit 611ed25

3 files changed

Lines changed: 36 additions & 2 deletions

File tree

SPECS/photon-os-installer/config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
sources:
22
- archive: photon-os-installer-2.7.tar.gz
3-
archive_sha512sum: 9c2b6df1e9136e94db1451064b51a286b2894849b309dde9539cb9df4fc82e807c74ccb0f7795d7d1d5b2c1ea856dfb38623e1c08e94c567696a637ca6f75fe8
3+
archive_sha512sum: ad09f965513fdbd83ca2a02346abb1bf3c8b77f85581ef3448c59181d8f207a2b741d55b919912032e99449857c8d1380917b419b282cc12b4140bcbb0f230dd
44
skip_validation: true
55
spdx:
66
package:
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2+
From: Factory AI Bot <factory-droid[bot]@users.noreply.github.com>
3+
Date: Mon, 30 Mar 2026 20:00:00 +0200
4+
Subject: [PATCH] Replace deprecated pkg_resources with importlib.metadata
5+
6+
Python 3.14 deprecates pkg_resources. Use importlib.metadata.version()
7+
instead, matching the fix already present in upstream master.
8+
9+
---
10+
photon_installer/__init__.py | 4 ++--
11+
1 file changed, 2 insertions(+), 2 deletions(-)
12+
13+
diff --git a/photon_installer/__init__.py b/photon_installer/__init__.py
14+
--- a/photon_installer/__init__.py
15+
+++ b/photon_installer/__init__.py
16+
@@ -5,7 +5,7 @@
17+
18+
import sys
19+
import glob
20+
-import pkg_resources
21+
+from importlib.metadata import version as _get_version
22+
from os.path import dirname, basename, isfile, join
23+
24+
25+
@@ -13,4 +13,4 @@ modules = glob.glob(join(dirname(__file__), "*.py"))
26+
__all__ = [ basename(f)[:-3] for f in modules if isfile(f) and not f.endswith('__init__.py')]
27+
sys.path.append(dirname(__file__))
28+
29+
-__version__ = pkg_resources.get_distribution(__name__).version
30+
+__version__ = _get_version(__name__)

SPECS/photon-os-installer/photon-os-installer.spec

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Summary: Photon OS Installer
66
Name: photon-os-installer
77
Version: 2.7
8-
Release: 5%{?dist}
8+
Release: 6%{?dist}
99
Group: System Environment/Base
1010
Vendor: VMware, Inc.
1111
Distribution: Photon
@@ -16,6 +16,7 @@ Source1: license.txt
1616
%include %{SOURCE1}
1717

1818
Patch0: 0001-Use-mkpasswd-to-generate-password-hash.patch
19+
Patch1: fix-pkg-resources.patch
1920

2021
BuildRequires: python3-devel
2122
BuildRequires: python3-pyinstaller
@@ -70,6 +71,9 @@ rm -rf %{buildroot}
7071
%{_bindir}/photon-iso-builder
7172

7273
%changelog
74+
* Thu Apr 02 2026 Factory AI Bot <factory-droid[bot]@users.noreply.github.com> 2.7-6
75+
- Add btrfs-progs to install list when btrfs filesystem is selected
76+
- Replace deprecated pkg_resources with importlib.metadata
7377
* Tue Mar 24 2026 Shreenidhi Shedi <shreenidhi.shedi@broadcom.com> 2.7-5
7478
- Use mkpasswd to generate password
7579
* Wed Mar 18 2026 Prashant S Chauhan <prashant.singh-chauhan@broadcom.com> 2.7-4

0 commit comments

Comments
 (0)