diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /dev-util/elfsh | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'dev-util/elfsh')
-rw-r--r-- | dev-util/elfsh/Manifest | 2 | ||||
-rw-r--r-- | dev-util/elfsh/elfsh-0.51_beta3.ebuild | 43 | ||||
-rw-r--r-- | dev-util/elfsh/elfsh-0.65_rc1.ebuild | 59 | ||||
-rw-r--r-- | dev-util/elfsh/files/0.51_beta3-gentoo.patch | 63 | ||||
-rw-r--r-- | dev-util/elfsh/files/elfsh-0.51_beta3-glibc210.patch | 70 | ||||
-rw-r--r-- | dev-util/elfsh/metadata.xml | 10 |
6 files changed, 247 insertions, 0 deletions
diff --git a/dev-util/elfsh/Manifest b/dev-util/elfsh/Manifest new file mode 100644 index 000000000000..e9e9a5fcb325 --- /dev/null +++ b/dev-util/elfsh/Manifest @@ -0,0 +1,2 @@ +DIST elfsh-0.51b3-portable.tgz 136679 SHA256 ecffe100d0da12235cfe464726313491409739493030f3fbdb3a28696b23447f SHA512 3af4a7f031e830c24ecd05701c4ade052845cdd3808f6d5b60f19f8fff3ffa66f2edd1490fc62b9bbd8ac51d7c8aadb045fc2d369c885eb47a33210690f1c9df WHIRLPOOL 3d19b1bca64ebf98de3637978531bd1823c1f4b5fa9d2144873be9cf91c3c7771abb33b42107a156cfe7ca52ee0af33a5837581250ead29fa3a937883f946592 +DIST elfsh-0.65_rc1.zip 444993 SHA256 740e0bda6c368cbf7ceb6082e038d84c155220666c4edbb8dc8724b83d4feb93 SHA512 4268b29467cecfa661b4162214f1dc9dd9e465558aa62aa5ee412c6533a0405e3783c536d8e5bee420f87b636aafa4d1902d9f5b1b6fe0a3ad771894cd05ac76 WHIRLPOOL 89cef773854537865ef0f7a88dbcc44046ddfa8096c01a71f90719bdcc231d659b5d56767649c7d955e3e1d10dfe5673817d642b6ad8a2414b2295dfe3aedea4 diff --git a/dev-util/elfsh/elfsh-0.51_beta3.ebuild b/dev-util/elfsh/elfsh-0.51_beta3.ebuild new file mode 100644 index 000000000000..b7ebaac34357 --- /dev/null +++ b/dev-util/elfsh/elfsh-0.51_beta3.ebuild @@ -0,0 +1,43 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +inherit eutils multilib toolchain-funcs + +MY_PV=${PV/_beta/b} +S=${WORKDIR}/${PN}-${MY_PV} +DESCRIPTION="scripting language to modify ELF binaries" +HOMEPAGE="http://www.eresi-project.org/" +SRC_URI="mirror://gentoo/elfsh-${MY_PV}-portable.tgz" +#http://elfsh.segfault.net/files/elfsh-${MY_PV}-portable.tgz + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="" + +DEPEND=">=dev-libs/expat-1.95" +RDEPEND="${DEPEND}" + +src_unpack() { + unpack ${A} + cd "${S}" + epatch "${FILESDIR}"/${PV}-gentoo.patch + epatch "${FILESDIR}"/${P}-glibc210.patch + sed -i \ + -e "s:-g3 -O2:${CFLAGS}:" \ + -e "s:\$(CC):& \$(CFLAGS) \$(ELDFLGS): "\ + `find -name Makefile` \ + || die + sed -i -e "s:LIBPATH = \$(PREFIX)/lib:LIBPATH = \$(PREFIX)/$(get_libdir):" Makefile + +} + +src_compile() { + # emacs does not have to be a requirement. + emake CC=$(tc-getCC) ETAGS=echo ELDFLGS="${LDFLAGS}" || die "emake failed" +} + +src_install() { + make install DESTDIR="${D}" || die "einstall failed" +} diff --git a/dev-util/elfsh/elfsh-0.65_rc1.ebuild b/dev-util/elfsh/elfsh-0.65_rc1.ebuild new file mode 100644 index 000000000000..4b481d8599f0 --- /dev/null +++ b/dev-util/elfsh/elfsh-0.65_rc1.ebuild @@ -0,0 +1,59 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +inherit eutils toolchain-funcs + +DESCRIPTION="scripting language to modify ELF binaries" +HOMEPAGE="http://www.eresi-project.org/" +SRC_URI="mirror://gentoo/${P}.zip" +#http://www.eresi-project.org/browser/tags/elfsh_0_65rc1 + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="" +IUSE="readline" + +DEPEND=">=dev-libs/expat-1.95 + readline? ( sys-libs/readline ) + app-arch/unzip + dev-libs/libhash" +RDEPEND="" + +S="${WORKDIR}/tags/elfsh_0_65rc1" + +src_unpack() { + unpack ${A} + cd "${S}" + sed -i \ + -e 's: -O2 : :g' \ + -e "s: -g3 : ${CFLAGS} :" \ + -e "/^LDFLAGS/s:=:=${LDFLAGS} :" \ + $(find -name Makefile) \ + || die + chmod +x configure +} + +src_compile() { + local bits + touch foo.c && $(tc-getCC) -c foo.c -o foo.o || die + case $(file foo.o) in + *64-bit*) bits=64;; + *32-bit*) bits=32;; + *) die "unknown bits: $(file foo.o)";; + esac + # not an autoconf script + ./configure \ + $([[ ${bits} == "64" ]] && echo "--enable-m64") \ + --enable-${bits} \ + $(use_enable readline) \ + || die + # emacs does not have to be a requirement. + emake ETAGS=echo || die "emake failed" +} + +src_install() { + make install DESTDIR="${D}" || die "install failed" + dodoc README.FIRST doc/AUTHOR doc/CREDITS doc/Changelog doc/*.txt + doman doc/*.1 +} diff --git a/dev-util/elfsh/files/0.51_beta3-gentoo.patch b/dev-util/elfsh/files/0.51_beta3-gentoo.patch new file mode 100644 index 000000000000..26c4f7b91308 --- /dev/null +++ b/dev-util/elfsh/files/0.51_beta3-gentoo.patch @@ -0,0 +1,63 @@ +diff -ur elfsh-0.51b3.orig/Makefile elfsh-0.51b3/Makefile +--- elfsh-0.51b3.orig/Makefile 2004-09-20 22:20:22.152723392 -0400 ++++ elfsh-0.51b3/Makefile 2004-09-20 22:21:37.270303784 -0400 +@@ -5,12 +5,14 @@ + ## Last update Sun May 25 18:12:43 2003 mayhem + ## + ++DESTDIR = / ++PREFIX = $(DESTDIR)/usr + RM = rm -f + ETAGS = etags +-MODPATH = /usr/share/elfsh/ +-BINPATH = /usr/bin +-LIBPATH = /usr/lib/ +-INCPATH = /usr/include/ ++BINPATH = $(PREFIX)/bin ++LIBPATH = $(PREFIX)/lib ++INCPATH = $(PREFIX)/include ++MODPATH = $(LIBPATH)/elfsh + + all : + @echo 'Builting libelfsh...' +@@ -32,14 +34,15 @@ + #$(MAKE) -s tags + + install : mod_install ++ @mkdir -p $(BINPATH) $(LIBPATH) $(INCPATH) + @cp vm/elfsh $(BINPATH)/ + @cp libelfsh/libelfsh.a libelfsh/libelfsh.so $(LIBPATH) + @cp libelfsh/include/libelfsh*.h $(INCPATH) +- @chmod 755 $(BINPATH)/elfsh $(LIBPATH)libelfsh.so $(LIBPATH)libelfsh.a $(INCPATH)libelfsh*.h ++ @chmod 755 $(BINPATH)/elfsh $(LIBPATH)/libelfsh.so + @echo 'ELFsh and Libelfsh installed successfully .' + + mod_install: +- @mkdir $(MODPATH) 2>/dev/null || true ++ @mkdir -p $(MODPATH) + @cp modules/*.so $(MODPATH) + @chmod -R 755 $(MODPATH) + +diff -ur elfsh-0.51b3.orig/vm/Makefile elfsh-0.51b3/vm/Makefile +--- elfsh-0.51b3.orig/vm/Makefile 2004-09-20 22:20:22.117728712 -0400 ++++ elfsh-0.51b3/vm/Makefile 2004-09-20 22:22:17.807141248 -0400 +@@ -13,6 +13,7 @@ + #DLOPT_linux-gnu = -ldl + #DLOPT_solaris = -ldl + #EXTRAOPT = -lefence ++EXTRAOPT = -ldl + + # Uncomment that to use libasm + #ASMOPT = -DUSE_LIBASM +diff -ur elfsh-0.51b3.orig/vm/include/elfsh.h elfsh-0.51b3/vm/include/elfsh.h +--- elfsh-0.51b3.orig/vm/include/elfsh.h 2004-09-20 22:20:22.116728864 -0400 ++++ elfsh-0.51b3/vm/include/elfsh.h 2004-09-20 22:20:22.358692080 -0400 +@@ -94,7 +94,7 @@ + #define ELFSH_SHELL "/bin/bash" + #define ELFSH_INIT "elfsh_init" + #define ELFSH_FINI "elfsh_fini" +-#define ELFSH_MODPATH "/usr/share/elfsh/" ++#define ELFSH_MODPATH "/usr/lib/elfsh/" + + /* For elfsh/elfsh/disasm.c:display_object() */ + #define ELFSH_HEXA_VIEW 0 diff --git a/dev-util/elfsh/files/elfsh-0.51_beta3-glibc210.patch b/dev-util/elfsh/files/elfsh-0.51_beta3-glibc210.patch new file mode 100644 index 000000000000..2e83c93d19af --- /dev/null +++ b/dev-util/elfsh/files/elfsh-0.51_beta3-glibc210.patch @@ -0,0 +1,70 @@ +diff -NrU5 elfsh-0.51b3.original/modules/modgraph.c elfsh-0.51b3/modules/modgraph.c +--- elfsh-0.51b3.original/modules/modgraph.c 2009-07-22 23:17:51.000000000 -0600 ++++ elfsh-0.51b3/modules/modgraph.c 2009-07-22 23:33:28.000000000 -0600 +@@ -181,11 +181,11 @@ + } + } + else + { + name = elfsh_reverse_metasym(world.current, blk->vaddr, &off); +- dprintf(fd, "%s_%08x", name, off); ++ d_printf(fd, "%s_%08x", name, off); + + } + free(buffer); + world.state.vm_quiet = vm_quiet; + } +diff -NrU5 elfsh-0.51b3.original/vm/disasm.c elfsh-0.51b3/vm/disasm.c +--- elfsh-0.51b3.original/vm/disasm.c 2009-07-22 23:17:51.000000000 -0600 ++++ elfsh-0.51b3/vm/disasm.c 2009-07-22 23:33:53.000000000 -0600 +@@ -80,30 +80,30 @@ + + /* Are we in quiet mode ? */ + if (world.state.vm_quiet) + { + snprintf(buf, sizeof(buf), " %08X %s + %u", vaddr + index, name, nindex); +- dprintf(fd, "%-40s %-30s ", buf, s); ++ d_printf(fd, "%-40s %-30s ", buf, s); + } + else + { + snprintf(buf, sizeof(buf), " %08X [foff: %u] %s + %u", + vaddr + index, foffset + index, name, nindex); +- dprintf(fd, "%-60s %-50s ", buf, s); ++ d_printf(fd, "%-60s %-50s ", buf, s); + } + + /* Print bytes in hexa for this instruction */ + ret = asm_instr_len(&ptr); + if (!ret) + ret++; + + if (!world.state.vm_quiet) + for (idx_bytes = 0; idx_bytes < ret; idx_bytes++) +- dprintf(fd, "%c%c ", ++ d_printf(fd, "%c%c ", + base[(buff[index + idx_bytes] >> 4) & 0x0F], + base[buff[index + idx_bytes] & 0x0F]); +- dprintf(fd, "\n"); ++ d_printf(fd, "\n"); + return (ret); + } + #endif /* USE_LIBASM */ + + +diff -NrU5 elfsh-0.51b3.original/vm/include/elfsh.h elfsh-0.51b3/vm/include/elfsh.h +--- elfsh-0.51b3.original/vm/include/elfsh.h 2009-07-22 23:17:51.000000000 -0600 ++++ elfsh-0.51b3/vm/include/elfsh.h 2009-07-22 23:22:30.000000000 -0600 +@@ -469,11 +469,11 @@ + int vm_getsort(u_int index, u_int argc, char **argv); + int vm_getdisasm(u_int index, u_int argc, char **argv); + int vm_gethexa(u_int index, u_int argc, char **argv); + int vm_getvarparams(u_int index, u_int argc, char **argv); + +-int dprintf(int fd, char *format, ...); ++int d_printf(int fd, char *format, ...); + + /* Libasm resolve handler */ + void do_resolve(void *data, u_int vaddr, char *, u_int); + u_int display_instr(int, u_int, u_int, u_int, u_int, + char *, u_int, char *); diff --git a/dev-util/elfsh/metadata.xml b/dev-util/elfsh/metadata.xml new file mode 100644 index 000000000000..d48e561d339f --- /dev/null +++ b/dev-util/elfsh/metadata.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer> + <email>blueness@gentoo.org</email> +</maintainer> +<longdescription> +ELFsh is an interactive and scriptable ELF machine to play with executable files, shared libraries and relocatable ELF32 objects. It is useful for daily binary manipulations such as on-the-fly patching, embedded code injection, and binary analysis in research fields such as reverse engineering, security auditing and intrusion detection. +</longdescription> +</pkgmetadata> |