From owner-svn-ports-all@FreeBSD.ORG Wed Jun 4 14:26:34 2014 Return-Path: Delivered-To: svn-ports-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 485A3F61; Wed, 4 Jun 2014 14:26:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2864828AD; Wed, 4 Jun 2014 14:26:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s54EQYC7031415; Wed, 4 Jun 2014 14:26:34 GMT (envelope-from skreuzer@svn.freebsd.org) Received: (from skreuzer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s54EQXvP031410; Wed, 4 Jun 2014 14:26:33 GMT (envelope-from skreuzer@svn.freebsd.org) Message-Id: <201406041426.s54EQXvP031410@svn.freebsd.org> From: Steven Kreuzer Date: Wed, 4 Jun 2014 14:26:33 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r356502 - in head/sysutils/DTraceToolkit: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jun 2014 14:26:34 -0000 Author: skreuzer Date: Wed Jun 4 14:26:33 2014 New Revision: 356502 URL: http://svnweb.freebsd.org/changeset/ports/356502 QAT: https://qat.redports.org/buildarchive/r356502/ Log: Add support for opensnoop and shellsnoop Submitted by: Daniel O'Connor Added: head/sysutils/DTraceToolkit/files/ head/sysutils/DTraceToolkit/files/patch-Apps-shellsnoop (contents, props changed) head/sysutils/DTraceToolkit/files/patch-opensnoop (contents, props changed) Modified: head/sysutils/DTraceToolkit/Makefile head/sysutils/DTraceToolkit/pkg-plist Modified: head/sysutils/DTraceToolkit/Makefile ============================================================================== --- head/sysutils/DTraceToolkit/Makefile Wed Jun 4 14:14:57 2014 (r356501) +++ head/sysutils/DTraceToolkit/Makefile Wed Jun 4 14:26:33 2014 (r356502) @@ -3,6 +3,7 @@ PORTNAME= DTraceToolkit PORTVERSION= 0.99 +PORTREVISION= 1 CATEGORIES= sysutils MASTER_SITES= http://www.brendangregg.com/DTraceToolkit/ @@ -14,7 +15,7 @@ sh_OLD_CMD= /usr/bin/sh sh_CMD= ${SH} SHEBANG_LANG+= sh -SHEBANG_FILES= hotkernel procsystime +SHEBANG_FILES= hotkernel procsystime opensnoop Apps/shellsnoop NO_BUILD= YES .include @@ -25,12 +26,14 @@ IGNORE= needs to have dtrace enabled ker do-install: ${MKDIR} ${STAGEDIR}${DATADIR} - (cd ${WRKSRC}; ${TAR} cf - . ) | \ + (cd ${WRKSRC}; ${TAR} --exclude '*.orig' -cf - . ) | \ (cd ${STAGEDIR}${DATADIR}/; ${TAR} xvf -) post-install: ${LN} -fs ${DATADIR}/hotkernel ${STAGEDIR}${PREFIX}/bin/hotkernel ${LN} -fs ${DATADIR}/procsystime ${STAGEDIR}${PREFIX}/bin/procsystime + ${LN} -fs ${DATADIR}/opensnoop ${STAGEDIR}${PREFIX}/bin/opensnoop + ${LN} -fs ${DATADIR}/Apps/shellsnoop ${STAGEDIR}${PREFIX}/bin/shellsnoop @${CAT} ${PKGMESSAGE} .include Added: head/sysutils/DTraceToolkit/files/patch-Apps-shellsnoop ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/DTraceToolkit/files/patch-Apps-shellsnoop Wed Jun 4 14:26:33 2014 (r356502) @@ -0,0 +1,35 @@ +--- Apps/shellsnoop.orig 2014-06-04 09:00:10.000000000 -0400 ++++ Apps/shellsnoop 2014-06-04 09:01:29.000000000 -0400 +@@ -140,7 +140,7 @@ + /* + * Remember this PID is a shell child + */ +- syscall::exec:entry, syscall::exece:entry ++ syscall::exec:entry + /execname == "sh" || execname == "ksh" || execname == "csh" || + execname == "tcsh" || execname == "zsh" || execname == "bash"/ + { +@@ -151,7 +151,7 @@ + OPT_debug == 1 ? printf("PID %d CMD %s started. (%s)\n", + pid, execname, stringof(this->parent)) : 1; + } +- syscall::exec:entry, syscall::exece:entry ++ syscall::exec:entry + /(OPT_pid == 1 && PID != ppid) || (OPT_uid == 1 && UID != uid)/ + { + /* forget if filtered */ +@@ -256,12 +256,12 @@ + /* + * Cleanup + */ +- syscall::rexit:entry ++ syscall::exit:entry + { + child[pid] = 0; + + /* debug */ +- this->parent = (char *)curthread->t_procp->p_parent->p_user.u_comm; ++ this->parent = (char *)curthread->td_proc->p_pptr->p_comm; + OPT_debug == 1 ? printf("PID %d CMD %s exited. (%s)\n", + pid, execname, stringof(this->parent)) : 1; + } Added: head/sysutils/DTraceToolkit/files/patch-opensnoop ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/DTraceToolkit/files/patch-opensnoop Wed Jun 4 14:26:33 2014 (r356502) @@ -0,0 +1,29 @@ +--- opensnoop.orig 2014-06-04 08:58:11.000000000 -0400 ++++ opensnoop 2014-06-04 08:58:42.000000000 -0400 +@@ -189,7 +189,7 @@ + /* + * Print open event + */ +- syscall::open:entry, syscall::open64:entry ++ syscall::open:entry + { + /* save pathname */ + self->pathp = arg0; +@@ -203,7 +203,7 @@ + /* OPT_file is checked on return to ensure pathp is mapped */ + } + +- syscall::open:return, syscall::open64:return ++ syscall::open:return + /self->ok && (! OPT_failonly || (int)arg0 < 0) && + ((OPT_file == 0) || (OPT_file == 1 && PATHNAME == copyinstr(self->pathp)))/ + { +@@ -235,7 +235,7 @@ + /* + * Cleanup + */ +- syscall::open:return, syscall::open64:return ++ syscall::open:return + /self->ok/ + { + self->pathp = 0; Modified: head/sysutils/DTraceToolkit/pkg-plist ============================================================================== --- head/sysutils/DTraceToolkit/pkg-plist Wed Jun 4 14:14:57 2014 (r356501) +++ head/sysutils/DTraceToolkit/pkg-plist Wed Jun 4 14:26:33 2014 (r356502) @@ -1007,6 +1007,8 @@ %%DATADIR%%/opensnoop bin/procsystime bin/hotkernel +bin/shellsnoop +bin/opensnoop @dirrm %%DATADIR%%/Mem @dirrm %%DATADIR%%/Man/man1m @dirrm %%DATADIR%%/Man