import createrepo_c-0.17.7-3.el8

This commit is contained in:
CentOS Sources 2021-12-02 16:36:57 +00:00 committed by Stepan Oksanichenko
parent 6a9da64646
commit 7d3815449a
2 changed files with 16 additions and 9 deletions

View File

@ -1,4 +1,4 @@
From a611bb0c3729713af28031cdf1d056823d663db1 Mon Sep 17 00:00:00 2001
From 6bcfaac228236ac3c609d014cbd23c3bd645bf18 Mon Sep 17 00:00:00 2001
From: Aleš Matěj <amatej@redhat.com>
Date: Thu, 9 Sep 2021 08:31:03 +0200
Subject: [PATCH] Preserve changed API for cr_compress_file_with_stat (RhBug:1973588)
@ -9,17 +9,20 @@ behavior.
Keep the fixed version as cr_compress_file_with_stat_v2 only for rhel8
https://bugzilla.redhat.com/show_bug.cgi?id=1973588
With fixed memory leak of `tmp_err`, reported here:
https://bugzilla.redhat.com/show_bug.cgi?id=2005781
---
src/misc.c | 138 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
src/misc.c | 139 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
src/misc.h | 42 ++++++++++++++++++++++++++++++++++++++++--
src/modifyrepo_shared.c | 4 ++--
src/python/misc-py.c | 2 +-
src/threads.c | 14 +++++++-------
tests/test_misc.c | 34 +++++++++++++++++-----------------
6 files changed, 204 insertions(+), 30 deletions(-)
6 files changed, 205 insertions(+), 30 deletions(-)
diff --git a/src/misc.c b/src/misc.c
index 59c04e6..b3a218c 100644
index 4bd9f4c..c4b2cb3 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -446,7 +446,7 @@ cr_copy_file(const char *src, const char *in_dst, GError **err)
@ -31,7 +34,7 @@ index 59c04e6..b3a218c 100644
cr_CompressionType compression,
cr_ContentStat *stat,
const char *zck_dict_dir,
@@ -458,6 +458,142 @@ cr_compress_file_with_stat(const char *src,
@@ -458,6 +458,143 @@ cr_compress_file_with_stat(const char *src,
char buf[BUFFER_SIZE];
CR_FILE *orig = NULL;
CR_FILE *new = NULL;
@ -113,6 +116,7 @@ index 59c04e6..b3a218c 100644
+ g_set_error(err, ERR_DOMAIN, CRE_IO,
+ "Error reading zchunk dict %s: %s",
+ dict_file, tmp_err->message);
+ g_clear_error(&tmp_err);
+ ret = CRE_IO;
+ goto compress_file_cleanup;
+ }
@ -271,10 +275,10 @@ index 6a7871e..cc28448 100644
nice_exception(&tmp_err, NULL);
return NULL;
diff --git a/src/threads.c b/src/threads.c
index 9ef839d..91b5430 100644
index f0c3f93..b529d55 100644
--- a/src/threads.c
+++ b/src/threads.c
@@ -100,13 +100,13 @@ cr_compressing_thread(gpointer data, G_GNUC_UNUSED gpointer user_data)
@@ -101,13 +101,13 @@ cr_compressing_thread(gpointer data, G_GNUC_UNUSED gpointer user_data)
cr_compression_suffix(task->type),
NULL);
@ -376,5 +380,5 @@ index 6614809..1acccb7 100644
g_assert_cmpint(ret, ==, CRE_OK);
g_assert(g_file_test(dst_full_name, G_FILE_TEST_EXISTS));
--
libgit2 1.0.1
libgit2 1.1.0

View File

@ -31,7 +31,7 @@
Summary: Creates a common metadata repository
Name: createrepo_c
Version: 0.17.7
Release: 2%{?dist}
Release: 3%{?dist}
License: GPLv2+
URL: https://github.com/rpm-software-management/createrepo_c
Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz
@ -183,6 +183,9 @@ ln -sr %{buildroot}%{_bindir}/modifyrepo_c %{buildroot}%{_bindir}/modifyrepo
%{python3_sitearch}/%{name}-%{version}-py%{python3_version}.egg-info
%changelog
* Mon Nov 29 2021 Pavla Kratochvilova <pkratoch@redhat.com> - 0.17.7-3
- Fix memory leak of `tmp_err` (RhBug:2005781)
* Mon Nov 15 2021 Pavla Kratochvilova <pkratoch@redhat.com> - 0.17.7-2
- Build with legacy hashes (RhBug:2022271)