commit libdnf for openSUSE:Factory
Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package libdnf for openSUSE:Factory checked in at 2024-10-21 16:25:15 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libdnf (Old) and /work/SRC/openSUSE:Factory/.libdnf.new.26871 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "libdnf" Mon Oct 21 16:25:15 2024 rev:39 rq:1210017 version:0.73.3 Changes: -------- --- /work/SRC/openSUSE:Factory/libdnf/libdnf.changes 2024-08-06 09:07:33.451797727 +0200 +++ /work/SRC/openSUSE:Factory/.libdnf.new.26871/libdnf.changes 2024-10-21 16:25:17.218660591 +0200 @@ -1,0 +2,8 @@ +Wed Sep 4 07:36:10 UTC 2024 - pgajdos@suse.com + +- version update to 0.73.3 + * Support colon in username, use LRO_USERNAME and LRO_PASSWORD + * Set pool flag to fix pool_addfileprovides_queue() without filelists.xml + * Fix a memory leak in glob_for_cachedir() + +------------------------------------------------------------------- Old: ---- libdnf-0.73.2.tar.gz New: ---- libdnf-0.73.3.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libdnf.spec ++++++ --- /var/tmp/diff_new_pack.uuXnIj/_old 2024-10-21 16:25:18.094697147 +0200 +++ /var/tmp/diff_new_pack.uuXnIj/_new 2024-10-21 16:25:18.098697314 +0200 @@ -34,7 +34,7 @@ %define devname %{name}-devel Name: libdnf -Version: 0.73.2 +Version: 0.73.3 Release: 0 Summary: Library providing C and Python APIs atop libsolv License: LGPL-2.1-or-later ++++++ libdnf-0.73.2.tar.gz -> libdnf-0.73.3.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libdnf-0.73.2/CMakeLists.txt new/libdnf-0.73.3/CMakeLists.txt --- old/libdnf-0.73.2/CMakeLists.txt 2024-06-18 21:57:16.000000000 +0200 +++ new/libdnf-0.73.3/CMakeLists.txt 2024-08-14 23:12:42.000000000 +0200 @@ -61,7 +61,7 @@ pkg_check_modules(JSONC REQUIRED json-c) include_directories(${JSONC_INCLUDE_DIRS}) pkg_check_modules(LIBMODULEMD REQUIRED modulemd-2.0>=2.11.2) -pkg_check_modules(REPO REQUIRED librepo>=1.15.0) +pkg_check_modules(REPO REQUIRED librepo>=1.18.0) include_directories(${REPO_INCLUDE_DIRS}) link_directories(${REPO_LIBRARY_DIRS}) pkg_check_modules(RPM REQUIRED rpm>=4.15.0) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libdnf-0.73.2/VERSION.cmake new/libdnf-0.73.3/VERSION.cmake --- old/libdnf-0.73.2/VERSION.cmake 2024-06-18 21:57:16.000000000 +0200 +++ new/libdnf-0.73.3/VERSION.cmake 2024-08-14 23:12:42.000000000 +0200 @@ -1,6 +1,6 @@ set (DEFAULT_LIBDNF_MAJOR_VERSION 0) set (DEFAULT_LIBDNF_MINOR_VERSION 73) -set (DEFAULT_LIBDNF_MICRO_VERSION 2) +set (DEFAULT_LIBDNF_MICRO_VERSION 3) if(DEFINED LIBDNF_MAJOR_VERSION) if(NOT ${DEFAULT_LIBDNF_MAJOR_VERSION} STREQUAL ${LIBDNF_MAJOR_VERSION}) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libdnf-0.73.2/docs/release_notes.rst new/libdnf-0.73.3/docs/release_notes.rst --- old/libdnf-0.73.2/docs/release_notes.rst 2024-06-18 21:57:16.000000000 +0200 +++ new/libdnf-0.73.3/docs/release_notes.rst 2024-08-14 23:12:42.000000000 +0200 @@ -20,6 +20,14 @@ ###################### ==================== +0.73.3 Release Notes +==================== + +- Support colon in username, use LRO_USERNAME and LRO_PASSWORD +- Set pool flag to fix pool_addfileprovides_queue() without filelists.xml +- Fix a memory leak in glob_for_cachedir() + +==================== 0.73.2 Release Notes ==================== diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libdnf-0.73.2/libdnf/dnf-repo.cpp new/libdnf-0.73.3/libdnf/dnf-repo.cpp --- old/libdnf-0.73.2/libdnf/dnf-repo.cpp 2024-06-18 21:57:16.000000000 +0200 +++ new/libdnf-0.73.3/libdnf/dnf-repo.cpp 2024-08-14 23:12:42.000000000 +0200 @@ -817,20 +817,16 @@ /** * @brief Format user password string * -* Returns user and password in user:password form. If encode is True, -* special characters in user and password are URL encoded. +* Returns user and password in user:password form. +* Special characters in user and password are URL encoded. * * @param user Username * @param passwd Password -* @param encode If quote is True, special characters in user and password are URL encoded. * @return User and password in user:password form */ -static std::string formatUserPassString(const std::string & user, const std::string & passwd, bool encode) +static std::string formatUserPassString(const std::string & user, const std::string & passwd) { - if (encode) - return libdnf::urlEncode(user) + ":" + libdnf::urlEncode(passwd); - else - return user + ":" + passwd; + return libdnf::urlEncode(user) + ":" + libdnf::urlEncode(passwd); } /* Resets repository configuration options previously readed from repository @@ -1130,7 +1126,7 @@ "repo '%s': 'proxy_username' is set but not 'proxy_password'", repoId); return FALSE; } - tmp_str = formatUserPassString(tmp_str, conf->proxy_password().getValue(), true); + tmp_str = formatUserPassString(tmp_str, conf->proxy_password().getValue()); tmp_cstr = tmp_str.c_str(); } } @@ -1138,14 +1134,11 @@ return FALSE; // setup username and password - tmp_cstr = NULL; - tmp_str = conf->username().getValue(); - if (!tmp_str.empty()) { - // TODO Use URL encoded form, needs support in librepo - tmp_str = formatUserPassString(tmp_str, conf->password().getValue(), false); - tmp_cstr = tmp_str.c_str(); - } - if (!lr_handle_setopt(priv->repo_handle, error, LRO_USERPWD, tmp_cstr)) + auto & username = conf->username().getValue(); + if (!lr_handle_setopt(priv->repo_handle, error, LRO_USERNAME, username.empty() ? NULL : username.c_str())) + return FALSE; + auto & password = conf->password().getValue(); + if (!lr_handle_setopt(priv->repo_handle, error, LRO_PASSWORD, password.empty() ? NULL : password.c_str())) return FALSE; auto proxy_sslverify = conf->proxy_sslverify().getValue(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libdnf-0.73.2/libdnf/dnf-sack.cpp new/libdnf-0.73.3/libdnf/dnf-sack.cpp --- old/libdnf-0.73.2/libdnf/dnf-sack.cpp 2024-06-18 21:57:16.000000000 +0200 +++ new/libdnf-0.73.3/libdnf/dnf-sack.cpp 2024-08-14 23:12:42.000000000 +0200 @@ -185,6 +185,13 @@ DnfSackPrivate *priv = GET_PRIVATE(sack); priv->pool = pool_create(); pool_set_flag(priv->pool, POOL_FLAG_WHATPROVIDESWITHDISABLED, 1); + + // Configures the pool_addfileprovides_queue() method to only add files from primary.xml. + // This ensures the method works correctly even if filelist.xml metadata are not loaded. + // At the same time when filelist.xml are loaded libsolv is able to search them for required + // files if needed. + pool_set_flag(priv->pool, POOL_FLAG_ADDFILEPROVIDESFILTERED, 1); + priv->running_kernel_id = -1; priv->running_kernel_fn = running_kernel; priv->considered_uptodate = TRUE; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libdnf-0.73.2/libdnf/hy-iutil.cpp new/libdnf-0.73.3/libdnf/hy-iutil.cpp --- old/libdnf-0.73.2/libdnf/hy-iutil.cpp 2024-06-18 21:57:16.000000000 +0200 +++ new/libdnf-0.73.3/libdnf/hy-iutil.cpp 2024-08-14 23:12:42.000000000 +0200 @@ -89,7 +89,7 @@ if (!g_str_has_suffix(path, "XXXXXX")) return ret; - wordexp_t word_vector; + wordexp_t word_vector = {0}; char *p = g_strdup(path); const int len = strlen(p); struct stat s; @@ -98,6 +98,7 @@ p[len-6] = '*'; p[len-5] = '\0'; if (wordexp(p, &word_vector, 0)) { + wordfree(&word_vector); g_free(p); return ret; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libdnf-0.73.2/libdnf/repo/Repo.cpp new/libdnf-0.73.3/libdnf/repo/Repo.cpp --- old/libdnf-0.73.2/libdnf/repo/Repo.cpp 2024-06-18 21:57:16.000000000 +0200 +++ new/libdnf-0.73.3/libdnf/repo/Repo.cpp 2024-08-14 23:12:42.000000000 +0200 @@ -252,20 +252,16 @@ /** * @brief Format user password string * -* Returns user and password in user:password form. If quote is True, -* special characters in user and password are URL encoded. +* Returns user and password in user:password form. +* Special characters in user and password are URL encoded. * * @param user Username * @param passwd Password -* @param encode If quote is True, special characters in user and password are URL encoded. * @return User and password in user:password form */ -static std::string formatUserPassString(const std::string & user, const std::string & passwd, bool encode) +static std::string formatUserPassString(const std::string & user, const std::string & passwd) { - if (encode) - return urlEncode(user) + ":" + urlEncode(passwd); - else - return user + ":" + passwd; + return urlEncode(user) + ":" + urlEncode(passwd); } Repo::Impl::Impl(Repo & owner, const std::string & id, Type type, std::unique_ptr<ConfigRepo> && conf) @@ -524,12 +520,8 @@ } // setup username/password if needed - auto userpwd = config.username().getValue(); - if (!userpwd.empty()) { - // TODO Use URL encoded form, needs support in librepo - userpwd = formatUserPassString(userpwd, config.password().getValue(), false); - handleSetOpt(h, LRO_USERPWD, userpwd.c_str()); - } + handleSetOpt(h, LRO_USERNAME, config.username().getValue().empty() ? NULL : config.username().getValue().c_str()); + handleSetOpt(h, LRO_PASSWORD, config.password().getValue().empty() ? NULL : config.password().getValue().c_str()); if (!config.proxy().empty() && !config.proxy().getValue().empty()) handleSetOpt(h, LRO_PROXY, config.proxy().getValue().c_str()); @@ -548,7 +540,7 @@ else throw RepoError(_("'proxy_username' is set but not 'proxy_password'")); } - userpwd = formatUserPassString(userpwd, config.proxy_password().getValue(), true); + userpwd = formatUserPassString(userpwd, config.proxy_password().getValue()); handleSetOpt(h, LRO_PROXYUSERPWD, userpwd.c_str()); } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libdnf-0.73.2/libdnf.spec new/libdnf-0.73.3/libdnf.spec --- old/libdnf-0.73.2/libdnf.spec 2024-06-18 21:57:16.000000000 +0200 +++ new/libdnf-0.73.3/libdnf.spec 2024-08-14 23:12:42.000000000 +0200 @@ -1,11 +1,11 @@ %global libsolv_version 0.7.21 %global libmodulemd_version 2.13.0 -%global librepo_version 1.15.0 +%global librepo_version 1.18.0 %global dnf_conflict 4.11.0 %global swig_version 3.0.12 %global libdnf_major_version 0 %global libdnf_minor_version 73 -%global libdnf_micro_version 2 +%global libdnf_micro_version 3 %define __cmake_in_source_build 1
participants (1)
-
Source-Sync