mfabik / rpms / satyr

Forked from rpms/satyr 3 years ago
Clone

Blame SPECS/satyr.spec

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