wireshark: forked, added sap plugin (SAP-Dissection-plug-in-for-Wireshark)

This commit is contained in:
Anton Bolshakov 2015-03-03 13:19:07 +00:00
parent 092945a590
commit 2a702a5c6e
7 changed files with 432 additions and 0 deletions

View file

@ -0,0 +1,7 @@
AUX wireshark-1.11.0-oldlibs.patch 776 SHA256 0b4b23ad3ce7022809187ce970733a4c6bdb9fed31099853b399498fde8dee66 SHA512 dde2cbfd839409c594562b71783204279c37697939d44ee56ce4966d7dd43d04ab5837bd51551c416ec789b56f8efd0016e6ecc2311af8b3109e987da301bef6 WHIRLPOOL 57fb7f67166440208c5fe023f8c7e62a4f860ae5fecf02df6e9b8b45fe31c999f7eeeee83914bbfc26c656c69bfceee75c94f9ac80c64ebd0c1d6db792b66665
AUX wireshark-1.11.3-gtk-deprecated-warnings.patch 1068 SHA256 0211d3f345617554add63f3101a548a990e26219b31b28003e4dbf607d38de88 SHA512 9ea643e8f707d9f9fe3ce61b875ae1828c77cd81c636423fc5572420fd3b103042e078f89541c5145db49f133828d333c55d1c2c3b9a162f0756051ef9d946b9 WHIRLPOOL b04cad3b70bc37b9cbc833227bdf9c32c17e67ad067902d3fb35f467fb76520546ecd508de1805ef810b76ebe4f0b686e483817c790cb4ede75c229505596502
AUX wireshark-1.6.13-ldflags.patch 230 SHA256 bb56440fb9de9ed480b992d202feac93a53003e9fa47869f54c6f2f30d315720 SHA512 c4a2c66e6ea9b523ca9f5a3e37411221f5aa630de07d7bf84633855ac44da60b3b493671e578dbfd67de94e87ab1c79203f9b80b57f9460f2a81ee39f58171b3 WHIRLPOOL ca20e190c7a8d7ca69c6d90cfb28f8f1c8896b6793b9a026567ec4df4f7080ca6424ab249d01754db1059891d32362444178272489b4425e895f3031a0e1e0f7
AUX wireshark-1.99.0-qt5.patch 2757 SHA256 79621949e1b0d99229e1a033b58f7a2c18cfb1afa0e4868d1ae91b7f372ced8f SHA512 e3e660db8711985e2522bd2e1fea7833781ce8b7d5e00489d50141ea9c3a1ee41105d5cdd48750fbee4437a5607ec7161c1f5a6cf40ea938ef16975183b28078 WHIRLPOOL e40f53957c9cb2f54cb2f1abb768c75e73cc7d5e26dd41613c9d0519306bdbd669d4712f5e4006a6369f80e97da6e47355936dc4d3320eb02b6902952e19d97d
AUX wireshark-1.99.1-sbc.patch 665 SHA256 c76afab0f03c59001df597948153bf76bbdc14da30a2de9e93831bed6dc6e898 SHA512 3e71c9ecfb07c96df8330b6a1fa959bde79bf7531f106b7f90acc59a82f3b1ec74ae1643b9b13cd6a642b25766996afa7083ac1daa2bada765134ae8846112a8 WHIRLPOOL 8b53a06ffa03579ed71a558cb475e05bb7152463123089cec80b3f00ae68bab02fcba2fa789471419175965be6af1604e8371b30b9dd04a5b967c995627a5517
DIST wireshark-1.12.3.tar.bz2 29211228 SHA256 69950b9dcb1a630982b5f680554d73d27ee0dc856fc6aeef88c8d04eb5ac33ea SHA512 370ae828a638edac378242a996b0279747a2f54689387fe415f1f66e267a4b52c71a1a369755f3eaa6a2db0e970913dab0b5d3704af3461aa9d7d64abb3a49c6 WHIRLPOOL 4152abb29cc02236449844526207c404628c24a680e059cf8352a8ba8d50003dffca606fca8bf3a157b9970a1fba6943e0d06f51afaa847c4103ebbcbc4aeb44
EBUILD wireshark-1.12.3.ebuild 6429 SHA256 48b344c58ee4f7781482a25c5c38fefde377a177814d60fdbfe17ff9606bb66c SHA512 0286b742c377d069adb040dc1061292fcce241e0676a30fbc4acf769cfab12fc81be94345d9f59c1ce29d6fc7b71fcefafb3a9b5a6382bcc07e95690164a35ec WHIRLPOOL 5f8d8f187edd5c4a809614df1d1409dd48869f64c1aeb6d38b096dbd335bfeb09fe3e991e9e570955cb2349e7daae4e612885d7f009c17cba6af490bc86d3e0e

View file

@ -0,0 +1,20 @@
--- a/epan/Makefile.am
+++ b/epan/Makefile.am
@@ -137,6 +137,7 @@
# Add the object files for missing routines, if any.
#
libwireshark_la_LIBADD = \
+ ${top_builddir}/wiretap/libwiretap.la ${top_builddir}/wsutil/libwsutil.la \
libwireshark_generated.la \
libwireshark_asmopt.la crypt/libairpdcap.la \
ftypes/libftypes.la dfilter/libdfilter.la dissectors/libdissectors.la \
@@ -144,8 +145,7 @@
wmem/libwmem.la $(wslua_lib) $(wspython_lib) @SOCKET_LIBS@ @NSL_LIBS@ \
@C_ARES_LIBS@ @ADNS_LIBS@ @LIBGCRYPT_LIBS@ @LIBGNUTLS_LIBS@ \
@KRB5_LIBS@ @SSL_LIBS@ @LIBSMI_LDFLAGS@ @GEOIP_LIBS@ \
- ${top_builddir}/wiretap/libwiretap.la @GLIB_LIBS@ \
- ${top_builddir}/wsutil/libwsutil.la -lm
+ @GLIB_LIBS@ -lm
libwireshark_la_DEPENDENCIES = \
libwireshark_generated.la \

View file

@ -0,0 +1,29 @@
--- a/configure.ac
+++ b/configure.ac
@@ -1491,26 +1491,6 @@
wireshark_man=""
fi
-if test "$have_gtk" = "yes" ; then
- # If we have GTK then add flags for it.
-
- CPPFLAGS="-DGDK_PIXBUF_DISABLE_DEPRECATED $CPPFLAGS"
- CPPFLAGS="-DGDK_DISABLE_DEPRECATED $CPPFLAGS"
- if test \( $gtk_config_major_version -eq 3 -a $gtk_config_minor_version -ge 10 \) ; then
- ## Allow use of deprecated & disable deprecated warnings if Gtk >= 3.10;
- ## The deprecations in Gtk 3.10 will not be fixed ...
- CPPFLAGS="-DGDK_DISABLE_DEPRECATION_WARNINGS $CPPFLAGS"
- else
- CPPFLAGS="-DGTK_DISABLE_DEPRECATED $CPPFLAGS"
- fi
- CPPFLAGS="-DGTK_DISABLE_SINGLE_INCLUDES $CPPFLAGS"
- if test ! \( $gtk_config_major_version -eq 2 -a $gtk_config_minor_version -lt 20 \) ; then
- # Enable GSEAL when building with GTK > 2.20
- # (Versions prior to 2.22 lacked some necessary accessors.)
- CPPFLAGS="-DGSEAL_ENABLE $CPPFLAGS"
- fi
-fi
-
# XXX - Is this really necessary? When we build with both Gtk+ and Qt it works...
if test "$use_glib_cflags" = "true"; then
# Use GLIB_CFLAGS

View file

@ -0,0 +1,14 @@
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -61,9 +61,9 @@
# "-R" here.
#
AC_DEFUN([AC_WIRESHARK_ADD_DASH_L],
-[$1="$$1 -L$2"
-case "$host_os" in
+[case "$host_os" in
solaris*)
+ $1="$$1 -L$2"
$1="$$1 -R$2"
;;
esac

View file

@ -0,0 +1,88 @@
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -2043,21 +2043,23 @@
# Try the Qt 5 version first.
# (And be prepared to add Qt6 at some point....)
#
- for modprefix in Qt5 Qt
- do
- pkg_config_module="${modprefix}$1"
- AC_MSG_CHECKING(for $pkg_config_module - version >= $min_qt_version)
- if $PKG_CONFIG --atleast-version $min_qt_version $pkg_config_module; then
- mod_version=`$PKG_CONFIG --modversion $pkg_config_module`
- AC_MSG_RESULT(yes (version $mod_version))
- Qt_CFLAGS="$Qt_CFLAGS `$PKG_CONFIG --cflags $pkg_config_module`"
- Qt_LIBS="$Qt_LIBS `$PKG_CONFIG --libs $pkg_config_module`"
- found_$1=yes
- break
- else
- AC_MSG_RESULT(no)
- fi
- done
+ if test "$with_qt5" = yes; then
+ modprefix=Qt5
+ else
+ modprefix=Qt
+ fi
+ pkg_config_module="${modprefix}$1"
+ AC_MSG_CHECKING(for $pkg_config_module - version >= $min_qt_version)
+ if $PKG_CONFIG --atleast-version $min_qt_version $pkg_config_module; then
+ mod_version=`$PKG_CONFIG --modversion $pkg_config_module`
+ AC_MSG_RESULT(yes (version $mod_version))
+ Qt_CFLAGS="$Qt_CFLAGS `$PKG_CONFIG --cflags $pkg_config_module`"
+ Qt_LIBS="$Qt_LIBS `$PKG_CONFIG --libs $pkg_config_module`"
+ found_$1=yes
+ break
+ else
+ AC_MSG_RESULT(no)
+ fi
if test "x$found_$1" = "xyes"; then
# Run Action-If-Found
--- a/configure.ac
+++ b/configure.ac
@@ -456,10 +456,15 @@
#
# GUI toolkit options
#
-AC_ARG_WITH([qt],
- AC_HELP_STRING( [--with-qt=@<:@yes/no@:>@],
+AC_ARG_WITH([qt4],
+ AC_HELP_STRING( [--with-qt4=@<:@yes/no@:>@],
+ [use Qt @<:@default=yes@:>@]),
+ with_qt4="$withval", with_qt4="unspecified")
+
+AC_ARG_WITH([qt5],
+ AC_HELP_STRING( [--with-qt5=@<:@yes/no@:>@],
[use Qt @<:@default=yes@:>@]),
- with_qt="$withval", with_qt="unspecified")
+ with_qt5="$withval", with_qt5="unspecified")
AC_ARG_WITH([gtk2],
AC_HELP_STRING( [--with-gtk2=@<:@yes/no@:>@],
@@ -1373,7 +1378,6 @@
AC_SUBST(GTK2_MIN_VERSION)
GTK3_MIN_VERSION=3.0.0
AC_SUBST(GTK3_MIN_VERSION)
-QT_MIN_VERSION=4.6.0
AC_SUBST(QT_MIN_VERSION)
# GTK+ and Qt checks; we require GTK+ $GTK2_MIN_VERSION or later or
# GTK3_MIN_VERSION or later or Qt $QT_MIN_VERSION or later.
@@ -1417,14 +1421,15 @@
if test "x$enable_wireshark" = "xyes"; then
if test "x$with_gtk2" = "xunspecified" -a \
"x$with_gtk3" = "xunspecified" -a \
- "x$with_qt" = "xunspecified"; then
+ "x$with_qt4" = "xunspecified" -a \
+ "x$with_qt5" = "xunspecified"; then
#
# No GUI toolkit was explicitly specified; pick Qt and GTK+ 3.
#
with_qt=yes
with_gtk3=yes
fi
- if test "x$with_qt" = "xyes"; then
+ if test "x$with_qt" = "xyes" || test "x$with_qt4" = "xyes" || test "x$with_qt5" = "xyes"; then
#
# Qt was specified; Make sure we have a C++ compiler.
#

View file

@ -0,0 +1,18 @@
--- a/configure.ac
+++ b/configure.ac
@@ -2731,7 +2731,14 @@
# Check Bluetooth SBC codec for RTP Player
# git://git.kernel.org/pub/scm/bluetooth/sbc.git
-PKG_CHECK_MODULES(SBC, sbc >= 1.0, [have_sbc=yes], [have_sbc=no])
+AC_ARG_WITH(sbc,
+ AC_HELP_STRING( [--with-sbc],
+ [add support for playing SBC]),
+ [if test "x$withval" = "xyes"; then
+ PKG_CHECK_MODULES(SBC, sbc >= 1.0, [have_sbc=yes], [have_sbc=no])
+ else
+ have_sbc=no
+ fi])
if (test "${have_sbc}" = "yes"); then
AC_DEFINE(HAVE_SBC, 1, [Define to support playing SBC by standalone BlueZ SBC library])
CFLAGS="$CFLAGS $(pkg-config sbc --cflags)"

View file

@ -0,0 +1,256 @@
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-analyzer/wireshark/wireshark-1.12.3.ebuild,v 1.10 2015/01/16 08:07:55 ago Exp $
EAPI=5
inherit autotools eutils fcaps multilib qt4-r2 user git-2
DESCRIPTION="A network protocol analyzer formerly known as ethereal"
HOMEPAGE="http://www.wireshark.org/"
SRC_URI="${HOMEPAGE}download/src/all-versions/${P}.tar.bz2"
LICENSE="GPL-2"
SLOT="0/${PV}"
KEYWORDS="alpha amd64 ~arm hppa ia64 ppc ppc64 sparc x86 ~x86-fbsd"
IUSE="
adns +caps crypt doc doc-pdf geoip +gtk3 ipv6 kerberos lua +netlink +pcap
portaudio +qt4 qt5 sap sbc selinux smi ssl zlib
"
if use sap; then
EGIT_REPO_URI="https://github.com/CoreSecurity/SAP-Dissection-plug-in-for-Wireshark.git"
EGIT_COMMIT="68cdc1141e32d0c45e184f04b231c2e236ab9f97"
EGIT_SOURCEDIR="${S}/plugins/sap/"
fi
REQUIRED_USE="
ssl? ( crypt )
?? ( qt4 qt5 )
"
GTK_COMMON_DEPEND="
x11-libs/gdk-pixbuf
x11-libs/pango
x11-misc/xdg-utils
"
CDEPEND="
>=dev-libs/glib-2.14:2
netlink? ( dev-libs/libnl:3 )
adns? ( >=net-dns/c-ares-1.5 )
crypt? ( dev-libs/libgcrypt:0 )
caps? ( sys-libs/libcap )
geoip? ( dev-libs/geoip )
gtk3? (
${GTK_COMMON_DEPEND}
x11-libs/gtk+:3
)
kerberos? ( virtual/krb5 )
lua? ( >=dev-lang/lua-5.1 )
pcap? ( net-libs/libpcap )
portaudio? ( media-libs/portaudio )
qt4? (
dev-qt/qtcore:4
dev-qt/qtgui:4[accessibility]
x11-misc/xdg-utils
)
qt5? (
dev-qt/qtcore:5
dev-qt/qtgui:5[accessibility]
dev-qt/qtprintsupport:5
dev-qt/qtwidgets:5
x11-misc/xdg-utils
)
sbc? ( media-libs/sbc )
smi? ( net-libs/libsmi )
ssl? ( net-libs/gnutls )
zlib? ( sys-libs/zlib !=sys-libs/zlib-1.2.4 )
"
# We need perl for `pod2html`. The rest of the perl stuff is to block older
# and broken installs. #455122
DEPEND="
${CDEPEND}
dev-lang/perl
!<virtual/perl-Pod-Simple-3.170
!<perl-core/Pod-Simple-3.170
doc? (
app-doc/doxygen
app-text/asciidoc
dev-libs/libxml2
dev-libs/libxslt
doc-pdf? ( dev-java/fop )
www-client/lynx
)
sys-devel/bison
sys-devel/flex
virtual/pkgconfig
"
RDEPEND="
${CDEPEND}
gtk3? ( virtual/freedesktop-icon-theme )
qt4? ( virtual/freedesktop-icon-theme )
qt5? ( virtual/freedesktop-icon-theme )
selinux? ( sec-policy/selinux-wireshark )
"
pkg_setup() {
enewgroup wireshark
}
src_prepare() {
epatch \
"${FILESDIR}"/${PN}-1.6.13-ldflags.patch \
"${FILESDIR}"/${PN}-1.11.0-oldlibs.patch \
"${FILESDIR}"/${PN}-1.11.3-gtk-deprecated-warnings.patch \
"${FILESDIR}"/${PN}-1.99.0-qt5.patch \
"${FILESDIR}"/${PN}-1.99.1-sbc.patch
use sap && epatch "${S}"/plugins/sap/wireshark.patch
epatch_user
eautoreconf
}
src_configure() {
local myconf
# Workaround bug #213705. If krb5-config --libs has -lcrypto then pass
# --with-ssl to ./configure. (Mimics code from acinclude.m4).
if use kerberos; then
case $(krb5-config --libs) in
*-lcrypto*)
ewarn "Kerberos was built with ssl support: linkage with openssl is enabled."
ewarn "Note there are annoying license incompatibilities between the OpenSSL"
ewarn "license and the GPL, so do your check before distributing such package."
myconf+=( "--with-ssl" )
;;
esac
fi
# Enable wireshark binary with any supported GUI toolkit (bug #473188)
if use gtk3 || use qt4 || use qt5; then
myconf+=( "--enable-wireshark" )
else
myconf+=( "--disable-wireshark" )
fi
use qt4 && export QT_MIN_VERSION=4.6.0
use qt5 && export QT_MIN_VERSION=5.3.0
# Hack around inability to disable doxygen/fop doc generation
use doc || export ac_cv_prog_HAVE_DOXYGEN=false
use doc-pdf || export ac_cv_prog_HAVE_FOP=false
# dumpcap requires libcap
# --disable-profile-build bugs #215806, #292991, #479602
econf \
$(use_enable ipv6) \
$(use_with adns c-ares) \
$(use_with caps libcap) \
$(use_with crypt gcrypt) \
$(use_with geoip) \
$(use_with gtk3) \
$(use_with kerberos krb5) \
$(use_with lua) \
$(use_with pcap dumpcap-group wireshark) \
$(use_with pcap) \
$(use_with portaudio) \
$(use_with qt4) \
$(use_with qt5) \
$(usex qt5 MOC=/usr/$(get_libdir)/qt5/bin/moc '') \
$(usex qt5 UIC=/usr/$(get_libdir)/qt5/bin/uic '') \
$(use_with sbc) \
$(use_with smi libsmi) \
$(use_with ssl gnutls) \
$(use_with zlib) \
$(usex netlink --with-libnl=3 --without-libnl) \
--disable-profile-build \
--disable-usr-local \
--disable-warnings-as-errors \
--sysconfdir="${EPREFIX}"/etc/wireshark \
--without-adns \
${myconf[@]}
}
src_compile() {
default
if use doc; then
use doc-pdf && addpredict "/root/.java"
emake -j1 -C docbook
fi
}
src_install() {
default
if use doc; then
dohtml -r docbook/{release-notes.html,ws{d,u}g_html{,_chunked}}
if use doc-pdf; then
insinto /usr/share/doc/${PF}/pdf/
doins docbook/{{developer,user}-guide,release-notes}-{a4,us}.pdf
fi
fi
# FAQ is not required as is installed from help/faq.txt
dodoc AUTHORS ChangeLog NEWS README{,.bsd,.linux,.macos,.vmware} \
doc/{randpkt.txt,README*}
# install headers
local wsheader
for wsheader in \
color.h \
config.h \
epan/*.h \
epan/crypt/*.h \
epan/dfilter/*.h \
epan/dissectors/*.h \
epan/ftypes/*.h \
epan/wmem/*.h \
register.h \
wiretap/*.h \
ws_symbol_export.h \
wsutil/*.h
do
insinto /usr/include/wireshark/$( dirname ${wsheader} )
doins ${wsheader}
done
#with the above this really shouldn't be needed, but things may be looking in wiretap/ instead of wireshark/wiretap/
insinto /usr/include/wiretap
doins wiretap/wtap.h
if use gtk3 || use qt4; then
local c d
for c in hi lo; do
for d in 16 32 48; do
insinto /usr/share/icons/${c}color/${d}x${d}/apps
newins image/${c}${d}-app-wireshark.png wireshark.png
done
done
fi
if use gtk3; then
domenu wireshark.desktop
fi
if use qt4; then
sed -e '/Exec=/s|wireshark|&-qt|g' wireshark.desktop > wireshark-qt.desktop || die
domenu wireshark-qt.desktop
fi
prune_libtool_files
}
pkg_postinst() {
# Add group for users allowed to sniff.
enewgroup wireshark
if use pcap; then
fcaps -o 0 -g wireshark -m 4710 -M 0710 \
cap_dac_read_search,cap_net_raw,cap_net_admin \
"${EROOT}"/usr/bin/dumpcap
fi
ewarn "NOTE: To capture traffic with wireshark as normal user you have to"
ewarn "add yourself to the wireshark group. This security measure ensures"
ewarn "that only trusted users are allowed to sniff your traffic."
}