diff --git a/dnf5.spec b/dnf5.spec index 2794b46701..1dce54541e 100644 --- a/dnf5.spec +++ b/dnf5.spec @@ -115,7 +115,7 @@ Provides: dnf5-command(versionlock) # ========== versions of dependencies ========== %global libmodulemd_version 2.5.0 -%global librepo_version 1.15.0 +%global librepo_version 1.18.0 %global libsolv_version 0.7.25 %global sqlite_version 3.35.0 %global swig_version 4 diff --git a/libdnf5/CMakeLists.txt b/libdnf5/CMakeLists.txt index 6bbe04ee99..493d2b0855 100644 --- a/libdnf5/CMakeLists.txt +++ b/libdnf5/CMakeLists.txt @@ -103,7 +103,7 @@ pkg_check_modules (GLIB2 glib-2.0>=2.46.0) include_directories(${GLIB2_INCLUDE_DIRS}) target_link_libraries(libdnf5 PRIVATE ${GLIB2_LIBRARIES}) -pkg_check_modules(LIBREPO REQUIRED librepo>=1.15.0) +pkg_check_modules(LIBREPO REQUIRED librepo>=1.18.0) list(APPEND LIBDNF5_PC_REQUIRES "${LIBREPO_MODULE_NAME}") target_include_directories(libdnf5 PUBLIC PRIVATE ${LIBREPO_INCLUDE_DIRS}) target_link_libraries(libdnf5 PRIVATE ${LIBREPO_LDFLAGS}) diff --git a/libdnf5/repo/librepo.cpp b/libdnf5/repo/librepo.cpp index 06a20da280..83fc61f34b 100644 --- a/libdnf5/repo/librepo.cpp +++ b/libdnf5/repo/librepo.cpp @@ -139,11 +139,10 @@ static void init_remote(LibrepoHandle & handle, const C & config) { handle.set_opt(LRO_IPRESOLVE, LR_IPRESOLVE_V6); } - auto userpwd = config.get_username_option().get_value(); - if (!userpwd.empty()) { - // TODO Use URL encoded form, needs support in librepo - userpwd = format_user_pass_string(userpwd, config.get_password_option().get_value(), false); - handle.set_opt(LRO_USERPWD, userpwd.c_str()); + auto username = config.get_username_option().get_value(); + if (!username.empty()) { + handle.set_opt(LRO_USERNAME, username.c_str()); + handle.set_opt(LRO_PASSWORD, config.get_password_option().get_value().c_str()); } if (!config.get_sslcacert_option().get_value().empty()) {