Blame SOURCES/satyr-0.13-disable-fingerprints.patch

01add4
From 58e874e4a28ce00623db208475b0d9fd22d601ac Mon Sep 17 00:00:00 2001
01add4
From: Martin Milata <mmilata@redhat.com>
01add4
Date: Tue, 14 Jan 2014 13:40:45 +0100
01add4
Subject: [SATYR PATCH 3/3] abrt: disable fingerprinting of core stacktraces
01add4
01add4
Closes rhbz#1052402.
01add4
01add4
Signed-off-by: Martin Milata <mmilata@redhat.com>
01add4
---
01add4
 include/abrt.h         |  2 ++
01add4
 lib/abrt.c             |  2 ++
01add4
 lib/core_fingerprint.c | 25 +++++++++++++++++++++++++
01add4
 3 files changed, 29 insertions(+)
01add4
01add4
diff --git a/include/abrt.h b/include/abrt.h
01add4
index 1ef7876..0a8f5ac 100644
01add4
--- a/include/abrt.h
01add4
+++ b/include/abrt.h
01add4
@@ -31,6 +31,8 @@ bool
01add4
 sr_abrt_print_report_from_dir(const char *directory,
01add4
                               char **error_message);
01add4
 
01add4
+/* NOTE: the hash_fingerprints argument has no effect because fingerprint
01add4
+ * generation is disabled. */
01add4
 bool
01add4
 sr_abrt_create_core_stacktrace(const char *directory,
01add4
                                bool hash_fingerprints,
01add4
diff --git a/lib/abrt.c b/lib/abrt.c
01add4
index 8c006fa..39bc45d 100644
01add4
--- a/lib/abrt.c
01add4
+++ b/lib/abrt.c
01add4
@@ -87,11 +87,13 @@ create_core_stacktrace(const char *directory, const char *gdb_output,
01add4
     if (!core_stacktrace)
01add4
         return false;
01add4
 
01add4
+#if 0
01add4
     sr_core_fingerprint_generate(core_stacktrace,
01add4
                                  error_message);
01add4
 
01add4
     if (hash_fingerprints)
01add4
         sr_core_fingerprint_hash(core_stacktrace);
01add4
+#endif
01add4
 
01add4
     char *json = sr_core_stacktrace_to_json(core_stacktrace);
01add4
 
01add4
diff --git a/lib/core_fingerprint.c b/lib/core_fingerprint.c
01add4
index 8c5a228..3c7b5ba 100644
01add4
--- a/lib/core_fingerprint.c
01add4
+++ b/lib/core_fingerprint.c
01add4
@@ -17,6 +17,8 @@
01add4
     with this program; if not, write to the Free Software Foundation, Inc.,
01add4
     51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
01add4
 */
01add4
+#include "config.h"
01add4
+
01add4
 #include "core/fingerprint.h"
01add4
 #include "core/stacktrace.h"
01add4
 #include "core/frame.h"
01add4
@@ -33,6 +35,8 @@
01add4
 #include <stdlib.h>
01add4
 #include <search.h>
01add4
 
01add4
+#if HAVE_LIBOPCODES
01add4
+
01add4
 static void
01add4
 fingerprint_add_bool(struct sr_strbuf *buffer,
01add4
                      const char *name,
01add4
@@ -552,6 +556,27 @@ sr_core_fingerprint_generate_for_binary(struct sr_core_thread *thread,
01add4
     return true;
01add4
 }
01add4
 
01add4
+#else // HAVE_LIBOPCODES
01add4
+
01add4
+bool
01add4
+sr_core_fingerprint_generate(struct sr_core_stacktrace *stacktrace,
01add4
+                             char **error_message)
01add4
+{
01add4
+    *error_message = sr_strdup("satyr compiled without libopcodes");
01add4
+    return false;
01add4
+}
01add4
+
01add4
+bool
01add4
+sr_core_fingerprint_generate_for_binary(struct sr_core_thread *thread,
01add4
+                                        const char *binary_path,
01add4
+                                        char **error_message)
01add4
+{
01add4
+    *error_message = sr_strdup("satyr compiled without libopcodes");
01add4
+    return false;
01add4
+}
01add4
+
01add4
+#endif // HAVE_LIBOPCODES
01add4
+
01add4
 static void
01add4
 hash_frame (struct sr_core_frame *frame)
01add4
 {
01add4
-- 
01add4
1.8.3.1
01add4