Blame SPECS/ltrace.spec

fe0466
%global __python /usr/bin/python3
fe0466
%{?scl:%{?scl_package:%scl_package ltrace}}
fe0466
fe0466
Summary: Tracks runtime library calls from dynamically linked executables
fe0466
Name: %{?scl_prefix}ltrace
fe0466
Version: 0.7.91
fe0466
Release: 1%{?dist}
fe0466
URL: http://ltrace.alioth.debian.org/
fe0466
License: GPLv2+
fe0466
fe0466
BuildRequires: elfutils-devel dejagnu
fe0466
BuildRequires: libselinux-devel
fe0466
BuildRequires: autoconf automake libtool
fe0466
fe0466
# Note: this URL needs to be updated for each release, as the file
fe0466
# number changes for each file.  Full list of released files is at:
fe0466
#  https://alioth.debian.org/frs/?group_id=30892
fe0466
Source: ltrace-%{version}.tar.bz2
fe0466
fe0466
# Merge of several upstream commits that fixes compilation on ARM.
fe0466
Patch0: ltrace-0.7.91-arm.patch
fe0466
fe0466
# Upstream patch that fixes accounting of exec, __libc_start_main and
fe0466
# others in -c output.
fe0466
Patch1: ltrace-0.7.91-account_execl.patch
fe0466
fe0466
# Upstream patch that fixes interpretation of PLT on x86_64 when
fe0466
# IRELATIVE slots are present.
fe0466
Patch2: ltrace-0.7.91-x86_64-irelative.patch
fe0466
fe0466
# Upstream patch that fixes fetching of system call arguments on s390.
fe0466
Patch3: ltrace-0.7.91-s390-fetch-syscall.patch
fe0466
fe0466
# Upstream patch that enables tracing of IRELATIVE PLT slots on s390.
fe0466
Patch4: ltrace-0.7.91-s390-irelative.patch
fe0466
fe0466
# Fix for a regression in tracing across fork.  Upstream patch.
fe0466
Patch5: ltrace-0.7.91-ppc64-fork.patch
fe0466
fe0466
# Fix crashing a prelinked PPC64 binary which makes PLT calls through
fe0466
# slots that ltrace doesn't trace.
fe0466
# https://bugzilla.redhat.com/show_bug.cgi?id=1051221
fe0466
Patch6: ltrace-0.7.91-breakpoint-on_install.patch
fe0466
Patch7: ltrace-0.7.91-ppc64-unprelink.patch
fe0466
fe0466
# Man page nits.  Backport of an upstream patch.
fe0466
Patch8: ltrace-0.7.91-man.patch
fe0466
fe0466
# https://bugzilla.redhat.com/show_bug.cgi?id=1044766
fe0466
Patch9: ltrace-0.7.91-cant_open.patch
fe0466
fe0466
# Support Aarch64 architecture.
fe0466
Patch10: ltrace-0.7.91-aarch64.patch
fe0466
fe0466
# https://bugzilla.redhat.com/show_bug.cgi?id=1064406
fe0466
Patch11: ltrace-0.7.2-e_machine.patch
fe0466
fe0466
# Support for ppc64le, backported from upstream.
fe0466
# http://anonscm.debian.org/gitweb/?p=collab-maint/ltrace.git;a=commit;h=eea4ad2cce289753aaa35b4e0258a76d8f8f367c
fe0466
# https://bugzilla.redhat.com/show_bug.cgi?id=1131956
fe0466
Patch13: ltrace-0.7.91-ppc64le-support.patch
fe0466
# 35a9677dc9dcb7909ebd28f30200474d7e8b660f,
fe0466
# 437d2377119036346f4dbd93039c847b4cc9d0be,
fe0466
# eb3993420734f091cde9a6053ca6b4edcf9ae334
fe0466
Patch14: ltrace-0.7.91-ppc64le-fixes.patch
fe0466
fe0466
# http://anonscm.debian.org/gitweb/?p=collab-maint/ltrace.git;a=commit;h=2e9f9f1f5d0fb223b109429b9c904504b7f638e2
fe0466
# http://anonscm.debian.org/gitweb/?p=collab-maint/ltrace.git;a=commit;h=f96635a03b3868057db5c2d7972d5533e2068345
fe0466
Patch15: ltrace-0.7.91-parser-ws_after_id.patch
fe0466
fe0466
# https://bugzilla.redhat.com/show_bug.cgi?id=1171165
fe0466
# http://anonscm.debian.org/cgit/collab-maint/ltrace.git/commit/?id=d8f1287b85e2c2b2ae0235809e956f4365e53c45
fe0466
# http://anonscm.debian.org/cgit/collab-maint/ltrace.git/commit/?id=d80c5371454383e3f9978622e5578cf02af8c44c
fe0466
# http://anonscm.debian.org/cgit/collab-maint/ltrace.git/commit/?id=bf82100966deda9c7d26ad085d97c08126a8ae88
fe0466
Patch16: ltrace-0.7.91-ppc-bias.patch
fe0466
fe0466
# https://bugzilla.redhat.com/show_bug.cgi?id=1158714
fe0466
Patch17: ltrace-0.7.91-x86-plt_map.patch
fe0466
Patch18: ltrace-0.7.91-x86-unused_label.patch
fe0466
fe0466
# https://bugzilla.redhat.com/show_bug.cgi?id=1170315
fe0466
Patch19: ltrace-0.7.91-unwind-elfutils.patch
fe0466
fe0466
# https://bugzilla.redhat.com/show_bug.cgi?id=1208351
fe0466
# http://anonscm.debian.org/cgit/collab-maint/ltrace.git/commit/?id=4724bd5a4a19db117a1d280b9d1a3508fd4e03fa
fe0466
# http://anonscm.debian.org/cgit/collab-maint/ltrace.git/commit/?id=72ee29639c55b5942bc07c8ed0013005f8fc5a97
fe0466
Patch20: ltrace-0.7.91-multithread-no-f-1.patch
fe0466
Patch21: ltrace-0.7.91-multithread-no-f-2.patch
fe0466
fe0466
# Fix problems with building a number of test cases.
fe0466
# http://anonscm.debian.org/cgit/collab-maint/ltrace.git/commit/?id=694d19ff14017926454771cbb63a22355b72f1bf
fe0466
# http://anonscm.debian.org/cgit/collab-maint/ltrace.git/commit/?id=a3a03622fb4ca9772dca13eae724a94ba1e728f4
fe0466
Patch22: ltrace-0.7.91-testsuite-includes.patch
fe0466
Patch23: ltrace-0.7.91-testsuite-includes-2.patch
fe0466
fe0466
# https://bugzilla.redhat.com/show_bug.cgi?id=1210653
fe0466
# http://anonscm.debian.org/cgit/collab-maint/ltrace.git/commit/?id=eea6091f8672b01f7f022b0fc367e0f568225ffc
fe0466
Patch24: ltrace-0.7.91-ppc64le-configure.patch
fe0466
fe0466
Patch25: ltrace-rh1307754.patch
fe0466
fe0466
# GCC now warns (errors) on "tautological compares", and readdir_r is deprecated.
fe0466
Patch26: ltrace-0.7.91-tautology.patch
fe0466
fe0466
# ARM code has unreachable code after switch statement, move initialization
fe0466
Patch27: ltrace-rh1423913.patch
fe0466
fe0466
# AARCH64 large parameters and syscall testsuite fixes.
fe0466
Patch28: ltrace-0.7.91-aarch64-params.patch
fe0466
fe0466
# gcc-9 fix.  Avoid passing NULL as argument to %s
fe0466
Patch29: ltrace-0.7.91-null.patch
fe0466
fe0466
# Adds support for CET PLTs via second-plt lookups.
fe0466
Patch30: ltrace-0.7.91-cet.patch
fe0466
fe0466
%description
fe0466
Ltrace is a debugging program which runs a specified command until the
fe0466
command exits.  While the command is executing, ltrace intercepts and
fe0466
records both the dynamic library calls called by the executed process
fe0466
and the signals received by the executed process.  Ltrace can also
fe0466
intercept and print system calls executed by the process.
fe0466
fe0466
You should install ltrace if you need a sysadmin tool for tracking the
fe0466
execution of processes.
fe0466
fe0466
%prep
fe0466
%setup -q -n ltrace-%{version}
fe0466
%patch0 -p1
fe0466
%patch1 -p1
fe0466
%patch2 -p1
fe0466
%patch3 -p1
fe0466
%patch4 -p1
fe0466
%patch5 -p1
fe0466
%patch6 -p1
fe0466
%patch7 -p1
fe0466
%patch8 -p1
fe0466
%patch9 -p1
fe0466
%patch10 -p1
fe0466
%patch11 -p1
fe0466
%patch13 -p1
fe0466
%patch14 -p1
fe0466
%patch15 -p1
fe0466
%patch16 -p1
fe0466
%patch17 -p1
fe0466
%patch18 -p1
fe0466
%patch19 -p1
fe0466
%patch20 -p1
fe0466
%patch21 -p1
fe0466
%patch22 -p1
fe0466
%patch23 -p1
fe0466
%patch24 -p1
fe0466
%patch25 -p1
fe0466
%patch26 -p1
fe0466
%patch27 -p1
fe0466
%patch28 -p1
fe0466
%patch29 -p1
fe0466
%patch30 -p1
fe0466
fe0466
%build
fe0466
autoreconf -i
fe0466
%configure --docdir=%{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}}
fe0466
make %{?_smp_mflags}
fe0466
fe0466
%install
fe0466
make DESTDIR=$RPM_BUILD_ROOT bindir=%{_bindir} install
fe0466
fe0466
# The testsuite is useful for development in real world, but fails in
fe0466
# koji for some reason.  Disable it, but have it handy.
fe0466
%check
fe0466
echo ====================TESTING=========================
fe0466
timeout 180 make -k check ||:
fe0466
echo ====================TESTING END=====================
fe0466
fe0466
%files
fe0466
%defattr(-,root,root)
fe0466
%doc NEWS COPYING CREDITS INSTALL README TODO
fe0466
%{_bindir}/ltrace
fe0466
%{_mandir}/man1/ltrace.1*
fe0466
%{_mandir}/man5/ltrace.conf.5*
fe0466
%{_datadir}/ltrace
fe0466
fe0466
%changelog
fe0466
* Tue Jul 28 2020 DJ Delorie <dj@redhat.com> - 0.7.91-1
fe0466
- Initial sources (#1851544)
fe0466