Gwyn Ciesla 1 year ago
parent 357a4ee680
commit efa687e6aa

@ -1,40 +0,0 @@
From b676e6338a7c094cb3335d11f851ac0e12222017 Mon Sep 17 00:00:00 2001
From: MKLeb <calebb@vmware.com>
Date: Wed, 5 Oct 2022 15:49:37 -0400
Subject: [PATCH] Allow entrypoint compatibility for importlib-metadata>=5.0.0
---
salt/utils/entrypoints.py | 19 +++++++++++++------
1 file changed, 13 insertions(+), 6 deletions(-)
diff --git a/salt/utils/entrypoints.py b/salt/utils/entrypoints.py
index 3effa0b4941..ac65ae2df49 100644
--- a/salt/utils/entrypoints.py
+++ b/salt/utils/entrypoints.py
@@ -38,13 +38,20 @@ def iter_entry_points(group, name=None):
entry_points_listing = []
entry_points = importlib_metadata.entry_points()
- for entry_point_group, entry_points_list in entry_points.items():
- if entry_point_group != group:
- continue
- for entry_point in entry_points_list:
- if name is not None and entry_point.name != name:
+ # pre importlib-metadata 5.0.0
+ if hasattr(entry_points, "items"):
+ for entry_point_group, entry_points_list in entry_points.items():
+ if entry_point_group != group:
continue
- entry_points_listing.append(entry_point)
+ for entry_point in entry_points_list:
+ if name is not None and entry_point.name != name:
+ continue
+ entry_points_listing.append(entry_point)
+ # starting with importlib-metadata 5.0.0
+ for entry_point in entry_points.select(group=group):
+ if name is not None and entry_point.name != name:
+ continue
+ entry_points_listing.append(entry_point)
return entry_points_listing

@ -1,18 +1,14 @@
--- salt-3005/requirements/base.txt.fix 2022-08-25 17:13:58.740984435 -0600
+++ salt-3005/requirements/base.txt 2022-08-25 17:14:14.428036445 -0600
@@ -4,5 +4,4 @@ PyYAML
MarkupSafe
requests>=1.0.0
distro>=1.0.1
--- salt-3006.1/requirements/base.txt~ 2023-05-05 12:53:34.000000000 -0500
+++ salt-3006.1/requirements/base.txt 2023-05-24 09:59:08.874838801 -0500
@@ -9,4 +9,3 @@
packaging>=21.3
looseversion
# We need contextvars for salt-ssh
-contextvars
psutil>=5.0.0
--- salt-3005/requirements/zeromq.txt.fix 2022-08-25 17:05:45.496349067 -0600
+++ salt-3005/requirements/zeromq.txt 2022-08-25 17:06:19.011460188 -0600
@@ -1,6 +1,4 @@
-r base.txt
--- salt-3006.1/requirements/zeromq.txt~ 2023-05-05 12:53:34.000000000 -0500
+++ salt-3006.1/requirements/zeromq.txt 2023-05-24 10:02:57.943989348 -0500
@@ -2,4 +2,3 @@
-r crypto.txt
-pyzmq<=20.0.0 ; python_version < "3.6"
-pyzmq>=17.0.0 ; python_version < "3.9"
-pyzmq>19.0.2 ; python_version >= "3.9"
+pyzmq>=19.0.2
pyzmq>=20.0.0
-pyzmq==25.0.2 ; sys_platform == "win32"

@ -10,8 +10,8 @@
%global py3_shebang_flags %(echo %py3_shebang_flags | sed s/s//)
Name: salt
Version: 3005.1%{?__rc_ver}
Release: 4%{?dist}
Version: 3006.1
Release: 1%{?dist}
Summary: A parallel remote execution system
Group: System Environment/Daemons
License: ASL 2.0
@ -40,9 +40,6 @@ Source20: %{name}-run.fish
Source21: %{name}-syndic.fish
Patch0: contextvars.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=2189782
# salt-3005.1-entry-points-py310.patch
Patch1: https://github.com/saltstack/salt/commit/b676e6338a7c094cb3335d11f851ac0e12222017.patch
BuildArch: noarch
%ifarch %{ix86} x86_64
@ -205,7 +202,7 @@ install -p -m 0644 %{SOURCE21} %{buildroot}%{fish_dir}/%{name}-syndic.fish
# ZSH completion
mkdir -p %{buildroot}%{zsh_dir}
install -p -m 0644 pkg/%{name}.zsh %{buildroot}%{zsh_dir}/_%{name}
install -p -m 0644 pkg/common/%{name}.zsh %{buildroot}%{zsh_dir}/_%{name}
%check
@ -226,6 +223,7 @@ install -p -m 0644 pkg/%{name}.zsh %{buildroot}%{zsh_dir}/_%{name}
%dir %{_sysconfdir}/%{name}/pki/
%{fish_dir}/%{name}*.fish
%{zsh_dir}/_%{name}
%{_bindir}/salt-pip
%files master
%doc %{_mandir}/man7/%{name}.7*
@ -320,6 +318,9 @@ install -p -m 0644 pkg/%{name}.zsh %{buildroot}%{zsh_dir}/_%{name}
%changelog
* Wed May 24 2023 Gwyn Ciesla <gwync@protonmail.com> - 3006.1-1
- 3006.1
* Mon May 22 2023 Jonathan Steffan <jsteffan@fedoraproject.org>- 3005.1-4
- Add patch for py3.10 support (RHBZ#2189782)

Loading…
Cancel
Save