5b1ee8eea9
- Add some package to the build requires to make test suite work. That is haveged to generate entropy, sysvinit-tools to have the tools to control start and stop of haveged, and the package time to make the test on /usr/bin/time possible. OBS-URL: https://build.opensuse.org/request/show/344700 OBS-URL: https://build.opensuse.org/package/show/devel:tools/strace?expand=0&rev=54
139 lines
4.2 KiB
RPMSpec
139 lines
4.2 KiB
RPMSpec
#
|
|
# spec file for package strace
|
|
#
|
|
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
Name: strace
|
|
Version: 4.10
|
|
Release: 0
|
|
Summary: A utility to trace the system calls of a program
|
|
License: BSD-3-Clause
|
|
Group: Development/Tools/Debuggers
|
|
Url: http://sourceforge.net/projects/strace/
|
|
|
|
#Freecode-URL: http://freecode.com/projects/strace
|
|
#Git-Clone: git://git.code.sf.net/p/strace/code
|
|
Source: http://downloads.sourceforge.net/strace/%name-%version.tar.xz
|
|
Source2: http://downloads.sourceforge.net/strace/%name-%version.tar.xz.asc
|
|
Source3: %name.keyring
|
|
Source4: baselibs.conf
|
|
Patch1: 0001-aarch64-fix-rt_sigreturn-decoding.patch
|
|
Patch2: 0002-m68k-define-HAVE_SA_RESTORER.patch
|
|
Patch3: 0003-Fix-decoding-of-mmap2-for-arm.patch
|
|
Patch5: 0005-tests-select.test-handle-architectures-using-pselect.patch
|
|
Patch6: 0006-aarch64-fix-ioctl-decoding.patch
|
|
Patch7: 0007-m68k-fix-sigreturn-decoding.patch
|
|
Patch8: 0008-Fix-crash-in-ipc_sem-test.patch
|
|
Patch9: 0009-tests-ipc_-match-IPC_64-flag.patch
|
|
Patch10: 0010-semctl-fix-indirect-syscall-decoding.patch
|
|
Patch11: 0011-Fix-stat64-st_-acm-time-decoding-for-personalities-w.patch
|
|
Patch12: 0012-tests-verify-that-all-patterns-match.patch
|
|
Patch13: 0013-aarch64-properly-decode-generic-syscalls.patch
|
|
Patch14: 0014-stat64-v.test-add-newfstatat-syscall-support.patch
|
|
Patch15: 0015-tests-uid-use-fchown-instead-of-chown.patch
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
BuildRequires: haveged
|
|
BuildRequires: libacl-devel
|
|
BuildRequires: libaio-devel
|
|
# libunwind is broken on ppc and ppc64 and aarch64
|
|
%ifarch %ix86 ia64 x86_64 %{arm} ppc64le
|
|
BuildRequires: libunwind-devel
|
|
%endif
|
|
BuildRequires: lksctp-tools-devel
|
|
%if 0%{suse_version} > 1140
|
|
BuildRequires: sysvinit-tools
|
|
BuildRequires: time
|
|
%endif
|
|
BuildRequires: xz
|
|
# bug437293
|
|
%ifarch ppc64
|
|
Obsoletes: strace-64bit
|
|
%endif
|
|
%ifarch x86_64
|
|
Obsoletes: strace-32bit
|
|
%endif
|
|
|
|
%description
|
|
With strace, you can trace the activity of a program. Information
|
|
about any system calls the program makes and the signals it receives
|
|
and processes can be seen. Child processes can also be tracked.
|
|
|
|
|
|
|
|
Authors:
|
|
--------
|
|
Paul Kranenburg <pk@cs.few.eur.nl>
|
|
Branko Lankester <branko@hacktic.nl>
|
|
Rick Sladkey <rs@world.std.com>
|
|
|
|
%prep
|
|
%setup -q
|
|
# This file is missing in the tarball
|
|
echo 'extern uint64_t *const aarch64_sp_ptr;
|
|
extern uint32_t *const arm_sp_ptr;' > linux/aarch64/arch_regs.h
|
|
%patch1 -p1
|
|
%patch2 -p1
|
|
%patch3 -p1
|
|
%patch5 -p1
|
|
%patch6 -p1
|
|
%patch7 -p1
|
|
%patch8 -p1
|
|
%patch9 -p1
|
|
%patch10 -p1
|
|
%patch11 -p1
|
|
%patch12 -p1
|
|
%patch13 -p1
|
|
%patch14 -p1
|
|
%patch15 -p1
|
|
|
|
%build
|
|
export CFLAGS="$RPM_OPT_FLAGS"
|
|
%ifarch alpha
|
|
CFLAGS="$CFLAGS -ffixed-8"
|
|
%endif
|
|
%configure \
|
|
%ifarch %sparc
|
|
--host=%_target_platform \
|
|
%endif
|
|
%{nil}
|
|
make %{?_smp_mflags}
|
|
|
|
# Have to exclude make check for qemu builds, which apparently don't support PTRACE.
|
|
%if !(0%{?qemu_user_space_build})
|
|
%check
|
|
haveged=$(PATH=$PATH:/sbin:/usr/sbin type -p haveged)
|
|
if test -n "$haveged" && ! /sbin/checkproc $haveged ; then
|
|
$haveged --pidfile=$PWD/haveged.pid < /dev/null 1>&0 2>&0 || true
|
|
fi
|
|
make check || { cat tests/test-suite.log; exit 1; }
|
|
if test -s $PWD/haveged.pid ; then
|
|
/sbin/killproc -p $PWD/haveged.pid $haveged
|
|
fi
|
|
%endif
|
|
|
|
%install
|
|
make install DESTDIR=$RPM_BUILD_ROOT
|
|
|
|
%files
|
|
%defattr(-,root,root)
|
|
%doc CREDITS README README-linux-ptrace NEWS
|
|
%{_prefix}/bin/strace
|
|
%{_prefix}/bin/strace-graph
|
|
%{_prefix}/bin/strace-log-merge
|
|
%{_mandir}/man1/strace.1.gz
|
|
|
|
%changelog
|