From 219f083e340ac1c8d6298c4e5adfc5ca109ae06d Mon Sep 17 00:00:00 2001 From: Kyle Walker Date: Tue, 30 May 2023 14:16:34 -0400 Subject: [PATCH] Spec: Set the python version explicitly to 3.9 The __python3 macro defaults to /usr/bin/python3. This is not a problem as long as the python3 symlink always points to the python3.9 runtime. If that is changed via alternatives or another means, the following error is returned: Traceback (most recent call last): File "/usr/bin/dnf", line 61, in from dnf.cli import main ModuleNotFoundError: No module named 'dnf' This update specifically sets the __python3 macro to /usr/bin/python3.9 which results in the following shebang within /usr/bin/dnf: #!/usr/bin/python3.9 Resolves: rhbz#2211019 Signed-off-by: Kyle Walker --- dnf.spec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dnf.spec b/dnf.spec index 5dceec5..0135a7a 100644 --- a/dnf.spec +++ b/dnf.spec @@ -56,6 +56,9 @@ %global py3pluginpath %{python3_sitelib}/%{name}-plugins +# To avoid breakage if the python3 symlink is changed +%{?python3_version:%global __python3 /usr/bin/python%{python3_version}} + # Use the same directory of the main package for subpackage licence and docs %global _docdir_fmt %{name} @@ -66,7 +69,7 @@ It supports RPMs, modules and comps groups & environments. Name: dnf Version: 4.14.0 -Release: 6%{?dist} +Release: 7%{?dist} Summary: %{pkg_summary} # For a breakdown of the licensing, see PACKAGE-LICENSING License: GPLv2+ @@ -369,6 +372,9 @@ popd %{python3_sitelib}/%{name}/automatic/ %changelog +* Tue May 30 2023 Kyle Walker - 4.14.0-7 +- Explicitly use the python3.9 runtime (RhBug:2211019) + * Thu May 11 2023 Jaroslav Rohel - 4.14.0-6 - Add reboot option to DNF Automatic (RhBug:2124793) - Omit src RPMs from check-update (RhBug:2151910,2203069)