From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <gentoo-commits+bounces-670263-garchives=archives.gentoo.org@lists.gentoo.org> Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 8B252138F42 for <garchives@archives.gentoo.org>; Sat, 22 Feb 2014 21:25:43 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1B8FEE0B0A; Sat, 22 Feb 2014 21:25:43 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 8ED07E0B0A for <gentoo-commits@lists.gentoo.org>; Sat, 22 Feb 2014 21:25:42 +0000 (UTC) Received: from spoonbill.gentoo.org (spoonbill.gentoo.org [81.93.255.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 96C5133F840 for <gentoo-commits@lists.gentoo.org>; Sat, 22 Feb 2014 21:25:41 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by spoonbill.gentoo.org (Postfix) with ESMTP id 5D4C9188A2 for <gentoo-commits@lists.gentoo.org>; Sat, 22 Feb 2014 21:25:40 +0000 (UTC) From: "Anthony G. Basile" <blueness@gentoo.org> To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Anthony G. Basile" <blueness@gentoo.org> Message-ID: <1393104356.4e871a5e2f25deb65f0e7416178500439f5f761a.blueness@gentoo> Subject: [gentoo-commits] proj/hardened-dev:musl commit in: dev-util/strace/files/, dev-util/strace/ X-VCS-Repository: proj/hardened-dev X-VCS-Files: dev-util/strace/files/strace-4.8-musl.patch dev-util/strace/metadata.xml dev-util/strace/strace-4.8-r99.ebuild X-VCS-Directories: dev-util/strace/files/ dev-util/strace/ X-VCS-Committer: blueness X-VCS-Committer-Name: Anthony G. Basile X-VCS-Revision: 4e871a5e2f25deb65f0e7416178500439f5f761a X-VCS-Branch: musl Date: Sat, 22 Feb 2014 21:25:40 +0000 (UTC) Precedence: bulk List-Post: <mailto:gentoo-commits@lists.gentoo.org> List-Help: <mailto:gentoo-commits+help@lists.gentoo.org> List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org> List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org> List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org> X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 3d323a17-df27-40d6-bcd8-a11792aea975 X-Archives-Hash: 7f1262a23bfaac60c8f6fa6e9dfc8a06 commit: 4e871a5e2f25deb65f0e7416178500439f5f761a Author: Felix Janda <felix.janda <AT> posteo <DOT> de> AuthorDate: Sat Feb 22 21:56:18 2014 +0000 Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org> CommitDate: Sat Feb 22 21:25:56 2014 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-dev.git;a=commit;h=4e871a5e dev-util/strace: move to tree --- dev-util/strace/files/strace-4.8-musl.patch | 168 ++++++++++++++++++++++++++++ dev-util/strace/metadata.xml | 10 ++ dev-util/strace/strace-4.8-r99.ebuild | 49 ++++++++ 3 files changed, 227 insertions(+) diff --git a/dev-util/strace/files/strace-4.8-musl.patch b/dev-util/strace/files/strace-4.8-musl.patch new file mode 100644 index 0000000..ac9cf56 --- /dev/null +++ b/dev-util/strace/files/strace-4.8-musl.patch @@ -0,0 +1,168 @@ +taken from sabotage linux +diff -ru strace-4.8.orig/defs.h strace-4.8/defs.h +--- strace-4.8.orig/defs.h 2013-05-14 14:10:42.000000000 +0000 ++++ strace-4.8/defs.h 2013-09-20 14:30:38.785856744 +0000 +@@ -155,7 +155,7 @@ + || defined(METAG) \ + || defined(TILE) \ + || defined(XTENSA) \ +- ) && defined(__GLIBC__) ++ ) && defined(__linux__) + # include <sys/ptrace.h> + #else + /* Work around awkward prototype in ptrace.h. */ +@@ -222,7 +222,7 @@ + # define PTRACE_EVENT_EXIT 6 + #endif + +-#if !defined(__GLIBC__) ++#if !defined(__GLIBC__) && !defined(PTRACE_PEEKUSER) + # define PTRACE_PEEKUSER PTRACE_PEEKUSR + # define PTRACE_POKEUSER PTRACE_POKEUSR + #endif +diff -ru strace-4.8.orig/desc.c strace-4.8/desc.c +--- strace-4.8.orig/desc.c 2013-05-01 22:39:10.000000000 +0000 ++++ strace-4.8/desc.c 2013-09-20 14:30:38.795856744 +0000 +@@ -299,7 +299,7 @@ + #ifdef X32 + tprintf(", start=%lld, len=%lld", fl.l_start, fl.l_len); + #else +- tprintf(", start=%ld, len=%ld", fl.l_start, fl.l_len); ++ tprintf(", start=%ld, len=%ld", (long) fl.l_start, (long) fl.l_len); + #endif + if (getlk) + tprintf(", pid=%lu}", (unsigned long) fl.l_pid); +diff -ru strace-4.8.orig/file.c strace-4.8/file.c +--- strace-4.8.orig/file.c 2013-05-06 18:23:01.000000000 +0000 ++++ strace-4.8/file.c 2013-09-20 14:30:38.795856744 +0000 +@@ -632,7 +632,7 @@ + return 0; + } + +-#if _LFS64_LARGEFILE ++#if defined _LFS64_LARGEFILE || defined HAVE_LONG_LONG_OFF_T + int + sys_truncate64(struct tcb *tcp) + { +@@ -654,7 +654,7 @@ + return 0; + } + +-#if _LFS64_LARGEFILE ++#if defined _LFS64_LARGEFILE || defined HAVE_LONG_LONG_OFF_T + int + sys_ftruncate64(struct tcb *tcp) + { +@@ -2322,7 +2322,7 @@ + return 0; + } + +-#if _LFS64_LARGEFILE ++#if defined _LFS64_LARGEFILE || defined HAVE_LONG_LONG_OFF_T + int + sys_getdents64(struct tcb *tcp) + { +diff -ru strace-4.8.orig/net.c strace-4.8/net.c +--- strace-4.8.orig/net.c 2013-05-17 22:20:02.000000000 +0000 ++++ strace-4.8/net.c 2013-09-20 14:30:38.805856744 +0000 +@@ -95,12 +95,14 @@ + #endif + + /* Under Linux these are enums so we can't test for them with ifdef. */ ++#if !defined(IPPROTO_MAX) + #define IPPROTO_EGP IPPROTO_EGP + #define IPPROTO_PUP IPPROTO_PUP + #define IPPROTO_IDP IPPROTO_IDP + #define IPPROTO_IGMP IPPROTO_IGMP + #define IPPROTO_RAW IPPROTO_RAW + #define IPPROTO_MAX IPPROTO_MAX ++#endif + + static const struct xlat domains[] = { + #ifdef PF_UNSPEC +diff -ru strace-4.8.orig/process.c strace-4.8/process.c +--- strace-4.8.orig/process.c 2013-05-17 22:22:19.000000000 +0000 ++++ strace-4.8/process.c 2013-09-20 14:30:38.805856744 +0000 +@@ -2857,7 +2857,7 @@ + if (umove(tcp, tcp->u_arg[2], &p) < 0) + tprintf(", %#lx", tcp->u_arg[2]); + else +- tprintf(", { %d }", p.__sched_priority); ++ tprintf(", { %d }", p.sched_priority); + } + return 0; + } +@@ -2872,7 +2872,7 @@ + if (umove(tcp, tcp->u_arg[1], &p) < 0) + tprintf("%#lx", tcp->u_arg[1]); + else +- tprintf("{ %d }", p.__sched_priority); ++ tprintf("{ %d }", p.sched_priority); + } + return 0; + } +@@ -2885,7 +2885,7 @@ + if (umove(tcp, tcp->u_arg[1], &p) < 0) + tprintf("%d, %#lx", (int) tcp->u_arg[0], tcp->u_arg[1]); + else +- tprintf("%d, { %d }", (int) tcp->u_arg[0], p.__sched_priority); ++ tprintf("%d, { %d }", (int) tcp->u_arg[0], p.sched_priority); + } + return 0; + } +diff -ru strace-4.8.orig/signal.c strace-4.8/signal.c +--- strace-4.8.orig/signal.c 2013-05-23 13:41:23.000000000 +0000 ++++ strace-4.8/signal.c 2013-09-20 14:30:38.815856744 +0000 +@@ -59,6 +59,7 @@ + #ifdef IA64 + # include <asm/ptrace_offsets.h> + #endif ++#include <asm/ptrace.h> + + #if defined(SPARC) || defined(SPARC64) || defined(MIPS) + typedef struct { +diff -ru strace-4.8.orig/strace.c strace-4.8/strace.c +--- strace-4.8.orig/strace.c 2013-05-28 21:49:16.000000000 +0000 ++++ strace-4.8/strace.c 2013-09-20 14:30:38.815856744 +0000 +@@ -506,7 +506,7 @@ + perror_msg_and_die("dup2"); + close(fds[0]); + } +- execl(_PATH_BSHELL, "sh", "-c", command, NULL); ++ execl(_PATH_BSHELL, "sh", "-c", command, (void*) 0); + perror_msg_and_die("Can't execute '%s'", _PATH_BSHELL); + } + +diff -ru strace-4.8.orig/syscall.c strace-4.8/syscall.c +--- strace-4.8.orig/syscall.c 2013-05-14 14:10:42.000000000 +0000 ++++ strace-4.8/syscall.c 2013-09-20 14:30:38.825856744 +0000 +@@ -72,13 +72,7 @@ + # include <elf.h> + #endif + +-#if defined(AARCH64) +-# include <asm/ptrace.h> +-#endif +- +-#if defined(XTENSA) +-# include <asm/ptrace.h> +-#endif ++#include <asm/ptrace.h> + + #ifndef ERESTARTSYS + # define ERESTARTSYS 512 +diff -ru strace-4.8.orig/time.c strace-4.8/time.c +--- strace-4.8.orig/time.c 2012-05-01 21:17:51.000000000 +0000 ++++ strace-4.8/time.c 2013-09-20 14:32:49.165856719 +0000 +@@ -774,7 +774,11 @@ + /* _pad[0] is the _tid field which might not be + present in the userlevel definition of the + struct. */ ++#if defined(__GLIBC__) + tprintf("{%d}", sev._sigev_un._pad[0]); ++#else ++ tprintf("{%d}", (int) sev.__pad[0]); ++#endif + else if (sev.sigev_notify == SIGEV_THREAD) + tprintf("{%p, %p}", sev.sigev_notify_function, + sev.sigev_notify_attributes); diff --git a/dev-util/strace/metadata.xml b/dev-util/strace/metadata.xml new file mode 100644 index 0000000..3134acb --- /dev/null +++ b/dev-util/strace/metadata.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>base-system</herd> + <use> + <flag name="aio"> + Enable <pkg>dev-libs/libaio</pkg> support for tracing Asynchronous I/O operations + </flag> + </use> +</pkgmetadata> diff --git a/dev-util/strace/strace-4.8-r99.ebuild b/dev-util/strace/strace-4.8-r99.ebuild new file mode 100644 index 0000000..e9fd721 --- /dev/null +++ b/dev-util/strace/strace-4.8-r99.ebuild @@ -0,0 +1,49 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-util/strace/strace-4.8.ebuild,v 1.5 2014/02/20 13:36:59 jer 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 arm64 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="aio +perl static" + +# 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 epatch_user || [[ ! -e configure ]] ; then + # git generation + eautoreconf + [[ ! -e CREDITS ]] && cp CREDITS{.in,} + fi + + epatch ${FILESDIR}/${P}-musl.patch + export ac_cv_have_long_long_off_t=yes + + filter-lfs-flags # configure handles this sanely + use static && append-ldflags -static + + export ac_cv_header_libaio_h=$(usex aio) +} + +src_install() { + default + use perl || rm "${ED}"/usr/bin/strace-graph + dodoc CREDITS +}