diff options
author | Bertrand Jacquin <beber@meleeweb.net> | 2011-07-26 20:20:00 +0200 |
---|---|---|
committer | Bertrand Jacquin <beber@meleeweb.net> | 2011-07-26 20:20:00 +0200 |
commit | cc09198bd77d05fe4b3ac2b071051a5391c864f7 (patch) | |
tree | 616e2480ca811c12024e334b3223203f0d1e85b8 /net-analyzer/ettercap | |
parent | net-analyzer/arpoison: #375655 (diff) | |
download | portage-cc09198bd77d05fe4b3ac2b071051a5391c864f7.tar.xz |
net-analyzer/ettercap: #375693
https://bugs.gentoo.org/show_bug.cgi?id=375693
Diffstat (limited to 'net-analyzer/ettercap')
7 files changed, 280 insertions, 0 deletions
diff --git a/net-analyzer/ettercap/Manifest b/net-analyzer/ettercap/Manifest new file mode 100644 index 00000000..c73e28f3 --- /dev/null +++ b/net-analyzer/ettercap/Manifest @@ -0,0 +1,7 @@ +AUX ettercap-0.7.3-64bit-casting.patch 591 RMD160 fdee869048dcdb510324e5b173e1e514c2aed2fd SHA1 e53753de80c2fecb1a2d677f6213886e5f272a22 SHA256 7ce23fd163ad8c53c442e789bf9f0db3716c35a5da76dad6687938c34b122897 +AUX ettercap-0.7.3-as-needed.patch 476 RMD160 1c7f5d24a4b77922e6499d048cd8b7b984db6eb4 SHA1 fd137a91ec37a5b1fbfa28fc075191cc92d298c7 SHA256 7722bd2e6f993d45e74ae8b36b200d34e10257fc7b2b8de7f76a6946f7a8046a +AUX ettercap-0.7.3-autotools.patch 5368 RMD160 2d3ea1962be61aff0584f6b542f8c2e82297314d SHA1 647ca23c2e85fdefca7c650dec6ff1601c448cdf SHA256 9b9df4880b85d125233d6508b03e5912af1e00c4e0a863409a6ad235814eafd4 +AUX ettercap-0.7.3-open_missing_mode.patch 625 RMD160 9bc96776088d33c347bd1bcb2b29b62f9173d348 SHA1 e680a22e24d5f48d1f1604e8d9e55d645cffd117 SHA256 be35690de1d1f70045a97903cfba253923ec0a86d7f7fc6e47e31dee8c03ce0c +AUX ettercap-BJA-cross-NS_GET32.diff 292 RMD160 9702aebdba4d5786f6df59e43dbbfaa83c0ce4a1 SHA1 b45c6b1624b1a8d6d26026fd7788902fad4ec4ee SHA256 89dcc0b60ee530100b9f14d806bfb1dfc2f1e383ef5fe244025cfdb9847a4f3b +DIST ettercap-NG-0.7.3.tar.gz 1138643 RMD160 f4e6c0d87b2064b3775e9af60f34575273742616 SHA1 7a2c3f848ca4f39c07fddeb0d6308641265bc4ff SHA256 c74239052d62565c13a82f9bbf217a4fdcce4b34949e361b53bb3f28e3168543 +EBUILD ettercap-0.7.3-r4.ebuild 2010 RMD160 6b81a4547184adde42bff01ab63e726d2068668b SHA1 6ecc4f55a4a6635a02a2e8679a2a388076cbac5a SHA256 eb864035f747c6dff1eb92b4f670b3d7dafd647d656cc9e41aa8281a360b2cc5 diff --git a/net-analyzer/ettercap/ettercap-0.7.3-r4.ebuild b/net-analyzer/ettercap/ettercap-0.7.3-r4.ebuild new file mode 100644 index 00000000..f51ea6e1 --- /dev/null +++ b/net-analyzer/ettercap/ettercap-0.7.3-r4.ebuild @@ -0,0 +1,72 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/ettercap/ettercap-0.7.3-r4.ebuild,v 1.9 2011/03/28 21:25:11 radhermit Exp $ + +# the actual version is "NG-0.7.0" but I suppose portage people will not be +# happy with it (as for the 0.6.b version), so let's set it to "0.7.0". +# since 'ettercap NG' has to be intended as an upgrade to 0.6.x series and not as +# a new project or branch, this will be fine... + +EAPI=2 + +inherit autotools flag-o-matic libtool + +MY_P="${PN}-NG-${PV}" +DESCRIPTION="A suite for man in the middle attacks and network mapping" +HOMEPAGE="http://ettercap.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="alpha amd64 arm hppa ppc ppc64 sparc x86 ~x86-fbsd" +IUSE="debug gtk ncurses ssl" + +# libtool is needed because it provides libltdl (needed for plugins) +RDEPEND=">=net-libs/libnet-1.1.2.1-r1 + net-libs/libpcap + sys-devel/libtool + ncurses? ( sys-libs/ncurses ) + ssl? ( dev-libs/openssl ) + gtk? ( >=x11-libs/gtk+-2.2.2:2 )" +DEPEND=${RDEPEND} + +S=${WORKDIR}/${MY_P} + +src_prepare() { + sed -e 's:-Werror ::' -i configure.in + epatch "${FILESDIR}"/${P}-as-needed.patch + epatch "${FILESDIR}"/${P}-open_missing_mode.patch + #patch from Timothy Redaelli <timothy@redaelli.eu> which fixes crash + # on 64bit CPU systems + epatch "${FILESDIR}"/${P}-64bit-casting.patch + epatch "${FILESDIR}"/${P}-autotools.patch + epatch "${FILESDIR}"/${PN}-BJA-cross-NS_GET32.diff + + NO_FAIL=1 eautoreconf + eautoconf +} + +src_configure() { + strip-flags + + append-flags "-DLTDL_SHLIB_EXT='\".so\"'" #272681 + + local myconf + if use ssl; then + myconf="${myconf} --with-openssl=/usr" + else + myconf="${myconf} --without-openssl" + fi + + econf \ + --disable-dependency-tracking \ + ${myconf} \ + $(use_enable gtk) \ + $(use_enable debug) \ + $(use_with ncurses) \ + --with-libnet=${ROOT}/usr +} + +src_install() { + emake DESTDIR="${D}" install || die "make install failed" +} diff --git a/net-analyzer/ettercap/files/ettercap-0.7.3-64bit-casting.patch b/net-analyzer/ettercap/files/ettercap-0.7.3-64bit-casting.patch new file mode 100644 index 00000000..3f0c7bf7 --- /dev/null +++ b/net-analyzer/ettercap/files/ettercap-0.7.3-64bit-casting.patch @@ -0,0 +1,19 @@ +commit 8cdf08d401d368d5678f9d9c2cf36ddbdef03aec +Author: Timothy Redaelli <timothy@redaelli.eu> +Date: Tue Jun 23 09:16:27 2009 +0000 + + Fix a crash in 64 bit CPUs + +diff --git a/src/protocols/ec_tcp.c b/src/protocols/ec_tcp.c +index ea0c997..be8f3e0 100644 +--- a/src/protocols/ec_tcp.c ++++ b/src/protocols/ec_tcp.c +@@ -116,7 +116,7 @@ FUNC_DECODER(decode_tcp) + tcp = (struct tcp_header *)DECODE_DATA; + + opt_start = (u_char *)(tcp + 1); +- opt_end = (u_char *)((int)tcp + tcp->off * 4); ++ opt_end = (u_char *)(tcp + tcp->off * 4); + + DECODED_LEN = (u_int32)(tcp->off * 4); + diff --git a/net-analyzer/ettercap/files/ettercap-0.7.3-as-needed.patch b/net-analyzer/ettercap/files/ettercap-0.7.3-as-needed.patch new file mode 100644 index 00000000..3a742109 --- /dev/null +++ b/net-analyzer/ettercap/files/ettercap-0.7.3-as-needed.patch @@ -0,0 +1,14 @@ +diff -uNr ettercap-NG-0.7.3.orig/src/Makefile.am ettercap-NG-0.7.3/src/Makefile.am +--- ettercap-NG-0.7.3.orig/src/Makefile.am 2006-04-03 19:33:36.000000000 +0100 ++++ ettercap-NG-0.7.3/src/Makefile.am 2006-04-03 19:35:09.000000000 +0100 +@@ -140,7 +140,9 @@ + ettercap_LDADD += interfaces/gtk/libec_gtk.a + endif + +-ettercap_LDFLAGS = -export-dynamic @EC_LIBS@ ++ettercap_LDADD += @EC_LIBS@ ++ ++ettercap_LDFLAGS = -export-dynamic + + CLEANFILES = *.log *.out core* missing/*.o *~ + diff --git a/net-analyzer/ettercap/files/ettercap-0.7.3-autotools.patch b/net-analyzer/ettercap/files/ettercap-0.7.3-autotools.patch new file mode 100644 index 00000000..6a7a0145 --- /dev/null +++ b/net-analyzer/ettercap/files/ettercap-0.7.3-autotools.patch @@ -0,0 +1,145 @@ +Index: ettercap-NG-0.7.3/configure.in +=================================================================== +--- ettercap-NG-0.7.3.orig/configure.in ++++ ettercap-NG-0.7.3/configure.in +@@ -20,7 +20,7 @@ dnl + dnl $Id: ettercap-0.7.3-autotools.patch,v 1.1 2010/12/01 06:04:16 flameeyes Exp $ + dnl + +-AC_INIT ++AC_INIT(ettercap, 0.7.3) + AC_CONFIG_SRCDIR([include/ec.h]) + + dnl Force autoconf 2.57 +@@ -32,16 +32,8 @@ dnl AM_INIT_AUTOMAKE(1.7.0) + dnl Do not recompile configure Makefile et similia + AM_MAINTAINER_MODE + +-VERSION=`grep EC_VERSION\ ./include/ec_version.h | cut -f2 -d"\""` +-SB=`./shtool echo -n -e %B` +-EB=`./shtool echo -n -e %b` +-AC_SUBST(SB) +-AC_SUBST(EB) +-AC_SUBST(VERSION) +-EC_MESSAGE(Configuring ettercap $VERSION) +- + AC_CONFIG_SRCDIR(src) +-AM_INIT_AUTOMAKE(ettercap, $VERSION) ++AM_INIT_AUTOMAKE([subdir-objects]) + + AC_CONFIG_HEADERS([include/config.h]) + dnl AC_CONFIG_HEADERS(include/config.h) +@@ -282,29 +274,18 @@ EC_MESSAGE(Checking for missing function + + AC_CONFIG_LIBOBJ_DIR(src/missing) + +-AM_CONDITIONAL(MISSING_STRLCPY, false) +-AM_CONDITIONAL(MISSING_STRLCAT, false) +-AM_CONDITIONAL(MISSING_STRSEP, false) +-AM_CONDITIONAL(MISSING_MEMMEM, false) +-AM_CONDITIONAL(MISSING_MEMCMP, false) +-AM_CONDITIONAL(MISSING_BASENAME, false) +-AM_CONDITIONAL(MISSING_GETOPT_LONG, false) +-AM_CONDITIONAL(MISSING_STRCASESTR, false) +-AM_CONDITIONAL(MISSING_INET_ATON, false) +-AM_CONDITIONAL(MISSING_SCANDIR, false) +- + dnl AC_REPLACE_FUNCS(strlcpy) + +-AC_CHECK_FUNCS([strlcpy], , [AC_LIBOBJ(missing/strlcpy) AM_CONDITIONAL(MISSING_STRLCPY, true)]) +-AC_CHECK_FUNCS([strlcat], , [AC_LIBOBJ(missing/strlcat) AM_CONDITIONAL(MISSING_STRLCAT, true)]) +-AC_CHECK_FUNCS([strsep], , [AC_LIBOBJ(missing/strsep) AM_CONDITIONAL(MISSING_STRSEP, true)]) +-AC_CHECK_FUNCS([memmem], , [AC_LIBOBJ(missing/memmem) AM_CONDITIONAL(MISSING_MEMMEM, true)]) +-AC_CHECK_FUNCS([memcmp], , [AC_LIBOBJ(missing/memcmp) AM_CONDITIONAL(MISSING_MEMCMP, true)]) +-AC_CHECK_FUNCS([basename], , [AC_LIBOBJ(missing/basename) AM_CONDITIONAL(MISSING_BASENAME, true)]) +-AC_CHECK_FUNCS([getopt_long], , [AC_LIBOBJ(missing/getopt) AM_CONDITIONAL(MISSING_GETOPT_LONG, true)]) +-AC_CHECK_FUNCS([strcasestr], , [AC_LIBOBJ(missing/strcasestr) AM_CONDITIONAL(MISSING_STRCASESTR, true)]) +-AC_CHECK_FUNCS([scandir], , [AC_LIBOBJ(missing/scandir) AM_CONDITIONAL(MISSING_SCANDIR, true)]) +-AC_CHECK_FUNCS([inet_aton], , [AC_LIBOBJ(missing/inet_aton) AM_CONDITIONAL(MISSING_INET_ATON, true)]) ++AC_CHECK_FUNCS([strlcpy], , [AC_LIBOBJ(strlcpy)]) ++AC_CHECK_FUNCS([strlcat], , [AC_LIBOBJ(strlcat)]) ++AC_CHECK_FUNCS([strsep], , [AC_LIBOBJ(strsep)]) ++AC_CHECK_FUNCS([memmem], , [AC_LIBOBJ(memmem)]) ++AC_CHECK_FUNCS([memcmp], , [AC_LIBOBJ(memcmp)]) ++AC_CHECK_FUNCS([basename], , [AC_LIBOBJ(basename)]) ++AC_CHECK_FUNCS([getopt_long], , [AC_LIBOBJ(getopt)]) ++AC_CHECK_FUNCS([strcasestr], , [AC_LIBOBJ(strcasestr)]) ++AC_CHECK_FUNCS([scandir], , [AC_LIBOBJ(scandir)]) ++AC_CHECK_FUNCS([inet_aton], , [AC_LIBOBJ(inet_aton)]) + + AC_CHECK_LIB(resolv, inet_aton, + AM_CONDITIONAL(INET_ATON_WANTS_RESOLV, true), +Index: ettercap-NG-0.7.3/utils/etterlog/Makefile.am +=================================================================== +--- ettercap-NG-0.7.3.orig/utils/etterlog/Makefile.am ++++ ettercap-NG-0.7.3/utils/etterlog/Makefile.am +@@ -30,32 +30,10 @@ etterlog_SOURCES = el_analyze.c \ + $(top_srcdir)/src/ec_passive.c \ + $(top_srcdir)/src/ec_strings.c \ + $(top_srcdir)/src/ec_format.c +- +-if MISSING_STRSEP +- etterlog_SOURCES += $(top_srcdir)/src/missing/strsep.c +-endif +-if MISSING_STRLCAT +- etterlog_SOURCES += $(top_srcdir)/src/missing/strlcat.c +-endif +-if MISSING_STRCASESTR +- etterlog_SOURCES += $(top_srcdir)/src/missing/strcasestr.c +-endif +-if MISSING_MEMMEM +- etterlog_SOURCES += $(top_srcdir)/src/missing/memmem.c +-endif +-if MISSING_BASENAME +- etterlog_SOURCES += $(top_srcdir)/src/missing/basename.c +-endif +-if MISSING_INET_ATON +- etterlog_SOURCES += $(top_srcdir)/src/missing/inet_aton.c +-endif +-if MISSING_GETOPT_LONG +- etterlog_SOURCES += $(top_srcdir)/src/missing/getopt.c +-endif + + etterlog_CFLAGS = @EC_CFLAGS@ + +-etterlog_LDADD = -lz @ICONVLIB@ ++etterlog_LDADD = -lz @ICONVLIB@ @LIBOBJS@ + + if INET_ATON_WANTS_RESOLV + etterlog_LDADD += -lresolv +Index: ettercap-NG-0.7.3/utils/etterfilter/Makefile.am +=================================================================== +--- ettercap-NG-0.7.3.orig/utils/etterfilter/Makefile.am ++++ ettercap-NG-0.7.3/utils/etterfilter/Makefile.am +@@ -26,22 +26,6 @@ etterfilter_SOURCES = ef_compiler.c \ + $(top_srcdir)/src/ec_strings.c + + noinst_HEADERS = ef_grammar.h +- +-if MISSING_STRSEP +- etterfilter_SOURCES += $(top_srcdir)/src/missing/strsep.c +-endif +-if MISSING_STRLCPY +- etterfilter_SOURCES += $(top_srcdir)/src/missing/strlcpy.c +-endif +-if MISSING_MEMMEM +- etterfilter_SOURCES += $(top_srcdir)/src/missing/memmem.c +-endif +-if MISSING_INET_ATON +- etterfilter_SOURCES += $(top_srcdir)/src/missing/inet_aton.c +-endif +-if MISSING_GETOPT_LONG +- etterfilter_SOURCES += $(top_srcdir)/src/missing/getopt.c +-endif + + etterfilter_CFLAGS = @EC_CFLAGS@ + +@@ -49,7 +33,7 @@ if BSD + etterfilter_CFLAGS += -pthread + endif + +-etterfilter_LDADD = ++etterfilter_LDADD = @LIBOBJS@ + + if INET_ATON_WANTS_RESOLV + etterfilter_LDADD += -lresolv diff --git a/net-analyzer/ettercap/files/ettercap-0.7.3-open_missing_mode.patch b/net-analyzer/ettercap/files/ettercap-0.7.3-open_missing_mode.patch new file mode 100644 index 00000000..03837fc9 --- /dev/null +++ b/net-analyzer/ettercap/files/ettercap-0.7.3-open_missing_mode.patch @@ -0,0 +1,12 @@ +diff -Naur ettercap-NG-0.7.3-orig/src/ec_log.c ettercap-NG-0.7.3-patch/src/ec_log.c +--- ettercap-NG-0.7.3-orig/src/ec_log.c 2004-09-30 16:01:45.000000000 +0000 ++++ ettercap-NG-0.7.3-patch/src/ec_log.c 2009-02-16 13:04:23.000000000 +0000 +@@ -190,7 +190,7 @@ + if (fd->cfd == NULL) + SEMIFATAL_ERROR("%s", gzerror(fd->cfd, &zerr)); + } else { +- fd->fd = open(filename, O_CREAT | O_TRUNC | O_RDWR | O_BINARY); ++ fd->fd = open(filename, O_CREAT | O_TRUNC | O_RDWR | O_BINARY, S_IRUSR | S_IWUSR); + if (fd->fd == -1) + SEMIFATAL_ERROR("Can't create %s: %s", filename, strerror(errno)); + } diff --git a/net-analyzer/ettercap/files/ettercap-BJA-cross-NS_GET32.diff b/net-analyzer/ettercap/files/ettercap-BJA-cross-NS_GET32.diff new file mode 100644 index 00000000..f9825a69 --- /dev/null +++ b/net-analyzer/ettercap/files/ettercap-BJA-cross-NS_GET32.diff @@ -0,0 +1,11 @@ +--- acinclude.m4.ori 2011-07-19 21:59:06.000000000 +0200 ++++ acinclude.m4 2011-07-19 21:59:26.000000000 +0200 +@@ -179,7 +179,7 @@ + [ + AC_CHECK_HEADERS(arpa/nameser.h) + AC_MSG_CHECKING(for NS_GET32) +- AC_TRY_RUN([ ++ AC_TRY_LINK([ + #include <arpa/nameser.h> + + int main() |