diff --git a/dnf-4.16.2-port-to-newer-cmake.patch b/dnf-4.16.2-port-to-newer-cmake.patch new file mode 100644 index 0000000000000000000000000000000000000000..fa4a798fdf448156b6cf0f31b1521929b0672c11 --- /dev/null +++ b/dnf-4.16.2-port-to-newer-cmake.patch @@ -0,0 +1,38 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4aee99f..996ae74 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,5 +1,5 @@ ++CMAKE_MINIMUM_REQUIRED (VERSION 3.12...${CMAKE_VERSION}) + PROJECT (dnf NONE) +-CMAKE_MINIMUM_REQUIRED (VERSION 2.4) + + INCLUDE (${CMAKE_SOURCE_DIR}/VERSION.cmake) + +@@ -7,14 +7,22 @@ SET( SYSCONFDIR /etc) + SET( SYSTEMD_DIR /usr/lib/systemd/system) + + IF (NOT PYTHON_DESIRED) +- FIND_PACKAGE (PythonInterp REQUIRED) ++ FIND_PACKAGE (Python REQUIRED) ++ SET(PYTHON_EXECUTABLE ${Python_EXECUTABLE}) ++ SET(PYTHON_VERSION_MAJOR ${Python_VERSION_MAJOR}) + ELSEIF (${PYTHON_DESIRED} STREQUAL "2") +- FIND_PACKAGE (PythonInterp 2 EXACT REQUIRED) ++ FIND_PACKAGE (Python2 REQUIRED) ++ SET(PYTHON_EXECUTABLE ${Python2_EXECUTABLE}) ++ SET(PYTHON_VERSION_MAJOR 2) + ELSEIF (${PYTHON_DESIRED} STREQUAL "3") +- FIND_PACKAGE (PythonInterp 3 EXACT REQUIRED) ++ FIND_PACKAGE (Python3 REQUIRED) ++ SET(PYTHON_EXECUTABLE ${Python3_EXECUTABLE}) ++ SET(PYTHON_VERSION_MAJOR 3) + ELSEIF (EXISTS ${PYTHON_DESIRED}) + SET (PYTHON_EXECUTABLE ${PYTHON_DESIRED}) +- FIND_PACKAGE (PythonInterp REQUIRED) ++ FIND_PACKAGE (Python REQUIRED) ++ SET(PYTHON_EXECUTABLE ${Python_EXECUTABLE}) ++ SET(PYTHON_VERSION_MAJOR ${Python_VERSION_MAJOR}) + ELSE () + MESSAGE (FATAL_ERROR "Invalid PYTHON_DESIRED value: " ${PYTHON_DESIRED}) + ENDIF() diff --git a/dnf.spec b/dnf.spec index f95968ae9b18728637a4e29f7e7c2d986f8021cb..6a9f774d0ad1738aded739e321697ec2347e0e92 100644 --- a/dnf.spec +++ b/dnf.spec @@ -4,27 +4,14 @@ Name: dnf Version: 4.16.2 -Release: 9 +Release: 10 Summary: A software package manager that manages packages on Linux distributions. License: GPL-2.0-or-later AND GPL-1.0-only URL: https://github.com/rpm-software-management/dnf Source0: https://github.com/rpm-software-management/dnf/archive/%{version}/%{name}-%{version}.tar.gz -Patch9002: add-rpm-transaction-debuginfo.patch -Patch9004: fix-dnf-history-undo-error-when-history-sqlite-missing.patch - -%if 0%{?check_target_before_unlink} -Patch9006: get-lockfile-exists-before-unlick.patch -%endif - -%ifarch sw_64 Patch6000: dnf-4.10.0-sw.patch -%endif - -%if 0%(test `uname -m` == "loongarch64" && echo 1) Patch6001: 0001-Add-loongarch-architecture-support.patch -%endif - Patch6002: backport-Fix-bash-completion-due-to-sqlite-changes.patch Patch6003: backport-remove-duplicates-when-no-duplicates-exit-with-0.patch Patch6004: backport-remove-oldinstallonly-when-no-old-installonly-packages-exit-with-0.patch @@ -35,6 +22,13 @@ Patch6008: backport-Update-the-man-page-entry-for-the-countme-option. Patch6009: backport-Allow-local-downloads-to-same-downloaddir.patch Patch9001: bugfix-automatic-Use-add_security_filters-not-_update_secur.patch +Patch9002: add-rpm-transaction-debuginfo.patch +Patch9003: dnf-4.16.2-port-to-newer-cmake.patch +Patch9004: fix-dnf-history-undo-error-when-history-sqlite-missing.patch + +%if 0%{?check_target_before_unlink} +Patch9006: get-lockfile-exists-before-unlick.patch +%endif BuildArch: noarch BuildRequires: cmake gettext systemd bash-completion python3-sphinx @@ -257,6 +251,10 @@ export TERM=linux %{_mandir}/man8/%{name}-automatic.8* %changelog +* Fri Mar 14 2025 Funda Wang - 4.16.2-10 +- fix build with cmake 4.0 +- make all patches included + * Fri Dec 20 2024 Funda Wang - 4.16.2-9 - adopt to new cmake macro