From 9a7f0c025aa500f73127fa5b72561b5b62ba1e11 Mon Sep 17 00:00:00 2001 From: William Cohen Date: Mon, 5 Aug 2013 12:54:58 -0400 Subject: [PATCH] Resolves: rhbz991889 FTBFS --- dyninst-pokeuser.patch | 48 ++++++++++++++++++++++++++++++++++++++++++ dyninst.spec | 8 ++++++- 2 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 dyninst-pokeuser.patch diff --git a/dyninst-pokeuser.patch b/dyninst-pokeuser.patch new file mode 100644 index 0000000..80cb7ef --- /dev/null +++ b/dyninst-pokeuser.patch @@ -0,0 +1,48 @@ +diff -up dyninst/proccontrol/src/linux.C.orig dyninst/proccontrol/src/linux.C +--- dyninst/proccontrol/src/linux.C.orig 2013-06-18 11:34:02.000000000 -0400 ++++ dyninst/proccontrol/src/linux.C 2013-08-05 12:16:35.172000000 -0400 +@@ -1970,7 +1970,7 @@ bool linux_thread::plat_getRegister(Dyni + const unsigned size = i->second.second; + assert(sizeof(val) >= size); + val = 0; +- unsigned long result = do_ptrace((pt_req) PTRACE_PEEKUSR, lwp, (void *) offset, NULL); ++ unsigned long result = do_ptrace((pt_req) PTRACE_PEEKUSER, lwp, (void *) offset, NULL); + if (errno != 0) { + perr_printf("Error reading registers from %d: %s\n", lwp, strerror(errno)); + setLastError(err_internal, "Could not read register from thread"); +@@ -2184,11 +2184,11 @@ bool linux_thread::plat_setRegister(Dyni + int result; + if (size == 4) { + uint32_t value = (uint32_t) val; +- result = do_ptrace((pt_req) PTRACE_POKEUSR, lwp, (void *) offset, (void *) value); ++ result = do_ptrace((pt_req) PTRACE_POKEUSER, lwp, (void *) offset, (void *) value); + } + else if (size == 8) { + uint64_t value = (uint64_t) val; +- result = do_ptrace((pt_req) PTRACE_POKEUSR, lwp, (void *) offset, (void *) value); ++ result = do_ptrace((pt_req) PTRACE_POKEUSER, lwp, (void *) offset, (void *) value); + } + else { + assert(0); +diff -up dyninst/proccontrol/src/linux.h.orig dyninst/proccontrol/src/linux.h +--- dyninst/proccontrol/src/linux.h.orig 2013-06-18 11:34:02.000000000 -0400 ++++ dyninst/proccontrol/src/linux.h 2013-08-05 12:16:35.173000000 -0400 +@@ -47,7 +47,6 @@ + #include "common/h/dthread.h" + #include + #include +-#include + + typedef enum __ptrace_request pt_req; + +diff -up dyninst/stackwalk/src/linux-swk.C.orig dyninst/stackwalk/src/linux-swk.C +--- dyninst/stackwalk/src/linux-swk.C.orig 2013-06-18 11:34:02.000000000 -0400 ++++ dyninst/stackwalk/src/linux-swk.C 2013-08-05 12:16:35.175000000 -0400 +@@ -73,7 +73,6 @@ using namespace Dyninst::Stackwalker; + // if porting to some linux-like platform that doesn't support + // them. + #include +-#include + typedef enum __ptrace_request pt_req; + #define cap_ptrace_traceclone + #define cap_ptrace_setoptions diff --git a/dyninst.spec b/dyninst.spec index 2157578..7420b7d 100644 --- a/dyninst.spec +++ b/dyninst.spec @@ -2,7 +2,7 @@ Summary: An API for Run-time Code Generation License: LGPLv2+ Name: dyninst Group: Development/Libraries -Release: 3%{?dist} +Release: 4%{?dist} URL: http://www.dyninst.org Version: 8.1.2 Exclusiveos: linux @@ -22,6 +22,7 @@ Source0: %{name}-%{version}.tar.gz Source1: %{name}-docs-8.1.1.tar.gz Patch1: dyninst-rpm-build-flags.patch Patch2: dyninst-install-testsuite.patch +Patch3: dyninst-pokeuser.patch BuildRequires: libdwarf-devel >= 20111030 BuildRequires: elfutils-libelf-devel BuildRequires: boost-devel @@ -85,8 +86,10 @@ making sure that dyninst works properly. pushd dyninst %patch1 -p1 -b .buildflags %patch2 -p1 -b .testsuite +%patch3 -p1 -b .pokeuser popd + %build cd dyninst @@ -154,6 +157,9 @@ chmod 644 %{buildroot}%{_libdir}/dyninst/testsuite/* %attr(755,root,root) %{_libdir}/dyninst/testsuite/* %changelog +* Mon Aug 05 2013 Fedora Release Engineering - 8.1.2-4 +- Fix rhbz991889 (FTBFS). + * Sat Aug 03 2013 Fedora Release Engineering - 8.1.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild