From a5df953824474dfcb99ee3da305c11e2b178eeb5 Mon Sep 17 00:00:00 2001 From: wangmy Date: Tue, 15 Mar 2022 19:22:17 +0800 Subject: libdnf: upgrade 0.65.0 -> 0.66.0 0001-Add-WITH_TESTS-option.patch 0001-Look-fo-sphinx-only-if-documentation-is-actually-ena.patch removed since they're included in 0.66.0 0001-Get-parameters-for-both-libsolv-and-libsolvext-libdn.patch 0004-Set-libsolv-variables-with-pkg-config-cmake-s-own-mo.patch modified for new version Changelog: ========= Use rpmdbCookie from librpm, remove hawkey.Sack._rpmdb_version Fix handling transaction id in resolveTransactionItemReason (RhBug:2010259,2053014) Remove deprecated assertions (RhBug:2027383) Skip rich deps for autodetection of unmet dependencies (RhBug:2033130, 2048394) Increase required rpm version since we use rpmdbCookie() Signed-off-by: Wang Mingyu Signed-off-by: Richard Purdie --- .../libdnf/libdnf/0001-Add-WITH_TESTS-option.patch | 49 ---------------------- ...ers-for-both-libsolv-and-libsolvext-libdn.patch | 4 +- ...inx-only-if-documentation-is-actually-ena.patch | 42 ------------------- ...-variables-with-pkg-config-cmake-s-own-mo.patch | 10 +++-- meta/recipes-devtools/libdnf/libdnf_0.65.0.bb | 38 ----------------- meta/recipes-devtools/libdnf/libdnf_0.66.0.bb | 36 ++++++++++++++++ 6 files changed, 44 insertions(+), 135 deletions(-) delete mode 100644 meta/recipes-devtools/libdnf/libdnf/0001-Add-WITH_TESTS-option.patch delete mode 100644 meta/recipes-devtools/libdnf/libdnf/0001-Look-fo-sphinx-only-if-documentation-is-actually-ena.patch delete mode 100644 meta/recipes-devtools/libdnf/libdnf_0.65.0.bb create mode 100644 meta/recipes-devtools/libdnf/libdnf_0.66.0.bb diff --git a/meta/recipes-devtools/libdnf/libdnf/0001-Add-WITH_TESTS-option.patch b/meta/recipes-devtools/libdnf/libdnf/0001-Add-WITH_TESTS-option.patch deleted file mode 100644 index 607995a394..0000000000 --- a/meta/recipes-devtools/libdnf/libdnf/0001-Add-WITH_TESTS-option.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 7d60d62b5c5374156703ca7262fb2f85ec5db119 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin -Date: Tue, 6 Nov 2018 13:54:43 +0100 -Subject: [PATCH] Add WITH_TESTS option - -This makes a dependency on cppunit optional. - -Upstream-Status: Submitted [https://github.com/rpm-software-management/libdnf/pull/1382] -Signed-off-by: Alexander Kanavin - ---- - CMakeLists.txt | 3 +++ - python/hawkey/CMakeLists.txt | 2 ++ - 2 files changed, 5 insertions(+) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 9c6e1b2f..8599c540 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -33,6 +33,7 @@ option(WITH_MAN "Enables hawkey man page generation" ON) - option(WITH_ZCHUNK "Build with zchunk support" ON) - option(ENABLE_RHSM_SUPPORT "Build with Red Hat Subscription Manager support?" OFF) - option(ENABLE_SOLV_URPMREORDER "Build with support for URPM-like solution reordering?" OFF) -+option(WITH_TESTS "Enables unit tests" ON) - - - # build options - debugging -@@ -179,8 +180,10 @@ endif() - - - # build tests -+IF (WITH_TESTS) - enable_testing() - add_subdirectory(tests) -+ENDIF() - if(WITH_BINDINGS) - add_subdirectory(python/hawkey) - endif() -diff --git a/python/hawkey/CMakeLists.txt b/python/hawkey/CMakeLists.txt -index d9645346..84d17204 100644 ---- a/python/hawkey/CMakeLists.txt -+++ b/python/hawkey/CMakeLists.txt -@@ -50,4 +50,6 @@ target_link_libraries(_hawkeymodule ${PYTHON_LIBRARY}) - install(FILES __init__.py DESTINATION ${PYTHON_INSTALL_DIR}/hawkey) - install(TARGETS _hawkeymodule LIBRARY DESTINATION ${PYTHON_INSTALL_DIR}/hawkey) - -+IF (WITH_TESTS) - add_subdirectory(tests) -+ENDIF() diff --git a/meta/recipes-devtools/libdnf/libdnf/0001-Get-parameters-for-both-libsolv-and-libsolvext-libdn.patch b/meta/recipes-devtools/libdnf/libdnf/0001-Get-parameters-for-both-libsolv-and-libsolvext-libdn.patch index 10450defbe..c7b2af89d1 100644 --- a/meta/recipes-devtools/libdnf/libdnf/0001-Get-parameters-for-both-libsolv-and-libsolvext-libdn.patch +++ b/meta/recipes-devtools/libdnf/libdnf/0001-Get-parameters-for-both-libsolv-and-libsolvext-libdn.patch @@ -16,12 +16,12 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt index b722d4fb..ce88b9e3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -45,7 +45,7 @@ endif() +@@ -52,7 +52,7 @@ endif() # build dependencies find_package(Gpgme REQUIRED) -PKG_CHECK_MODULES (LIBSOLV REQUIRED libsolv) +PKG_CHECK_MODULES (LIBSOLV REQUIRED libsolv libsolvext) set(LIBSOLV_LIBRARY ${LIBSOLV_LIBRARIES}) - find_package(OpenSSL REQUIRED) + diff --git a/meta/recipes-devtools/libdnf/libdnf/0001-Look-fo-sphinx-only-if-documentation-is-actually-ena.patch b/meta/recipes-devtools/libdnf/libdnf/0001-Look-fo-sphinx-only-if-documentation-is-actually-ena.patch deleted file mode 100644 index 2d8213cc87..0000000000 --- a/meta/recipes-devtools/libdnf/libdnf/0001-Look-fo-sphinx-only-if-documentation-is-actually-ena.patch +++ /dev/null @@ -1,42 +0,0 @@ -From b570c7f8bd089deec7da2b108aa789a27025a473 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin -Date: Tue, 19 Nov 2019 13:46:09 +0100 -Subject: [PATCH] Look fo sphinx only if documentation is actually enabled - -Upstream-Status: Submitted [https://github.com/rpm-software-management/libdnf/pull/1383] -Signed-off-by: Alexander Kanavin ---- - docs/hawkey/CMakeLists.txt | 20 +++++++++++--------- - 1 file changed, 11 insertions(+), 9 deletions(-) - -diff --git a/docs/hawkey/CMakeLists.txt b/docs/hawkey/CMakeLists.txt -index 52cc35c6..63c7672f 100644 ---- a/docs/hawkey/CMakeLists.txt -+++ b/docs/hawkey/CMakeLists.txt -@@ -2,15 +2,17 @@ - # tell sphinx-build to do them both in one go: - - --find_program(SPHINX_PROGRAM NAMES "sphinx-build-${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}") --if(NOT EXISTS ${SPHINX_PROGRAM}) -- find_program(SPHINX_PROGRAM NAMES sphinx-build-${PYTHON_VERSION_MAJOR}) --endif() --if(NOT EXISTS ${SPHINX_PROGRAM}) -- find_program(SPHINX_PROGRAM NAMES sphinx-build) --endif() --if(NOT EXISTS ${SPHINX_PROGRAM}) -- message(FATAL_ERROR "Sphinx program not found." ) -+if (WITH_HTML OR WITH_MAN) -+ find_program(SPHINX_PROGRAM NAMES "sphinx-build-${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}") -+ if(NOT EXISTS ${SPHINX_PROGRAM}) -+ find_program(SPHINX_PROGRAM NAMES sphinx-build-${PYTHON_VERSION_MAJOR}) -+ endif() -+ if(NOT EXISTS ${SPHINX_PROGRAM}) -+ find_program(SPHINX_PROGRAM NAMES sphinx-build) -+ endif() -+ if(NOT EXISTS ${SPHINX_PROGRAM}) -+ message(FATAL_ERROR "Sphinx program not found." ) -+ endif() - endif() - - if(WITH_HTML) diff --git a/meta/recipes-devtools/libdnf/libdnf/0004-Set-libsolv-variables-with-pkg-config-cmake-s-own-mo.patch b/meta/recipes-devtools/libdnf/libdnf/0004-Set-libsolv-variables-with-pkg-config-cmake-s-own-mo.patch index 475c8f120b..9adb345b68 100644 --- a/meta/recipes-devtools/libdnf/libdnf/0004-Set-libsolv-variables-with-pkg-config-cmake-s-own-mo.patch +++ b/meta/recipes-devtools/libdnf/libdnf/0004-Set-libsolv-variables-with-pkg-config-cmake-s-own-mo.patch @@ -7,22 +7,24 @@ Subject: [PATCH] Set libsolv variables with pkg-config (cmake's own module Upstream-Status: Submitted [https://github.com/rpm-software-management/libdnf/pull/312] Signed-off-by: Alexander Kanavin - --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt -index 16b63308..b722d4fb 100644 +index fd6e3f0..5383744 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -45,7 +45,8 @@ endif() +@@ -52,7 +52,8 @@ endif() # build dependencies find_package(Gpgme REQUIRED) -find_package(LibSolv 0.6.30 REQUIRED COMPONENTS ext) +PKG_CHECK_MODULES (LIBSOLV REQUIRED libsolv) +set(LIBSOLV_LIBRARY ${LIBSOLV_LIBRARIES}) - find_package(OpenSSL REQUIRED) + # build dependencies via pkg-config +-- +2.25.1 + diff --git a/meta/recipes-devtools/libdnf/libdnf_0.65.0.bb b/meta/recipes-devtools/libdnf/libdnf_0.65.0.bb deleted file mode 100644 index 03c56e934a..0000000000 --- a/meta/recipes-devtools/libdnf/libdnf_0.65.0.bb +++ /dev/null @@ -1,38 +0,0 @@ -SUMMARY = "Library providing simplified C and Python API to libsolv" -HOMEPAGE = "https://github.com/rpm-software-management/libdnf" -DESCRIPTION = "This library provides a high level package-manager. It's core library of dnf, PackageKit and rpm-ostree. It's replacement for deprecated hawkey library which it contains inside and uses librepo under the hood." -LICENSE = "LGPL-2.1-or-later" -LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" - -SRC_URI = "git://github.com/rpm-software-management/libdnf;branch=dnf-4-master;protocol=https \ - file://0001-FindGtkDoc.cmake-drop-the-requirement-for-GTKDOC_SCA.patch \ - file://0004-Set-libsolv-variables-with-pkg-config-cmake-s-own-mo.patch \ - file://0001-Get-parameters-for-both-libsolv-and-libsolvext-libdn.patch \ - file://0001-Add-WITH_TESTS-option.patch \ - file://0001-Look-fo-sphinx-only-if-documentation-is-actually-ena.patch \ - file://enable_test_data_dir_set.patch \ - file://0001-drop-FindPythonInstDir.cmake.patch \ - file://0001-libdnf-dnf-context.cpp-do-not-try-to-access-BDB-data.patch \ - " - -SRCREV = "cee3e1c59f849d9be1bb8d7db3090cea5c59f4b6" -UPSTREAM_CHECK_GITTAGREGEX = "(?P(?!4\.90)\d+(\.\d+)+)" - -S = "${WORKDIR}/git" - -DEPENDS = "glib-2.0 libsolv libcheck librepo rpm gtk-doc libmodulemd json-c swig-native" - -inherit gtk-doc gobject-introspection cmake pkgconfig setuptools3-base - -EXTRA_OECMAKE = " -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR} -DWITH_MAN=OFF -DPYTHON_DESIRED=3 \ - ${@bb.utils.contains('GI_DATA_ENABLED', 'True', '-DWITH_GIR=ON', '-DWITH_GIR=OFF', d)} \ - -DWITH_TESTS=OFF \ - -DWITH_ZCHUNK=OFF \ - -DWITH_HTML=OFF \ - " -EXTRA_OECMAKE:append:class-native = " -DWITH_GIR=OFF" -EXTRA_OECMAKE:append:class-nativesdk = " -DWITH_GIR=OFF" - -BBCLASSEXTEND = "native nativesdk" -SKIP_RECIPE[libdnf] ?= "${@bb.utils.contains('PACKAGE_CLASSES', 'package_rpm', '', 'Does not build without package_rpm in PACKAGE_CLASSES due disabled rpm support in libsolv', d)}" - diff --git a/meta/recipes-devtools/libdnf/libdnf_0.66.0.bb b/meta/recipes-devtools/libdnf/libdnf_0.66.0.bb new file mode 100644 index 0000000000..1bfe901c8a --- /dev/null +++ b/meta/recipes-devtools/libdnf/libdnf_0.66.0.bb @@ -0,0 +1,36 @@ +SUMMARY = "Library providing simplified C and Python API to libsolv" +HOMEPAGE = "https://github.com/rpm-software-management/libdnf" +DESCRIPTION = "This library provides a high level package-manager. It's core library of dnf, PackageKit and rpm-ostree. It's replacement for deprecated hawkey library which it contains inside and uses librepo under the hood." +LICENSE = "LGPL-2.1-or-later" +LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" + +SRC_URI = "git://github.com/rpm-software-management/libdnf;branch=dnf-4-master;protocol=https \ + file://0001-FindGtkDoc.cmake-drop-the-requirement-for-GTKDOC_SCA.patch \ + file://0004-Set-libsolv-variables-with-pkg-config-cmake-s-own-mo.patch \ + file://0001-Get-parameters-for-both-libsolv-and-libsolvext-libdn.patch \ + file://enable_test_data_dir_set.patch \ + file://0001-drop-FindPythonInstDir.cmake.patch \ + file://0001-libdnf-dnf-context.cpp-do-not-try-to-access-BDB-data.patch \ + " + +SRCREV = "add5d5418b140a86d08667dd2b14793093984875" +UPSTREAM_CHECK_GITTAGREGEX = "(?P(?!4\.90)\d+(\.\d+)+)" + +S = "${WORKDIR}/git" + +DEPENDS = "glib-2.0 libsolv libcheck librepo rpm gtk-doc libmodulemd json-c swig-native" + +inherit gtk-doc gobject-introspection cmake pkgconfig setuptools3-base + +EXTRA_OECMAKE = " -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR} -DWITH_MAN=OFF -DPYTHON_DESIRED=3 \ + ${@bb.utils.contains('GI_DATA_ENABLED', 'True', '-DWITH_GIR=ON', '-DWITH_GIR=OFF', d)} \ + -DWITH_TESTS=OFF \ + -DWITH_ZCHUNK=OFF \ + -DWITH_HTML=OFF \ + " +EXTRA_OECMAKE:append:class-native = " -DWITH_GIR=OFF" +EXTRA_OECMAKE:append:class-nativesdk = " -DWITH_GIR=OFF" + +BBCLASSEXTEND = "native nativesdk" +SKIP_RECIPE[libdnf] ?= "${@bb.utils.contains('PACKAGE_CLASSES', 'package_rpm', '', 'Does not build without package_rpm in PACKAGE_CLASSES due disabled rpm support in libsolv', d)}" + -- cgit 1.2.3-korg