Blame SPECS/ltrace.spec

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