diff --git a/1001-Fix-build-failure-with-gcc-fno-common.patch b/1001-Fix-build-failure-with-gcc-fno-common.patch new file mode 100644 index 0000000000000000000000000000000000000000..a276fceae6baf1d26194c6bb7c4cf1bd01da31c7 --- /dev/null +++ b/1001-Fix-build-failure-with-gcc-fno-common.patch @@ -0,0 +1,294 @@ +From 0af82291c7c80cc0a1b486882242774211e5d8d4 Mon Sep 17 00:00:00 2001 +From: Michal Fabik +Date: Tue, 28 Jan 2020 08:59:36 +0100 +Subject: [PATCH] Fix build failure with gcc -fno-common + +Definitions of the extern symbols are found in the existing versions of the corresponding .c files. + +Signed-off-by: Michal Fabik +--- + python/py_core_frame.h | 2 +- + python/py_core_stacktrace.h | 2 +- + python/py_core_thread.h | 2 +- + python/py_gdb_frame.h | 2 +- + python/py_gdb_stacktrace.h | 2 +- + python/py_gdb_thread.h | 2 +- + python/py_java_frame.h | 2 +- + python/py_java_stacktrace.h | 2 +- + python/py_java_thread.h | 2 +- + python/py_js_frame.h | 2 +- + python/py_js_stacktrace.h | 2 +- + python/py_koops_frame.h | 2 +- + python/py_koops_stacktrace.h | 2 +- + python/py_operating_system.h | 2 +- + python/py_python_frame.h | 2 +- + python/py_python_stacktrace.h | 2 +- + python/py_report.h | 2 +- + python/py_rpm_package.h | 2 +- + python/py_ruby_frame.h | 2 +- + python/py_ruby_stacktrace.h | 2 +- + 20 files changed, 20 insertions(+), 20 deletions(-) + +diff --git a/python/py_core_frame.h b/python/py_core_frame.h +index dc4a3a2..bc002e6 100644 +--- a/python/py_core_frame.h ++++ b/python/py_core_frame.h +@@ -32,7 +32,7 @@ extern "C" { + #include + #include + +-PyTypeObject sr_py_core_frame_type; ++extern PyTypeObject sr_py_core_frame_type; + + /* The beginning of this structure has to have the same layout as + * sr_py_base_frame. +diff --git a/python/py_core_stacktrace.h b/python/py_core_stacktrace.h +index f458a23..6d91e40 100644 +--- a/python/py_core_stacktrace.h ++++ b/python/py_core_stacktrace.h +@@ -35,7 +35,7 @@ extern "C" { + struct sr_py_core_frame; + struct sr_py_core_thread; + +-PyTypeObject sr_py_core_stacktrace_type; ++extern PyTypeObject sr_py_core_stacktrace_type; + + /* The beginning of this structure has to have the same layout as + * sr_py_multi_thread_stacktrace. +diff --git a/python/py_core_thread.h b/python/py_core_thread.h +index 2890ff1..c400fb0 100644 +--- a/python/py_core_thread.h ++++ b/python/py_core_thread.h +@@ -32,7 +32,7 @@ extern "C" { + #include + #include + +-PyTypeObject sr_py_core_thread_type; ++extern PyTypeObject sr_py_core_thread_type; + + /* The beginning of this structure has to have the same layout as + * sr_py_base_thread. +diff --git a/python/py_gdb_frame.h b/python/py_gdb_frame.h +index a5f6911..64d49b2 100644 +--- a/python/py_gdb_frame.h ++++ b/python/py_gdb_frame.h +@@ -33,7 +33,7 @@ extern "C" { + #include + #include "gdb/frame.h" + +-PyTypeObject sr_py_gdb_frame_type; ++extern PyTypeObject sr_py_gdb_frame_type; + + typedef sr_gdb_frame_address_t sr_py_gdb_frame_address_t; + +diff --git a/python/py_gdb_stacktrace.h b/python/py_gdb_stacktrace.h +index f5a1765..6c977be 100644 +--- a/python/py_gdb_stacktrace.h ++++ b/python/py_gdb_stacktrace.h +@@ -35,7 +35,7 @@ extern "C" { + struct sr_py_gdb_frame; + struct sr_py_gdb_thread; + +-PyTypeObject sr_py_gdb_stacktrace_type; ++extern PyTypeObject sr_py_gdb_stacktrace_type; + + /* The beginning of this structure has to have the same layout as + * sr_py_multi_thread_stacktrace. +diff --git a/python/py_gdb_thread.h b/python/py_gdb_thread.h +index 39d5163..f518fd8 100644 +--- a/python/py_gdb_thread.h ++++ b/python/py_gdb_thread.h +@@ -32,7 +32,7 @@ extern "C" { + #include + #include + +-PyTypeObject sr_py_gdb_thread_type; ++extern PyTypeObject sr_py_gdb_thread_type; + + /* The beginning of this structure has to have the same layout as + * sr_py_base_thread. +diff --git a/python/py_java_frame.h b/python/py_java_frame.h +index 9f30eb5..ce77cd2 100644 +--- a/python/py_java_frame.h ++++ b/python/py_java_frame.h +@@ -32,7 +32,7 @@ extern "C" { + #include + #include + +-PyTypeObject sr_py_java_frame_type; ++extern PyTypeObject sr_py_java_frame_type; + + /* The beginning of this structure has to have the same layout as + * sr_py_base_frame. +diff --git a/python/py_java_stacktrace.h b/python/py_java_stacktrace.h +index 9cbe80a..1ddf412 100644 +--- a/python/py_java_stacktrace.h ++++ b/python/py_java_stacktrace.h +@@ -35,7 +35,7 @@ extern "C" { + struct sr_py_java_frame; + struct sr_py_java_thread; + +-PyTypeObject sr_py_java_stacktrace_type; ++extern PyTypeObject sr_py_java_stacktrace_type; + + /* The beginning of this structure has to have the same layout as + * sr_py_multi_thread_stacktrace. +diff --git a/python/py_java_thread.h b/python/py_java_thread.h +index 0abe8bc..d95438f 100644 +--- a/python/py_java_thread.h ++++ b/python/py_java_thread.h +@@ -32,7 +32,7 @@ extern "C" { + #include + #include + +-PyTypeObject sr_py_java_thread_type; ++extern PyTypeObject sr_py_java_thread_type; + + /* The beginning of this structure has to have the same layout as + * sr_py_base_thread. +diff --git a/python/py_js_frame.h b/python/py_js_frame.h +index 4374f17..8ce154e 100644 +--- a/python/py_js_frame.h ++++ b/python/py_js_frame.h +@@ -32,7 +32,7 @@ extern "C" { + #include + #include + +-PyTypeObject sr_py_js_frame_type; ++extern PyTypeObject sr_py_js_frame_type; + + /* The beginning of this structure has to have the same layout as + * sr_py_base_frame. +diff --git a/python/py_js_stacktrace.h b/python/py_js_stacktrace.h +index 4c24476..14f6c36 100644 +--- a/python/py_js_stacktrace.h ++++ b/python/py_js_stacktrace.h +@@ -32,7 +32,7 @@ extern "C" { + #include + #include + +-PyTypeObject sr_py_js_stacktrace_type; ++extern PyTypeObject sr_py_js_stacktrace_type; + + /* The beginning of this structure has to have the same layout as + * sr_py_base_thread. +diff --git a/python/py_koops_frame.h b/python/py_koops_frame.h +index 81174de..7d658d7 100644 +--- a/python/py_koops_frame.h ++++ b/python/py_koops_frame.h +@@ -32,7 +32,7 @@ extern "C" { + #include + #include + +-PyTypeObject sr_py_koops_frame_type; ++extern PyTypeObject sr_py_koops_frame_type; + + /* The beginning of this structure has to have the same layout as + * sr_py_base_frame. +diff --git a/python/py_koops_stacktrace.h b/python/py_koops_stacktrace.h +index e72ab54..bea12c9 100644 +--- a/python/py_koops_stacktrace.h ++++ b/python/py_koops_stacktrace.h +@@ -32,7 +32,7 @@ extern "C" { + #include + #include + +-PyTypeObject sr_py_koops_stacktrace_type; ++extern PyTypeObject sr_py_koops_stacktrace_type; + + /* The beginning of this structure has to have the same layout as + * sr_py_base_thread. +diff --git a/python/py_operating_system.h b/python/py_operating_system.h +index bcd8e7f..dbfa024 100644 +--- a/python/py_operating_system.h ++++ b/python/py_operating_system.h +@@ -32,7 +32,7 @@ extern "C" { + #include + #include + +-PyTypeObject sr_py_operating_system_type; ++extern PyTypeObject sr_py_operating_system_type; + + struct sr_py_operating_system + { +diff --git a/python/py_python_frame.h b/python/py_python_frame.h +index 6b4b63f..6cdde88 100644 +--- a/python/py_python_frame.h ++++ b/python/py_python_frame.h +@@ -32,7 +32,7 @@ extern "C" { + #include + #include + +-PyTypeObject sr_py_python_frame_type; ++extern PyTypeObject sr_py_python_frame_type; + + /* The beginning of this structure has to have the same layout as + * sr_py_base_frame. +diff --git a/python/py_python_stacktrace.h b/python/py_python_stacktrace.h +index a89ad8f..fff51c4 100644 +--- a/python/py_python_stacktrace.h ++++ b/python/py_python_stacktrace.h +@@ -32,7 +32,7 @@ extern "C" { + #include + #include + +-PyTypeObject sr_py_python_stacktrace_type; ++extern PyTypeObject sr_py_python_stacktrace_type; + + /* The beginning of this structure has to have the same layout as + * sr_py_base_thread. +diff --git a/python/py_report.h b/python/py_report.h +index 88ec30f..2c5bb8d 100644 +--- a/python/py_report.h ++++ b/python/py_report.h +@@ -32,7 +32,7 @@ extern "C" { + #include + #include + +-PyTypeObject sr_py_report_type; ++extern PyTypeObject sr_py_report_type; + + struct sr_py_report + { +diff --git a/python/py_rpm_package.h b/python/py_rpm_package.h +index 0a00d8d..363acd6 100644 +--- a/python/py_rpm_package.h ++++ b/python/py_rpm_package.h +@@ -32,7 +32,7 @@ extern "C" { + #include + #include + +-PyTypeObject sr_py_rpm_package_type; ++extern PyTypeObject sr_py_rpm_package_type; + + struct sr_py_rpm_package + { +diff --git a/python/py_ruby_frame.h b/python/py_ruby_frame.h +index 7f460ff..e7aa568 100644 +--- a/python/py_ruby_frame.h ++++ b/python/py_ruby_frame.h +@@ -32,7 +32,7 @@ extern "C" { + #include + #include + +-PyTypeObject sr_py_ruby_frame_type; ++extern PyTypeObject sr_py_ruby_frame_type; + + /* The beginning of this structure has to have the same layout as + * sr_py_base_frame. +diff --git a/python/py_ruby_stacktrace.h b/python/py_ruby_stacktrace.h +index f4eebce..59d866b 100644 +--- a/python/py_ruby_stacktrace.h ++++ b/python/py_ruby_stacktrace.h +@@ -32,7 +32,7 @@ extern "C" { + #include + #include + +-PyTypeObject sr_py_ruby_stacktrace_type; ++extern PyTypeObject sr_py_ruby_stacktrace_type; + + /* The beginning of this structure has to have the same layout as + * sr_py_base_thread. +-- +2.24.1 + diff --git a/satyr.spec b/satyr.spec index 86d67a11cd5387c2fcb585246c717f832d05ebdd..373a4a1938a3748263d2ef5682b2602885236c2e 100644 --- a/satyr.spec +++ b/satyr.spec @@ -1,3 +1,4 @@ +%define anolis_release .0.1 %{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} %if 0%{?fedora} || 0%{?rhel} > 7 @@ -27,7 +28,7 @@ Name: satyr Version: 0.26 -Release: 2%{?dist} +Release: 2%{anolis_release}%{?dist} Summary: Tools to create anonymous, machine-friendly problem reports License: GPLv2+ URL: https://github.com/abrt/satyr @@ -63,6 +64,11 @@ BuildRequires: git Patch0001: 0001-Anonymize-paths-in-frames.patch Patch0002: 0002-testsuite-Correct-syntax-for-gdb-backtrace-command.patch +# Begin: Anolis customized patches +# Backport from fc32 to fix FTBFS on gcc10 +Patch1001: 1001-Fix-build-failure-with-gcc-fno-common.patch +# End: Anolis customized patches + %description Satyr is a library that can be used to create and process microreports. @@ -179,6 +185,9 @@ make check|| { %endif %changelog +* Wed Dec 01 2021 Weitao Zhou 0.26-2.0.1 +- use extern in header files when declaring global variables for compatible gcc10 build + * Fri Jun 29 2018 Matej Habrnal 0.26-2 - Anonymize paths in frames - Test fix: correct syntax for gdb backtrace command