summaryrefslogtreecommitdiffstats
path: root/external/poky/meta/recipes-devtools/libdnf
diff options
context:
space:
mode:
Diffstat (limited to 'external/poky/meta/recipes-devtools/libdnf')
-rw-r--r--external/poky/meta/recipes-devtools/libdnf/libdnf/0001-Add-WITH_TESTS-option.patch49
-rw-r--r--external/poky/meta/recipes-devtools/libdnf/libdnf/0001-Get-parameters-for-both-libsolv-and-libsolvext-libdn.patch21
-rw-r--r--external/poky/meta/recipes-devtools/libdnf/libdnf/0001-include-stdexcept-for-runtime_error.patch65
-rw-r--r--external/poky/meta/recipes-devtools/libdnf/libdnf/0002-Prefix-sysroot-path-to-introspection-tools-path.patch36
-rw-r--r--external/poky/meta/recipes-devtools/libdnf/libdnf/0003-Set-the-library-installation-directory-correctly.patch29
-rw-r--r--external/poky/meta/recipes-devtools/libdnf/libdnf/0004-Set-libsolv-variables-with-pkg-config-cmake-s-own-mo.patch25
-rw-r--r--external/poky/meta/recipes-devtools/libdnf/libdnf/fix-deprecation-warning.patch71
-rw-r--r--external/poky/meta/recipes-devtools/libdnf/libdnf_0.28.1.bb (renamed from external/poky/meta/recipes-devtools/libdnf/libdnf_0.11.1.bb)12
8 files changed, 213 insertions, 95 deletions
diff --git a/external/poky/meta/recipes-devtools/libdnf/libdnf/0001-Add-WITH_TESTS-option.patch b/external/poky/meta/recipes-devtools/libdnf/libdnf/0001-Add-WITH_TESTS-option.patch
new file mode 100644
index 00000000..3c87d4d8
--- /dev/null
+++ b/external/poky/meta/recipes-devtools/libdnf/libdnf/0001-Add-WITH_TESTS-option.patch
@@ -0,0 +1,49 @@
+From e5a50db749b2b02e9e0cff9f7b639020e8ac76da Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Tue, 6 Nov 2018 13:54:43 +0100
+Subject: [PATCH] Add WITH_TESTS option
+
+This makes a dependency on cppunit optional.
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
+---
+ CMakeLists.txt | 3 +++
+ python/hawkey/CMakeLists.txt | 2 ++
+ 2 files changed, 5 insertions(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index ce88b9e3..7a99320a 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -32,6 +32,7 @@ option(WITH_HTML "Enables hawkey HTML generation" ON)
+ option(WITH_MAN "Enables hawkey man page generation" 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)
+
+
+ # load pkg-config first; it's required by other modules
+@@ -158,8 +159,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/external/poky/meta/recipes-devtools/libdnf/libdnf/0001-Get-parameters-for-both-libsolv-and-libsolvext-libdn.patch b/external/poky/meta/recipes-devtools/libdnf/libdnf/0001-Get-parameters-for-both-libsolv-and-libsolvext-libdn.patch
index cbd0362c..10450def 100644
--- a/external/poky/meta/recipes-devtools/libdnf/libdnf/0001-Get-parameters-for-both-libsolv-and-libsolvext-libdn.patch
+++ b/external/poky/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)
+@@ -45,7 +45,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
-
+ find_package(OpenSSL REQUIRED)
+
diff --git a/external/poky/meta/recipes-devtools/libdnf/libdnf/0001-include-stdexcept-for-runtime_error.patch b/external/poky/meta/recipes-devtools/libdnf/libdnf/0001-include-stdexcept-for-runtime_error.patch
new file mode 100644
index 00000000..cedf5392
--- /dev/null
+++ b/external/poky/meta/recipes-devtools/libdnf/libdnf/0001-include-stdexcept-for-runtime_error.patch
@@ -0,0 +1,65 @@
+From 5f8eee5040d7074710cd542fc50f7a40918321fc Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 23 Dec 2019 14:30:22 -0800
+Subject: [PATCH] include <stdexcept> for runtime_error
+
+Fixes
+
+error: class 'libdnf::ModulePackageContainer::Exception' does not have any field named 'runtime_error'
+ explicit Exception(const std::string &what) : runtime_error(what) {}
+ ^~~~~~~~~~~~~
+
+Upstream-Status: Submitted [https://github.com/rpm-software-management/libdnf/pull/867]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ libdnf/goal/Goal.hpp | 1 +
+ libdnf/module/ModulePackageContainer.hpp | 1 +
+ libdnf/repo/solvable/Dependency.cpp | 3 ++-
+ 3 files changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/libdnf/goal/Goal.hpp b/libdnf/goal/Goal.hpp
+index f33dfa24..7b8d822c 100644
+--- a/libdnf/goal/Goal.hpp
++++ b/libdnf/goal/Goal.hpp
+@@ -22,6 +22,7 @@
+ #define __GOAL_HPP
+
+ #include <memory>
++#include <stdexcept>
+
+ #include "../dnf-types.h"
+ #include "../hy-goal.h"
+diff --git a/libdnf/module/ModulePackageContainer.hpp b/libdnf/module/ModulePackageContainer.hpp
+index 1f815fda..37a8832d 100644
+--- a/libdnf/module/ModulePackageContainer.hpp
++++ b/libdnf/module/ModulePackageContainer.hpp
+@@ -30,6 +30,7 @@
+ #include <string>
+ #include <vector>
+ #include <set>
++#include <stdexcept>
+
+ //class ModulePackageContainer;
+ //typedef std::shared_ptr<ModulePackageContainer> ModulePackageContainerPtr;
+diff --git a/libdnf/repo/solvable/Dependency.cpp b/libdnf/repo/solvable/Dependency.cpp
+index 6682b729..0fc8b5cd 100644
+--- a/libdnf/repo/solvable/Dependency.cpp
++++ b/libdnf/repo/solvable/Dependency.cpp
+@@ -18,6 +18,7 @@
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
++#include <stdexcept>
+ #include "Dependency.hpp"
+ #include "libdnf/utils/utils.hpp"
+ #include "libdnf/repo/DependencySplitter.hpp"
+@@ -106,4 +107,4 @@ Dependency::getReldepId(DnfSack *sack, const char * reldepStr)
+ }
+ }
+
+-}
+\ No newline at end of file
++}
+--
+2.24.1
+
diff --git a/external/poky/meta/recipes-devtools/libdnf/libdnf/0002-Prefix-sysroot-path-to-introspection-tools-path.patch b/external/poky/meta/recipes-devtools/libdnf/libdnf/0002-Prefix-sysroot-path-to-introspection-tools-path.patch
deleted file mode 100644
index 7eecc3d0..00000000
--- a/external/poky/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/external/poky/meta/recipes-devtools/libdnf/libdnf/0003-Set-the-library-installation-directory-correctly.patch b/external/poky/meta/recipes-devtools/libdnf/libdnf/0003-Set-the-library-installation-directory-correctly.patch
deleted file mode 100644
index 81264094..00000000
--- a/external/poky/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/external/poky/meta/recipes-devtools/libdnf/libdnf/0004-Set-libsolv-variables-with-pkg-config-cmake-s-own-mo.patch b/external/poky/meta/recipes-devtools/libdnf/libdnf/0004-Set-libsolv-variables-with-pkg-config-cmake-s-own-mo.patch
index 6cf48a49..475c8f12 100644
--- a/external/poky/meta/recipes-devtools/libdnf/libdnf/0004-Set-libsolv-variables-with-pkg-config-cmake-s-own-mo.patch
+++ b/external/poky/meta/recipes-devtools/libdnf/libdnf/0004-Set-libsolv-variables-with-pkg-config-cmake-s-own-mo.patch
@@ -1,7 +1,7 @@
-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).
@@ -13,19 +13,16 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 8875bbf..ca280f3 100644
+index 16b63308..b722d4fb 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)
+@@ -45,7 +45,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})
---
-2.14.2
-
+ find_package(OpenSSL REQUIRED)
+
+
diff --git a/external/poky/meta/recipes-devtools/libdnf/libdnf/fix-deprecation-warning.patch b/external/poky/meta/recipes-devtools/libdnf/libdnf/fix-deprecation-warning.patch
new file mode 100644
index 00000000..3a3e02f3
--- /dev/null
+++ b/external/poky/meta/recipes-devtools/libdnf/libdnf/fix-deprecation-warning.patch
@@ -0,0 +1,71 @@
+From 66d9b2ba3fbc7b04f2b5ad9d0e5371340c037b5f Mon Sep 17 00:00:00 2001
+From: Marek Blaha <mblaha@redhat.com>
+Date: Wed, 10 Jul 2019 10:11:01 +0200
+Subject: [oe-core][PATCH 1/1] Fix Python 3.8 deprecation warning
+ (RhBug:1724244)
+
+This deprecation warning was introduced in Python 3.8 by
+https://bugs.python.org/issue36381:
+
+/usr/lib/python3.8/site-packages/dnf/package.py:57: DeprecationWarning: PY_SSIZE_T_CLEAN will be required for '#' formats
+ return super(Package, self).chksum
+
+https://bugzilla.redhat.com/show_bug.cgi?id=1724244
+---
+ python/hawkey/package-py.cpp | 3 ++-
+ python/hawkey/packagedelta-py.cpp | 3 ++-
+ 2 files changed, 4 insertions(+), 2 deletions(-)
+---
+
+Unchanged. Appears in version 0.35.2.
+
+Upstream-Status: Backport [git://github.com/rpm-software-management/libdnf.git]
+
+Signed-off-by: Joe Slater <joe.slater@windriver.com>
+
+
+diff --git a/python/hawkey/package-py.cpp b/python/hawkey/package-py.cpp
+index 5102bba..68e03cb 100644
+--- a/python/hawkey/package-py.cpp
++++ b/python/hawkey/package-py.cpp
+@@ -18,6 +18,7 @@
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
++#define PY_SSIZE_T_CLEAN
+ #include <Python.h>
+ #include <stdio.h>
+
+@@ -251,7 +252,7 @@ get_chksum(_PackageObject *self, void *closure)
+ #if PY_MAJOR_VERSION < 3
+ res = Py_BuildValue("is#", type, cs, checksum_length);
+ #else
+- res = Py_BuildValue("iy#", type, cs, checksum_length);
++ res = Py_BuildValue("iy#", type, cs, (Py_ssize_t)checksum_length);
+ #endif
+
+ return res;
+diff --git a/python/hawkey/packagedelta-py.cpp b/python/hawkey/packagedelta-py.cpp
+index ca1cb7d..1a64836 100644
+--- a/python/hawkey/packagedelta-py.cpp
++++ b/python/hawkey/packagedelta-py.cpp
+@@ -18,6 +18,7 @@
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
++#define PY_SSIZE_T_CLEAN
+ #include <Python.h>
+
+ // hawkey
+@@ -92,7 +93,7 @@ get_chksum(_PackageDeltaObject *self, void *closure)
+ #if PY_MAJOR_VERSION < 3
+ res = Py_BuildValue("is#", type, cs, checksum_length);
+ #else
+- res = Py_BuildValue("iy#", type, cs, checksum_length);
++ res = Py_BuildValue("iy#", type, cs, (Py_ssize_t)checksum_length);
+ #endif
+
+ return res;
+--
+2.7.4
+
diff --git a/external/poky/meta/recipes-devtools/libdnf/libdnf_0.11.1.bb b/external/poky/meta/recipes-devtools/libdnf/libdnf_0.28.1.bb
index 4fc1d6de..cc2ceb88 100644
--- a/external/poky/meta/recipes-devtools/libdnf/libdnf_0.11.1.bb
+++ b/external/poky/meta/recipes-devtools/libdnf/libdnf_0.28.1.bb
@@ -4,25 +4,29 @@ 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 \
+ file://0001-Add-WITH_TESTS-option.patch \
+ file://0001-include-stdexcept-for-runtime_error.patch \
+ file://fix-deprecation-warning.patch \
"
-SRCREV = "60f979bd8db651229c559c1412f1eb880257127d"
+SRCREV = "751f89045b80d58c0d05800f74357cf78cdf7e77"
+UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)"
S = "${WORKDIR}/git"
-DEPENDS = "glib-2.0 libsolv libcheck librepo rpm gtk-doc"
+DEPENDS = "glib-2.0 libsolv libcheck librepo rpm gtk-doc libmodulemd-v1 json-c swig-native"
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)} \
+ -DWITH_TESTS=OFF \
"
EXTRA_OECMAKE_append_class-native = " -DWITH_GIR=OFF"
EXTRA_OECMAKE_append_class-nativesdk = " -DWITH_GIR=OFF"
BBCLASSEXTEND = "native nativesdk"
+PNBLACKLIST[libdnf] ?= "${@bb.utils.contains('PACKAGE_CLASSES', 'package_rpm', '', 'Does not build without package_rpm in PACKAGE_CLASSES due disabled rpm support in libsolv', d)}"