- Append Python interpreter as related package
- Modernize spec file

Signed-off-by: Martin Kutlak <mkutlak@redhat.com>
This commit is contained in:
Martin Kutlak 2018-03-27 16:40:33 +02:00
parent 2f5a14e22e
commit b756439a72
4 changed files with 87 additions and 255 deletions

View File

@ -1,30 +0,0 @@
From 6383faff4959c751f71f107901897ff654e82615 Mon Sep 17 00:00:00 2001
From: Matej Habrnal <mhabrnal@redhat.com>
Date: Fri, 3 Nov 2017 14:38:13 +0100
Subject: [PATCH] normalization: actualize list of functions
Related to #1509086
Signed-off-by: Matej Habrnal <mhabrnal@redhat.com>
---
lib/normalize.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lib/normalize.c b/lib/normalize.c
index 9d7574e..4e9ebb5 100644
--- a/lib/normalize.c
+++ b/lib/normalize.c
@@ -145,7 +145,9 @@ is_removable_glib(const char *function_name,
call_match(function_name, source_file, "g_print", "libglib", NULL) ||
call_match(function_name, source_file, "invalid_closure_notify", "gsignal.c", "libgobject", NULL) ||
call_match(function_name, source_file, "smc_tree_abort", "gslice.c", "libglib", NULL) ||
- call_match(function_name, source_file, "g_thread_abort", "libglib", NULL);
+ call_match(function_name, source_file, "g_thread_abort", "libglib", NULL) ||
+ call_match(function_name, source_file, "_g_log_abort", "gmessages.c", "libglib", NULL) ||
+ call_match(function_name, source_file, "g_log_default_handler", "gmessages.c", "libglib", NULL);
}
static bool
--
2.13.6

View File

@ -1,46 +0,0 @@
From c932a8e85f8306c03618628b1cc8fcfd39d820b0 Mon Sep 17 00:00:00 2001
From: Wes Lindauer <wesley.lindauer@gmail.com>
Date: Mon, 14 Aug 2017 16:31:03 -0400
Subject: [PATCH] elfutils: Add missing stubs from earlier commit
Commit f749d97f060e3c287eb700636790d61337b73eae added new functions
*_core_hook_prepare and *_core_hook_generate to replace a single
function *_core_hook. The *_core_hook was already stubbed out when
WITH_LIBDWFL or PTRACE_SEIZE was not defined, but the new commit did not
add matching stubs for the new functions that replaced it.
---
lib/core_unwind.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/lib/core_unwind.c b/lib/core_unwind.c
index e6dfc1c..1145df3 100644
--- a/lib/core_unwind.c
+++ b/lib/core_unwind.c
@@ -57,6 +57,24 @@ sr_parse_coredump(const char *coredump_filename,
#if (!defined WITH_LIBDWFL || !defined PTRACE_SEIZE)
+struct sr_core_stracetrace_unwind_state *
+sr_core_stacktrace_from_core_hook_prepare(pid_t thread_id, char **error_message)
+{
+ *error_message = sr_asprintf("satyr is built without live process unwind support");
+ return NULL;
+}
+
+struct sr_core_stacktrace *
+sr_core_stacktrace_from_core_hook_generate(pid_t thread_id,
+ const char *executable_filename,
+ int signum,
+ struct sr_core_stracetrace_unwind_state *state,
+ char **error_message)
+{
+ *error_message = sr_asprintf("satyr is built without live process unwind support");
+ return NULL;
+}
+
struct sr_core_stacktrace *
sr_core_stacktrace_from_core_hook(pid_t thread_id,
const char *executable_filename,
--
2.13.6

View File

@ -0,0 +1,68 @@
From 702f5385b83919881b6c33f4cc531baf820a4181 Mon Sep 17 00:00:00 2001
From: Matej Habrnal <mhabrnal@redhat.com>
Date: Mon, 19 Mar 2018 16:19:56 +0100
Subject: [PATCH 11/11] Append Python interpreter as related package
We've decided to attach python interpreter rpm information
to uReport as related package. Python developers need this
information in same cases.
Fixes abrt/abrt#1294
Signed-off-by: Matej Habrnal <mhabrnal@redhat.com>
---
lib/abrt.c | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/lib/abrt.c b/lib/abrt.c
index d206c0d..e3d4695 100644
--- a/lib/abrt.c
+++ b/lib/abrt.c
@@ -372,6 +372,33 @@ rpm_dso_list_from_dir(struct sr_rpm_package *packages,
return packages;
}
+static struct sr_rpm_package *
+rpm_interpreter_from_dir(struct sr_rpm_package *packages,
+ const char *directory,
+ char **error_message)
+{
+ char *interpreter_str = file_contents(directory, "interpreter",
+ error_message);
+ if (interpreter_str)
+ {
+ struct sr_rpm_package *interpreter_package = sr_rpm_package_new();
+ bool success = sr_rpm_package_parse_nevra(interpreter_str,
+ &interpreter_package->name,
+ &interpreter_package->epoch,
+ &interpreter_package->version,
+ &interpreter_package->release,
+ &interpreter_package->architecture);
+
+ free(interpreter_str);
+ if (success)
+ packages = sr_rpm_package_append(packages, interpreter_package);
+ else
+ sr_rpm_package_free(interpreter_package, true);
+ }
+
+ return packages;
+}
+
static bool
file_exist(const char *directory, const char *filename)
{
@@ -412,6 +439,10 @@ sr_abrt_rpm_packages_from_dir(const char *directory, struct sr_rpm_package **pac
return -2;
}
+ /* attach interpreter as related package if exists */
+ if (file_exist(directory, "interpreter"))
+ *packages = rpm_interpreter_from_dir(*packages, directory, error_message);
+
return 0;
}
--
2.14.3

View File

@ -1,12 +1,5 @@
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
# rhel6's python-sphinx cannot build manual pages
%if 0%{?rhel} && 0%{?rhel} <= 6
%define enable_python_manpage 0
%else
%define enable_python_manpage 1
%endif
%if 0%{?fedora} || 0%{?rhel} > 7
%define with_python3 1
%else
@ -26,9 +19,8 @@
Name: satyr
Version: 0.25
Release: 3%{?dist}
Release: 4%{?dist}
Summary: Tools to create anonymous, machine-friendly problem reports
Group: System Environment/Libraries
License: GPLv2+
URL: https://github.com/abrt/satyr
Source0: https://github.com/abrt/%{name}/archive/%{version}/%{name}-%{version}.tar.xz
@ -46,15 +38,16 @@ BuildRequires: pkgconfig
BuildRequires: automake
BuildRequires: gcc-c++
BuildRequires: gdb
%if %{?enable_python_manpage}
BuildRequires: python2-sphinx
%endif
Patch0001: 0001-normalization-actualize-list-of-functions.patch
#Patch0002: 0002-testsuite-add-testcase-for-ARM-kernel-oops-bz.patch
Patch0003: 0003-elfutils-Add-missing-stubs-from-earlier-commit.patch
#Patch0004: 0004-makefile-add-make-release-subcommands.patch
#Patch0005: 0005-allow-to-build-python3-for-rhel8.patch
#Patch0001: 0001-ldconfig-is-not-needed-in-rawhide.patch
#Patch0002: 0002-mark-license-as-license.patch
#Patch0003: 0003-we-do-not-build-for-el6-any-more.patch
#Patch0004: 0004-remove-Groups.patch
#Patch0005: 0005-remove-2-years-old-changelog-entries.patch
#Patch0006: 0006-makefile-create-.tar.xz-with-make-release.patch
#Patch0007: 0007-spec-Update-Python-2-dependency-declarations.patch
Patch0008: 0008-Append-Python-interpreter-as-related-package.patch
%description
Satyr is a library that can be used to create and process microreports.
@ -67,7 +60,6 @@ operations on them.
%package devel
Summary: Development libraries for %{name}
Group: Development/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
@ -80,7 +72,6 @@ Provides: %{name}-python = %{version}-%{release}
Provides: %{name}-python%{?_isa} = %{version}-%{release}
Obsoletes: %{name}-python < %{version}-%{release}
Summary: Python bindings for %{name}
Group: Development/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release}
%description -n python2-satyr
@ -94,7 +85,6 @@ Provides: %{name}-python3 = %{version}-%{release}
Provides: %{name}-python3%{?_isa} = %{version}-%{release}
Obsoletes: %{name}-python3 < %{version}-%{release}
Summary: Python 3 bindings for %{name}
Group: Development/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release}
%description -n python3-satyr
@ -106,9 +96,6 @@ Python 3 bindings for %{name}.
%build
%configure \
%if ! %{?enable_python_manpage}
--disable-python-manpage \
%endif
%if ! %{?with_python3}
--without-python3 \
%endif
@ -131,11 +118,16 @@ make check || {
exit 1
}
%if 0%{?fedora} > 27
# ldconfig is not needed
%else
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%endif
%files
%doc README NEWS COPYING
%doc README NEWS
%license COPYING
%{_bindir}/satyr
%{_mandir}/man1/%{name}.1*
%{_libdir}/libsatyr.so.3*
@ -150,10 +142,7 @@ make check || {
%files -n python2-satyr
%dir %{python_sitearch}/%{name}
%{python_sitearch}/%{name}/*
%if %{?enable_python_manpage}
%{_mandir}/man3/satyr-python.3*
%endif
%if 0%{?with_python3}
%files -n python3-satyr
@ -162,6 +151,10 @@ make check || {
%endif
%changelog
* Tue Mar 27 2018 Martin Kutlak <mkutlak@redhat.com> - 0.25-4
- Modernize spec file
- Append Python interpreter as related package
* Mon Feb 12 2018 Iryna Shcherbina <ishcherb@redhat.com> - 0.25-3
- Update Python 2 dependency declarations to new packaging standards
(See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
@ -234,156 +227,3 @@ make check || {
- New upstream version
- Introduce 'serial' field in uReport
- normalization: actualize list of functions
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.20-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.20-2
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
* Thu Sep 17 2015 Matej Habrnal <mhabrnal@redhat.com> 0.20-1
- New upstream version
- Don't parse SO files as source_files
- Add support for OS Variant
- Fix the missing frame build_id and file_name
- Bugfixes
* Sun Jul 26 2015 Kevin Fenzi <kevin@scrye.com> 0.19-2
- Rebuild for new librpm
* Tue Jul 07 2015 Martin Milata <mmilata@redhat.com> 0.19-1
- New upstream version
- Enhancements to GDB parser: Thread ID, C++ template arguments
- Tests and bugfixes
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.18-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Tue Jun 09 2015 Martin Milata <mmilata@redhat.com> - 0.18-1
- New upstream version
- Remove function fingerprinting
- New kernel taint flags
- Normalization tweaks
- More secure core stacktraces from core hook
* Sat May 02 2015 Kalev Lember <kalevlember@gmail.com> - 0.16-3
- Rebuilt for GCC 5 C++11 ABI change
* Sat Feb 21 2015 Till Maas <opensource@till.name> - 0.16-2
- Rebuilt for Fedora 23 Change
https://fedoraproject.org/wiki/Changes/Harden_all_packages_with_position-independent_code
* Fri Feb 20 2015 Martin Milata <mmilata@redhat.com> 0.16-1
- New upstream version
- Add support for unwinding from core dump hook
- Add support for Ruby uReports
- Bugfixes
* Fri Nov 07 2014 Jakub Filak <jfilak@redhat.com> 0.15-2
- Add function name into reason text for kernel page faults
* Tue Oct 07 2014 Jakub Filak <jfilak@redhat.com> 0.15-1
- New upstream version
- uReport enhancements (DESKTOP_SESSION, auth_data, missing values)
- Enhance the backtrace quality algorithm to tackle MiniDebuginfo
- Support unusual Python and Java exceptions
- Deal with infinite recursion in backtraces
- Bugfixes
* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.14-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Wed Aug 13 2014 Martin Milata <mmilata@redhat.com> 0.14-2
- Fix unwinding of stacktraces containing VDSO frame
* Tue Jun 10 2014 Martin Milata <mmilata@redhat.com> 0.14-1
- New upstream version
- Ported to elfutils-0.158 unwinder API
- Frame fingerprinting disabled
- Bugfixes
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.13-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Thu Jan 09 2014 Rex Dieter <rdieter@fedoraproject.org> 0.13-3
- track api, abi/soname in %%files, so bumps aren't a surprise
* Tue Jan 07 2014 Martin Milata <mmilata@redhat.com> 0.13-2
- Fix build against elfutils-0.158
* Tue Jan 07 2014 Martin Milata <mmilata@redhat.com> 0.13-1
- New upstream version
- Kerneloops parser support for ppc64 and s390
- Kerneloops hashing
* Tue Dec 10 2013 Martin Milata <mmilata@redhat.com> 0.12-1
- New upstream version
- JVM frames normalization
- Add C++ symbol demangling
- Unsigned overflow bugfixes
- Fix malformed uReports for Java
* Sat Oct 26 2013 Jakub Filak <jfilak@redhat.com> 0.11-1
- New upstream version
- Make all python objects hashable
- Improve memory management in rpm module
- Extend the list of normalized functions
- Add command for debugging duphashes to satyr utility
* Thu Oct 03 2013 Jakub Filak <jfilak@redhat.com> 0.10-1
- New upstream version
- Fix a segmentation fault in sr_rpm_package_uniq()
- Respect kernel flavor when parsing package name
- Parse backtrace without Thread header
- Fix koops json output if there are no modules
- Add support for multiple koops stacks
* Wed Sep 11 2013 Jakub Filak <jfilak@redhat.com> 0.9-1
- New upstream version
- Enrich koops uReport data with koops text and kernel version.
- Improve koops modules handling.
* Wed Aug 28 2013 Richard Marko<rmarko@redhat.com> 0.8-1
- New upstream version
- Added support for json de/serialization of reports and stacktraces.
- Library version number increased, as the interface changed since the last release
* Mon Aug 26 2013 Martin Milata <mmilata@redhat.com> 0.7-1
- New upstream version
- Fix couple of crashes (#997076, #994747)
* Mon Jul 29 2013 Martin Milata <mmilata@redhat.com> 0.6-1
- New upstream version
- Do not export internal function symbols.
* Thu Jul 25 2013 Martin Milata <mmilata@redhat.com> 0.5-2
- Remove libunwind dependency altogether, always use GDB for unwinding.
* Thu Jul 25 2013 Jakub Filak <jfilak@redhat.com> 0.5-1
- Added function that creates core stacktrace from GDB output. Several bugfixes.
* Tue Jul 09 2013 Martin Milata <mmilata@redhat.com> 0.4-2
- Fix failing tests (failure manifests only on s390x)
* Mon Jul 08 2013 Martin Milata <mmilata@redhat.com> 0.4-1
- New upstream version
- Added features needed by ABRT
- Support for uReport2
- Major C and Python API changes
- Patch for python-2.6 compatibility
* Tue Apr 02 2013 Dan Horák <dan[at]danny.cz> 0.3-2
- libunwind exists only on selected arches
* Mon Mar 25 2013 Martin Milata <mmilata@redhat.com> 0.3-1
- New upstream version
- Bug fixes
- Build fixes for older systems
- Do not require libunwind on rhel
* Mon Mar 18 2013 Martin Milata <mmilata@redhat.com> 0.2-1
- Documentation and spec cleanup
- Build fixes (build against RPM)
* Mon Aug 30 2010 Karel Klic <kklic@redhat.com> 0.1-1
- Upstream package spec file