diff options
Diffstat (limited to 'meta/recipes-devtools/libdnf/libdnf')
8 files changed, 147 insertions, 99 deletions
diff --git a/meta/recipes-devtools/libdnf/libdnf/0001-FindGtkDoc.cmake-drop-the-requirement-for-GTKDOC_SCA.patch b/meta/recipes-devtools/libdnf/libdnf/0001-FindGtkDoc.cmake-drop-the-requirement-for-GTKDOC_SCA.patch index 791a32e748..046e09eab2 100644 --- a/meta/recipes-devtools/libdnf/libdnf/0001-FindGtkDoc.cmake-drop-the-requirement-for-GTKDOC_SCA.patch +++ b/meta/recipes-devtools/libdnf/libdnf/0001-FindGtkDoc.cmake-drop-the-requirement-for-GTKDOC_SCA.patch @@ -1,7 +1,7 @@ -From 9bb7630915c3e787732463a3e2064fe0e177101b Mon Sep 17 00:00:00 2001 +From 5d6db56791d326e6b486dca54fe2335af0225229 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <alex.kanavin@gmail.com> Date: Thu, 24 Nov 2016 14:33:07 +0200 -Subject: [PATCH 1/4] FindGtkDoc.cmake: drop the requirement for +Subject: [PATCH] FindGtkDoc.cmake: drop the requirement for GTKDOC_SCANGOBJ_WRAPPER For some reason cmake is not able to find it when building in openembedded, @@ -14,7 +14,7 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/modules/FindGtkDoc.cmake b/cmake/modules/FindGtkDoc.cmake -index 92b2cc7..39f34bd 100644 +index 92b2cc7e..39f34bd5 100644 --- a/cmake/modules/FindGtkDoc.cmake +++ b/cmake/modules/FindGtkDoc.cmake @@ -52,7 +52,7 @@ find_program(GTKDOC_MKHTML_EXE gtkdoc-mkhtml PATH "${GLIB_PREFIX}/bin") @@ -26,6 +26,3 @@ index 92b2cc7..39f34bd 100644 VERSION_VAR GtkDoc_VERSION) # :: --- -2.11.0 - 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 280edb7a65..223c1be218 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,29 +1,26 @@ -From 3012a93745223751cc979e3770207a09a075bec6 Mon Sep 17 00:00:00 2001 +From bf9bde4af952b67cc357d25b9863889099ea9665 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 5/5] Get parameters for both libsolv and libsolvext (libdnf is +Subject: [PATCH] Get parameters for both libsolv and libsolvext (libdnf is + using both) Upstream-Status: Submitted [https://github.com/rpm-software-management/libdnf/pull/312] Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> - --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt -index 8b2ab9a..e2d33d7 100644 +index e99b28d0..548a9137 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.44.0 REQUIRED) - FIND_LIBRARY (RPMDB_LIBRARY NAMES rpmdb) +@@ -51,7 +51,7 @@ endif() + + + # build dependencies -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.11.0 - + + 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..27f76077d7 --- /dev/null +++ b/meta/recipes-devtools/libdnf/libdnf/0001-drop-FindPythonInstDir.cmake.patch @@ -0,0 +1,39 @@ +From a6b3bc4fb3db996cd6c5616a99c16d085704dae0 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) ++ 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 1ea9310893..ecab47e5af 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,30 +1,27 @@ -From 55cbe6f40fe0836385e1a7241ec811cbe99e5840 Mon Sep 17 00:00:00 2001 +From e40def862bdeb10da295b15c5904fe2829d391c7 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 4/5] 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 a75df04..8b2ab9a 100644 +index 6444c374..e99b28d0 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.44.0 REQUIRED) - FIND_LIBRARY (RPMDB_LIBRARY NAMES rpmdb) --find_package (LibSolv 0.6.21 REQUIRED COMPONENTS ext) +@@ -51,7 +51,8 @@ endif() + + + # build dependencies +-find_package(LibSolv 0.7.21 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}) --- -2.11.0 - + + + # build dependencies via pkg-config diff --git a/meta/recipes-devtools/libdnf/libdnf/armarch.patch b/meta/recipes-devtools/libdnf/libdnf/armarch.patch new file mode 100644 index 0000000000..63debdb58f --- /dev/null +++ b/meta/recipes-devtools/libdnf/libdnf/armarch.patch @@ -0,0 +1,50 @@ +From aa0f8b65feec64420a9b7b61cfcc8bcce161e14b Mon Sep 17 00:00:00 2001 +From: Richard Purdie <richard.purdie@linuxfoundation.org> +Date: Thu, 9 Nov 2023 10:29:31 +0000 +Subject: [PATCH] libdnf: Fix arm arch mapping issues for qemuarmv5 + +We change the way rpm architectures work, we make the machine name the default machine +specific package architecture. + +This arm mapping code can work or in the case of qemuarmv5, it doesn't as it creates +armv5hl which doesn't exist and causes errrors. We can simply remove it, we don't need it. + +Upstream-Status: Inappropriate [Relies on OE rpm config] +--- + libdnf/hy-util.cpp | 23 ----------------------- + 1 file changed, 23 deletions(-) + +diff --git a/libdnf/hy-util.cpp b/libdnf/hy-util.cpp +index 9978c8e9..aa1369b6 100644 +--- a/libdnf/hy-util.cpp ++++ b/libdnf/hy-util.cpp +@@ -117,29 +117,6 @@ hy_detect_arch(char **arch) + if (uname(&un) < 0) + return DNF_ERROR_FAILED; + +- if (!strncmp(un.machine, "armv", 4)) { +- /* un.machine is armvXE, where X is version number and E is +- * endianness (b or l); we need to add modifiers such as +- * h (hardfloat), n (neon). Neon is a requirement of armv8 so +- * as far as rpm is concerned armv8l is the equivilent of armv7hnl +- * (or 7hnb) so we don't explicitly add 'n' for 8+ as it's expected. */ +- char endian = un.machine[strlen(un.machine)-1]; +- char *modifier = un.machine + 5; +- while(isdigit(*modifier)) /* keep armv7, armv8, armv9, armv10, armv100, ... */ +- modifier++; +- if (getauxval(AT_HWCAP) & HWCAP_ARM_VFP) +- *modifier++ = 'h'; +- if ((atoi(un.machine+4) == 7) && (getauxval(AT_HWCAP) & HWCAP_ARM_NEON)) +- *modifier++ = 'n'; +- *modifier++ = endian; +- *modifier = 0; +- } +-#ifdef __MIPSEL__ +- if (!strcmp(un.machine, "mips")) +- strcpy(un.machine, "mipsel"); +- else if (!strcmp(un.machine, "mips64")) +- strcpy(un.machine, "mips64el"); +-#endif + *arch = g_strdup(un.machine); + return 0; + } 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..e4f6d447f1 --- /dev/null +++ b/meta/recipes-devtools/libdnf/libdnf/enable_test_data_dir_set.patch @@ -0,0 +1,33 @@ +From 25229773a9d4472235278bb45f75439e56630cee Mon Sep 17 00:00:00 2001 +From: Joe Slater <joe.slater@windriver.com> +Date: Wed, 22 Jul 2020 13:31:11 -0700 +Subject: [PATCH] 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> +--- + CMakeLists.txt | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 548a9137..c378e7d9 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -132,7 +132,12 @@ add_definitions(-DGETTEXT_DOMAIN=\\"libdnf\\") + add_definitions(-DG_LOG_DOMAIN=\\"libdnf\\") + + # 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) |