%global __python3 /usr/bin/python3.11 %global python3_pkgversion 3.11 # Always build out-of-source %define __cmake_in_source_build 1 # default dependencies %global hawkey_version 0.66.0 %global libcomps_version 0.1.8 %global libmodulemd_version 2.9.3 %global rpm_version 4.14.0 # paths %global confdir %{_sysconfdir}/%{name} %global pluginconfpath %{confdir}/plugins %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} %global pkg_summary Package manager %global pkg_description Utility that allows users to manage packages on their systems. \ It supports RPMs, modules and comps groups & environments. Name: python%{python3_pkgversion}-dnf Version: 4.14.0 Release: 9%{?dist} Summary: %{pkg_summary} # For a breakdown of the licensing, see PACKAGE-LICENSING License: GPLv2+ URL: https://github.com/rpm-software-management/dnf Source0: %{url}/archive/%{version}/dnf-%{version}.tar.gz Patch1: 0001-Pass-whole-URL-in-relativeUrl-to-PackageTarget-for-R.patch Patch2: 0002-Document-changes-to-offline-upgrade-command-RhBug-19.patch Patch3: 0003-Move-system-upgrade-plugin-to-core-RhBug-2054235.patch Patch4: 0004-Fix-plugins-unit-tests.patch Patch5: 0005-Ignore-processing-variable-files-with-unsupported-en.patch Patch6: 0006-Update-translations.patch Patch7: 0007-Add-reboot-option-to-DNF-Automatic.patch Patch8: 0008-Omit-src-RPMs-from-check-update-RhBug-2151910.patch Patch9: 0009-automatic-Fix-online-detection-with-proxy-RhBz2022440.patch Patch10: 0010-automatic-Return-an-error-when-transaction-fails-RhB.patch Patch11: 0011-Document-symbols-in-dnf-history-list-output.patch Patch12: 0012-RHEL-11345-Fix-japanese-translations.patch Patch13: 0013-RHEL-6396-Fix-substitution-in-kvp-in-add_new_repo.patch Patch14: 0014-RHEL-6304-base-Add-obsoleters-of-only-latest-versions.patch BuildArch: noarch BuildRequires: cmake BuildRequires: gettext BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-hawkey >= %{hawkey_version} BuildRequires: python%{python3_pkgversion}-libdnf >= %{hawkey_version} BuildRequires: python%{python3_pkgversion}-libcomps >= %{libcomps_version} BuildRequires: python%{python3_pkgversion}-libdnf BuildRequires: libmodulemd >= %{libmodulemd_version} Requires: libmodulemd >= %{libmodulemd_version} BuildRequires: python%{python3_pkgversion}-gpg Requires: python%{python3_pkgversion}-gpg Requires: python%{python3_pkgversion}-hawkey >= %{hawkey_version} Requires: python%{python3_pkgversion}-libdnf >= %{hawkey_version} Requires: python%{python3_pkgversion}-libcomps >= %{libcomps_version} Requires: python%{python3_pkgversion}-libdnf BuildRequires: python%{python3_pkgversion}-rpm >= %{rpm_version} Requires: python%{python3_pkgversion}-rpm >= %{rpm_version} # required for DNSSEC main.gpgkey_dns_verification https://dnf.readthedocs.io/en/latest/conf_ref.html Recommends: python%{python3_pkgversion}-unbound %description Python %{python3_pkgversion} interface to DNF %prep %autosetup -p1 -n dnf-%{version} # remove non-python files sed -i '/ADD_SUBDIRECTORY (bin)/d' CMakeLists.txt sed -i '/ADD_SUBDIRECTORY (doc)/d' CMakeLists.txt sed -i '/ADD_SUBDIRECTORY (etc)/d' CMakeLists.txt sed -i '/ADD_SUBDIRECTORY (po)/d' CMakeLists.txt sed -i '/bin\/dnf/d' CMakeLists.txt sed -i '/doc\/conf.py/d' CMakeLists.txt # distutils is deprecated on 3.11 # and I have no need for DNF plugins on 3.11 sed -i 's/PLUGINPATH = .*/PLUGINPATH = "not-on-3.11"/' dnf/const.py.in sed -i '/distutils/d' dnf/const.py.in sed -i '/distutils/d' dnf/persistor.py mkdir build-py3 %build pushd build-py3 %cmake .. -DPYTHON_DESIRED:FILEPATH=%{__python3} -DDNF_VERSION=%{version} %make_build popd %install pushd build-py3 %make_install popd %files %{python3_sitelib}/dnf/ %changelog * Mon Aug 26 2024 Ken Dreyer - 4.14.0-9 - Update package for rhel-9.4.0. - Thanks: Jaroslav Rohel Kyle Walker * Fri Oct 27 2023 Ken Dreyer - 4.14.0-5 - Initial package for python 3.11 based on rhel-9.2.0. - Thanks previous contibutors: Aleš Kozumplík Ales Matej Daniel Mach Igor Gnatenko Jan Silhan Jaroslav Mracek Lukas Hrazky Marek Blaha Martin Hatina Michal Luscon Nicola Sella Pavla Kratochvilova Richard W.M. Jones