public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Igor Raits <ignatenkobrain@fedoraproject.org>
To: git-commits@fedoraproject.org
Subject: [rpms/abrt] update-2.17.8: Backport few more patches to fix compatibility with new libreport
Date: Mon, 03 Aug 2026 10:24:01 GMT [thread overview]
Message-ID: <178575264112.1.12755185814102989249.rpms-abrt-5f74b5e40709@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/abrt
Branch : update-2.17.8
Commit : 5f74b5e40709fd5924c4dc57f71d00f052786e89
Author : Igor Raits <ignatenkobrain@fedoraproject.org>
Date : 2020-02-07T08:00:55+01:00
Stats : +243/-1 in 3 file(s)
URL : https://src.fedoraproject.org/rpms/abrt/c/5f74b5e40709fd5924c4dc57f71d00f052786e89?branch=update-2.17.8
Log:
Backport few more patches to fix compatibility with new libreport
Signed-off-by: Igor Raits <ignatenkobrain@fedoraproject.org>
---
diff --git a/0001-Stop-using-parse_list.patch b/0001-Stop-using-parse_list.patch
new file mode 100644
index 0000000..8f2459c
--- /dev/null
+++ b/0001-Stop-using-parse_list.patch
@@ -0,0 +1,70 @@
+From 3f5003af92d2b2b0e4f5565ccd90b29e32e6b30b Mon Sep 17 00:00:00 2001
+From: Ernestas Kulik <ekulik@redhat.com>
+Date: Thu, 16 Jan 2020 10:53:47 +0100
+Subject: [PATCH] Stop using parse_list
+
+It will be gone from libreport before you know it.
+---
+ src/daemon/abrt-action-save-package-data.c | 12 ++++++------
+ src/plugins/abrt-dump-journal-xorg.c | 2 +-
+ 2 files changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/src/daemon/abrt-action-save-package-data.c b/src/daemon/abrt-action-save-package-data.c
+index e52b3d55..30e8fd73 100644
+--- a/src/daemon/abrt-action-save-package-data.c
++++ b/src/daemon/abrt-action-save-package-data.c
+@@ -49,20 +49,20 @@ static void ParseCommon(map_string_t *settings, const char *conf_filename)
+ value = get_map_string_item_or_NULL(settings, "BlackList");
+ if (value)
+ {
+- settings_setBlackListedPkgs = parse_list(value);
++ settings_setBlackListedPkgs = parse_delimited_list(value, ",");
+ remove_map_string_item(settings, "BlackList");
+ }
+ else
+- settings_setBlackListedPkgs = parse_list(DEFAULT_BLACKLISTED_PKGS);
++ settings_setBlackListedPkgs = parse_delimited_list(DEFAULT_BLACKLISTED_PKGS, ",");
+
+ value = get_map_string_item_or_NULL(settings, "BlackListedPaths");
+ if (value)
+ {
+- settings_setBlackListedPaths = parse_list(value);
++ settings_setBlackListedPaths = parse_delimited_list(value, ",");
+ remove_map_string_item(settings, "BlackListedPaths");
+ }
+ else
+- settings_setBlackListedPaths = parse_list(DEFAULT_BLACKLISTED_PATHS);
++ settings_setBlackListedPaths = parse_delimited_list(DEFAULT_BLACKLISTED_PATHS, ",");
+
+ value = get_map_string_item_or_NULL(settings, "ProcessUnpackaged");
+ if (value)
+@@ -74,11 +74,11 @@ static void ParseCommon(map_string_t *settings, const char *conf_filename)
+ value = get_map_string_item_or_NULL(settings, "Interpreters");
+ if (value)
+ {
+- settings_Interpreters = parse_list(value);
++ settings_Interpreters = parse_delimited_list(value, ",");
+ remove_map_string_item(settings, "Interpreters");
+ }
+ else
+- settings_Interpreters = parse_list(DEFAULT_INTERPRETERS);
++ settings_Interpreters = parse_delimited_list(DEFAULT_INTERPRETERS, ",");
+
+ map_string_iter_t iter;
+ const char *name;
+diff --git a/src/plugins/abrt-dump-journal-xorg.c b/src/plugins/abrt-dump-journal-xorg.c
+index 92d19661..351bbae4 100644
+--- a/src/plugins/abrt-dump-journal-xorg.c
++++ b/src/plugins/abrt-dump-journal-xorg.c
+@@ -261,7 +261,7 @@ int main(int argc, char *argv[])
+ conf_journal_filters = XORG_DEFAULT_JOURNAL_FILTERS;
+ }
+
+- xorg_journal_filter = parse_list(conf_journal_filters);
++ xorg_journal_filter = parse_delimited_list(conf_journal_filters, ",");
+ /* list data will be free by g_list_free_full */
+ free_filter_list_data = true;
+ free_map_string(settings);
+--
+2.25.0
+
diff --git a/0001-Use-GChecksum-to-compute-checksums.patch b/0001-Use-GChecksum-to-compute-checksums.patch
new file mode 100644
index 0000000..f0e32ae
--- /dev/null
+++ b/0001-Use-GChecksum-to-compute-checksums.patch
@@ -0,0 +1,168 @@
+From 16468b57579997971c056687ecc8438a406d57c2 Mon Sep 17 00:00:00 2001
+From: Ernestas Kulik <ekulik@redhat.com>
+Date: Tue, 14 Jan 2020 16:36:21 +0100
+Subject: [PATCH] Use GChecksum to compute checksums
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+d605ffeaa6ae411ef396160ffd67b7a6fd27c6ba in libreport removed some
+convenience API for hashing data, so let’s just go with what GLib has in
+store.
+---
+ src/dbus/abrt_problems2_service.c | 33 +++++++++++----------
+ src/plugins/abrt-action-analyze-backtrace.c | 8 +++--
+ src/plugins/abrt-action-analyze-c.c | 7 +++--
+ src/plugins/abrt-action-analyze-python.c | 9 +++---
+ 4 files changed, 32 insertions(+), 25 deletions(-)
+
+diff --git a/src/dbus/abrt_problems2_service.c b/src/dbus/abrt_problems2_service.c
+index 2511136f..a0d2a3ce 100644
+--- a/src/dbus/abrt_problems2_service.c
++++ b/src/dbus/abrt_problems2_service.c
+@@ -572,9 +572,11 @@ static AbrtP2Object *session_object_register(AbrtP2Service *service,
+
+ static char *session_object_caller_to_path(const char *caller)
+ {
+- char hash_str[SHA1_RESULT_LEN*2 + 1];
+- str_to_sha1str(hash_str, caller);
+- return xasprintf(ABRT_P2_PATH"/Session/%s", hash_str);
++ g_autofree char *checksum = NULL;
++
++ checksum = g_compute_checksum_for_string(G_CHECKSUM_SHA1, caller, -1);
++
++ return xasprintf(ABRT_P2_PATH"/Session/%s", checksum);
+ }
+
+ static AbrtP2Object *abrt_p2_service_get_session_for_caller(
+@@ -1323,9 +1325,11 @@ static void entry_object_destructor(AbrtP2Object *obj)
+
+ static char *entry_object_dir_name_to_path(const char *dd_dirname)
+ {
+- char hash_str[SHA1_RESULT_LEN*2 + 1];
+- str_to_sha1str(hash_str, dd_dirname);
+- return xasprintf(ABRT_P2_PATH"/Entry/%s", hash_str);
++ g_autofree char *checksum = NULL;
++
++ checksum = g_compute_checksum_for_string(G_CHECKSUM_SHA1, dd_dirname, -1);
++
++ return xasprintf(ABRT_P2_PATH"/Entry/%s", checksum);
+ }
+
+ static AbrtP2Object *entry_object_register_dump_dir(AbrtP2Service *service,
+@@ -1480,8 +1484,10 @@ char *abrt_p2_service_save_problem( AbrtP2Service *service,
+ else
+ {
+ /* start hash */
+- sha1_ctx_t sha1ctx;
+- sha1_begin(&sha1ctx);
++ g_autoptr(GChecksum) checksum = NULL;
++ const char *digest;
++
++ checksum = g_checksum_new(G_CHECKSUM_SHA1);
+
+ /*
+ * To avoid spurious hash differences, sort keys so that elements are
+@@ -1500,19 +1506,16 @@ char *abrt_p2_service_save_problem( AbrtP2Service *service,
+
+ gsize size = 0;
+ const char *content = g_variant_get_string(element, &size);
+- sha1_hash(&sha1ctx, content, size);
++
++ g_checksum_update(checksum, (const unsigned char *)content, size);
+
+ g_variant_unref(element);
+ }
+ g_list_free_full(list, free);
+
+- /* end hash */
+- char hash_bytes[SHA1_RESULT_LEN];
+- sha1_end(&sha1ctx, hash_bytes);
+- char hash_str[SHA1_RESULT_LEN*2 + 1];
+- bin2hex(hash_str, hash_bytes, SHA1_RESULT_LEN)[0] = '\0';
++ digest = g_checksum_get_string(checksum);
+
+- g_variant_dict_insert(&pd, FILENAME_UUID, "s", hash_str);
++ g_variant_dict_insert(&pd, FILENAME_UUID, "s", digest);
+ }
+ }
+
+diff --git a/src/plugins/abrt-action-analyze-backtrace.c b/src/plugins/abrt-action-analyze-backtrace.c
+index 622d7953..20e71945 100644
+--- a/src/plugins/abrt-action-analyze-backtrace.c
++++ b/src/plugins/abrt-action-analyze-backtrace.c
+@@ -82,6 +82,8 @@ int main(int argc, char **argv)
+ /* Store backtrace hash */
+ if (!backtrace)
+ {
++ g_autofree char *checksum = NULL;
++
+ /*
+ * The parser failed. Compute the duphash from the executable
+ * instead of a backtrace.
+@@ -98,10 +100,10 @@ int main(int argc, char **argv)
+ strbuf_prepend_str(emptybt, component);
+
+ log_debug("Generating duphash: %s", emptybt->buf);
+- char hash_str[SHA1_RESULT_LEN*2 + 1];
+- str_to_sha1str(hash_str, emptybt->buf);
+
+- dd_save_text(dd, FILENAME_DUPHASH, hash_str);
++ checksum = g_compute_checksum_for_string(G_CHECKSUM_SHA1, emptybt->buf, -1);
++
++ dd_save_text(dd, FILENAME_DUPHASH, checksum);
+ /*
+ * Other parts of ABRT assume that if no rating is available,
+ * it is ok to allow reporting of the bug. To be sure no bad
+diff --git a/src/plugins/abrt-action-analyze-c.c b/src/plugins/abrt-action-analyze-c.c
+index 08e48779..4a6d34d4 100644
+--- a/src/plugins/abrt-action-analyze-c.c
++++ b/src/plugins/abrt-action-analyze-c.c
+@@ -235,10 +235,11 @@ int main(int argc, char **argv)
+
+ log_debug("String to hash: %s", string_to_hash);
+
+- char hash_str[SHA1_RESULT_LEN*2 + 1];
+- str_to_sha1str(hash_str, string_to_hash);
++ g_autofree char *checksum = NULL;
+
+- dd_save_text(dd, FILENAME_UUID, hash_str);
++ checksum = g_compute_checksum_for_string(G_CHECKSUM_SHA1, string_to_hash, -1);
++
++ dd_save_text(dd, FILENAME_UUID, checksum);
+
+ /* Create crash_function element from core_backtrace */
+ char *core_backtrace_json = dd_load_text_ext(dd, FILENAME_CORE_BACKTRACE,
+diff --git a/src/plugins/abrt-action-analyze-python.c b/src/plugins/abrt-action-analyze-python.c
+index 0dd55750..10589cbb 100644
+--- a/src/plugins/abrt-action-analyze-python.c
++++ b/src/plugins/abrt-action-analyze-python.c
+@@ -26,6 +26,8 @@
+
+ int main(int argc, char **argv)
+ {
++ g_autofree char *checksum = NULL;
++
+ /* I18n */
+ setlocale(LC_ALL, "");
+ #if ENABLE_NLS
+@@ -91,13 +93,12 @@ int main(int argc, char **argv)
+
+ char *bt_end = strchrnul(bt, '\n');
+ *bt_end = '\0';
+- char hash_str[SHA1_RESULT_LEN*2 + 1];
+- str_to_sha1str(hash_str, bt);
++ checksum = g_compute_checksum_for_string(G_CHECKSUM_SHA1, bt, -1);
+
+ free(bt);
+
+- dd_save_text(dd, FILENAME_UUID, hash_str);
+- dd_save_text(dd, FILENAME_DUPHASH, hash_str);
++ dd_save_text(dd, FILENAME_UUID, checksum);
++ dd_save_text(dd, FILENAME_DUPHASH, checksum);
+ dd_close(dd);
+
+ return 0;
+--
+2.25.0
+
diff --git a/abrt.spec b/abrt.spec
index 5c4f2f0..8ab97a0 100644
--- a/abrt.spec
+++ b/abrt.spec
@@ -58,8 +58,12 @@ Patch0001: 0001-python-Use-correct-paths-for-installed-modules.patch
Patch0002: 0002-Fix-build-failure-with-gcc-fno-common.patch
Patch0003: 0003-bodhi-Initialize-karma-values-with-default.patch
Patch0004: 0004-dbus-Fix-possibly-uninitialized-variable.patch
+# https://github.com/abrt/abrt/commit/16468b57579997971c056687ecc8438a406d57c2
+Patch0005: 0001-Use-GChecksum-to-compute-checksums.patch
# https://github.com/abrt/abrt/commit/439fe1daddd62d53bf2ee72c45b631f5248daf5d
-Patch0005: 0001-koops-Avoid-explicit-dependency-on-hash-size.patch
+Patch0006: 0001-koops-Avoid-explicit-dependency-on-hash-size.patch
+# https://github.com/abrt/abrt/commit/3f5003af92d2b2b0e4f5565ccd90b29e32e6b30b
+Patch0007: 0001-Stop-using-parse_list.patch
BuildRequires: git-core
BuildRequires: %{dbus_devel}
reply other threads:[~2026-08-03 10:24 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178575264112.1.12755185814102989249.rpms-abrt-5f74b5e40709@fedoraproject.org \
--to=ignatenkobrain@fedoraproject.org \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox