Skip to content

Commit

Permalink
Update to libdnf-0.48.0
Browse files Browse the repository at this point in the history
  • Loading branch information
fepitre committed Oct 11, 2020
1 parent 25464a2 commit 3c086bb
Show file tree
Hide file tree
Showing 30 changed files with 211 additions and 3,474 deletions.
12 changes: 6 additions & 6 deletions debian-pkg/debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ Build-Depends: debhelper (>= 9~),
cmake (>= 2.8.5-1~),
pkg-config,
libglib2.0-dev (>= 2.50.3-2.1~),
libsolv0-dev (>= 0.6.36~),
libsolvext0-dev (>= 0.6.36~),
libsolv-tools (>= 0.6.36~),
libsolv-dev (>= 0.7.14-2~),
libsolvext-dev (>= 0.7.14-2~),
libsolv-tools (>= 0.7.14-2~),
librpm-dev (>= 4.14.2.1+dfsg1-1.1~),
libzstd-dev,
librepo-dev (>= 1.10.0-1~),
Expand All @@ -23,7 +23,7 @@ Build-Depends: debhelper (>= 9~),
libgpgme-dev,
libssl-dev,
libjson-c-dev,
libmodulemd1-dev (>= 1.6.1-1~),
libmodulemd-dev,
libsmartcols-dev (>= 2.29.2-1+deb9u1.1~),
libsqlite3-dev,
gettext,
Expand All @@ -45,8 +45,8 @@ Architecture: any
Multi-Arch: same
Depends: ${misc:Depends},
libdnf2 (= ${binary:Version}),
libsolv0-dev (>= 0.6.36~),
libsolvext0-dev (>= 0.6.36~),
libsolv-dev (>= 0.7.14-2~),
libsolvext-dev (>= 0.7.14-2~),
Breaks: gir1.2-libdnf-1.0 (<< ${binary:Version})
Description: libdnf - development files
A library providing simplified C and Python APIs to libsolv.
Expand Down
2,865 changes: 0 additions & 2,865 deletions debian-pkg/debian/libdnf2.symbols

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
From d0c07d97dba24d25e41d60e6688f2245522f17f3 Mon Sep 17 00:00:00 2001
From: Mihai Moldovan <[email protected]>
Date: Tue, 29 Sep 2020 18:30:16 +0200
Subject: [PATCH] CMakeLists.txt: append libsolv cmake path

Make sure cmake finds FindLibSolv.cmake installed
in ${CMAKE_INSTALL_PREFIX}/share/cmake/libsolv.
---
CMakeLists.txt | 1 +
1 file changed, 1 insertion(+)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 40d64fc4..6c96caed 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -46,6 +46,7 @@ if(APPLE)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH};/usr/local/share/cmake/Modules/)
include_directories(/usr/local/include)
endif()
+LIST (APPEND CMAKE_MODULE_PATH "${CMAKE_INSTALL_PREFIX}/share/cmake/libsolv/")


# build dependencies
--
2.26.2

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
From 02f66db51a3e9e058721dfcaea714de20bdb6a4f Mon Sep 17 00:00:00 2001
From: Mihai Moldovan <[email protected]>
Date: Tue, 29 Sep 2020 18:30:16 +0200
Subject: [PATCH]
000200_tests-hawkey-CMakeLists.txt_use-static-libcheck-and-add-LDFLAGS

Within Debian, only the static libcheck library is shipped. Use it correctly,
since the static library requires additional private libraries and definitions.
---
tests/hawkey/CMakeLists.txt | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tests/hawkey/CMakeLists.txt b/tests/hawkey/CMakeLists.txt
index c2ca446a..b4acd57b 100644
--- a/tests/hawkey/CMakeLists.txt
+++ b/tests/hawkey/CMakeLists.txt
@@ -28,7 +28,8 @@ add_executable(test_hawkey_main ${hawkeytest_SRCS})
set_target_properties(test_hawkey_main PROPERTIES COMPILE_FLAGS -fPIC)
target_link_libraries(test_hawkey_main
libdnf
- ${CHECK_LIBRARIES}
+ ${CHECK_STATIC_LIBRARIES}
+ ${CHECK_STATIC_LDFLAGS}
${SOLV_LIBRARY}
${SOLVEXT_LIBRARY}
${RPMDB_LIBRARY}
--
2.26.2

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,20 +1,31 @@
Description: Set the default disttype to RPM.
Author: Mihai Moldovan <[email protected]>
From 858f1ef41e7e6927b5e6308659f0f0cac965294c Mon Sep 17 00:00:00 2001
From: Mihai Moldovan <[email protected]>
Date: Tue, 29 Sep 2020 18:30:16 +0200
Subject: [PATCH]
000300_tests-hawkey-test_iutil.cpp_libdnf-dnf-sack.cpp_set-default-disttype-to-DISTTYPE_RPM

On "foreign" systems, including Debian, libsolv tries to be smart and default
to the native packaging system type. We need to explicitly override it to use
RPM for dnf to work.
---
libdnf/dnf-sack.cpp | 1 +
tests/hawkey/test_iutil.cpp | 7 +++++++
2 files changed, 8 insertions(+)

diff --git a/libdnf/dnf-sack.cpp b/libdnf/dnf-sack.cpp
index 025988b4..cacf9fff 100644
--- a/libdnf/dnf-sack.cpp
+++ b/libdnf/dnf-sack.cpp
@@ -183,6 +183,7 @@ dnf_sack_init(DnfSack *sack)
{
@@ -185,6 +185,7 @@ dnf_sack_init(DnfSack *sack)
DnfSackPrivate *priv = GET_PRIVATE(sack);
priv->pool = pool_create();
pool_set_flag(priv->pool, POOL_FLAG_WHATPROVIDESWITHDISABLED, 1);
+ pool_setdisttype(priv->pool, DISTTYPE_RPM);
priv->running_kernel_id = -1;
priv->running_kernel_fn = running_kernel;
priv->considered_uptodate = TRUE;
diff --git a/tests/hawkey/test_iutil.cpp b/tests/hawkey/test_iutil.cpp
index 8d00cc94..0ca12800 100644
--- a/tests/hawkey/test_iutil.cpp
+++ b/tests/hawkey/test_iutil.cpp
@@ -150,6 +150,13 @@ END_TEST
Expand All @@ -31,3 +42,6 @@ RPM for dnf to work.
char evr[] = "1:5.9.3-8";
char *epoch, *version, *release;

--
2.26.2

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,21 +1,32 @@
Description: Enable implicitobsoleteusescolors flag.
Author: Mihai Moldovan <[email protected]>
From 4f21fb8cfedca9bc23ffbe935718e1cc51b1cc79 Mon Sep 17 00:00:00 2001
From: Mihai Moldovan <[email protected]>
Date: Tue, 29 Sep 2020 18:30:16 +0200
Subject: [PATCH]
000320_tests-hawkey-test_iutil.cpp_libdnf-dnf-sack.cpp_enable-implicitobsoleteusescolors

This flag is normally enabled by default in libsolv if compiled on Fedora or
Mageia systems, but disabled for all others. Since we explicitly want to
support Fedora (and CentOS/RHEL) repositories with DNF, enable this feature for
correct resolution.
---
libdnf/dnf-sack.cpp | 1 +
tests/hawkey/test_iutil.cpp | 9 +++++++++
2 files changed, 10 insertions(+)

diff --git a/libdnf/dnf-sack.cpp b/libdnf/dnf-sack.cpp
index cacf9fff..0162e04b 100644
--- a/libdnf/dnf-sack.cpp
+++ b/libdnf/dnf-sack.cpp
@@ -184,6 +184,7 @@ dnf_sack_init(DnfSack *sack)
DnfSackPrivate *priv = GET_PRIVATE(sack);
@@ -186,6 +186,7 @@ dnf_sack_init(DnfSack *sack)
priv->pool = pool_create();
pool_set_flag(priv->pool, POOL_FLAG_WHATPROVIDESWITHDISABLED, 1);
pool_setdisttype(priv->pool, DISTTYPE_RPM);
+ pool_set_flag(priv->pool, POOL_FLAG_IMPLICITOBSOLETEUSESCOLORS, 1);
priv->running_kernel_id = -1;
priv->running_kernel_fn = running_kernel;
priv->considered_uptodate = TRUE;
diff --git a/tests/hawkey/test_iutil.cpp b/tests/hawkey/test_iutil.cpp
index 0ca12800..8ce75bfb 100644
--- a/tests/hawkey/test_iutil.cpp
+++ b/tests/hawkey/test_iutil.cpp
@@ -157,6 +157,15 @@ START_TEST(test_version_split)
Expand All @@ -34,3 +45,6 @@ correct resolution.
char evr[] = "1:5.9.3-8";
char *epoch, *version, *release;

--
2.26.2

Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
From af55ca7fb2193fce2dcdb36efb98c1993f2c7cdb Mon Sep 17 00:00:00 2001
From: Mihai Moldovan <[email protected]>
Date: Tue, 29 Sep 2020 18:30:16 +0200
Subject: [PATCH]
000330_tests-hawkey-test_iutil.cpp_libdnf-dnf-sack.cpp_enable-rpmdb-in-homedir

The rpm package on Debian is patched to always use the RPMDB in a user's home
directory. Libsolv is not patched in such a way. Since DNF is mixing librpm and
libsolv, strange situations occur.

Tell libsolv to prefer the rpmdb in the user's home directory.
---
libdnf/dnf-sack.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libdnf/dnf-sack.cpp b/libdnf/dnf-sack.cpp
index 0162e04b..b12ee6df 100644
--- a/libdnf/dnf-sack.cpp
+++ b/libdnf/dnf-sack.cpp
@@ -1685,7 +1685,7 @@ dnf_sack_load_system_repo(DnfSack *sack, HyRepo a_hrepo, int flags, GError **err
repo = repo_create(pool, HY_SYSTEM_REPO_NAME);

g_debug("fetching rpmdb");
- int flagsrpm = REPO_REUSE_REPODATA | RPM_ADD_WITH_HDRID | REPO_USE_ROOTDIR;
+ int flagsrpm = REPO_REUSE_REPODATA | RPM_ADD_WITH_HDRID | REPO_USE_ROOTDIR | RPMDB_USE_HOMEDIR;
int rc = repo_add_rpmdb_reffp(repo, NULL, flagsrpm);
if (!rc) {
repoImpl->state_main = _HY_LOADED_FETCH;
--
2.26.2

Loading

0 comments on commit 3c086bb

Please sign in to comment.