Blame SPECS/ltrace.spec

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