summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2020-04-25 19:28:02 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-05-02 09:08:52 +0100
commit7add0b8b4db11309f59cbea4490e0e0549951f86 (patch)
tree5aeb0a5606546c6da348860e487ff6c08f92332a
parente1ab20ea5a9258c6f7e3bf18e040df1e0ddff0d9 (diff)
downloadpoky-7add0b8b4db11309f59cbea4490e0e0549951f86.tar.gz
libdnf: upgrade 0.28.1 -> 0.47.0
Add a patch that avoids hardcoded sphinx dependency. Switch off a couple of new features (zchunk, html docs for hawkey library via sphinx) that both require new dependencies. Move from modulemd 1.x to 2.x, drop upstreamed patches. (From OE-Core rev: ce54462de6642935859421f2116e25ca5b2faa8c) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-devtools/libdnf/libdnf/0001-Add-WITH_TESTS-option.patch12
-rw-r--r--meta/recipes-devtools/libdnf/libdnf/0001-Look-fo-sphinx-only-if-documentation-is-actually-ena.patch42
-rw-r--r--meta/recipes-devtools/libdnf/libdnf/0001-include-stdexcept-for-runtime_error.patch65
-rw-r--r--meta/recipes-devtools/libdnf/libdnf/fix-deprecation-warning.patch71
-rw-r--r--meta/recipes-devtools/libdnf/libdnf_0.47.0.bb (renamed from meta/recipes-devtools/libdnf/libdnf_0.28.1.bb)11
5 files changed, 54 insertions, 147 deletions
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
index 3c87d4d8b3..ac9400c48d 100644
--- a/meta/recipes-devtools/libdnf/libdnf/0001-Add-WITH_TESTS-option.patch
+++ b/meta/recipes-devtools/libdnf/libdnf/0001-Add-WITH_TESTS-option.patch
@@ -1,4 +1,4 @@
1From e5a50db749b2b02e9e0cff9f7b639020e8ac76da Mon Sep 17 00:00:00 2001 1From 56fa2bbdbd29377a6ef0d0b7aadbac8b5ea8c95b Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com> 2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Tue, 6 Nov 2018 13:54:43 +0100 3Date: Tue, 6 Nov 2018 13:54:43 +0100
4Subject: [PATCH] Add WITH_TESTS option 4Subject: [PATCH] Add WITH_TESTS option
@@ -14,18 +14,18 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
14 2 files changed, 5 insertions(+) 14 2 files changed, 5 insertions(+)
15 15
16diff --git a/CMakeLists.txt b/CMakeLists.txt 16diff --git a/CMakeLists.txt b/CMakeLists.txt
17index ce88b9e3..7a99320a 100644 17index 881152a..965c992 100644
18--- a/CMakeLists.txt 18--- a/CMakeLists.txt
19+++ b/CMakeLists.txt 19+++ b/CMakeLists.txt
20@@ -32,6 +32,7 @@ option(WITH_HTML "Enables hawkey HTML generation" ON) 20@@ -33,6 +33,7 @@ option(WITH_MAN "Enables hawkey man page generation" ON)
21 option(WITH_MAN "Enables hawkey man page generation" ON) 21 option(WITH_ZCHUNK "Build with zchunk support" ON)
22 option(ENABLE_RHSM_SUPPORT "Build with Red Hat Subscription Manager support?" OFF) 22 option(ENABLE_RHSM_SUPPORT "Build with Red Hat Subscription Manager support?" OFF)
23 option(ENABLE_SOLV_URPMREORDER "Build with support for URPM-like solution reordering?" OFF) 23 option(ENABLE_SOLV_URPMREORDER "Build with support for URPM-like solution reordering?" OFF)
24+option(WITH_TESTS "Enables unit tests" ON) 24+option(WITH_TESTS "Enables unit tests" ON)
25 25
26 26
27 # load pkg-config first; it's required by other modules 27 # load pkg-config first; it's required by other modules
28@@ -158,8 +159,10 @@ endif() 28@@ -165,8 +166,10 @@ endif()
29 29
30 30
31 # build tests 31 # build tests
@@ -37,7 +37,7 @@ index ce88b9e3..7a99320a 100644
37 add_subdirectory(python/hawkey) 37 add_subdirectory(python/hawkey)
38 endif() 38 endif()
39diff --git a/python/hawkey/CMakeLists.txt b/python/hawkey/CMakeLists.txt 39diff --git a/python/hawkey/CMakeLists.txt b/python/hawkey/CMakeLists.txt
40index d9645346..84d17204 100644 40index d964534..84d1720 100644
41--- a/python/hawkey/CMakeLists.txt 41--- a/python/hawkey/CMakeLists.txt
42+++ b/python/hawkey/CMakeLists.txt 42+++ b/python/hawkey/CMakeLists.txt
43@@ -50,4 +50,6 @@ target_link_libraries(_hawkeymodule ${PYTHON_LIBRARY}) 43@@ -50,4 +50,6 @@ target_link_libraries(_hawkeymodule ${PYTHON_LIBRARY})
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
new file mode 100644
index 0000000000..6dd7c71aae
--- /dev/null
+++ b/meta/recipes-devtools/libdnf/libdnf/0001-Look-fo-sphinx-only-if-documentation-is-actually-ena.patch
@@ -0,0 +1,42 @@
1From b570c7f8bd089deec7da2b108aa789a27025a473 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Tue, 19 Nov 2019 13:46:09 +0100
4Subject: [PATCH] Look fo sphinx only if documentation is actually enabled
5
6Upstream-Status: Pending
7Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
8---
9 docs/hawkey/CMakeLists.txt | 20 +++++++++++---------
10 1 file changed, 11 insertions(+), 9 deletions(-)
11
12diff --git a/docs/hawkey/CMakeLists.txt b/docs/hawkey/CMakeLists.txt
13index 52cc35c6..63c7672f 100644
14--- a/docs/hawkey/CMakeLists.txt
15+++ b/docs/hawkey/CMakeLists.txt
16@@ -2,15 +2,17 @@
17 # tell sphinx-build to do them both in one go:
18
19
20-find_program(SPHINX_PROGRAM NAMES "sphinx-build-${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}")
21-if(NOT EXISTS ${SPHINX_PROGRAM})
22- find_program(SPHINX_PROGRAM NAMES sphinx-build-${PYTHON_VERSION_MAJOR})
23-endif()
24-if(NOT EXISTS ${SPHINX_PROGRAM})
25- find_program(SPHINX_PROGRAM NAMES sphinx-build)
26-endif()
27-if(NOT EXISTS ${SPHINX_PROGRAM})
28- message(FATAL_ERROR "Sphinx program not found." )
29+if (WITH_HTML OR WITH_MAN)
30+ find_program(SPHINX_PROGRAM NAMES "sphinx-build-${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}")
31+ if(NOT EXISTS ${SPHINX_PROGRAM})
32+ find_program(SPHINX_PROGRAM NAMES sphinx-build-${PYTHON_VERSION_MAJOR})
33+ endif()
34+ if(NOT EXISTS ${SPHINX_PROGRAM})
35+ find_program(SPHINX_PROGRAM NAMES sphinx-build)
36+ endif()
37+ if(NOT EXISTS ${SPHINX_PROGRAM})
38+ message(FATAL_ERROR "Sphinx program not found." )
39+ endif()
40 endif()
41
42 if(WITH_HTML)
diff --git a/meta/recipes-devtools/libdnf/libdnf/0001-include-stdexcept-for-runtime_error.patch b/meta/recipes-devtools/libdnf/libdnf/0001-include-stdexcept-for-runtime_error.patch
deleted file mode 100644
index cedf539243..0000000000
--- a/meta/recipes-devtools/libdnf/libdnf/0001-include-stdexcept-for-runtime_error.patch
+++ /dev/null
@@ -1,65 +0,0 @@
1From 5f8eee5040d7074710cd542fc50f7a40918321fc Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 23 Dec 2019 14:30:22 -0800
4Subject: [PATCH] include <stdexcept> for runtime_error
5
6Fixes
7
8error: class 'libdnf::ModulePackageContainer::Exception' does not have any field named 'runtime_error'
9 explicit Exception(const std::string &what) : runtime_error(what) {}
10 ^~~~~~~~~~~~~
11
12Upstream-Status: Submitted [https://github.com/rpm-software-management/libdnf/pull/867]
13Signed-off-by: Khem Raj <raj.khem@gmail.com>
14---
15 libdnf/goal/Goal.hpp | 1 +
16 libdnf/module/ModulePackageContainer.hpp | 1 +
17 libdnf/repo/solvable/Dependency.cpp | 3 ++-
18 3 files changed, 4 insertions(+), 1 deletion(-)
19
20diff --git a/libdnf/goal/Goal.hpp b/libdnf/goal/Goal.hpp
21index f33dfa24..7b8d822c 100644
22--- a/libdnf/goal/Goal.hpp
23+++ b/libdnf/goal/Goal.hpp
24@@ -22,6 +22,7 @@
25 #define __GOAL_HPP
26
27 #include <memory>
28+#include <stdexcept>
29
30 #include "../dnf-types.h"
31 #include "../hy-goal.h"
32diff --git a/libdnf/module/ModulePackageContainer.hpp b/libdnf/module/ModulePackageContainer.hpp
33index 1f815fda..37a8832d 100644
34--- a/libdnf/module/ModulePackageContainer.hpp
35+++ b/libdnf/module/ModulePackageContainer.hpp
36@@ -30,6 +30,7 @@
37 #include <string>
38 #include <vector>
39 #include <set>
40+#include <stdexcept>
41
42 //class ModulePackageContainer;
43 //typedef std::shared_ptr<ModulePackageContainer> ModulePackageContainerPtr;
44diff --git a/libdnf/repo/solvable/Dependency.cpp b/libdnf/repo/solvable/Dependency.cpp
45index 6682b729..0fc8b5cd 100644
46--- a/libdnf/repo/solvable/Dependency.cpp
47+++ b/libdnf/repo/solvable/Dependency.cpp
48@@ -18,6 +18,7 @@
49 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
50 */
51
52+#include <stdexcept>
53 #include "Dependency.hpp"
54 #include "libdnf/utils/utils.hpp"
55 #include "libdnf/repo/DependencySplitter.hpp"
56@@ -106,4 +107,4 @@ Dependency::getReldepId(DnfSack *sack, const char * reldepStr)
57 }
58 }
59
60-}
61\ No newline at end of file
62+}
63--
642.24.1
65
diff --git a/meta/recipes-devtools/libdnf/libdnf/fix-deprecation-warning.patch b/meta/recipes-devtools/libdnf/libdnf/fix-deprecation-warning.patch
deleted file mode 100644
index 3a3e02f352..0000000000
--- a/meta/recipes-devtools/libdnf/libdnf/fix-deprecation-warning.patch
+++ /dev/null
@@ -1,71 +0,0 @@
1From 66d9b2ba3fbc7b04f2b5ad9d0e5371340c037b5f Mon Sep 17 00:00:00 2001
2From: Marek Blaha <mblaha@redhat.com>
3Date: Wed, 10 Jul 2019 10:11:01 +0200
4Subject: [oe-core][PATCH 1/1] Fix Python 3.8 deprecation warning
5 (RhBug:1724244)
6
7This deprecation warning was introduced in Python 3.8 by
8https://bugs.python.org/issue36381:
9
10/usr/lib/python3.8/site-packages/dnf/package.py:57: DeprecationWarning: PY_SSIZE_T_CLEAN will be required for '#' formats
11 return super(Package, self).chksum
12
13https://bugzilla.redhat.com/show_bug.cgi?id=1724244
14---
15 python/hawkey/package-py.cpp | 3 ++-
16 python/hawkey/packagedelta-py.cpp | 3 ++-
17 2 files changed, 4 insertions(+), 2 deletions(-)
18---
19
20Unchanged. Appears in version 0.35.2.
21
22Upstream-Status: Backport [git://github.com/rpm-software-management/libdnf.git]
23
24Signed-off-by: Joe Slater <joe.slater@windriver.com>
25
26
27diff --git a/python/hawkey/package-py.cpp b/python/hawkey/package-py.cpp
28index 5102bba..68e03cb 100644
29--- a/python/hawkey/package-py.cpp
30+++ b/python/hawkey/package-py.cpp
31@@ -18,6 +18,7 @@
32 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
33 */
34
35+#define PY_SSIZE_T_CLEAN
36 #include <Python.h>
37 #include <stdio.h>
38
39@@ -251,7 +252,7 @@ get_chksum(_PackageObject *self, void *closure)
40 #if PY_MAJOR_VERSION < 3
41 res = Py_BuildValue("is#", type, cs, checksum_length);
42 #else
43- res = Py_BuildValue("iy#", type, cs, checksum_length);
44+ res = Py_BuildValue("iy#", type, cs, (Py_ssize_t)checksum_length);
45 #endif
46
47 return res;
48diff --git a/python/hawkey/packagedelta-py.cpp b/python/hawkey/packagedelta-py.cpp
49index ca1cb7d..1a64836 100644
50--- a/python/hawkey/packagedelta-py.cpp
51+++ b/python/hawkey/packagedelta-py.cpp
52@@ -18,6 +18,7 @@
53 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
54 */
55
56+#define PY_SSIZE_T_CLEAN
57 #include <Python.h>
58
59 // hawkey
60@@ -92,7 +93,7 @@ get_chksum(_PackageDeltaObject *self, void *closure)
61 #if PY_MAJOR_VERSION < 3
62 res = Py_BuildValue("is#", type, cs, checksum_length);
63 #else
64- res = Py_BuildValue("iy#", type, cs, checksum_length);
65+ res = Py_BuildValue("iy#", type, cs, (Py_ssize_t)checksum_length);
66 #endif
67
68 return res;
69--
702.7.4
71
diff --git a/meta/recipes-devtools/libdnf/libdnf_0.28.1.bb b/meta/recipes-devtools/libdnf/libdnf_0.47.0.bb
index cc2ceb8816..1b4b7e4233 100644
--- a/meta/recipes-devtools/libdnf/libdnf_0.28.1.bb
+++ b/meta/recipes-devtools/libdnf/libdnf_0.47.0.bb
@@ -2,27 +2,28 @@ SUMMARY = "Library providing simplified C and Python API to libsolv"
2LICENSE = "LGPLv2.1" 2LICENSE = "LGPLv2.1"
3LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" 3LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
4 4
5SRC_URI = "git://github.com/rpm-software-management/libdnf \ 5SRC_URI = "git://github.com/rpm-software-management/libdnf;branch=dnf-4-master \
6 file://0001-FindGtkDoc.cmake-drop-the-requirement-for-GTKDOC_SCA.patch \ 6 file://0001-FindGtkDoc.cmake-drop-the-requirement-for-GTKDOC_SCA.patch \
7 file://0004-Set-libsolv-variables-with-pkg-config-cmake-s-own-mo.patch \ 7 file://0004-Set-libsolv-variables-with-pkg-config-cmake-s-own-mo.patch \
8 file://0001-Get-parameters-for-both-libsolv-and-libsolvext-libdn.patch \ 8 file://0001-Get-parameters-for-both-libsolv-and-libsolvext-libdn.patch \
9 file://0001-Add-WITH_TESTS-option.patch \ 9 file://0001-Add-WITH_TESTS-option.patch \
10 file://0001-include-stdexcept-for-runtime_error.patch \ 10 file://0001-Look-fo-sphinx-only-if-documentation-is-actually-ena.patch \
11 file://fix-deprecation-warning.patch \
12 " 11 "
13 12
14SRCREV = "751f89045b80d58c0d05800f74357cf78cdf7e77" 13SRCREV = "8330eea6985c4e4b53796f858de5b6b38b1ddf5c"
15UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)" 14UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)"
16 15
17S = "${WORKDIR}/git" 16S = "${WORKDIR}/git"
18 17
19DEPENDS = "glib-2.0 libsolv libcheck librepo rpm gtk-doc libmodulemd-v1 json-c swig-native" 18DEPENDS = "glib-2.0 libsolv libcheck librepo rpm gtk-doc libmodulemd json-c swig-native"
20 19
21inherit gtk-doc gobject-introspection cmake pkgconfig distutils3-base 20inherit gtk-doc gobject-introspection cmake pkgconfig distutils3-base
22 21
23EXTRA_OECMAKE = " -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR} -DWITH_MAN=OFF -DPYTHON_DESIRED=3 \ 22EXTRA_OECMAKE = " -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR} -DWITH_MAN=OFF -DPYTHON_DESIRED=3 \
24 ${@bb.utils.contains('GI_DATA_ENABLED', 'True', '-DWITH_GIR=ON', '-DWITH_GIR=OFF', d)} \ 23 ${@bb.utils.contains('GI_DATA_ENABLED', 'True', '-DWITH_GIR=ON', '-DWITH_GIR=OFF', d)} \
25 -DWITH_TESTS=OFF \ 24 -DWITH_TESTS=OFF \
25 -DWITH_ZCHUNK=OFF \
26 -DWITH_HTML=OFF \
26 " 27 "
27EXTRA_OECMAKE_append_class-native = " -DWITH_GIR=OFF" 28EXTRA_OECMAKE_append_class-native = " -DWITH_GIR=OFF"
28EXTRA_OECMAKE_append_class-nativesdk = " -DWITH_GIR=OFF" 29EXTRA_OECMAKE_append_class-nativesdk = " -DWITH_GIR=OFF"