Blame SPECS/satyr.spec

742a38
%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
742a38
742a38
%if 0%{?fedora} || 0%{?rhel} > 7
742a38
# Enable python3 build by default
742a38
%bcond_without python3
742a38
%else
742a38
%bcond_with python3
742a38
%endif
742a38
742a38
%if 0%{?rhel} > 7 || 0%{?fedora} > 28
742a38
# Disable python2 build by default
742a38
%bcond_with python2
742a38
%else
742a38
%bcond_without python2
742a38
%endif
742a38
742a38
%if 0%{?suse_version}
742a38
  %define python2_sitearch %{python_sitearch}
742a38
  %define python2_devel python-devel
742a38
  %define libdw_devel libdw-devel
742a38
  %define libelf_devel libelf-devel
742a38
%else
742a38
  %define python2_devel python2-devel
742a38
  %define libdw_devel elfutils-devel
742a38
  %define libelf_devel elfutils-libelf-devel
742a38
%endif
742a38
742a38
Name: satyr
742a38
Version: 0.26
742a38
Release: 2%{?dist}
742a38
Summary: Tools to create anonymous, machine-friendly problem reports
742a38
License: GPLv2+
742a38
URL: https://github.com/abrt/satyr
742a38
Source0: https://github.com/abrt/%{name}/archive/%{version}/%{name}-%{version}.tar.xz
742a38
%if %{with python2}
742a38
BuildRequires: %{python2_devel}
742a38
%endif # with python2
742a38
%if %{with python3}
742a38
BuildRequires: python3-devel
742a38
%endif # with python3
742a38
BuildRequires: %{libdw_devel}
742a38
BuildRequires: %{libelf_devel}
742a38
BuildRequires: binutils-devel
742a38
BuildRequires: rpm-devel
742a38
BuildRequires: libtool
742a38
BuildRequires: doxygen
742a38
BuildRequires: pkgconfig
742a38
BuildRequires: automake
742a38
BuildRequires: gcc-c++
742a38
BuildRequires: gdb
742a38
%if %{with python2}
742a38
BuildRequires: python2-sphinx
742a38
%endif # with python2
742a38
%if %{with python3}
742a38
BuildRequires: python3-sphinx
742a38
%endif # with python3
742a38
742a38
# git is need for '%%autosetup -S git' which automatically applies all the
742a38
# patches above. Please, be aware that the patches must be generated
742a38
# by 'git format-patch'
742a38
BuildRequires: git
742a38
742a38
Patch0001: 0001-Anonymize-paths-in-frames.patch
742a38
Patch0002: 0002-testsuite-Correct-syntax-for-gdb-backtrace-command.patch
742a38
742a38
742a38
%description
742a38
Satyr is a library that can be used to create and process microreports.
742a38
Microreports consist of structured data suitable to be analyzed in a fully
742a38
automated manner, though they do not necessarily contain sufficient information
742a38
to fix the underlying problem. The reports are designed not to contain any
742a38
potentially sensitive data to eliminate the need for review before submission.
742a38
Included is a tool that can create microreports and perform some basic
742a38
operations on them.
742a38
742a38
%package devel
742a38
Summary: Development libraries for %{name}
742a38
Requires: %{name}%{?_isa} = %{version}-%{release}
742a38
742a38
%description devel
742a38
Development libraries and headers for %{name}.
742a38
742a38
%if %{with python2}
742a38
%package -n python2-satyr
742a38
%{?python_provide:%python_provide python2-satyr}
742a38
# Remove before F30
742a38
Provides: %{name}-python = %{version}-%{release}
742a38
Provides: %{name}-python%{?_isa} = %{version}-%{release}
742a38
Obsoletes: %{name}-python < 0.24
742a38
Summary: Python bindings for %{name}
742a38
Requires: %{name}%{?_isa} = %{version}-%{release}
742a38
742a38
%description -n python2-satyr
742a38
Python bindings for %{name}.
742a38
%endif #with python2
742a38
742a38
%if %{with python3}
742a38
%package -n python3-satyr
742a38
%{?python_provide:%python_provide python3-satyr}
742a38
# Remove before F30
742a38
Provides: %{name}-python3 = %{version}-%{release}
742a38
Provides: %{name}-python3%{?_isa} = %{version}-%{release}
742a38
Obsoletes: %{name}-python3 < 0.24
742a38
Summary: Python 3 bindings for %{name}
742a38
Requires: %{name}%{?_isa} = %{version}-%{release}
742a38
742a38
%description -n python3-satyr
742a38
Python 3 bindings for %{name}.
742a38
%endif # if with python3
742a38
742a38
%prep
742a38
# http://www.rpm.org/wiki/PackagerDocs/Autosetup
742a38
# Default '__scm_apply_git' is 'git apply && git commit' but this workflow
742a38
# doesn't allow us to create a new file within a patch, so we have to use
742a38
# 'git am' (see /usr/lib/rpm/macros for more details)
742a38
%define __scm_apply_git(qp:m:) %{__git} am
742a38
%autosetup -S git
742a38
742a38
%build
742a38
%configure \
742a38
%if %{without python2}
742a38
        --without-python2 \
742a38
%endif # with python2
742a38
%if %{without python3}
742a38
        --without-python3 \
742a38
%endif # with python3
742a38
%{?_without_python2} \
742a38
        --disable-static \
742a38
        --enable-doxygen-docs
742a38
742a38
make %{?_smp_mflags}
742a38
742a38
%install
742a38
make install DESTDIR=%{buildroot}
742a38
742a38
# Remove all libtool archives (*.la) from modules directory.
742a38
find %{buildroot} -name "*.la" | xargs rm --
742a38
742a38
%check
742a38
make check|| {
742a38
    # find and print the logs of failed test
742a38
    # do not cat tests/testsuite.log because it contains a lot of bloat
742a38
    find tests/testsuite.dir -name "testsuite.log" -print -exec cat '{}' \;
742a38
    exit 1
742a38
}
742a38
742a38
%if 0%{?fedora} > 27
742a38
# ldconfig is not needed
742a38
%else
742a38
%post -p /sbin/ldconfig
742a38
%postun -p /sbin/ldconfig
742a38
%endif
742a38
742a38
%files
742a38
%doc README NEWS
742a38
%license COPYING
742a38
%{_bindir}/satyr
742a38
%{_mandir}/man1/%{name}.1*
742a38
%{_libdir}/lib*.so.*
742a38
742a38
%files devel
742a38
# The complex pattern below (instead of simlpy *) excludes Makefile{.am,.in}:
742a38
%doc apidoc/html/*.{html,png,css,js}
742a38
%{_includedir}/*
742a38
%{_libdir}/lib*.so
742a38
%{_libdir}/pkgconfig/*
742a38
742a38
%if %{with python2}
742a38
%files -n python2-satyr
742a38
%dir %{python2_sitearch}/%{name}
742a38
%{python2_sitearch}/%{name}/*
742a38
%{_mandir}/man3/satyr-python.3*
742a38
%endif # with python2
742a38
742a38
%if 0%{?with_python3}
742a38
%files -n python3-satyr
742a38
%dir %{python3_sitearch}/%{name}
742a38
%{python3_sitearch}/%{name}/*
742a38
%endif
742a38
742a38
%changelog
742a38
* Fri Jun 29 2018 Matej Habrnal <mhabrnal@redhat.com> 0.26-2
742a38
- Anonymize paths in frames
742a38
- Test fix: correct syntax for gdb backtrace command
742a38
742a38
* Tue Apr 17 2018 Matej Habrnal <mhabrnal@redhat.com> 0.26-1
742a38
- spec: fix Allow python2 to be optional at build time
742a38
- Allow python2 to be optional at build time
742a38
- normalization: actualize list of functions
742a38
- Append Python interpreter as related package
742a38
- makefile: create .tar.xz with make release
742a38
742a38
* Thu Jan 18 2018 Martin Kutlak <mkutlak@redhat.com> 0.25-1
742a38
- New upstream version
742a38
 - Normalization: actualize list of functions
742a38
 - Fix some compilation warnings
742a38
 - Allow to build python3 for rhel8
742a38
 - Makefile: add make release-* subcommands
742a38
 - Elfutils: Add missing stubs from earlier commit
742a38
742a38
* Wed Nov 1 2017 Julius Milan <jmilan@redhat.com> 0.24-1
742a38
- New upstream version
742a38
  - Allow to report unpackaged problems
742a38
  - apidoc: generate html docs using doxygen
742a38
  - Fix parsing of subset of arm kernel oopses
742a38
742a38
* Mon Mar 13 2017 Matej Habrnal <mhabrnal@redhat.com> 0.23-1
742a38
- New upstream version
742a38
  - Allow rpm to be optional at build time
742a38
  - Do not use deprecated fedorahosted.org
742a38
742a38
* Thu Dec 1 2016 Jakub Filak <jakub@thefilaks.net> 0.22-1
742a38
- New upstream version
742a38
  - Added support fof JavaScript (V8) stack traces
742a38
  - Most parts of the in-hook core unwinder callable under unprivileged user
742a38
  - GDB core unwinder limits number of unwound frames
742a38
  - Fixed a pair of compile warnings - Chris Redmon <credmonster@gmail.com>
742a38
742a38
* Wed May 18 2016 Matej Habrnal <mhabrnal@redhat.com> 0.21-1
742a38
- New upstream version
742a38
  - Introduce 'serial' field in uReport
742a38
  - normalization: actualize list of functions