b9f1249
%if 0%{?fedora} || 0%{?rhel} > 7
f161e5f
# Enable python3 build by default
f161e5f
%bcond_without python3
8fc81b0
%else
f161e5f
%bcond_with python3
f161e5f
%endif
f161e5f
Martin Milata b095ba8
%if 0%{?suse_version}
Martin Milata b095ba8
  %define libdw_devel libdw-devel
Martin Milata b095ba8
  %define libelf_devel libelf-devel
Martin Milata b095ba8
%else
Martin Milata b095ba8
  %define libdw_devel elfutils-devel
Martin Milata b095ba8
  %define libelf_devel elfutils-libelf-devel
Martin Milata b095ba8
%endif
Martin Milata b095ba8
Martin Milata 50f3ee6
Name: satyr
6c2770c
Version: 0.28
1fe1d5e
Release: 2%{?dist}
Martin Milata 50f3ee6
Summary: Tools to create anonymous, machine-friendly problem reports
Martin Milata 50f3ee6
License: GPLv2+
Martin Milata 50f3ee6
URL: https://github.com/abrt/satyr
acb9b8c
Source0: https://github.com/abrt/%{name}/archive/%{version}/%{name}-%{version}.tar.xz
f161e5f
%if %{with python3}
Martin Milata ede4ce2
BuildRequires: python3-devel
f161e5f
%endif # with python3
Martin Milata b095ba8
BuildRequires: %{libdw_devel}
Martin Milata b095ba8
BuildRequires: %{libelf_devel}
Martin Milata b095ba8
BuildRequires: binutils-devel
Martin Milata 0d00212
BuildRequires: rpm-devel
Martin Milata b095ba8
BuildRequires: libtool
6f11dbb
BuildRequires: doxygen
Martin Milata b095ba8
BuildRequires: pkgconfig
Martin Milata b095ba8
BuildRequires: automake
Martin Milata b095ba8
BuildRequires: gcc-c++
8cafea7
BuildRequires: gdb
f161e5f
%if %{with python3}
f161e5f
BuildRequires: python3-sphinx
f161e5f
%endif # with python3
b9f1249
7589fca
# git is need for '%%autosetup -S git' which automatically applies all the
7589fca
# patches above. Please, be aware that the patches must be generated
7589fca
# by 'git format-patch'
7589fca
BuildRequires: git
7589fca
7589fca
7589fca
Martin Milata 50f3ee6
%description
Martin Milata 50f3ee6
Satyr is a library that can be used to create and process microreports.
Martin Milata 50f3ee6
Microreports consist of structured data suitable to be analyzed in a fully
Martin Milata 50f3ee6
automated manner, though they do not necessarily contain sufficient information
Martin Milata 50f3ee6
to fix the underlying problem. The reports are designed not to contain any
Martin Milata 50f3ee6
potentially sensitive data to eliminate the need for review before submission.
Martin Milata 50f3ee6
Included is a tool that can create microreports and perform some basic
Martin Milata 50f3ee6
operations on them.
Martin Milata 50f3ee6
Martin Milata 50f3ee6
%package devel
Martin Milata 50f3ee6
Summary: Development libraries for %{name}
Martin Milata 50f3ee6
Requires: %{name}%{?_isa} = %{version}-%{release}
Martin Milata 50f3ee6
Martin Milata 50f3ee6
%description devel
Martin Milata 50f3ee6
Development libraries and headers for %{name}.
Martin Milata 50f3ee6
f161e5f
%if %{with python3}
36d7e1c
%package -n python3-satyr
36d7e1c
%{?python_provide:%python_provide python3-satyr}
36d7e1c
# Remove before F30
36d7e1c
Provides: %{name}-python3 = %{version}-%{release}
36d7e1c
Provides: %{name}-python3%{?_isa} = %{version}-%{release}
f161e5f
Obsoletes: %{name}-python3 < 0.24
Martin Milata ede4ce2
Summary: Python 3 bindings for %{name}
Martin Milata ede4ce2
Requires: %{name}%{?_isa} = %{version}-%{release}
Martin Milata ede4ce2
36d7e1c
%description -n python3-satyr
Martin Milata ede4ce2
Python 3 bindings for %{name}.
f161e5f
%endif # if with python3
Martin Milata ede4ce2
Martin Milata 50f3ee6
%prep
7589fca
# http://www.rpm.org/wiki/PackagerDocs/Autosetup
7589fca
# Default '__scm_apply_git' is 'git apply && git commit' but this workflow
7589fca
# doesn't allow us to create a new file within a patch, so we have to use
7589fca
# 'git am' (see /usr/lib/rpm/macros for more details)
7589fca
%define __scm_apply_git(qp:m:) %{__git} am
7589fca
%autosetup -S git
Martin Milata 50f3ee6
Martin Milata 50f3ee6
%build
Jakub Filak 5957810
%configure \
f161e5f
%if %{without python3}
8fc81b0
        --without-python3 \
f161e5f
%endif # with python3
6f11dbb
        --disable-static \
6f11dbb
        --enable-doxygen-docs
Jakub Filak 5957810
Martin Milata 50f3ee6
make %{?_smp_mflags}
Martin Milata 50f3ee6
Martin Milata 50f3ee6
%install
Martin Milata 50f3ee6
make install DESTDIR=%{buildroot}
Martin Milata 50f3ee6
Martin Milata 50f3ee6
# Remove all libtool archives (*.la) from modules directory.
Martin Milata 50f3ee6
find %{buildroot} -name "*.la" | xargs rm --
Martin Milata 50f3ee6
Martin Milata 50f3ee6
%check
f161e5f
make check|| {
Martin Milata ec9699b
    # find and print the logs of failed test
Martin Milata ec9699b
    # do not cat tests/testsuite.log because it contains a lot of bloat
Martin Milata ec9699b
    find tests/testsuite.dir -name "testsuite.log" -print -exec cat '{}' \;
Martin Milata ec9699b
    exit 1
Martin Milata ec9699b
}
Martin Milata 50f3ee6
b756439
%if 0%{?fedora} > 27
b756439
# ldconfig is not needed
b756439
%else
Martin Milata 50f3ee6
%post -p /sbin/ldconfig
Martin Milata 50f3ee6
%postun -p /sbin/ldconfig
b756439
%endif
Martin Milata 50f3ee6
Martin Milata 50f3ee6
%files
b756439
%doc README NEWS
b756439
%license COPYING
Martin Milata 50f3ee6
%{_bindir}/satyr
Martin Milata 50f3ee6
%{_mandir}/man1/%{name}.1*
f161e5f
%{_libdir}/lib*.so.*
Martin Milata 50f3ee6
Martin Milata 50f3ee6
%files devel
6f11dbb
# The complex pattern below (instead of simlpy *) excludes Makefile{.am,.in}:
6f11dbb
%doc apidoc/html/*.{html,png,css,js}
f161e5f
%{_includedir}/*
f161e5f
%{_libdir}/lib*.so
f161e5f
%{_libdir}/pkgconfig/*
Martin Milata 50f3ee6
8fc81b0
%if 0%{?with_python3}
36d7e1c
%files -n python3-satyr
Martin Milata ede4ce2
%dir %{python3_sitearch}/%{name}
Martin Milata ede4ce2
%{python3_sitearch}/%{name}/*
8fc81b0
%endif
Martin Milata ede4ce2
Martin Milata 50f3ee6
%changelog
1fe1d5e
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.28-2
1fe1d5e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
1fe1d5e
6c2770c
* Fri Jun 21 2019 Ernestas Kulik <ekulik@redhat.com> - 0.28-1
6c2770c
- New version 0.28
6c2770c
f924238
* Mon Jun 10 22:13:23 CET 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.27-4
f924238
- Rebuild for RPM 4.15
f924238
a12eeb9
* Mon Jun 10 15:42:05 CET 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.27-3
a12eeb9
- Rebuild for RPM 4.15
a12eeb9
8bfd1a8
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.27-2
8bfd1a8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
8bfd1a8
066a6e5
* Mon Oct 8 2018 Martin Kutlak <mkutlak@redhat.com> 0.27-1
066a6e5
- New upstream version
066a6e5
 - Improve format of truncated backtrace for Python and core
066a6e5
aea507c
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.26-4
aea507c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
aea507c
7589fca
* Fri Jun 29 2018 Matej Habrnal <mhabrnal@redhat.com> 0.26-3
7589fca
- Anonymize paths in frames
7589fca
- Test fix: correct syntax for gdb backtrace command
7589fca
f4211c2
* Tue Jun 19 2018 Miro HronĨok <mhroncok@redhat.com> - 0.26-2
f4211c2
- Rebuilt for Python 3.7
f4211c2
f161e5f
* Tue Apr 17 2018 Matej Habrnal <mhabrnal@redhat.com> 0.26-1
f161e5f
- spec: fix Allow python2 to be optional at build time
f161e5f
- Allow python2 to be optional at build time
f161e5f
- normalization: actualize list of functions
b756439
- Append Python interpreter as related package
f161e5f
- makefile: create .tar.xz with make release
b756439
f161e5f
* Thu Jan 18 2018 Martin Kutlak <mkutlak@redhat.com> 0.25-1
6fca127
- New upstream version
f161e5f
 - Normalization: actualize list of functions
f161e5f
 - Fix some compilation warnings
f161e5f
 - Allow to build python3 for rhel8
f161e5f
 - Makefile: add make release-* subcommands
f161e5f
 - Elfutils: Add missing stubs from earlier commit
b9f1249
6f11dbb
* Wed Nov 1 2017 Julius Milan <jmilan@redhat.com> 0.24-1
6f11dbb
- New upstream version
6f11dbb
  - Allow to report unpackaged problems
6f11dbb
  - apidoc: generate html docs using doxygen
6f11dbb
  - Fix parsing of subset of arm kernel oopses
6f11dbb
acb9b8c
* Mon Mar 13 2017 Matej Habrnal <mhabrnal@redhat.com> 0.23-1
acb9b8c
- New upstream version
acb9b8c
  - Allow rpm to be optional at build time
acb9b8c
  - Do not use deprecated fedorahosted.org
acb9b8c
f161e5f
* Thu Dec 1 2016 Jakub Filak <jakub@thefilaks.net> 0.22-1
8cafea7
- New upstream version
8cafea7
  - Added support fof JavaScript (V8) stack traces
8cafea7
  - Most parts of the in-hook core unwinder callable under unprivileged user
8cafea7
  - GDB core unwinder limits number of unwound frames
8cafea7
  - Fixed a pair of compile warnings - Chris Redmon <credmonster@gmail.com>
8cafea7
f161e5f
* Wed May 18 2016 Matej Habrnal <mhabrnal@redhat.com> 0.21-1
72d2e20
- New upstream version
72d2e20
  - Introduce 'serial' field in uReport
72d2e20
  - normalization: actualize list of functions