summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTavis Ormandy <taviso@gentoo.org>2005-04-06 12:16:19 +0000
committerTavis Ormandy <taviso@gentoo.org>2005-04-06 12:16:19 +0000
commit2102bb6f9885f36865939da1baa90a07655dbac2 (patch)
treef386e970e1054a9b8ee52a73b90c74ef8830f71b /dev-util
parentFixed xforms dependency when cjk is enabled. Bug #88140. Moved back to unstab... (diff)
downloadhistorical-2102bb6f9885f36865939da1baa90a07655dbac2.tar.gz
historical-2102bb6f9885f36865939da1baa90a07655dbac2.tar.bz2
historical-2102bb6f9885f36865939da1baa90a07655dbac2.zip
initial import
Package-Manager: portage-2.0.51.19
Diffstat (limited to 'dev-util')
-rw-r--r--dev-util/pretrace/ChangeLog9
-rw-r--r--dev-util/pretrace/Manifest4
-rw-r--r--dev-util/pretrace/files/digest-pretrace-0.11
-rw-r--r--dev-util/pretrace/metadata.xml11
-rw-r--r--dev-util/pretrace/pretrace-0.1.ebuild82
5 files changed, 107 insertions, 0 deletions
diff --git a/dev-util/pretrace/ChangeLog b/dev-util/pretrace/ChangeLog
new file mode 100644
index 000000000000..c315758dc56b
--- /dev/null
+++ b/dev-util/pretrace/ChangeLog
@@ -0,0 +1,9 @@
+# ChangeLog for dev-util/pretrace
+# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-util/pretrace/ChangeLog,v 1.1 2005/04/06 12:16:19 taviso Exp $
+
+*pretrace-0.1 (06 Apr 2005)
+
+ 06 Apr 2005; Tavis Ormandy <taviso@gentoo.org> +pretrace-0.1.ebuild:
+ initial import.
+
diff --git a/dev-util/pretrace/Manifest b/dev-util/pretrace/Manifest
new file mode 100644
index 000000000000..7d24150cab89
--- /dev/null
+++ b/dev-util/pretrace/Manifest
@@ -0,0 +1,4 @@
+MD5 ed76c57b17798d19725079a182880218 pretrace-0.1.ebuild 2610
+MD5 266af5af3bd5f9e7394b2c91d4a13661 ChangeLog 326
+MD5 c6ea7a07929a9d7924313374907810a4 metadata.xml 284
+MD5 c015b053460aa197aab1c7808192ca9f files/digest-pretrace-0.1 59
diff --git a/dev-util/pretrace/files/digest-pretrace-0.1 b/dev-util/pretrace/files/digest-pretrace-0.1
new file mode 100644
index 000000000000..6e43727cb120
--- /dev/null
+++ b/dev-util/pretrace/files/digest-pretrace-0.1
@@ -0,0 +1 @@
+MD5 b6481ba2ba4ab5e382c228e3d6cb83b9 libpretrace.c.gz 2207
diff --git a/dev-util/pretrace/metadata.xml b/dev-util/pretrace/metadata.xml
new file mode 100644
index 000000000000..bca82f9a4ea0
--- /dev/null
+++ b/dev-util/pretrace/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>no-herd</herd>
+<maintainer>
+ <email>taviso@gentoo.org</email>
+</maintainer>
+<maintainer>
+ <email>tigger@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/dev-util/pretrace/pretrace-0.1.ebuild b/dev-util/pretrace/pretrace-0.1.ebuild
new file mode 100644
index 000000000000..d434a9599799
--- /dev/null
+++ b/dev-util/pretrace/pretrace-0.1.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-util/pretrace/pretrace-0.1.ebuild,v 1.1 2005/04/06 12:16:19 taviso Exp $
+
+inherit toolchain-funcs flag-o-matic
+
+DESCRIPTION="Start dynamically linked applications under debugging environment"
+HOMEPAGE="http://dev.gentoo.org/~taviso/files/libpretrace.c"
+SRC_URI="${HOMEPAGE}.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86"
+IUSE="debug"
+DEPEND="virtual/libc"
+S=${WORKDIR}
+
+src_compile() {
+ use debug && append-flags -DDEBUG
+
+ ebegin "[CC] ${A//.gz/} => libpretrace.so"
+ $(tc-getCC) ${CFLAGS} ${ASFLAGS} ${LDFLAGS} -shared \
+ -o ${S}/libpretrace.so ${S}/${A//.gz/} || {
+ eend 1
+ die "compile failed"
+ }
+ eend 0
+
+ ebegin "[DOC] => pretrace.conf.example"
+cat << EOF > ${T}/pretrace.conf.example
+# example pretrace configuration file
+# /etc/pretrace.conf
+
+# application[:/full/path/to/debugger [arg1 arg2 ...]]
+
+ls:/usr/bin/strace -f -efile -o/home/user/ls.logfile
+fetchmail:/usr/bin/ltrace -f
+xcalc:/usr/bin/valgrind --tool=memcheck --trace-children=yes --log-file=xcalc
+xterm
+EOF
+ eend $?
+ ebegin "[DOC] => README"
+cat << EOF > ${T}/README
+libpretrace is a preload library that allows specified (dynamically linked)
+applications to always be executed under a debugging environment. To start
+using pretrace, add libpretrace.so to your /etc/ld.so.preload.
+
+ root# echo /usr/$(get_libdir)/libpretrace.so >> /etc/ld.so.preload
+
+You can now specify applications to trace in /etc/pretrace.conf, the format
+is one application per line, if you would like to specify a debugger append
+a colon, then the full path to the debugger and any arguments you would like
+to pass. If you do not specify a debugger, you get the default, strace, which
+saves the output to .logfile in the current working directory.
+
+# this is a comment
+application[:/full/path/to/debugger [arg1 arg2 ...]]
+
+An example pretrace.conf is provided with this distribution.
+
+libpretrace is designed as a debugging utility for developers and auditors,
+and should not be used in a production environment.
+
+libpretrace is released under GPL version 2, and was created by Rob Holland
+and Tavis Ormandy of the Gentoo Linux Security Audit Team.
+
+taviso@gentoo.org
+tigger@gentoo.org
+
+April, 2005.
+EOF
+ eend $?
+}
+
+src_install() {
+ dolib.so libpretrace.so
+ dodoc ${T}/pretrace.conf.example ${T}/README
+}
+
+pkg_postinst() {
+ einfo "To use pretrace, please add /usr/$(get_libdir)/libpretrace.so to /etc/ld.so.preload."
+ einfo "Please see documentation for the configuration file format and more information."
+}