From 44bae0b80b0ed98c3c4519a56ff5d64b65977fbd Mon Sep 17 00:00:00 2001 From: Pavla Kratochvilova Date: Tue, 12 Mar 2019 10:59:50 +0100 Subject: [PATCH] Update to 0.28.0 --- .gitignore | 1 + ...ckwards-so-setting-zchunkfalse-would.patch | 34 ------- ...y-when-using-zchunk-metadata-so-this.patch | 90 ------------------- libdnf.spec | 17 ++-- sources | 2 +- 5 files changed, 14 insertions(+), 130 deletions(-) delete mode 100644 0002-Zchunk-configuration-flags-were-backwards-so-setting-zchunkfalse-would.patch delete mode 100644 0003-hy_repos-werent-being-filled-properly-when-using-zchunk-metadata-so-this.patch diff --git a/.gitignore b/.gitignore index a2b88d2..c94ca7b 100644 --- a/.gitignore +++ b/.gitignore @@ -30,3 +30,4 @@ /libdnf-0.22.3.tar.gz /libdnf-0.24.1.tar.gz /libdnf-0.26.0.tar.gz +/libdnf-0.28.0.tar.gz diff --git a/0002-Zchunk-configuration-flags-were-backwards-so-setting-zchunkfalse-would.patch b/0002-Zchunk-configuration-flags-were-backwards-so-setting-zchunkfalse-would.patch deleted file mode 100644 index 8ef6123..0000000 --- a/0002-Zchunk-configuration-flags-were-backwards-so-setting-zchunkfalse-would.patch +++ /dev/null @@ -1,34 +0,0 @@ -From d696a96249a7bf2e71977594a278a86b06e50cb6 Mon Sep 17 00:00:00 2001 -From: Jonathan Dieter -Date: Sat, 22 Dec 2018 16:56:59 +0000 -Subject: [PATCH] Zchunk configuration flags were backwards, so setting zchunk=false would - ---- - libdnf/repo/Repo.cpp | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/libdnf/repo/Repo.cpp b/libdnf/repo/Repo.cpp -index 42823e7..7c0e464 100644 ---- a/libdnf/repo/Repo.cpp -+++ b/libdnf/repo/Repo.cpp -@@ -575,7 +575,7 @@ std::unique_ptr Repo::Impl::lrHandleInitLocal() - handleSetOpt(h.get(), LRO_LOCAL, 1L); - #ifdef LRO_SUPPORTS_CACHEDIR - /* If zchunk is enabled, set librepo cache dir */ -- if (!conf->getMasterConfig().zchunk().getValue()) -+ if (conf->getMasterConfig().zchunk().getValue()) - handleSetOpt(h.get(), LRO_CACHEDIR, conf->basecachedir().getValue().c_str()); - #endif - return h; -@@ -662,7 +662,7 @@ std::unique_ptr Repo::Impl::lrHandleInitRemote(const char *destdir, bo - - #ifdef LRO_SUPPORTS_CACHEDIR - /* If zchunk is enabled, set librepo cache dir */ -- if (!conf->getMasterConfig().zchunk().getValue()) -+ if (conf->getMasterConfig().zchunk().getValue()) - handleSetOpt(h.get(), LRO_CACHEDIR, conf->basecachedir().getValue().c_str()); - #endif - --- -libgit2 0.27.7 - diff --git a/0003-hy_repos-werent-being-filled-properly-when-using-zchunk-metadata-so-this.patch b/0003-hy_repos-werent-being-filled-properly-when-using-zchunk-metadata-so-this.patch deleted file mode 100644 index 15cc807..0000000 --- a/0003-hy_repos-werent-being-filled-properly-when-using-zchunk-metadata-so-this.patch +++ /dev/null @@ -1,90 +0,0 @@ -From d5e661a8eae27fb6108f54d924ac0af709696c60 Mon Sep 17 00:00:00 2001 -From: Jonathan Dieter -Date: Sat, 22 Dec 2018 17:01:13 +0000 -Subject: [PATCH] hy_repos weren't being filled properly when using zchunk metadata, so this - ---- - libdnf/dnf-repo.cpp | 35 +++++++++++++++++++++++++++-------- - libdnf/repo/Repo.cpp | 17 ++++++++++++++++- - 2 files changed, 43 insertions(+), 9 deletions(-) - -diff --git a/libdnf/dnf-repo.cpp b/libdnf/dnf-repo.cpp -index 1cf762b..3357af2 100644 ---- a/libdnf/dnf-repo.cpp -+++ b/libdnf/dnf-repo.cpp -@@ -1439,14 +1439,33 @@ dnf_repo_check_internal(DnfRepo *repo, - hy_repo_free(priv->repo); - priv->repo = hy_repo_create(priv->id); - hy_repo_set_string(priv->repo, HY_REPO_MD_FN, yum_repo->repomd); -- tmp = static_cast(g_hash_table_lookup(priv->filenames_md, "primary")); -- hy_repo_set_string(priv->repo, HY_REPO_PRIMARY_FN, tmp); -- tmp = static_cast(g_hash_table_lookup(priv->filenames_md, "filelists")); -- hy_repo_set_string(priv->repo, HY_REPO_FILELISTS_FN, tmp); -- tmp = static_cast(g_hash_table_lookup(priv->filenames_md, "updateinfo")); -- hy_repo_set_string(priv->repo, HY_REPO_UPDATEINFO_FN, tmp); -- tmp = static_cast(g_hash_table_lookup(priv->filenames_md, "modules")); -- hy_repo_set_string(priv->repo, MODULES_FN, tmp); -+ if (dnf_context_get_zchunk(priv->context)) { -+ tmp = static_cast(g_hash_table_lookup(priv->filenames_md, "primary_zck")); -+ if(!tmp) -+ tmp = static_cast(g_hash_table_lookup(priv->filenames_md, "primary")); -+ hy_repo_set_string(priv->repo, HY_REPO_PRIMARY_FN, tmp); -+ tmp = static_cast(g_hash_table_lookup(priv->filenames_md, "filelists_zck")); -+ if(!tmp) -+ tmp = static_cast(g_hash_table_lookup(priv->filenames_md, "filelists")); -+ hy_repo_set_string(priv->repo, HY_REPO_FILELISTS_FN, tmp); -+ tmp = static_cast(g_hash_table_lookup(priv->filenames_md, "updateinfo_zck")); -+ if(!tmp) -+ tmp = static_cast(g_hash_table_lookup(priv->filenames_md, "updateinfo")); -+ hy_repo_set_string(priv->repo, HY_REPO_UPDATEINFO_FN, tmp); -+ tmp = static_cast(g_hash_table_lookup(priv->filenames_md, "modules_zck")); -+ if(!tmp) -+ tmp = static_cast(g_hash_table_lookup(priv->filenames_md, "modules")); -+ hy_repo_set_string(priv->repo, MODULES_FN, tmp); -+ } else { -+ tmp = static_cast(g_hash_table_lookup(priv->filenames_md, "primary")); -+ hy_repo_set_string(priv->repo, HY_REPO_PRIMARY_FN, tmp); -+ tmp = static_cast(g_hash_table_lookup(priv->filenames_md, "filelists")); -+ hy_repo_set_string(priv->repo, HY_REPO_FILELISTS_FN, tmp); -+ tmp = static_cast(g_hash_table_lookup(priv->filenames_md, "updateinfo")); -+ hy_repo_set_string(priv->repo, HY_REPO_UPDATEINFO_FN, tmp); -+ tmp = static_cast(g_hash_table_lookup(priv->filenames_md, "modules")); -+ hy_repo_set_string(priv->repo, MODULES_FN, tmp); -+ } - - /* ensure we reset the values from the keyfile */ - if (!dnf_repo_set_keyfile_data(repo, error)) -diff --git a/libdnf/repo/Repo.cpp b/libdnf/repo/Repo.cpp -index 7c0e464..98279e6 100644 ---- a/libdnf/repo/Repo.cpp -+++ b/libdnf/repo/Repo.cpp -@@ -275,10 +275,25 @@ private: - delete[] *item; - delete[] ptr; - }}; -+ bool endsWith(std::string const &str, std::string const &ending) const; - }; - -+bool Repo::Impl::endsWith(const std::string &str, const std::string &ending) const { -+ if (str.length() >= ending.length()) -+ return (str.compare(str.length() - ending.length(), ending.length(), ending) == 0); -+ else -+ return false; -+} -+ - std::string Repo::Impl::getMetadataPath(const std::string &metadataType) const { -- auto it = metadataPaths.find(metadataType); -+ std::string lookupMetadataType = metadataType; -+ if (conf->getMasterConfig().zchunk().getValue()) { -+ if(!endsWith(metadataType, "_zck")) -+ lookupMetadataType = metadataType + "_zck"; -+ } -+ auto it = metadataPaths.find(lookupMetadataType); -+ if(it == metadataPaths.end() && lookupMetadataType != metadataType) -+ it = metadataPaths.find(metadataType); - return (it != metadataPaths.end()) ? it->second : ""; - } - --- -libgit2 0.27.7 - diff --git a/libdnf.spec b/libdnf.spec index 692a1e1..f0d62c4 100644 --- a/libdnf.spec +++ b/libdnf.spec @@ -1,5 +1,6 @@ %global libsolv_version 0.6.35-1 %global libmodulemd_version 1.6.1 +%global librepo_version 1.9.5 %global dnf_conflict 4.1.0 %global swig_version 3.0.12 @@ -30,21 +31,19 @@ %{nil} Name: libdnf -Version: 0.26.0 -Release: 2%{?dist} +Version: 0.28.0 +Release: 1%{?dist} Summary: Library providing simplified C and Python API to libsolv License: LGPLv2+ URL: https://github.com/rpm-software-management/libdnf Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz Patch0001: 0001-Revert-9309e92332241ff1113433057c969cebf127734e.patch -Patch0002: 0002-Zchunk-configuration-flags-were-backwards-so-setting-zchunkfalse-would.patch -Patch0003: 0003-hy_repos-werent-being-filled-properly-when-using-zchunk-metadata-so-this.patch BuildRequires: cmake BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: libsolv-devel >= %{libsolv_version} -BuildRequires: pkgconfig(librepo) +BuildRequires: pkgconfig(librepo) >= %{librepo_version} BuildRequires: pkgconfig(check) %if %{with valgrind} BuildRequires: valgrind @@ -66,6 +65,7 @@ BuildRequires: gpgme-devel Requires: libmodulemd%{?_isa} >= %{libmodulemd_version} Requires: libsolv%{?_isa} >= %{libsolv_version} +Requires: librepo%{?_isa} >= %{librepo_version} %description A Library providing simplified C and Python API to libsolv. @@ -248,6 +248,13 @@ popd %endif %changelog +* Mon Mar 11 2019 Pavla Kratochvilova - 0.28.0-1 +- Update to 0.28.0 +- Exclude module pkgs that have conflict +- Enhance config parser to preserve order of data, and keep comments and format +- Improve ARM detection +- Add support for SHA-384 + * Tue Feb 19 2019 Jaroslav Mracek - 0.26.0-2 - Backport patches for zchunk diff --git a/sources b/sources index aa222f7..f4c2798 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libdnf-0.26.0.tar.gz) = 62bfebf5b7c09a98cab957ee90da07a0a67d371449752af8e3f07e1f54d766fa1284f891f666f7de2dbca42670e116b3df30a514d74f84f5300db9e87cb3b91f +SHA512 (libdnf-0.28.0.tar.gz) = 518372705228a09461b1014dc5990c301991996d1c5e5eac0ff5c67601cb23febf45e10673f06a0e31bb9b8d4f76b1f59bfcccf9dcfb23013d41fd1e208757a9