diff options
author | Alexander Kanavin <alex.kanavin@gmail.com> | 2020-04-25 19:28:02 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-05-02 09:08:52 +0100 |
commit | 7add0b8b4db11309f59cbea4490e0e0549951f86 (patch) | |
tree | 5aeb0a5606546c6da348860e487ff6c08f92332a /meta/recipes-devtools/libdnf | |
parent | e1ab20ea5a9258c6f7e3bf18e040df1e0ddff0d9 (diff) | |
download | poky-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>
Diffstat (limited to 'meta/recipes-devtools/libdnf')
-rw-r--r-- | meta/recipes-devtools/libdnf/libdnf/0001-Add-WITH_TESTS-option.patch | 12 | ||||
-rw-r--r-- | meta/recipes-devtools/libdnf/libdnf/0001-Look-fo-sphinx-only-if-documentation-is-actually-ena.patch | 42 | ||||
-rw-r--r-- | meta/recipes-devtools/libdnf/libdnf/0001-include-stdexcept-for-runtime_error.patch | 65 | ||||
-rw-r--r-- | meta/recipes-devtools/libdnf/libdnf/fix-deprecation-warning.patch | 71 | ||||
-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 @@ | |||
1 | From e5a50db749b2b02e9e0cff9f7b639020e8ac76da Mon Sep 17 00:00:00 2001 | 1 | From 56fa2bbdbd29377a6ef0d0b7aadbac8b5ea8c95b Mon Sep 17 00:00:00 2001 |
2 | From: Alexander Kanavin <alex.kanavin@gmail.com> | 2 | From: Alexander Kanavin <alex.kanavin@gmail.com> |
3 | Date: Tue, 6 Nov 2018 13:54:43 +0100 | 3 | Date: Tue, 6 Nov 2018 13:54:43 +0100 |
4 | Subject: [PATCH] Add WITH_TESTS option | 4 | Subject: [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 | ||
16 | diff --git a/CMakeLists.txt b/CMakeLists.txt | 16 | diff --git a/CMakeLists.txt b/CMakeLists.txt |
17 | index ce88b9e3..7a99320a 100644 | 17 | index 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() |
39 | diff --git a/python/hawkey/CMakeLists.txt b/python/hawkey/CMakeLists.txt | 39 | diff --git a/python/hawkey/CMakeLists.txt b/python/hawkey/CMakeLists.txt |
40 | index d9645346..84d17204 100644 | 40 | index 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 @@ | |||
1 | From b570c7f8bd089deec7da2b108aa789a27025a473 Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexander Kanavin <alex.kanavin@gmail.com> | ||
3 | Date: Tue, 19 Nov 2019 13:46:09 +0100 | ||
4 | Subject: [PATCH] Look fo sphinx only if documentation is actually enabled | ||
5 | |||
6 | Upstream-Status: Pending | ||
7 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | ||
8 | --- | ||
9 | docs/hawkey/CMakeLists.txt | 20 +++++++++++--------- | ||
10 | 1 file changed, 11 insertions(+), 9 deletions(-) | ||
11 | |||
12 | diff --git a/docs/hawkey/CMakeLists.txt b/docs/hawkey/CMakeLists.txt | ||
13 | index 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 @@ | |||
1 | From 5f8eee5040d7074710cd542fc50f7a40918321fc Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Mon, 23 Dec 2019 14:30:22 -0800 | ||
4 | Subject: [PATCH] include <stdexcept> for runtime_error | ||
5 | |||
6 | Fixes | ||
7 | |||
8 | error: class 'libdnf::ModulePackageContainer::Exception' does not have any field named 'runtime_error' | ||
9 | explicit Exception(const std::string &what) : runtime_error(what) {} | ||
10 | ^~~~~~~~~~~~~ | ||
11 | |||
12 | Upstream-Status: Submitted [https://github.com/rpm-software-management/libdnf/pull/867] | ||
13 | Signed-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 | |||
20 | diff --git a/libdnf/goal/Goal.hpp b/libdnf/goal/Goal.hpp | ||
21 | index 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" | ||
32 | diff --git a/libdnf/module/ModulePackageContainer.hpp b/libdnf/module/ModulePackageContainer.hpp | ||
33 | index 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; | ||
44 | diff --git a/libdnf/repo/solvable/Dependency.cpp b/libdnf/repo/solvable/Dependency.cpp | ||
45 | index 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 | -- | ||
64 | 2.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 @@ | |||
1 | From 66d9b2ba3fbc7b04f2b5ad9d0e5371340c037b5f Mon Sep 17 00:00:00 2001 | ||
2 | From: Marek Blaha <mblaha@redhat.com> | ||
3 | Date: Wed, 10 Jul 2019 10:11:01 +0200 | ||
4 | Subject: [oe-core][PATCH 1/1] Fix Python 3.8 deprecation warning | ||
5 | (RhBug:1724244) | ||
6 | |||
7 | This deprecation warning was introduced in Python 3.8 by | ||
8 | https://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 | |||
13 | https://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 | |||
20 | Unchanged. Appears in version 0.35.2. | ||
21 | |||
22 | Upstream-Status: Backport [git://github.com/rpm-software-management/libdnf.git] | ||
23 | |||
24 | Signed-off-by: Joe Slater <joe.slater@windriver.com> | ||
25 | |||
26 | |||
27 | diff --git a/python/hawkey/package-py.cpp b/python/hawkey/package-py.cpp | ||
28 | index 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; | ||
48 | diff --git a/python/hawkey/packagedelta-py.cpp b/python/hawkey/packagedelta-py.cpp | ||
49 | index 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 | -- | ||
70 | 2.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" | |||
2 | LICENSE = "LGPLv2.1" | 2 | LICENSE = "LGPLv2.1" |
3 | LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" | 3 | LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" |
4 | 4 | ||
5 | SRC_URI = "git://github.com/rpm-software-management/libdnf \ | 5 | SRC_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 | ||
14 | SRCREV = "751f89045b80d58c0d05800f74357cf78cdf7e77" | 13 | SRCREV = "8330eea6985c4e4b53796f858de5b6b38b1ddf5c" |
15 | UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)" | 14 | UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)" |
16 | 15 | ||
17 | S = "${WORKDIR}/git" | 16 | S = "${WORKDIR}/git" |
18 | 17 | ||
19 | DEPENDS = "glib-2.0 libsolv libcheck librepo rpm gtk-doc libmodulemd-v1 json-c swig-native" | 18 | DEPENDS = "glib-2.0 libsolv libcheck librepo rpm gtk-doc libmodulemd json-c swig-native" |
20 | 19 | ||
21 | inherit gtk-doc gobject-introspection cmake pkgconfig distutils3-base | 20 | inherit gtk-doc gobject-introspection cmake pkgconfig distutils3-base |
22 | 21 | ||
23 | EXTRA_OECMAKE = " -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR} -DWITH_MAN=OFF -DPYTHON_DESIRED=3 \ | 22 | EXTRA_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 | " |
27 | EXTRA_OECMAKE_append_class-native = " -DWITH_GIR=OFF" | 28 | EXTRA_OECMAKE_append_class-native = " -DWITH_GIR=OFF" |
28 | EXTRA_OECMAKE_append_class-nativesdk = " -DWITH_GIR=OFF" | 29 | EXTRA_OECMAKE_append_class-nativesdk = " -DWITH_GIR=OFF" |