%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.63.0-8 %global libcomps_version 0.1.8 %global libmodulemd_version 2.9.3 %global rpm_version 4.14.2-35 # paths %global confdir %{_sysconfdir}/%{name} %global pluginconfpath %{confdir}/plugins %global py3pluginpath %{python3_sitelib}/%{name}-plugins # 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.7.0 Release: 20%{?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 # Patches are stored in the upstream repository in this branch: # https://github.com/rpm-software-management/dnf/tree/rhel-8.7 # Use "git format-patch -N" to regenerate the patch files. Patch0001: 0001-Set-top-level-directory-for-unittest.patch Patch0002: 0002-dnf-rpm-miscutils.py-fix-usage-of-_.patch Patch0003: 0003-Pass-the-package-to-rpmkeys-stdin.patch Patch0004: 0004-Use-rpmkeys-alone-to-verify-signature.patch Patch0005: 0005-Lower-_pkgverify_level-to-signature-for-signature-ch.patch Patch0006: 0006-add-default-colors-to-documentation.patch Patch0007: 0007-add-author.patch Patch0008: 0008-update-colors-according-to-libdnf-libdnf-conf-Config.patch Patch0009: 0009-Fix-reporting-irrecoverable-errors-on-packages-downl.patch Patch0010: 0010-Add-fail_fast-parameter-to-download_payloads-methods.patch Patch0011: 0011-comps-Make-the-install_or_skip-method-not-catch-Comp.patch Patch0012: 0012-doc-Improve-description-of-multilib_policy-all-RhBug.patch Patch0013: 0013-Fix-Python-dnf-API-does-not-respect-cacheonly-RhBug-.patch Patch0014: 0014-Documentation-API-notes-for-cacheonly.patch Patch0015: 0015-Allow-destdir-option-with-modulesync-command.patch Patch0016: 0016-Update-translations-RhBug-2017270.patch Patch0017: 0017-Add-documentation-for-query-api-flags.patch Patch0018: 0018-Fix-processing-of-download-errors-RhBug-2024527.patch Patch0019: 0019-Fix-unittests-that-relied-on-checksum-being-at-the-e.patch Patch0020: 0020-cli-commands-history-Fix-history-undo-on-a-Reason-Ch.patch Patch0021: 0021-Fix-remove-when-no-repos-are-enabled-RhBz-2064341.patch Patch0022: 0022-doc-Improve-proxy-configuration-option-documentation.patch Patch0023: 0023-Base.reset-plug-temporary-leak-of-libsolv-s-page-fil.patch Patch0024: 0024-doc-Describe-how-gpg-keys-are-stored-for-repo_ggpche.patch Patch0025: 0025-Add-only-relevant-pkgs-to-upgrade-transaction-RhBug-.patch Patch0026: 0026-Use-installed_all-because-installed_query-is-filtere.patch Patch0027: 0027-Don-t-include-resolved-advisories-for-obsoletes-with.patch Patch0028: 0028-Set-default-value-for-variable-to-prevent-crash-RhBu.patch Patch0029: 0029-Add-doc-related-to-destdir-and-downloadonly-options-.patch Patch0030: 0030-Expose-plugin-unload-method-to-API-RhBug-2047251.patch Patch0031: 0031-Add-support-for-group-upgrade-rollback-RhBug-2016070.patch Patch0032: 0032-Fix-upgrade-from-file-to-noarch-pkg-RhBug-2006018.patch Patch0033: 0033-Allow-passing-plugin-parameters-with-dashes-in-names.patch Patch0034: 0034-Fix-plugins-unit-tests-unload-plugins-upon-their-del.patch Patch0035: 0035-Move-system-upgrade-plugin-to-core-RhBug-2054235.patch Patch0036: 0036-Add-support-for-rollback-of-group-upgrade-rollback-R.patch Patch0037: 0037-Document-changes-to-offline-upgrade-command.patch Patch0038: 0038-Better-explain-traceback-of-rpm.error-with-dnf.patch Patch0039: 0039-Ignore-processing-variable-files-with-unsupported-en.patch Patch0040: 0040-Update-translations.patch Patch0041: 0041-Omit-src-RPMs-from-check-update-RhBug-2151910.patch Patch0042: 0042-Backport-automatic-Fix-onl-detect-proxy-RhBz2022440.patch Patch0043: 0043-automatic-Return-an-error-when-transaction-fails-RhB.patch Patch0044: 0044-Document-symbols-in-dnf-history-list-output.patch Patch0045: 0045-RHEL-1245-Remove-usrbin-from-syspath-noimpor-garbage.patch Patch0046: 0046-RHEL-6393-Fix-japanese-translations.patch Patch0047: 0047-RHEL-11786-Fix-substitution-in-kvp-in-add_new_repo.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 * Tue Aug 27 2024 Ken Dreyer - 4.7.0-20 - Sync with latest RHEL 8 package * Tue Jan 23 2024 Ken Dreyer - 4.7.0-19 - Initial package for python 3.11 based on rhel-8.9.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