strace: upgraded package to upstream
Upgraded dev-util/strace to version 4.7 on amd64, arm, x86
BUG=None
TEST=`emerge strace` worked
TEST=`emerge-stumpy strace` worked
TEST=`emerge-x86-alex strace` worked
TEST=`emerge-daisy strace` worked
TEST=`strace foo` worked in sdk & on target board
Change-Id: I9ad0248aece930c270f93777705ec71199790d69
Reviewed-on: https://gerrit.chromium.org/gerrit/45426
Reviewed-by: Matt Tennant <mtennant@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
diff --git a/dev-util/strace/Manifest b/dev-util/strace/Manifest
index c3cf1b4..3a347c3 100644
--- a/dev-util/strace/Manifest
+++ b/dev-util/strace/Manifest
@@ -1,2 +1 @@
-DIST strace-4.6-x32.patch.xz 142780 RMD160 99c8132cefdfd436a6bab15c251f50daa724341c SHA1 de3af88df7b753e2a84a628558344adc5b5d4c94 SHA256 78d196ea92d6d23a390ec8d00c7b4832f01204aa83b4ee52d1fadd32c993d72a
-DIST strace-4.6.tar.xz 403788 RMD160 da093a93da14639d1a20501e21c55be23ada495d SHA1 d84d6e215a65454aa5660e7b5c6200f6de39b89e SHA256 9ef9aa41b6118578e33ef4833b8a04209d6cc062546c28efd715f283b172c28a
+DIST strace-4.7.tar.xz 403280 SHA256 c49cd98873c119c5f201356200a9b9687da1ceea83a05047e2ae0a7ac1e41195 SHA512 52bcdd4b7a842b20233737197aeb5baf12533ea088568c9eeb644172420b98c79b86213c8068b49733da0a790031301b832489f87244bc65460971d1b0398d1e WHIRLPOOL 7f19233da30b0eb3d30aa79a881ad0bc6fed818557a55f9193511fb990e0af9ce7f8f792c395691bbedfb66b71427b0c743ea45819d039491cb02dccb29f4565
diff --git a/dev-util/strace/files/strace-4.7-glibc-2.15.patch b/dev-util/strace/files/strace-4.7-glibc-2.15.patch
new file mode 100644
index 0000000..c23a86f
--- /dev/null
+++ b/dev-util/strace/files/strace-4.7-glibc-2.15.patch
@@ -0,0 +1,53 @@
+https://bugs.gentoo.org/414637
+
+From 302e8ec6cd62912a3cd6494ce6702f4ad8dae0e2 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Fri, 4 May 2012 19:30:59 -0400
+Subject: [PATCH] util: fix building when glibc has a stub process_vm_readv
+
+If you have a newer glibc which provides process_vm_readv, but it is built
+against older kernel headers which lack __NR_process_vm_readv, the library
+will contain a stub implementation that just returns ENOSYS. Autoconf
+checks for this case explicitly and will declare it as unavailable. So we
+end up in a case where the headers provide the prototype, but autoconf has
+not defined HAVE_PROCESS_VM_READV, so we hit the same build failure again:
+
+util.c:738:16: error: static declaration of 'process_vm_readv' follows non-static declaration
+/usr/include/bits/uio.h:58:16: note: previous declaration of 'process_vm_readv' was here
+
+So rename our local function to something unique, and add a define so the
+callers all hit the right place.
+
+* util.c (strace_process_vm_readv): Rename from process_vm_readv.
+(process_vm_readv): Define to strace_process_vm_readv.
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ util.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/util.c b/util.c
+index d347bd8..f27acdf 100644
+--- a/util.c
++++ b/util.c
+@@ -735,7 +735,8 @@ static bool process_vm_readv_not_supported = 0;
+
+ #if defined(__NR_process_vm_readv)
+ static bool process_vm_readv_not_supported = 0;
+-static ssize_t process_vm_readv(pid_t pid,
++/* Have to avoid duplicating with the C library headers. */
++static ssize_t strace_process_vm_readv(pid_t pid,
+ const struct iovec *lvec,
+ unsigned long liovcnt,
+ const struct iovec *rvec,
+@@ -744,6 +745,7 @@ static ssize_t process_vm_readv(pid_t pid,
+ {
+ return syscall(__NR_process_vm_readv, (long)pid, lvec, liovcnt, rvec, riovcnt, flags);
+ }
++#define process_vm_readv strace_process_vm_readv
+ #else
+ static bool process_vm_readv_not_supported = 1;
+ # define process_vm_readv(...) (errno = ENOSYS, -1)
+--
+1.7.9.7
+
diff --git a/dev-util/strace/files/strace-4.7-x32.patch b/dev-util/strace/files/strace-4.7-x32.patch
new file mode 100644
index 0000000..4a7a3db
--- /dev/null
+++ b/dev-util/strace/files/strace-4.7-x32.patch
@@ -0,0 +1,89 @@
+From 364ed4f14c5edb5ddbc79c72d22498219033b29d Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Mon, 4 Jun 2012 13:19:42 -0400
+Subject: [PATCH] x32: update syscall table
+
+This syncs with the syscall table as it is in linux 3.4.
+
+* linux/x32/syscallent.h (59): Fix comment typo.
+(78): Add missing getdents entry.
+(174): Delete create_module entry (not in the kernel).
+(181, 182, 183, 184, 185): Add missing entries.
+(524, 536, 539, 540): Fix spacing.
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ linux/x32/syscallent.h | 24 ++++++++++++------------
+ 1 file changed, 12 insertions(+), 12 deletions(-)
+
+diff --git a/linux/x32/syscallent.h b/linux/x32/syscallent.h
+index fcb6a23..ee4c4ce 100644
+--- a/linux/x32/syscallent.h
++++ b/linux/x32/syscallent.h
+@@ -57,7 +57,7 @@
+ { 5, TP, sys_clone, "clone" }, /* 56 */
+ { 0, TP, sys_fork, "fork" }, /* 57 */
+ { 0, TP, sys_vfork, "vfork" }, /* 58 */
+- { }, /* 47 */
++ { }, /* 59 */
+ { 1, TP, sys_exit, "_exit" }, /* 60 */
+ { 4, TP, sys_wait4, "wait4" }, /* 61 */
+ { 2, TS, sys_kill, "kill" }, /* 62 */
+@@ -76,7 +76,7 @@
+ { 1, TD, sys_fdatasync, "fdatasync" }, /* 75 */
+ { 2, TF, sys_truncate, "truncate" }, /* 76 */
+ { 2, TD, sys_ftruncate, "ftruncate" }, /* 77 */
+- { }, /* 78 */
++ { 3, TD, sys_getdents, "getdents" }, /* 78 */
+ { 2, TF, sys_getcwd, "getcwd" }, /* 79 */
+ { 1, TF, sys_chdir, "chdir" }, /* 80 */
+ { 1, TD, sys_fchdir, "fchdir" }, /* 81 */
+@@ -172,18 +172,18 @@
+ { 2, 0, sys_setdomainname, "setdomainname" }, /* 171 */
+ { 1, 0, sys_iopl, "iopl" }, /* 172 */
+ { 3, 0, sys_ioperm, "ioperm" }, /* 173 */
+- { 2, 0, sys_create_module, "create_module" }, /* 174 */
++ { }, /* 174 */
+ { 3, 0, sys_init_module, "init_module" }, /* 175 */
+ { 2, 0, sys_delete_module, "delete_module" }, /* 176 */
+ { }, /* 177 */
+ { }, /* 178 */
+ { 4, 0, sys_quotactl, "quotactl" }, /* 179 */
+ { }, /* 180 */
+- { }, /* 181 */
+- { }, /* 182 */
+- { }, /* 183 */
+- { }, /* 184 */
+- { }, /* 185 */
++ { 5, 0, sys_getpmsg, "getpmsg" }, /* 181 */
++ { 5, 0, sys_putpmsg, "putpmsg" }, /* 182 */
++ { 5, 0, sys_afs_syscall, "afs_syscall" }, /* 183 */
++ { 3, 0, sys_tuxcall, "tuxcall" }, /* 184 */
++ { 3, 0, sys_security, "security" }, /* 185 */
+ { 0, 0, sys_gettid, "gettid" }, /* 186 */
+ { 4, TD, sys_readahead, "readahead" }, /* 187 */
+ { 5, TF, sys_setxattr, "setxattr" }, /* 188 */
+@@ -325,7 +325,7 @@
+ { 4, 0, sys_ptrace, "ptrace" }, /* 521 */
+ { 2, TS, sys_rt_sigpending, "rt_sigpending" }, /* 522 */
+ { 4, TS, sys_rt_sigtimedwait, "rt_sigtimedwait" }, /* 523 */
+- { 3, TS, sys_rt_sigqueueinfo, "rt_sigqueueinfo" }, /* 524 */
++ { 3, TS, sys_rt_sigqueueinfo, "rt_sigqueueinfo" }, /* 524 */
+ { 2, TS, sys_sigaltstack, "sigaltstack" }, /* 525 */
+ { 3, 0, sys_timer_create, "timer_create" }, /* 526 */
+ { 2, 0, sys_mq_notify, "mq_notify" }, /* 527 */
+@@ -337,8 +337,8 @@
+ { 6, 0, sys_move_pages, "move_pages" }, /* 533 */
+ { 5, TD, sys_preadv, "preadv" }, /* 534 */
+ { 5, TD, sys_pwritev, "pwritev" }, /* 535 */
+- { 4, TP|TS, sys_rt_tgsigqueueinfo, "rt_tgsigqueueinfo"}, /* 536 */
++ { 4, TP|TS, sys_rt_tgsigqueueinfo, "rt_tgsigqueueinfo" }, /* 536 */
+ { 5, TN, sys_recvmmsg, "recvmmsg" }, /* 537 */
+ { 4, TN, sys_sendmmsg, "sendmmsg" }, /* 538 */
+- { 6, 0, sys_process_vm_readv, "process_vm_readv"}, /* 539 */
+- { 6, 0, sys_process_vm_writev, "process_vm_writev"}, /* 540 */
++ { 6, 0, sys_process_vm_readv, "process_vm_readv" }, /* 539 */
++ { 6, 0, sys_process_vm_writev, "process_vm_writev" }, /* 540 */
+--
+1.7.9.7
+
diff --git a/dev-util/strace/strace-4.6.ebuild b/dev-util/strace/strace-4.6.ebuild
deleted file mode 100644
index a7def1b..0000000
--- a/dev-util/strace/strace-4.6.ebuild
+++ /dev/null
@@ -1,43 +0,0 @@
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-util/strace/strace-4.6.ebuild,v 1.9 2012/02/14 06:12:19 vapier Exp $
-
-EAPI="3"
-
-inherit flag-o-matic eutils autotools
-
-DESCRIPTION="A useful diagnostic, instructional, and debugging tool"
-HOMEPAGE="http://sourceforge.net/projects/strace/"
-SRC_URI="mirror://sourceforge/${PN}/${P}.tar.xz
- mirror://gentoo/${P}-x32.patch.xz"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-linux ~ia64-linux ~x86-linux"
-IUSE="static aio"
-
-# strace only uses the header from libaio
-DEPEND="aio? ( >=dev-libs/libaio-0.3.106 )
- sys-kernel/linux-headers"
-RDEPEND=""
-
-src_prepare() {
- if has x32 $(get_all_abis) ; then
- epatch "${WORKDIR}"/${P}-x32.patch
- eautoreconf
- fi
-}
-
-src_configure() {
- filter-lfs-flags # configure handles this sanely
- use static && append-ldflags -static
-
- use aio || export ac_cv_header_libaio_h=no
-
- econf
-}
-
-src_install() {
- emake install DESTDIR="${D}" || die
- dodoc ChangeLog CREDITS NEWS PORTING README* TODO
-}
diff --git a/dev-util/strace/strace-4.7.ebuild b/dev-util/strace/strace-4.7.ebuild
new file mode 100644
index 0000000..0f598fc
--- /dev/null
+++ b/dev-util/strace/strace-4.7.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-util/strace/strace-4.7.ebuild,v 1.12 2013/02/19 01:41:17 zmedico Exp $
+
+EAPI="4"
+
+inherit flag-o-matic eutils
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="git://strace.git.sourceforge.net/gitroot/strace/strace"
+ inherit git-2 autotools
+else
+ SRC_URI="mirror://sourceforge/${PN}/${P}.tar.xz"
+ KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux"
+fi
+
+DESCRIPTION="A useful diagnostic, instructional, and debugging tool"
+HOMEPAGE="http://sourceforge.net/projects/strace/"
+
+LICENSE="BSD"
+SLOT="0"
+IUSE="static aio"
+
+# strace only uses the header from libaio to decode structs
+DEPEND="aio? ( >=dev-libs/libaio-0.3.106 )
+ sys-kernel/linux-headers"
+RDEPEND=""
+
+src_prepare() {
+ if [[ ! -e configure ]] ; then
+ # git generation
+ eautoreconf
+ [[ ! -e CREDITS ]] && cp CREDITS{.in,}
+ fi
+
+ epatch "${FILESDIR}"/${P}-glibc-2.15.patch #414637
+ epatch "${FILESDIR}"/${P}-x32.patch
+
+ filter-lfs-flags # configure handles this sanely
+ use static && append-ldflags -static
+
+ export ac_cv_header_libaio_h=$(usex aio)
+}
+
+src_install() {
+ default
+ dodoc CREDITS
+}
diff --git a/metadata/md5-cache/dev-util/strace-4.6 b/metadata/md5-cache/dev-util/strace-4.6
deleted file mode 100644
index c0717cc..0000000
--- a/metadata/md5-cache/dev-util/strace-4.6
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=configure install prepare
-DEPEND=aio? ( >=dev-libs/libaio-0.3.106 ) sys-kernel/linux-headers || ( >=sys-devel/automake-1.11.1:1.11 >=sys-devel/automake-1.12:1.12 ) >=sys-devel/autoconf-2.68 sys-devel/libtool
-DESCRIPTION=A useful diagnostic, instructional, and debugging tool
-EAPI=3
-HOMEPAGE=http://sourceforge.net/projects/strace/
-IUSE=static aio
-KEYWORDS=alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-linux ~ia64-linux ~x86-linux
-LICENSE=BSD
-SLOT=0
-SRC_URI=mirror://sourceforge/strace/strace-4.6.tar.xz mirror://gentoo/strace-4.6-x32.patch.xz
-_eclasses_=autotools 1b0fa473be98091220edff9f51d06153 eutils d40dc948067bd3db1c8ebf7d51897313 flag-o-matic 01a8b1eb019305bc4b4a8bd0b04e4cd8 libtool 0fd90d183673bf1107465ec45849d1ea multilib ded93e450747134a079e647d888aa80b multiprocessing 1512bdfe7004902b8cd2c466fc3df772 toolchain-funcs 69a2016af67775a812f4c03ba4b0e03e user 9e552f935106ff0bc92af16da64b4b29
-_md5_=7a14b1243fa958997a4eb093b464ff40
diff --git a/metadata/md5-cache/dev-util/strace-4.7 b/metadata/md5-cache/dev-util/strace-4.7
new file mode 100644
index 0000000..d81f4c7
--- /dev/null
+++ b/metadata/md5-cache/dev-util/strace-4.7
@@ -0,0 +1,12 @@
+DEFINED_PHASES=install prepare
+DEPEND=aio? ( >=dev-libs/libaio-0.3.106 ) sys-kernel/linux-headers
+DESCRIPTION=A useful diagnostic, instructional, and debugging tool
+EAPI=4
+HOMEPAGE=http://sourceforge.net/projects/strace/
+IUSE=static aio
+KEYWORDS=alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux
+LICENSE=BSD
+SLOT=0
+SRC_URI=mirror://sourceforge/strace/strace-4.7.tar.xz
+_eclasses_=eutils d40dc948067bd3db1c8ebf7d51897313 flag-o-matic 01a8b1eb019305bc4b4a8bd0b04e4cd8 multilib ded93e450747134a079e647d888aa80b toolchain-funcs 69a2016af67775a812f4c03ba4b0e03e user 9e552f935106ff0bc92af16da64b4b29
+_md5_=c392a2cf35efacc282cb2dc9f7025d91