summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Fore <csfore@posteo.net>2023-12-12 21:37:23 -0500
committerSam James <sam@gentoo.org>2023-12-15 03:15:34 +0000
commitf69e68db135958c271d24c5bb9277671e2910605 (patch)
tree382a2b7656b41f0d5f4ed3eec1e0d1e93b6426c3 /net-analyzer/dsniff
parentapp-emacs/tablist: Stabilize 1.1 amd64, #919927 (diff)
downloadgentoo-f69e68db135958c271d24c5bb9277671e2910605.tar.gz
gentoo-f69e68db135958c271d24c5bb9277671e2910605.tar.bz2
gentoo-f69e68db135958c271d24c5bb9277671e2910605.zip
net-analyzer/dsniff: add 2.4_beta1_p31, fix GCC 14 compile
Patch attached fixes compilation on GCC 14 and some warnings about print formatting. Closes: https://bugs.gentoo.org/919503 Signed-off-by: Christopher Fore <csfore@posteo.net> Closes: https://github.com/gentoo/gentoo/pull/34258 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'net-analyzer/dsniff')
-rw-r--r--net-analyzer/dsniff/Manifest1
-rw-r--r--net-analyzer/dsniff/dsniff-2.4_beta1_p31.ebuild74
-rw-r--r--net-analyzer/dsniff/files/dsniff-2.4_beta1_p31-c99-fixes.patch36
3 files changed, 111 insertions, 0 deletions
diff --git a/net-analyzer/dsniff/Manifest b/net-analyzer/dsniff/Manifest
index cd9131c35ad9..f299e852f03d 100644
--- a/net-analyzer/dsniff/Manifest
+++ b/net-analyzer/dsniff/Manifest
@@ -1,2 +1,3 @@
DIST dsniff_2.4b1+debian-30.debian.tar.xz 30788 BLAKE2B 8605b1dcca36f626f31410d88d25a57e6661b57b941155cdbde951991b09fb2dd7c147b1fdd1a22eded1cf904c890317b1844a7829cd6e43fd2fc5defc79b5f3 SHA512 45ffe34fcd30cd1461a354891b9d5567038cc176dbfa79c67020075cd40ae09b7092954925019e583d0d69cae76a558049b489745454a8034ce3e9e832c58f64
+DIST dsniff_2.4b1+debian-31.debian.tar.xz 30848 BLAKE2B 46bdfa08170fbfbba35fcc67340fc35352ef276dd5e8e00a540da39d28364c3198198eefeb6b85cb05e74d3785fc61c7e8e58d6ce37e0b62e6018e4842d938ad SHA512 da927bb887db6761a07dc2460bdeb834b386ccc5b8aa50ebce804ee130f89379268412cddd83ad64cc763e98e2f42a7efc23b7ca77db59445533272cb408088f
DIST dsniff_2.4b1+debian.orig.tar.gz 130220 BLAKE2B e6953a5bfc5331b030e1a5335987c51fa4cf2c644fc4e7ac9aefe17f52373a1f66ccef36c5d9136542f68a475350138b1f3e501bc9494a0fd4988c7c5a7b2eef SHA512 09c3a864f112f81b8fdf93436886b14eb8f603ec751b13f18cf027307f24098c018eacf98b3ae353731a0cf6f1c9cacfafbb534a0db8b9f0cc793e7515c41b5a
diff --git a/net-analyzer/dsniff/dsniff-2.4_beta1_p31.ebuild b/net-analyzer/dsniff/dsniff-2.4_beta1_p31.ebuild
new file mode 100644
index 000000000000..f7cbbc6b9514
--- /dev/null
+++ b/net-analyzer/dsniff/dsniff-2.4_beta1_p31.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools toolchain-funcs
+
+MY_PV="${PV/_beta/b}"
+MY_PV="${MY_PV/_p*/}"
+MY_PV="$(ver_rs 1 '.' "${MY_PV}")"
+# 2.4_beta1_p30 -> 2.4beta1-30
+MY_DEB_PV="$(ver_cut 1-2)$(ver_cut 3-4)-$(ver_cut 6)"
+
+DESCRIPTION="A collection of tools for network auditing and penetration testing"
+HOMEPAGE="https://monkey.org/~dugsong/dsniff/"
+SRC_URI="mirror://debian/pool/main/${PN::1}/${PN}/${PN}_${MY_PV}+debian.orig.tar.gz
+ mirror://debian/pool/main/${PN::1}/${PN}/${PN}_${MY_PV}+debian-${PV/*_p}.debian.tar.xz"
+S="${WORKDIR}/${P/_beta1*/}"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="X"
+
+# There's a berkdb configure option but we get a build failure if
+# we try to disable it. Not clear how useful the package is
+# without it anyway.
+RDEPEND="net-libs/libpcap
+ >=net-libs/libnet-1.1.2.1-r1
+ >=net-libs/libnids-1.21
+ net-libs/libnsl:=
+ net-libs/libtirpc:=
+ dev-libs/openssl:=
+ >=sys-libs/db-4:=
+ X? ( x11-libs/libXmu )"
+DEPEND="${DEPEND}
+ net-libs/rpcsvc-proto"
+# Calls rpcgen during build
+BDEPEND="net-libs/rpcsvc-proto"
+
+PATCHES=(
+ "${WORKDIR}"/debian/patches/
+ "${FILESDIR}"/${PN}-2.4_beta1_p30-httppostfix.patch
+ "${FILESDIR}"/${PN}-2.4_beta1_p30-libdir-configure.patch
+ "${FILESDIR}"/${PN}-2.4_beta1_p30-respect-AR.patch
+ "${FILESDIR}"/${PN}-2.4_beta1_p31-c99-fixes.patch
+)
+
+src_prepare() {
+ default
+
+ mv configure.{in,ac} || die
+ eautoreconf
+}
+
+src_configure() {
+ tc-export AR
+
+ econf \
+ $(use_with X x)
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)"
+}
+
+src_install() {
+ emake install install_prefix="${D}"
+
+ dodir /etc/dsniff
+ cp "${ED}"/usr/share/dsniff/{dnsspoof.hosts,dsniff.{magic,services}} \
+ "${ED}"/etc/dsniff/ || die
+ dodoc CHANGES README TODO
+}
diff --git a/net-analyzer/dsniff/files/dsniff-2.4_beta1_p31-c99-fixes.patch b/net-analyzer/dsniff/files/dsniff-2.4_beta1_p31-c99-fixes.patch
new file mode 100644
index 000000000000..f77d21ea9510
--- /dev/null
+++ b/net-analyzer/dsniff/files/dsniff-2.4_beta1_p31-c99-fixes.patch
@@ -0,0 +1,36 @@
+# Gentoo bug: https://bugs.gentoo.org/919503
+
+diff --git a/tcpkill.c b/tcpkill.c
+index 1a64d40..de7ad00 100644
+--- a/tcpkill.c
++++ b/tcpkill.c
+@@ -19,6 +19,7 @@
+ #include <err.h>
+ #include <libnet.h>
+ #include <pcap.h>
++#include <inttypes.h>
+
+ #include "pcaputil.h"
+ #include "version.h"
+@@ -84,7 +85,7 @@ tcp_kill_cb(u_char *user, const struct pcap_pkthdr *pcap, const u_char *pkt)
+ if (libnet_write(l) < 0)
+ warn("write");
+
+- fprintf(stderr, "%s R %lu:%lu(0) win 0\n", ctext, seq, seq);
++ fprintf(stderr, "%s R %"PRIu32":%"PRIu32"(0) win 0\n", ctext, seq, seq);
+ }
+ }
+
+diff --git a/urlsnarf.c b/urlsnarf.c
+index f46ccf8..d57b9dd 100644
+--- a/urlsnarf.c
++++ b/urlsnarf.c
+@@ -341,7 +341,7 @@ main(int argc, char *argv[])
+ }
+
+ struct pcap_pkthdr *h;
+- u_char *d;
++ const u_char *d;
+ int rc;
+ while ((rc = pcap_next_ex(p, &h, &d)) == 1) {
+ tt = h->ts.tv_sec;