diff options
Diffstat (limited to 'meta/recipes-devtools/libdnf')
9 files changed, 161 insertions, 117 deletions
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 cbd0362c8b..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 @@ -1,7 +1,7 @@ -From 2bf0666544293dcfac2f67b678e24353acdcd4e7 Mon Sep 17 00:00:00 2001 +From 9294cd19e5e3121fb8d37b44ee82dd7c4b3ab2c7 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <alex.kanavin@gmail.com> Date: Tue, 7 Feb 2017 12:16:03 +0200 -Subject: [PATCH 2/2] Get parameters for both libsolv and libsolvext (libdnf is +Subject: [PATCH] Get parameters for both libsolv and libsolvext (libdnf is using both) @@ -13,18 +13,15 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt -index ca280f3..6ab9827 100644 +index b722d4fb..ce88b9e3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -29,7 +29,7 @@ find_package (PkgConfig REQUIRED) - SET (CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules) - PKG_CHECK_MODULES(GLIB gio-unix-2.0>=2.46.0 REQUIRED) - FIND_LIBRARY (RPMDB_LIBRARY NAMES rpmdb) +@@ -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}) - if (ENABLE_RHSM_SUPPORT) - pkg_check_modules (RHSM REQUIRED librhsm) --- -2.14.2 + diff --git a/meta/recipes-devtools/libdnf/libdnf/0001-drop-FindPythonInstDir.cmake.patch b/meta/recipes-devtools/libdnf/libdnf/0001-drop-FindPythonInstDir.cmake.patch new file mode 100644 index 0000000000..d483dd410b --- /dev/null +++ b/meta/recipes-devtools/libdnf/libdnf/0001-drop-FindPythonInstDir.cmake.patch @@ -0,0 +1,42 @@ +From c0a465ccae395871ab10932975e37894220bc6a1 Mon Sep 17 00:00:00 2001 +From: Hongxu Jia <hongxu.jia@windriver.com> +Date: Tue, 1 Jun 2021 10:23:59 +0800 +Subject: [PATCH] drop FindPythonInstDir.cmake + +Since commit [1] applied, PYTHON_INSTALL_DIR is not right +on nativesdk build +... +|Building for python3 +|-- Python install dir is +|tmp-glibc/work/x86_64-nativesdk-wrlinuxsdk-linux/nativesdk-libdnf/0.63.0-r0/ +recipe-sysroot-native/usr/lib/python3.9/site-packages +... + +Yocto manually set PYTHON_INSTALL_DIR from recipe, it is not +necessary to call FindPythonInstDir.cmake which will override +Yocto setting + +[1] https://github.com/rpm-software-management/libdnf/commit/f1cffbfb9f338da827e233c2d8ac3a25a6a59a69 + +Upstream-Status: Inappropriate [Yocto specific] + +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> +--- + cmake/modules/FindPythonInstDir.cmake | 7 +------ + 1 file changed, 1 insertion(+), 6 deletions(-) + +diff --git a/cmake/modules/FindPythonInstDir.cmake b/cmake/modules/FindPythonInstDir.cmake +index ed098ded..8b137891 100644 +--- a/cmake/modules/FindPythonInstDir.cmake ++++ b/cmake/modules/FindPythonInstDir.cmake +@@ -1,6 +1 @@ +-EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c " +-from sys import stdout +-from sysconfig import get_path +-path=get_path(name='platlib', vars={'platbase':'${CMAKE_INSTALL_PREFIX}'}) +-stdout.write(path)" +-OUTPUT_VARIABLE PYTHON_INSTALL_DIR) ++ +-- +2.18.1 + diff --git a/meta/recipes-devtools/libdnf/libdnf/0001-libdnf-dnf-context.cpp-do-not-try-to-access-BDB-data.patch b/meta/recipes-devtools/libdnf/libdnf/0001-libdnf-dnf-context.cpp-do-not-try-to-access-BDB-data.patch new file mode 100644 index 0000000000..6f8a3dcb50 --- /dev/null +++ b/meta/recipes-devtools/libdnf/libdnf/0001-libdnf-dnf-context.cpp-do-not-try-to-access-BDB-data.patch @@ -0,0 +1,37 @@ +From 2f7382b35d59fe08034603497e82ffb943fedef1 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <alex.kanavin@gmail.com> +Date: Wed, 30 Jun 2021 15:31:16 +0200 +Subject: [PATCH] libdnf/dnf-context.cpp: do not try to access BDB database + +Upstream-Status: Inappropriate [upstream needs to rework this to support +sqlite] +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> +--- + libdnf/dnf-context.cpp | 14 -------------- + 1 file changed, 14 deletions(-) + +diff --git a/libdnf/dnf-context.cpp b/libdnf/dnf-context.cpp +index 86f71a79..9cdcf769 100644 +--- a/libdnf/dnf-context.cpp ++++ b/libdnf/dnf-context.cpp +@@ -2264,20 +2264,6 @@ dnf_context_setup(DnfContext *context, + !dnf_context_set_os_release(context, error)) + return FALSE; + +- /* setup a file monitor on the rpmdb, if we're operating on the native / */ +- if (g_strcmp0(priv->install_root, "/") == 0) { +- rpmdb_path = g_build_filename(priv->install_root, "var/lib/rpm/Packages", NULL); +- file_rpmdb = g_file_new_for_path(rpmdb_path); +- priv->monitor_rpmdb = g_file_monitor_file(file_rpmdb, +- G_FILE_MONITOR_NONE, +- NULL, +- error); +- if (priv->monitor_rpmdb == NULL) +- return FALSE; +- g_signal_connect(priv->monitor_rpmdb, "changed", +- G_CALLBACK(dnf_context_rpmdb_changed_cb), context); +- } +- + /* copy any vendor distributed cached metadata */ + if (!dnf_context_copy_vendor_cache(context, error)) + return FALSE; diff --git a/meta/recipes-devtools/libdnf/libdnf/0002-Prefix-sysroot-path-to-introspection-tools-path.patch b/meta/recipes-devtools/libdnf/libdnf/0002-Prefix-sysroot-path-to-introspection-tools-path.patch deleted file mode 100644 index 7eecc3d051..0000000000 --- a/meta/recipes-devtools/libdnf/libdnf/0002-Prefix-sysroot-path-to-introspection-tools-path.patch +++ /dev/null @@ -1,36 +0,0 @@ -From c8211ad99ccaa4af4a75e0ba639527267fcfd69e Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <alex.kanavin@gmail.com> -Date: Fri, 30 Dec 2016 18:17:19 +0200 -Subject: [PATCH 2/4] Prefix sysroot path to introspection tools path. - -Upstream-Status: Submitted [https://github.com/rpm-software-management/libdnf/pull/312] -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> ---- - libdnf/CMakeLists.txt | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/libdnf/CMakeLists.txt b/libdnf/CMakeLists.txt -index 63f07bf..837792b 100644 ---- a/libdnf/CMakeLists.txt -+++ b/libdnf/CMakeLists.txt -@@ -133,7 +133,7 @@ if (GOBJECT_INTROSPECTION_FOUND) - set(GIR_TYPELIB "${GIR_PREFIX}.typelib") - - add_custom_command(OUTPUT ${GIR_XML} -- COMMAND env CFLAGS=${CMAKE_C_FLAGS} ${GOBJECT_INTROSPECTION_1.0_G_IR_SCANNER} -+ COMMAND env CFLAGS=${CMAKE_C_FLAGS} $ENV{PKG_CONFIG_SYSROOT_DIR}${GOBJECT_INTROSPECTION_1.0_G_IR_SCANNER} - --namespace=Dnf - --nsversion=${DNF_SO_VERSION}.0 - --library-path=${CMAKE_CURRENT_BINARY_DIR} -@@ -153,7 +153,7 @@ if (GOBJECT_INTROSPECTION_FOUND) - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) - - add_custom_command(OUTPUT ${GIR_TYPELIB} -- COMMAND ${GOBJECT_INTROSPECTION_1.0_G_IR_COMPILER} -+ COMMAND $ENV{PKG_CONFIG_SYSROOT_DIR}${GOBJECT_INTROSPECTION_1.0_G_IR_COMPILER} - -o ${GIR_TYPELIB} - ${GIR_XML} - DEPENDS ${GIR_XML} --- -2.11.0 - diff --git a/meta/recipes-devtools/libdnf/libdnf/0003-Set-the-library-installation-directory-correctly.patch b/meta/recipes-devtools/libdnf/libdnf/0003-Set-the-library-installation-directory-correctly.patch deleted file mode 100644 index 81264094eb..0000000000 --- a/meta/recipes-devtools/libdnf/libdnf/0003-Set-the-library-installation-directory-correctly.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 8d29879fe3606c78769c1bcdddf0bcfc7191c710 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <alex.kanavin@gmail.com> -Date: Fri, 30 Dec 2016 18:20:01 +0200 -Subject: [PATCH 3/4] Set the library installation directory correctly. - -Upstream-Status: Submitted [https://github.com/rpm-software-management/libdnf/pull/312] -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> ---- - CMakeLists.txt | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index d35f0d7..8edb627 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -62,7 +62,9 @@ ADD_DEFINITIONS(-DPACKAGE_VERSION=\\"${LIBDNF_VERSION}\\") - IF (CMAKE_SIZEOF_VOID_P MATCHES "8") - SET (LIB_SUFFIX "64") - ENDIF (CMAKE_SIZEOF_VOID_P MATCHES "8") --SET (LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}") -+#SET (LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}") -+SET (LIB_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}") -+ - - ADD_SUBDIRECTORY (libdnf) - ENABLE_TESTING() --- -2.11.0 - 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 6cf48a49f3..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 @@ -1,31 +1,30 @@ -From bcea5c5063a2d5f07dbe6f40aee30370fc4ba656 Mon Sep 17 00:00:00 2001 +From 18c2c06017784cd641cc8a3deee5fc472008f7f4 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <alex.kanavin@gmail.com> Date: Fri, 30 Dec 2016 18:24:50 +0200 -Subject: [PATCH 1/2] Set libsolv variables with pkg-config (cmake's own module +Subject: [PATCH] Set libsolv variables with pkg-config (cmake's own module doesn't work properly). Upstream-Status: Submitted [https://github.com/rpm-software-management/libdnf/pull/312] Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> - --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt -index 8875bbf..ca280f3 100644 +index fd6e3f0..5383744 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -29,7 +29,8 @@ find_package (PkgConfig REQUIRED) - SET (CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules) - PKG_CHECK_MODULES(GLIB gio-unix-2.0>=2.46.0 REQUIRED) - FIND_LIBRARY (RPMDB_LIBRARY NAMES rpmdb) --find_package (LibSolv 0.6.21 REQUIRED COMPONENTS ext) +@@ -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}) - if (ENABLE_RHSM_SUPPORT) - pkg_check_modules (RHSM REQUIRED librhsm) - include_directories (${RHSM_INCLUDE_DIRS}) + + + # build dependencies via pkg-config -- -2.14.2 +2.25.1 diff --git a/meta/recipes-devtools/libdnf/libdnf/enable_test_data_dir_set.patch b/meta/recipes-devtools/libdnf/libdnf/enable_test_data_dir_set.patch new file mode 100644 index 0000000000..e3784cc9e4 --- /dev/null +++ b/meta/recipes-devtools/libdnf/libdnf/enable_test_data_dir_set.patch @@ -0,0 +1,26 @@ +libdnf: allow reproducible binary builds + +Use a dummy directory for test data if not built WITH_TESTS. Allow for overriding +TESTDATADIR, since the default is guaranteed to be wrong for target builds. + +Upstream-Status: Pending + +Signed-off-by: Joe Slater <joe.slater@windriver.com> + + +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -133,7 +133,12 @@ add_definitions(-DG_LOG_DOMAIN=\\"libdnf + add_definitions(-D_FILE_OFFSET_BITS=64) + + # tests +-add_definitions(-DTESTDATADIR=\\"${CMAKE_SOURCE_DIR}/data/tests\\") ++if(NOT WITH_TESTS) ++ set(TEST_DATA_DIR "/notests") ++elseif(NOT DEFINED TEST_DATA_DIR) ++ set(TEST_DATA_DIR "${CMAKE_SOURCE_DIR}/data/tests") ++endif() ++add_definitions(-DTESTDATADIR=\\"${TEST_DATA_DIR}\\") + + # librhsm + if(ENABLE_RHSM_SUPPORT) diff --git a/meta/recipes-devtools/libdnf/libdnf_0.11.1.bb b/meta/recipes-devtools/libdnf/libdnf_0.11.1.bb deleted file mode 100644 index 4fc1d6defe..0000000000 --- a/meta/recipes-devtools/libdnf/libdnf_0.11.1.bb +++ /dev/null @@ -1,28 +0,0 @@ -SUMMARY = "Library providing simplified C and Python API to libsolv" -LICENSE = "LGPLv2.1" -LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" - -SRC_URI = "git://github.com/rpm-software-management/libdnf \ - file://0001-FindGtkDoc.cmake-drop-the-requirement-for-GTKDOC_SCA.patch \ - file://0002-Prefix-sysroot-path-to-introspection-tools-path.patch \ - file://0003-Set-the-library-installation-directory-correctly.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 \ - " - -SRCREV = "60f979bd8db651229c559c1412f1eb880257127d" - -S = "${WORKDIR}/git" - -DEPENDS = "glib-2.0 libsolv libcheck librepo rpm gtk-doc" - -inherit gtk-doc gobject-introspection cmake pkgconfig distutils3-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)} \ - " -EXTRA_OECMAKE_append_class-native = " -DWITH_GIR=OFF" -EXTRA_OECMAKE_append_class-nativesdk = " -DWITH_GIR=OFF" - -BBCLASSEXTEND = "native nativesdk" - 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<pver>(?!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)}" + |