%global __python3 /usr/bin/python3.11 %global python3_pkgversion 3.11 %global libsolv_version 0.7.20-3 %global libmodulemd_version 2.11.2-2 %global librepo_version 1.13.1 %global dnf_conflict 4.3.0 %global swig_version 3.0.12 %global libdnf_major_version 0 %global libdnf_minor_version 63 %global libdnf_micro_version 0 %define __cmake_in_source_build 1 %bcond_with valgrind %if 0%{?rhel} && ! 0%{?centos} %bcond_without rhsm %else %bcond_with rhsm %endif %if 0%{?rhel} %bcond_with zchunk %else %bcond_without zchunk %endif %bcond_with sanitizers %global _cmake_opts \\\ -DENABLE_RHSM_SUPPORT=%{?with_rhsm:ON}%{!?with_rhsm:OFF} \\\ %{nil} Name: python%{python3_pkgversion}-libdnf Version: %{libdnf_major_version}.%{libdnf_minor_version}.%{libdnf_micro_version} Release: 17.el8_9 Summary: Python %{python3_pkgversion} bindings for the libdnf library. License: LGPLv2+ URL: https://github.com/rpm-software-management/libdnf Source0: %{url}/archive/%{version}/libdnf-%{version}.tar.gz Patch1: 0001-Revert-Improve-performance-for-module-query.patch Patch2: 0002-Revert-Enhance-description-of-modular-solvables.patch Patch3: 0003-Revert-Fix-typo-lates-latest.patch Patch4: 0004-Revert-Remove-unused-code-bump-version.patch Patch5: 0005-Revert-Report-a-new-type-of-the-module-resolve-error.patch Patch6: 0006-Revert-Add-additional-fallback-for-module-resolve.patch Patch7: 0007-Revert-Decide-how-to-handle-context-according-to-sta.patch Patch8: 0008-Revert-Fix-load-update-FailSafe.patch Patch9: 0009-Revert-Change-mechanism-of-module-conflicts.patch Patch10: 0010-Revert-Call-addVersion2Modules-as-late-as-possible.patch Patch11: 0011-Revert-Fix-modular-queries-with-the-new-solver.patch Patch12: 0012-Revert-Add-compatible-layer-for-MdDocuments-v2.patch Patch13: 0013-Revert-Add-an-alternative-constructor-for-ModulePack.patch Patch14: 0014-Revert-Adjust-modular-solver-to-new-context-type.patch Patch15: 0015-Revert-Change-usage-of-context-and-version-in-modula.patch Patch16: 0016-Fix-failing-unittest-caused-by-the-revert-of-new-mod.patch Patch17: 0017-Modify-unit-test-after-change-of-handling-advisories.patch Patch18: 0018-Adjust-module-error-formatting-function-for-original.patch Patch19: 0019-Remove-redundant-test.patch Patch20: 0020-Fix-dnf_context_module_install-memory-leaks.patch Patch21: 0021-covscan-remove-unused-vars-mark-private-func-static-return-values.patch Patch22: 0022-hawkey-surrogateescape-error-handler-to-decode-UTF-8-strings-RhBug1893176.patch Patch23: 0023-Turn-off-strict-validation-of-modulemd-documents-RhBug200485320071662007167.patch Patch24: 0024-Add-unittest-for-setting-up-repo-with-empty-keyfile-RhBug1994614.patch Patch25: 0025-Add-getLatestModules.patch Patch26: 0026-context-Substitute-all-repository-config-options-RhB.patch Patch27: 0027-Use-environment-variable-in-unittest-instead-of-ugly.patch Patch28: 0028-Add-private-API-for-filling-reading-and-verifying-ne.patch Patch29: 0029-Use-dnf-solv-userdata-to-check-versions-and-checksum.patch Patch30: 0030-Update-unittest-to-test-the-new-private-dnf-solvfile.patch Patch31: 0031-Increase-required-libsolv-version-for-cache-versioni.patch Patch32: 0032-Add-more-specific-error-handling-for-loading-repomd-.patch Patch33: 0033-libdnf-transaction-RPMItem-Fix-handling-transaction-.patch Patch34: 0034-libdnf-transaction-TransactionItem-Set-short-action-.patch Patch35: 0035-Do-not-print-errors-on-failovermethod-repo-option-Rh.patch Patch36: 0036-sack-query.hpp-Add-a-missing-include.patch Patch37: 0037-context-dnf_context_remove-accepts-package-spec-as-d.patch Patch38: 0038-context-Fix-doc-dnf_context_install-remove-update-di.patch Patch39: 0039-advisory-upgrade-filter-out-advPkgs-with-different-a.patch Patch40: 0040-Add-obsoletes-to-filtering-for-advisory-candidates.patch Patch41: 0041-Fix-listing-a-repository-without-cpeid-RhBug-2066334.patch Patch42: 0042-Allow-change-of-arch-during-security-updates-with-no.patch Patch43: 0043-Update-translations.patch Patch44: 0044-Add_repoid_to_solver_error_messagase.patch Patch45: 0045-conf-Support-proxy-_none_-in-main-config-RhBug-21557.patch Patch46: 0046-Update-translations-RHEL-8.9.patch BuildRequires: cmake BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: libsolv-devel >= %{libsolv_version} BuildRequires: pkgconfig(librepo) >= %{librepo_version} BuildRequires: pkgconfig(check) %if %{with valgrind} BuildRequires: valgrind %endif BuildRequires: pkgconfig(gio-unix-2.0) >= 2.46.0 BuildRequires: pkgconfig(gtk-doc) BuildRequires: rpm-devel >= 4.11.0 %if %{with rhsm} BuildRequires: pkgconfig(librhsm) >= 0.0.3 %endif %if %{with zchunk} BuildRequires: pkgconfig(zck) >= 0.9.11 %endif BuildRequires: pkgconfig(sqlite3) BuildRequires: pkgconfig(json-c) BuildRequires: pkgconfig(cppunit) BuildRequires: pkgconfig(libcrypto) BuildRequires: pkgconfig(modulemd-2.0) >= %{libmodulemd_version} BuildRequires: pkgconfig(smartcols) BuildRequires: gettext BuildRequires: gpgme-devel %if %{with sanitizers} BuildRequires: libasan BuildRequires: liblsan BuildRequires: libubsan %endif Requires: libmodulemd%{?_isa} >= %{libmodulemd_version} Requires: libsolv%{?_isa} >= %{libsolv_version} Requires: librepo%{?_isa} >= %{librepo_version} Requires: libdnf%{?_isa} = %{version}-%{release} BuildRequires: git-core BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-setuptools BuildRequires: python3-sphinx BuildRequires: swig >= %{swig_version} %description Python %{python3_pkgversion} bindings for the libdnf library. %package -n python%{python3_pkgversion}-hawkey Summary: Python %{python3_pkgversion} bindings for the hawkey library BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-setuptools Requires: libdnf%{?_isa} = %{version}-%{release} Requires: python%{python3_pkgversion}-libdnf = %{version}-%{release} %description -n python%{python3_pkgversion}-hawkey Python %{python3_pkgversion} bindings for the hawkey library. %prep %autosetup -S git -p1 -n libdnf-%{version} mkdir build-py3 %build pushd build-py3 %cmake -DPYTHON_DESIRED:FILEPATH=%{__python3} -DWITH_GIR=0 -DWITH_MAN=0 -Dgtkdoc=0 ../ %{!?with_zchunk:-DWITH_ZCHUNK=OFF} %{!?with_valgrind:-DDISABLE_VALGRIND=1} %{_cmake_opts} -DLIBDNF_MAJOR_VERSION=%{libdnf_major_version} -DLIBDNF_MINOR_VERSION=%{libdnf_minor_version} -DLIBDNF_MICRO_VERSION=%{libdnf_micro_version} \ -DWITH_SANITIZERS=%{?with_sanitizers:ON}%{!?with_sanitizers:OFF} %make_build popd %check pushd build-py3 make ARGS="-V" test popd %install pushd build-py3 %make_install popd # remove non-python files rm -r %{buildroot}%{_libdir}/libdnf* rm -f %{buildroot}%{_sysconfdir}/profile.d/dnf-sanitizers.sh rm %{buildroot}/%{_libdir}/pkgconfig/libdnf.pc rm -r %{buildroot}/%{_includedir}/libdnf/ rm -r %{buildroot}/%{_datadir}/gtk-doc/html/libdnf/ rm %{buildroot}/usr/share/locale/*/LC_MESSAGES/libdnf.mo %files %license COPYING %doc README.md AUTHORS %{python3_sitearch}/libdnf/ %files -n python%{python3_pkgversion}-hawkey %{python3_sitearch}/hawkey/ %changelog * Tue Jan 23 2024 Ken Dreyer - 0.63.0-17 - sync with rhel-8.9.0 * Fri Oct 20 2023 Ken Dreyer - 0.63.0-14 - Initial package for Python 3.11 - Thanks original package contributors: Ales Matej Daniel Mach Igor Gnatenko Jaroslav Mracek Lukas Hrazky Lumír Balhar Marek Blaha Martin Hatina Miro Hrončok Nicola Sella Pavla Kratochvilova Peter Robinson Stratakis Charalampos