From a45b5bfe8a0b84c42c05848a3bd12b167e9fdc69 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Nov 19 2015 15:45:57 +0000 Subject: import strace-4.8-11.el7 --- diff --git a/SOURCES/strace-4.8-ppc64.patch b/SOURCES/strace-4.8-ppc64.patch new file mode 100644 index 0000000..26d9bf1 --- /dev/null +++ b/SOURCES/strace-4.8-ppc64.patch @@ -0,0 +1,66 @@ +commit 9afc2ee682d2f9fd3ad938756c841d7f0eed5f21 +Author: Anton Blanchard +Date: Thu Jul 11 12:03:57 2013 +1000 + + powerpc: enhance 32/64bit detection + + We were using uname to determine if userspace was 32 or 64bit. + This fails when we have a 64bit kernel and a 32bit userspace. + + * configure.ac (powerpc*): Similar to x86, use a runtime test + to determine if we are 32 or 64bit. + + Signed-off-by: Anton Blanchard + +diff --git a/configure.ac b/configure.ac +index 03e49fe..b3b62e8 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -54,7 +54,11 @@ alpha*) + powerpc*) + arch=powerpc + AC_DEFINE([POWERPC], 1, [Define for the PowerPC architecture.]) +- if test $host_cpu = powerpc64; then ++ AC_TRY_COMPILE( ++[#ifndef __LP64__ ++# error 32 bit ++#endif], [], ppc_bits=64, ppc_bits=32) ++ if test "$ppc_bits" = "64"; then + AC_DEFINE([POWERPC64], 1, [Define for the PowerPC64 architecture.]) + fi + ;; +diff -up strace-4.8/configure.ppc64 strace-4.8/configure +--- strace-4.8/configure.ppc64 2013-06-05 02:02:43.000000000 +0200 ++++ strace-4.8/configure 2014-07-25 16:16:01.000000000 +0200 +@@ -4660,10 +4660,29 @@ powerpc*) + + $as_echo "#define POWERPC 1" >>confdefs.h + +- if test $host_cpu = powerpc64; then ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++#ifndef __LP64__ ++# error 32 bit ++#endif ++int ++main () ++{ + +-$as_echo "#define POWERPC64 1" >>confdefs.h ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ ppc_bits=64 ++else ++ ppc_bits=32 ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ if test "$ppc_bits" = "64"; then + ++$as_echo "#define POWERPC64 1" >>confdefs.h ++ + fi + ;; + arm*) diff --git a/SOURCES/strace-rh1129572.patch b/SOURCES/strace-rh1129572.patch new file mode 100644 index 0000000..a764d66 --- /dev/null +++ b/SOURCES/strace-rh1129572.patch @@ -0,0 +1,53 @@ +commit 03ef0b2665363adf6100bc4af479a14b5f17bc27 +Author: Dmitry V. Levin +Date: Wed Nov 13 18:09:04 2013 +0000 + + Assume that provides a valid ptrace prototype + + We used to explicitly list architectures where from glibc + is known to provide a valid prototype for ptrace, and use a homegrown + replacement for all the rest. Situation seems to be better nowadays, + glibc is not the only libc available, so let's use ptrace prototype from + by default, leaving the replacement for rare broken cases + if any. + + * defs.h: Use ptrace prototype workaround iff + NEED_PTRACE_PROTOTYPE_WORKAROUND is defined. + +--- strace-4.8/defs.h ++++ strace-4.8/defs.h +@@ -147,27 +147,17 @@ extern char *stpcpy(char *dst, const cha + /* To force NOMMU build, set to 1 */ + #define NOMMU_SYSTEM 0 + +-#if (defined(SPARC) || defined(SPARC64) \ +- || defined(I386) || defined(X32) || defined(X86_64) \ +- || defined(ARM) || defined(AARCH64) \ +- || defined(AVR32) \ +- || defined(OR1K) \ +- || defined(METAG) \ +- || defined(TILE) \ +- || defined(XTENSA) \ +- ) && defined(__GLIBC__) +-# include +-#else +-/* Work around awkward prototype in ptrace.h. */ ++#ifdef NEED_PTRACE_PROTOTYPE_WORKAROUND + # define ptrace xptrace + # include + # undef ptrace +-# ifdef POWERPC +-# define __KERNEL__ +-# include +-# undef __KERNEL__ +-# endif + extern long ptrace(int, int, char *, long); ++#else ++# include ++#endif ++ ++#if defined(POWERPC) ++# include + #endif + + #if defined(TILE) diff --git a/SOURCES/strace-rh1214041.patch b/SOURCES/strace-rh1214041.patch new file mode 100644 index 0000000..6eef1d3 --- /dev/null +++ b/SOURCES/strace-rh1214041.patch @@ -0,0 +1,21 @@ +diff -Nrup a/strace.c b/strace.c +--- a/strace.c 2015-04-22 12:48:38.000000000 -0600 ++++ b/strace.c 2015-04-22 14:43:41.639193569 -0600 +@@ -1928,7 +1928,7 @@ collect_stopped_tcbs(void) + nextp = &found_tcps; + found_tcps = NULL; + +- while (nprocs != 0) { ++ while (1) { + int wait_errno; + int status; + unsigned event; +@@ -2398,7 +2398,7 @@ trace(void) + int rc; + struct tcb *tcbs; + +- while (nprocs != 0) { ++ while (1) { + if (interrupted) + return 0; + tcbs = collect_stopped_tcbs(); diff --git a/SPECS/strace.spec b/SPECS/strace.spec index 2f20421..c53afdf 100644 --- a/SPECS/strace.spec +++ b/SPECS/strace.spec @@ -1,7 +1,7 @@ Summary: Tracks and displays system calls associated with a running process Name: strace Version: 4.8 -Release: 7%{?dist} +Release: 11%{?dist} License: BSD Group: Development/Debuggers URL: http://sourceforge.net/projects/strace/ @@ -15,6 +15,10 @@ Patch1001: strace-rh948577.patch Patch1002: strace-rh851457.patch Patch1003: strace-rh971352.patch Patch1004: strace-rh1044044.patch +Patch1005: strace-4.8-ppc64.patch +Patch1006: strace-rh1129572.patch +Patch1007: strace-rh1214041.patch + # In the past we had a separate strace64 package, these days the # stndard 64 bit build provides that functionality. For tracing @@ -59,6 +63,9 @@ This package provides the `strace32' program to trace 32-bit processes on %patch1002 -p1 %patch1003 -p1 %patch1004 -p1 +%patch1005 -p1 +%patch1006 -p1 +%patch1007 -p1 %build %configure @@ -102,6 +109,19 @@ rm -rf %{buildroot} %endif %changelog +* Thu Jul 30 2015 Jeff Law 4.8-11 +- Fix race which caused follow-fork option to not always + work (#1235833) + +* Tue May 12 2015 Peter Robinson 4.8-10 +- rebuild + +* Fri Aug 15 2014 Jeff Law 4.8-9 +- Fix prototype for ptrace (#1129572) + +* Fri Aug 1 2014 Jeff Law 4.8-8 +- update for ppc64 -- Dan Horak's patch from Fedora (#1122390) + * Fri Jan 24 2014 Daniel Mach - 4.8-7 - Mass rebuild 2014-01-24