Blame SPECS/ltrace.spec

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