[packages/dsniff] - added libdir patch (drop -Llibdir from linking without ugly sed calls) - added nolibs patch (drop
qboosh
qboosh at pld-linux.org
Sat May 23 17:22:44 CEST 2020
commit 96e20b5521d6417150fbf7dcbc5c195fecfe98c3
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sat May 23 17:23:16 2020 +0200
- added libdir patch (drop -Llibdir from linking without ugly sed calls)
- added nolibs patch (drop unnecessary -lnsl)
- release 29 (rebuild with libnet 1.2)
dsniff-libdir.patch | 60 +++++++++++++++++++++++++++++++++++++++++++++
dsniff-nolibs.patch | 13 ++++++++++
dsniff.spec | 70 ++++++++++++++++++++++++++++++++++-------------------
3 files changed, 118 insertions(+), 25 deletions(-)
---
diff --git a/dsniff.spec b/dsniff.spec
index 451ef07..b58507e 100644
--- a/dsniff.spec
+++ b/dsniff.spec
@@ -1,7 +1,7 @@
# TODO
-# - make R: mozilla-firefox something generic (it uses X11 and remote.c to find
+# - make R: firefox something generic (it uses X11 and remote.c to find
# browser window to send openURL(%s, %s) command there)
-%define rel 28
+%define rel 29
Summary: Network audit tools
Summary(pl.UTF-8): Narzędzia do kontroli sieci
Name: dsniff
@@ -12,6 +12,8 @@ Group: Networking/Utilities
Source0: http://www.monkey.org/~dugsong/dsniff/beta/%{name}-%{version}b1.tar.gz
# Source0-md5: 2f761fa3475682a7512b0b43568ee7d6
Patch0: debian.patch
+Patch1: %{name}-libdir.patch
+Patch2: %{name}-nolibs.patch
# ggsniff 1.2 from http://ggsniff.sourceforge.net/
#Patch3: %{name}-gg.patch
URL: http://www.monkey.org/~dugsong/dsniff/
@@ -20,17 +22,13 @@ BuildRequires: automake
BuildRequires: cpp
BuildRequires: db-devel
BuildRequires: glibc-static
-BuildRequires: libnet-devel
+BuildRequires: libnet-devel >= 1:1.1
BuildRequires: libnids-devel
BuildRequires: libpcap-devel
BuildRequires: openssl-devel >= 0.9.7d
BuildRequires: rpm >= 4.4.9-56
-%if "%{pld_release}" == "ac"
-BuildRequires: XFree86-devel
-%else
BuildRequires: xorg-lib-libX11-devel
BuildRequires: xorg-lib-libXmu-devel
-%endif
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
@@ -47,38 +45,38 @@ Summary: Network audit tools
Summary(pl.UTF-8): Narzędzia do kontroli sieci
Group: Networking/Utilities
Requires: %{name} = %{version}-%{release}
-%if "%{pld_release}" == "ac"
-Requires: mozilla-firefox
-%else
Requires: firefox
-%endif
%description webspy
-webspy sends URLs sniffed from a client to your local Mozilla browser
+webspy sends URLs sniffed from a client to your local Firefox browser
for display, updated in real-time (as the target surfs, your browser
-surfs along with them, automagically). Mozilla must be running on your
+surfs along with them, automagically). Firefox must be running on your
local X display ahead of time.
%description webspy -l pl.UTF-8
webspy przesyła podsłuchane URL-e do wyświetlenia w lokalnie
-uruchomionej przeglądarce Mozilla. Adresy są uaktualniane na bieżąco
-(a więc przegląda się strony równolegle z podsłuchiwanym). Mozilla
-musi być wcześniej uruchomiona na lokalnym serwerze X.
+uruchomionej przeglądarce Firefox. Adresy są uaktualniane na bieżąco
+(a więc przegląda się strony równolegle z podsłuchiwanym). Firefox
+musi być wcześniej uruchomiony na lokalnym serwerze X.
%prep
%setup -q
%patch0 -p1
-rm configure
+%patch1 -p1
+%patch2 -p1
+
+%{__rm} configure
%build
-%{__autoheader}
%{__aclocal}
%{__autoconf}
+%{__autoheader}
%configure \
--libdir=%{_datadir}/%{name}
-sed -i -e 's#-L/usr/lib64 # #g' -e 's#-L/usr/lib # #g' Makefile
-%{__make} libmissing.a all
+# don't build libmissing.a with progs in parallel
+%{__make} libmissing.a
+%{__make}
%install
rm -rf $RPM_BUILD_ROOT
@@ -91,14 +89,36 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
-%doc README*
-%attr(755,root,root) %{_sbindir}/[a-u]*
+%doc CHANGES LICENSE README TODO
+%attr(755,root,root) %{_sbindir}/arpspoof
+%attr(755,root,root) %{_sbindir}/dnsspoof
+%attr(755,root,root) %{_sbindir}/dsniff
+%attr(755,root,root) %{_sbindir}/filesnarf
+%attr(755,root,root) %{_sbindir}/macof
+%attr(755,root,root) %{_sbindir}/mailsnarf
+%attr(755,root,root) %{_sbindir}/msgsnarf
+%attr(755,root,root) %{_sbindir}/sshmitm
+%attr(755,root,root) %{_sbindir}/sshow
+%attr(755,root,root) %{_sbindir}/tcpkill
+%attr(755,root,root) %{_sbindir}/tcpnice
+%attr(755,root,root) %{_sbindir}/urlsnarf
%attr(755,root,root) %{_sbindir}/webmitm
%{_datadir}/%{name}
-%{_mandir}/man8/[a-u]*
-%{_mandir}/man8/webmitm*
+%{_mandir}/man8/arpspoof.8*
+%{_mandir}/man8/dnsspoof.8*
+%{_mandir}/man8/dsniff.8*
+%{_mandir}/man8/filesnarf.8*
+%{_mandir}/man8/macof.8*
+%{_mandir}/man8/mailsnarf.8*
+%{_mandir}/man8/msgsnarf.8*
+%{_mandir}/man8/sshmitm.8*
+%{_mandir}/man8/sshow.8*
+%{_mandir}/man8/tcpkill.8*
+%{_mandir}/man8/tcpnice.8*
+%{_mandir}/man8/urlsnarf.8*
+%{_mandir}/man8/webmitm.8*
%files webspy
%defattr(644,root,root,755)
%attr(755,root,root) %{_sbindir}/webspy
-%{_mandir}/man8/webspy*
+%{_mandir}/man8/webspy.8*
diff --git a/dsniff-libdir.patch b/dsniff-libdir.patch
new file mode 100644
index 0000000..056d5cc
--- /dev/null
+++ b/dsniff-libdir.patch
@@ -0,0 +1,60 @@
+--- dsniff-2.4/configure.in.orig 2020-05-23 16:39:43.240198026 +0200
++++ dsniff-2.4/configure.in 2020-05-23 16:57:33.264401208 +0200
+@@ -122,18 +122,17 @@
+ fi
+ ;;
+ esac ],
+-[ for dir in ${prefix}/BerkeleyDB.3.1 ${prefix}/BerkeleyDB.3.0 \
+- ${prefix}/BerkeleyDB ${prefix}/db ${prefix}; do
++[ for dir in ${prefix}; do
+ if test -f ${dir}/include/db_185.h; then
+ AC_DEFINE(HAVE_DB_185_H)
+ DBINC="-I${dir}/include"
+- DBLIB="-L${dir}/lib -ldb"
++ DBLIB="-ldb"
+ have_db=yes
+ break
+ elif test -f ${dir}/include/db.h; then
+ AC_DEFINE(HAVE_DB_H)
+ DBINC="-I${dir}/include"
+- DBLIB="-L${dir}/lib -ldb"
++ DBLIB="-ldb"
+ have_db=yes
+ break
+ fi
+@@ -190,7 +189,7 @@
+ esac ],
+ [ if test -f ${prefix}/include/pcap.h; then
+ PCAPINC="-I${prefix}/include"
+- PCAPLIB="-L${prefix}/lib -lpcap"
++ PCAPLIB="-lpcap"
+ elif test -f /usr/include/pcap/pcap.h; then
+ PCAPINC="-I/usr/include/pcap"
+ PCAPLIB="-lpcap"
+@@ -235,7 +234,7 @@
+ [ if test -f ${prefix}/include/libnet.h; then
+ CFLAGS="$CFLAGS `${prefix}/bin/libnet-config --defines`"
+ LNETINC="-I${prefix}/include"
+- LNETLIB="-L${prefix}/lib -lnet"
++ LNETLIB="-lnet"
+ elif test -f /usr/include/libnet.h; then
+ CFLAGS="$CFLAGS `libnet-config --defines`"
+ LNETLIB="-lnet"
+@@ -275,7 +274,7 @@
+ esac ],
+ [ if test -f ${prefix}/include/nids.h; then
+ NIDSINC="-I${prefix}/include"
+- NIDSLIB="-L${prefix}/lib -lnids"
++ NIDSLIB="-lnids"
+ elif test -f /usr/include/nids.h; then
+ NIDSLIB="-lnids"
+ else
+@@ -322,7 +321,7 @@
+ esac ],
+ [ if test -f ${prefix}/include/openssl/ssl.h; then
+ SSLINC="-I${prefix}/include"
+- SSLLIB="-L${prefix}/lib -lssl -lcrypto"
++ SSLLIB="-lssl -lcrypto"
+ elif test -f ${prefix}/ssl/include/openssl/ssl.h; then
+ SSLINC="-I${prefix}/ssl/include"
+ SSLLIB="-L${prefix}/ssl/lib -lssl -lcrypto"
diff --git a/dsniff-nolibs.patch b/dsniff-nolibs.patch
new file mode 100644
index 0000000..6ec6739
--- /dev/null
+++ b/dsniff-nolibs.patch
@@ -0,0 +1,13 @@
+--- dsniff-2.4/configure.in.orig 2020-05-23 16:59:52.793645313 +0200
++++ dsniff-2.4/configure.in 2020-05-23 17:12:59.582716244 +0200
+@@ -53,8 +53,8 @@
+ AC_CHECK_FUNCS(gethostname socket strdup strstr)
+ AC_CHECK_LIB(rpcsvc, xdr_fhstatus)
+ dnl XXX - Solaris sux.
+-AC_CHECK_LIB(socket, socket)
+-AC_CHECK_LIB(nsl, gethostbyname)
++AC_SEARCH_LIBS(socket, socket)
++AC_SEARCH_LIBS(gethostbyname, nsl)
+ dnl XXX - feh, everything except OpenBSD sux.
+ AC_CHECK_LIB(resolv, dn_expand)
+ AC_CHECK_LIB(resolv, __dn_expand)
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/dsniff.git/commitdiff/96e20b5521d6417150fbf7dcbc5c195fecfe98c3
More information about the pld-cvs-commit
mailing list