1 |
commit: 17e48ce1fb4274f1d358b7e37a5c08e7511fd260 |
2 |
Author: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Mar 2 17:04:28 2018 +0000 |
4 |
Commit: Andreas Hüttel <dilfridge <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Mar 2 17:31:28 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=17e48ce1 |
7 |
|
8 |
net-analyzer/dsniff: Get rid of libtirpc automagic and depend on it instead |
9 |
|
10 |
Closes: https://bugs.gentoo.org/370645 |
11 |
Package-Manager: Portage-2.3.24, Repoman-2.3.6 |
12 |
|
13 |
net-analyzer/dsniff/dsniff-2.4_beta1-r10.ebuild | 83 +++++++++++++++++++++++++ |
14 |
net-analyzer/dsniff/files/2.4_beta1-rpc.patch | 39 ++++++++++++ |
15 |
2 files changed, 122 insertions(+) |
16 |
|
17 |
diff --git a/net-analyzer/dsniff/dsniff-2.4_beta1-r10.ebuild b/net-analyzer/dsniff/dsniff-2.4_beta1-r10.ebuild |
18 |
new file mode 100644 |
19 |
index 00000000000..6cf8570555a |
20 |
--- /dev/null |
21 |
+++ b/net-analyzer/dsniff/dsniff-2.4_beta1-r10.ebuild |
22 |
@@ -0,0 +1,83 @@ |
23 |
+# Copyright 1999-2018 Gentoo Foundation |
24 |
+# Distributed under the terms of the GNU General Public License v2 |
25 |
+ |
26 |
+EAPI=6 |
27 |
+inherit autotools toolchain-funcs |
28 |
+ |
29 |
+DESCRIPTION="A collection of tools for network auditing and penetration testing" |
30 |
+HOMEPAGE="http://monkey.org/~dugsong/dsniff/" |
31 |
+SRC_URI=" |
32 |
+ http://monkey.org/~dugsong/${PN}/beta/${P/_beta/b}.tar.gz |
33 |
+ mirror://debian/pool/main/d/${PN}/${PN}_2.4b1+debian-22.1.debian.tar.gz |
34 |
+" |
35 |
+LICENSE="BSD" |
36 |
+ |
37 |
+SLOT="0" |
38 |
+KEYWORDS="~amd64 ~ppc ~x86" |
39 |
+IUSE="libressl X" |
40 |
+ |
41 |
+DEPEND="net-libs/libpcap |
42 |
+ >=net-libs/libnet-1.1.2.1-r1 |
43 |
+ >=net-libs/libnids-1.21 |
44 |
+ net-libs/libnsl:0= |
45 |
+ net-libs/libtirpc |
46 |
+ net-libs/rpcsvc-proto |
47 |
+ !libressl? ( dev-libs/openssl:0= ) |
48 |
+ libressl? ( dev-libs/libressl:0= ) |
49 |
+ >=sys-libs/db-4:* |
50 |
+ X? ( x11-libs/libXmu )" |
51 |
+RDEPEND="${DEPEND}" |
52 |
+ |
53 |
+S="${WORKDIR}/${P/_beta1/}" |
54 |
+ |
55 |
+src_prepare() { |
56 |
+ # replace Debian patch 23 with a simpler one (bug #506076) |
57 |
+ mv -v \ |
58 |
+ "${WORKDIR}"/debian/patches/23_urlsnarf_timestamp.patch{,.old} || die |
59 |
+ cp -v \ |
60 |
+ "${FILESDIR}"/${PV}-urlsnarf-pcap_timestamps.patch \ |
61 |
+ "${WORKDIR}"/debian/patches/23_urlsnarf_timestamp.patch || die |
62 |
+ |
63 |
+ # Debian patchset, needs to be applied in the exact order that "series" |
64 |
+ # lists or patching will fail. |
65 |
+ # Bug #479882 |
66 |
+ eapply $( |
67 |
+ for file in $(< "${WORKDIR}"/debian/patches/series ); do |
68 |
+ printf "%s/debian/patches/%s " "${WORKDIR}" "${file}" |
69 |
+ done |
70 |
+ ) |
71 |
+ |
72 |
+ # Bug 125084 |
73 |
+ eapply "${FILESDIR}"/${PV}-httppostfix.patch |
74 |
+ |
75 |
+ # various Makefile.in patches |
76 |
+ eapply "${FILESDIR}"/${PV}-make.patch |
77 |
+ |
78 |
+ # bug #538462 |
79 |
+ eapply "${FILESDIR}"/${PV}-macof-size-calculation.patch |
80 |
+ |
81 |
+ # libtirpc support |
82 |
+ eapply "${FILESDIR}"/${PV}-rpc.patch |
83 |
+ |
84 |
+ default |
85 |
+ eautoreconf |
86 |
+} |
87 |
+ |
88 |
+src_configure() { |
89 |
+ econf \ |
90 |
+ --with-libtirpc \ |
91 |
+ $(use_with X x) \ |
92 |
+ || die "econf failed" |
93 |
+} |
94 |
+ |
95 |
+src_compile() { |
96 |
+ emake CC="$(tc-getCC)" |
97 |
+} |
98 |
+ |
99 |
+src_install() { |
100 |
+ emake install install_prefix="${D}" |
101 |
+ dodir /etc/dsniff |
102 |
+ cp "${D}"/usr/share/dsniff/{dnsspoof.hosts,dsniff.{magic,services}} \ |
103 |
+ "${D}"/etc/dsniff/ || die |
104 |
+ dodoc CHANGES README TODO |
105 |
+} |
106 |
|
107 |
diff --git a/net-analyzer/dsniff/files/2.4_beta1-rpc.patch b/net-analyzer/dsniff/files/2.4_beta1-rpc.patch |
108 |
new file mode 100644 |
109 |
index 00000000000..b43c91d9581 |
110 |
--- /dev/null |
111 |
+++ b/net-analyzer/dsniff/files/2.4_beta1-rpc.patch |
112 |
@@ -0,0 +1,39 @@ |
113 |
+--- a/Makefile.in |
114 |
++++ b/Makefile.in |
115 |
+@@ -37,8 +37,8 @@ |
116 |
+ X11INC = @X_CFLAGS@ |
117 |
+ X11LIB = @X_LIBS@ @X_PRE_LIBS@ -lXmu -lX11 @X_EXTRA_LIBS@ |
118 |
+ |
119 |
+-INCS = -I. $(X11INC) -I$(srcdir)/missing |
120 |
+-LIBS = @LIBS@ -L$(srcdir) -lmissing |
121 |
++INCS = -I. $(X11INC) -I$(srcdir)/missing @RPC_CFLAGS@ |
122 |
++LIBS = @LIBS@ -L$(srcdir) -lmissing @RPC_LIBS@ |
123 |
+ |
124 |
+ INSTALL = @INSTALL@ |
125 |
+ INSTALL_PROGRAM = @INSTALL_PROGRAM@ |
126 |
+--- a/configure.in |
127 |
++++ b/configure.in |
128 |
+@@ -337,4 +337,23 @@ |
129 |
+ AC_SUBST(SSLINC) |
130 |
+ AC_SUBST(SSLLIB) |
131 |
+ |
132 |
++AC_ARG_WITH([libtirpc], |
133 |
++ AS_HELP_STRING([--with-libtirpc], [Use libtirpc as RPC implementation (instead of sunrpc)]), |
134 |
++ [], [ with_libtirpc=no ]) |
135 |
++ |
136 |
++AS_IF([test "x$with_libtirpc" != xno], |
137 |
++ [PKG_CHECK_MODULES([TIRPC], |
138 |
++ [libtirpc], |
139 |
++ [RPC_CFLAGS=$TIRPC_CFLAGS; RPC_LIBS=$TIRPC_LIBS;], |
140 |
++ [AC_MSG_ERROR([libtirpc requested, but library not found.])] |
141 |
++ )], |
142 |
++ [AC_CHECK_HEADER(rpc/rpc.h, |
143 |
++ [RPC_CFLAGS=""; RPC_LIBS="";], |
144 |
++ [AC_MSG_ERROR([sunrpc requested, but headers are not present.])] |
145 |
++ )] |
146 |
++) |
147 |
++ |
148 |
++AC_SUBST(RPC_CFLAGS) |
149 |
++AC_SUBST(RPC_LIBS) |
150 |
++ |
151 |
+ AC_OUTPUT(Makefile) |