Blame SPECS/strace.spec

2f474b
%{?scl:%{?scl_package:%scl_package strace}}
2f474b
2f474b
Summary: Tracks and displays system calls associated with a running process
2f474b
Name: %{?scl_prefix}strace
2f474b
Version: 4.8
2f474b
Release: 8%{?dist}
2f474b
License: BSD
2f474b
Group: Development/Debuggers
2f474b
URL: http://sourceforge.net/projects/strace/
2f474b
# The upstream source really comes in .xz format.  Unfortunately
2f474b
# DTS builds using .xz seem to want to use /opt/rh/<...>/xz rather
2f474b
# than the one in /usr/bin.  Using the .gz extension seems to avoid
2f474b
# this problem.  This should be fixed at some point.
2f474b
Source: http://downloads.sourceforge.net/strace/strace-%{version}.tar.gz
2f474b
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
2f474b
2f474b
%define alternatives_cmd %{!?scl:%{_sbindir}}%{?scl:%{_root_sbindir}}/alternatives
2f474b
%define alternatives_cmdline %{alternatives_cmd}%{?scl: --altdir %{_sysconfdir}/alternatives --admindir %{_scl_root}/var/lib/alternatives}
2f474b
2f474b
BuildRequires: libacl-devel, libaio-devel, time
2f474b
%{?scl:Requires:%scl_runtime}
2f474b
2f474b
Patch1000: strace-strict-aliasing.patch
2f474b
Patch1001: strace-rh948577.patch
2f474b
Patch1002: strace-rh851457.patch
2f474b
Patch1003: strace-rh971352.patch
2f474b
Patch1004: strace-rh1044044.patch
2f474b
2f474b
# Hack as the RHEL 6 used for DTS is too old and doesn't define MADV_DODUMP
2f474b
# and MADV_DONTDUMP.
2f474b
Patch2000: strace-rh921550.patch
2f474b
2f474b
# In the past we had a separate strace64 package, these days the
2f474b
# stndard 64 bit build provides that functionality.  For tracing
2f474b
# 32 bit applications on ppc and s390 we still have strace32
2f474b
Obsoletes: strace64
2f474b
2f474b
%define strace32_arches ppc s390
2f474b
2f474b
%description
2f474b
The strace program intercepts and records the system calls called and
2f474b
received by a running process.  Strace can print a record of each
2f474b
system call, its arguments and its return value.  Strace is useful for
2f474b
diagnosing problems and debugging, as well as for instructional
2f474b
purposes.
2f474b
2f474b
Install strace if you need a tool to track the system calls made and
2f474b
received by a process.
2f474b
2f474b
%ifarch %{strace32_arches}
2f474b
%package -n strace32
2f474b
Summary: Tracks and displays system calls associated with a running process.
2f474b
Group: Development/Debuggers
2f474b
2f474b
%description -n strace32
2f474b
The strace program intercepts and records the system calls called and
2f474b
received by a running process.  Strace can print a record of each
2f474b
system call, its arguments and its return value.  Strace is useful for
2f474b
diagnosing problems and debugging, as well as for instructional
2f474b
purposes.
2f474b
2f474b
Install strace if you need a tool to track the system calls made and
2f474b
received by a process.
2f474b
2f474b
This package provides the `strace32' program to trace 32-bit processes on
2f474b
64-bit IBM P and Z series platforms.
2f474b
%endif
2f474b
2f474b
%prep
2f474b
%setup -q -n strace-%{version}
2f474b
%patch1000 -p1
2f474b
%patch1001 -p1
2f474b
%patch1002 -p1
2f474b
%patch1003 -p1
2f474b
%patch1004 -p1
2f474b
%patch2000 -p1
2f474b
2f474b
%build
2f474b
%configure
2f474b
make %{?_smp_mflags}
2f474b
2f474b
%install
2f474b
rm -rf %{buildroot}
2f474b
make DESTDIR=%{buildroot} install
2f474b
2f474b
# remove unpackaged files from the buildroot
2f474b
rm -f %{buildroot}%{_bindir}/strace-graph
2f474b
2f474b
%define copy64 ln
2f474b
%if 0%{?rhel}
2f474b
%if 0%{?rhel} < 6
2f474b
%endif
2f474b
%define copy64 cp -p
2f474b
%endif
2f474b
2f474b
%ifarch %{strace32_arches}
2f474b
%{copy64} %{buildroot}%{_bindir}/strace %{buildroot}%{_bindir}/strace32
2f474b
%endif
2f474b
2f474b
%check
2f474b
make check
2f474b
2f474b
%clean
2f474b
rm -rf %{buildroot}
2f474b
2f474b
%files
2f474b
%defattr(-,root,root)
2f474b
%doc CREDITS ChangeLog ChangeLog-CVS COPYING NEWS README
2f474b
%{_bindir}/strace
2f474b
%{_bindir}/strace-log-merge
2f474b
%{_mandir}/man1/*
2f474b
2f474b
%ifarch %{strace32_arches}
2f474b
%files -n strace32
2f474b
%defattr(-,root,root)
2f474b
%{_bindir}/strace32
2f474b
%endif
2f474b
2f474b
%changelog
2f474b
* Wed May 21 2014 Jeff Law <law@redhat.com> - 4.8-8
2f474b
- Import from RHEL 7 and build
2f474b