mfabik / rpms / satyr

Forked from rpms/satyr 3 years ago
Clone

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

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