summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Roovers <jer@gentoo.org>2012-08-02 15:21:15 +0000
committerJeroen Roovers <jer@gentoo.org>2012-08-02 15:21:15 +0000
commit3df8ede0b8f8c481c3eb0723020d799884a2c59d (patch)
treed08c72c8a0a6719ff593cca7b9174b427dd4f303 /net-analyzer
parentUpstream patch for inconsistent typecasts with libpng14 and above wrt securit... (diff)
downloadhistorical-3df8ede0b8f8c481c3eb0723020d799884a2c59d.tar.gz
historical-3df8ede0b8f8c481c3eb0723020d799884a2c59d.tar.bz2
historical-3df8ede0b8f8c481c3eb0723020d799884a2c59d.zip
Use Opera mirrors for final 12.01.
Package-Manager: portage-2.2.0_alpha120/cvs/Linux x86_64
Diffstat (limited to 'net-analyzer')
-rw-r--r--net-analyzer/wireshark/ChangeLog10
-rw-r--r--net-analyzer/wireshark/Manifest18
-rw-r--r--net-analyzer/wireshark/wireshark-1.6.9-r1.ebuild217
-rw-r--r--net-analyzer/wireshark/wireshark-1.8.1-r1.ebuild212
-rw-r--r--net-analyzer/wireshark/wireshark-1.8.1.ebuild4
5 files changed, 448 insertions, 13 deletions
diff --git a/net-analyzer/wireshark/ChangeLog b/net-analyzer/wireshark/ChangeLog
index 8f4fb9bab7c2..983bbbeb8146 100644
--- a/net-analyzer/wireshark/ChangeLog
+++ b/net-analyzer/wireshark/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for net-analyzer/wireshark
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-analyzer/wireshark/ChangeLog,v 1.368 2012/07/30 05:24:24 jdhore Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/wireshark/ChangeLog,v 1.369 2012/08/02 15:21:15 jer Exp $
+
+*wireshark-1.8.1-r1 (02 Aug 2012)
+*wireshark-1.6.9-r1 (02 Aug 2012)
+
+ 02 Aug 2012; Jeroen Roovers <jer@gentoo.org> +wireshark-1.6.9-r1.ebuild,
+ +wireshark-1.8.1-r1.ebuild:
+ Fix dumpcap crash on hardened systems reported by Alex Efros, patch by lynx
+ (bug #379369).
30 Jul 2012; Jeff Horelick <jdhore@gentoo.org> wireshark-1.6.9.ebuild,
wireshark-1.8.1.ebuild:
diff --git a/net-analyzer/wireshark/Manifest b/net-analyzer/wireshark/Manifest
index 57e1bac9a1bb..85b4ca09855d 100644
--- a/net-analyzer/wireshark/Manifest
+++ b/net-analyzer/wireshark/Manifest
@@ -1,23 +1,21 @@
-----BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA512
+Hash: SHA256
AUX wireshark-1.6.6-gtk-pcap.patch 841 SHA256 862c301f450fcb775e3bd907e5a6ca667b5a11b819768b66a7c848c2c3c90d8a SHA512 0ed1bce8b57942de72ee0a8d78ef7cc345ffea512248fa65acd4e8386a5aa61dde14663090578c78f3eee88c7966e8d40aa6d3dce13146c2adf5ed8ded019253 WHIRLPOOL a45a3d04c9823eb149174fbbaaeb5437e525d77da962aa627509941da3119e87d4eef26cb06b1d3534356c4fd1d4bf31bc102dbf8b3f69994a19dba8d730d05f
DIST wireshark-1.6.8.tar.bz2 21967111 SHA256 d4fbaffa4fd32543ed1d03b3097bf89a7d492e6d02e9bf8f8aa8a71281f3057f SHA512 1f2eae0b94632f0bc37dbab16afdba711e1b3c8b059390645c38523d114b2c2908ccd0c396fc0c3b89be8b6fb8a314fee7b1e16c57ce05e98bf88d923b55fc78 WHIRLPOOL b46571b9cf33d35158ef95c0df65fb4941ab2097d687ebc21501ca4f46bed176b91893adb910a884a16c1054d2be9cb52c68f4f552871a81c91c3618fec811f4
DIST wireshark-1.6.9.tar.bz2 22012780 SHA256 38d4dd9848ec2de5a16bf6706291f93b073e7521afacd669803f497d8d23991a SHA512 9f856f3ab3c95dda9750be8b4fe8c5a714db7f72794321b755fb61f97c409af957aafc84c2b45bd6cd0ea5b31142ab14a37ab4591e2d4becf16d328ff3604cea WHIRLPOOL 664d83872736cad73fef788fa2dd0e480531e3c8a0772495db232a8e6ba7addf648d135fabde50612a97e9b188bdbee92f27fa1f8c0ae355d8c6876dce66a5e5
DIST wireshark-1.8.1.tar.bz2 24125571 SHA256 5966a3e23d34972eb35433ae8198fccf1945617f71b89c1af26dada9f342feb7 SHA512 fec2212ca6c0b50b84f0642160b4685c5aa9e06677b68fa1103dbbd7dd684bfdc00330b2444a8805169e9fc88866707cf2b0dee45207e7f91ac40f7bcefb6faa WHIRLPOOL 1343b68fd95cb55f6445e09f38cd1b8f9b93d5a05146ea8937609f9d97be4b1fb4a45ff68aaa1885fd753d889b81f31422b5a96517eb72fd72d29e24f90745b6
EBUILD wireshark-1.6.8.ebuild 6453 SHA256 45983c22afd371ca12b7cfaaa7b8657bb2c661ecc78c7d639cd8f7067e73670d SHA512 ab98125603ada0828444414b8807760e4f5bf009547fe58110ba6cf3ff981df18bd34e7d17605ac11fdbd592a8ef9e0b5a1985775dbea11ea750b3aaedb9b6fe WHIRLPOOL 500f699b5f8d84c85cb2422745a95e2a47cdf7915cb030ea5d688a1cd2a772c9060b8058ee577eecfde2a9bfb4e2dcbe1c380fd113621cd9240e1db82d964110
+EBUILD wireshark-1.6.9-r1.ebuild 6480 SHA256 7b5a16793cbc74e3e3925316f79dd0fa801b59bca2677c47acd2e5d6d0dc3706 SHA512 fbd3d5f37b47558297f4c04bd44c15be093b741604ec64314441023621ee85308bf9b1f270742ab24276c5b42d65b2c1945dfb203ec3e17976bf68e85d2d53ec WHIRLPOOL 80ff8c299783e08d2c5133f2705734f53c2d48804252a5addd41a2051936b11741e56dbcd6a27f56dea1eec7788b422bf6a035e081e2a8551b55337328eb994e
EBUILD wireshark-1.6.9.ebuild 6457 SHA256 b2b6c3c71f35875d199a349d9d0d800cf190968fbbe75e332cc8ddcc7b03847a SHA512 208e3c518ea5b864e40733825d55dd2877b2f31ded55ccbf58eb59961c6953811d0a734b6c508087831965285a0e66487d16b122dcad55bfda84f0fc99d25d8a WHIRLPOOL 1242745910cdd1a009e74643f6349d54684b76c463168175ea10fa4770902ef550d33fa318db8140c79498602e4c7116ed13b623b1c1b3c93f4dbd39118f6ac3
-EBUILD wireshark-1.8.1.ebuild 6269 SHA256 c2e228145a375bb2d024ec504f976b21d127596581949259040b6eb4285ea29d SHA512 500a7dbf2c2d713412b19cc8189f54db56d29407e242e80ed8c2b74a6925c63f74f87f32e9de495971f9c9b9a7b5de5e19075141f54ab58be5578aa4e5a5b0ab WHIRLPOOL b6436d78b4e3a3f825bbb6b4fc6f3c08d2657c1cf685689e359fa5e3b4256ca87ce41266b3bb0f97d9d1ceb22e07257d0838fd517bd20aa761eca259433bc135
-MISC ChangeLog 53172 SHA256 dc1d43bbf64ed4e8b8a00cd392226ec2f422b4c4339bd3e044a1187095afe222 SHA512 1ff05bf7b6758dc3e304c34088a946bea5c5c0d935e0bbbad4f2f2972069dabf608162dd0c0d4612ec036599e56bf51daa26329b332c1cfbfe916ff272d8242c WHIRLPOOL 0d27b173c9e9ec4aaa6dd1e8f0595606a4e78ecd810bc851f713d60cf3aebeadabe142a011c3258b78ec3db1567b555c25693a1d1fb4a9a6d46c408cd11a95e4
+EBUILD wireshark-1.8.1-r1.ebuild 6282 SHA256 ba1fd029ded0d3666b210383291960e4443e8e45fc2548e0ac572b5651158e27 SHA512 f41a68540c162f60513700abbfebb0d93b4a65b0ce3b73245d13c810186d16bc77b33d5f2a2fad1af060006923dccffa9cd85641cf0143cc09dc9dba3bcfdb46 WHIRLPOOL b707a2e8c9c063480a4466cc97a1bbecdd683a0d8c64054390467649a6d112312696a4321716300ea1ee3e6dca45a18048a8f9dcc1f5c4f2ec7cab3052ce7971
+EBUILD wireshark-1.8.1.ebuild 6256 SHA256 a9aea6db858b460ba40a8a8707f3da5bd5485b21ae44729cfb4786bf5da4f017 SHA512 539be34e984c590292ce80378439ccb2fc5f74e8bac7b6ff8ab164fe2c36d779bedfb2989c00ae3032217106d370421f572bd4235e4d1670f2cf562139a4c588 WHIRLPOOL 1f7669abb5c977163bc9f338413695268cb26fce74234eb57baecde01ea243a2b03e39d6e899d31c07599ad6be701336f5a09db0ba8ef2546bf31e8081e107a6
+MISC ChangeLog 53439 SHA256 327c8f3e0a1d3f6d6bde92d78f06e8342a4c8c948b0667275d2e9c355c9a1583 SHA512 0a09841a7a2eb7afbe3a37a6bad51d55f8b526fe2f2b6e75bed2569e423e945da5b49bb0f5d099afeca4e4a2421b6cd6875ed516cc85364f112ca533f2b3aade WHIRLPOOL d27ae97fd62bf4eeca262138f197b08a47f6f9df59639df0188f939fa6ffa2efede5600a15615c75cb6cd05c781a82c13fc971ca05b2765e75b23b29b9595926
MISC metadata.xml 2400 SHA256 76f9bbd8fe91ac408781d92cd721b859e0c28fb9b645d48b7455d98320df8f30 SHA512 53cead1f63742ea915183e0d9d44776651f365a973884cf52525b181613a0ca4c2905e73597c228b637b633fa5e05a0331f6f91ca3e9c86991178dec3045412f WHIRLPOOL 98c5773fe59eb96e4f34ef7fc3e0ced2af1f28fd69be635c8afc6a95becc80c8f1a099d49486f9931dd7b7aa5d46672b97dfdb4dd3d0352ed23f8a94bd02b0ec
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
-iQEcBAEBCgAGBQJQFhqOAAoJEPUd7O0j6ekA3QMH/3H7FkWDx9S3n09Rk+pcubHv
-P9RsTgXDB2zpZKmQXHjl0ymMAdz1II9S44s+r8E8nQnh6wimBvyQ5F/sbVfCM6gf
-W4+PW3bHoC0QKz+fz8V0c6kJupbNLyzbhz8KZlv0eQKzh2JRC7tQeKjgt1a+zZm1
-OC4mcidbi+dKhfOsXfPTSQkGo6fPvhE0qgpMmcWfl5szLVHzt88J3Lp/EXVaRRfq
-+In6vKuCjXUa3Tl8afLYqPZ8MLhj6qJYtBdVjhdKm5SVkPAMiN2walb1+vnKQps+
-NwyseDTOej396HnLdfJZkGksAObry2JcmmBje2U52N2aYidKRr+xkr3NDeU2nDg=
-=ZKx5
+iEYEAREIAAYFAlAamvEACgkQVWmRsqeSphPZzACbBu0+ewLeeNZMeXkmv5W/AQIS
++igAoIECf7YEmJGzTKEleCMDf9CEKOxg
+=6fHc
-----END PGP SIGNATURE-----
diff --git a/net-analyzer/wireshark/wireshark-1.6.9-r1.ebuild b/net-analyzer/wireshark/wireshark-1.6.9-r1.ebuild
new file mode 100644
index 000000000000..44197f35d27c
--- /dev/null
+++ b/net-analyzer/wireshark/wireshark-1.6.9-r1.ebuild
@@ -0,0 +1,217 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/wireshark/wireshark-1.6.9-r1.ebuild,v 1.1 2012/08/02 15:21:15 jer Exp $
+
+EAPI="3"
+PYTHON_DEPEND="python? 2"
+inherit eutils flag-o-matic python toolchain-funcs user
+
+[[ -n ${PV#*_rc} && ${PV#*_rc} != ${PV} ]] && MY_P=${PN}-${PV/_} || MY_P=${P}
+DESCRIPTION="A network protocol analyzer formerly known as ethereal"
+HOMEPAGE="http://www.wireshark.org/"
+SRC_URI="http://www.wireshark.org/download/src/all-versions/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
+IUSE="adns ares doc doc-pdf gtk ipv6 lua gcrypt geoip kerberos
+profile +pcap portaudio python +caps selinux smi ssl threads zlib"
+
+RDEPEND=">=dev-libs/glib-2.14:2
+ zlib? ( sys-libs/zlib
+ !=sys-libs/zlib-1.2.4 )
+ smi? ( net-libs/libsmi )
+ gtk? ( >=x11-libs/gtk+-2.4.0:2
+ x11-libs/pango
+ dev-libs/atk
+ x11-misc/xdg-utils )
+ ssl? ( <net-libs/gnutls-3 )
+ gcrypt? ( dev-libs/libgcrypt )
+ pcap? ( net-libs/libpcap )
+ caps? ( sys-libs/libcap )
+ kerberos? ( virtual/krb5 )
+ portaudio? ( media-libs/portaudio )
+ ares? ( >=net-dns/c-ares-1.5 )
+ !ares? ( adns? ( net-libs/adns ) )
+ geoip? ( dev-libs/geoip )
+ lua? ( >=dev-lang/lua-5.1 )
+ selinux? ( sec-policy/selinux-wireshark )"
+
+DEPEND="${RDEPEND}
+ doc? ( dev-libs/libxslt
+ dev-libs/libxml2
+ app-doc/doxygen
+ doc-pdf? ( dev-java/fop ) )
+ virtual/pkgconfig
+ dev-lang/perl
+ sys-devel/bison
+ sys-apps/sed
+ sys-devel/flex
+ !!<net-analyzer/wireshark-1.6.0_rc1"
+
+S=${WORKDIR}/${MY_P}
+
+# borrowed from GSoC2010_Gentoo_Capabilities by constanze and flameyeys
+# @FUNCTION: fcaps
+# @USAGE: fcaps {uid:gid} {file-mode} {cap1[,cap2,...]} {file}
+# @RETURN: 0 if all okay; non-zero if failure and fallback
+# @DESCRIPTION:
+# fcaps sets the specified capabilities in the effective and permitted set of
+# the given file. In case of failure fcaps sets the given file-mode.
+fcaps() {
+ local uid_gid=$1
+ local perms=$2
+ local capset=$3
+ local path=$4
+ local res
+
+ chmod $perms $path && \
+ chown $uid_gid $path
+ res=$?
+
+ use caps || return $res
+
+ #set the capability
+ setcap "$capset=ep" "$path" &> /dev/null
+ #check if the capabilitiy got set correctly
+ setcap -v "$capset=ep" "$path" &> /dev/null
+ res=$?
+
+ if [ $res -ne 0 ]; then
+ ewarn "Failed to set capabilities. Probable reason is missed kernel support."
+ ewarn "Kernel must have <FS>_FS_SECURITY enabled where <FS> is the filesystem"
+ ewarn "to store ${path} (e.g. EXT3_FS_SECURITY). For kernels version before"
+ ewarn "2.6.33_rc1 SECURITY_FILE_CAPABILITIES must be enabled as well."
+ ewarn
+ ewarn "Falling back to suid now..."
+ chmod u+s ${path}
+ fi
+ return $res
+}
+
+pkg_setup() {
+ if ! use gtk; then
+ ewarn "USE=-gtk disables gtk-based gui called wireshark."
+ ewarn "Only command line utils will be built available"
+ fi
+ if use python; then
+ python_set_active_version 2
+ python_pkg_setup
+ fi
+ # Add group for users allowed to sniff.
+ enewgroup wireshark
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.6.6-gtk-pcap.patch
+}
+
+src_configure() {
+ local myconf
+
+ if [[ $(gcc-major-version) -lt 3 ||
+ ( $(gcc-major-version) -eq 3 &&
+ $(gcc-minor-version) -le 4 ) ]] ; then
+ die "Unsupported compiler version, please upgrade."
+ fi
+
+ if use ares && use adns; then
+ elog "You asked for both, ares and adns, but we can use only one of them."
+ elog "c-ares supersedes adns resolver thus using c-ares (ares USE flag)."
+ myconf="$(use_with ares c-ares) --without-adns"
+ else
+ myconf="$(use_with adns) $(use_with ares c-ares)"
+ fi
+
+ # profile and pie are incompatible #215806, #292991
+ if use profile; then
+ ewarn "You've enabled the 'profile' USE flag, building PIE binaries is disabled."
+ ewarn "Also ignore \"unrecognized option '-nopie'\" gcc warning #358101."
+ append-flags $(test-flags-CC -nopie)
+ fi
+
+ # 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
+
+ # 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, setuid-install requires dumpcap
+ econf $(use_enable gtk wireshark) \
+ $(use_enable profile profile-build) \
+ $(use_with ssl gnutls) \
+ $(use_with gcrypt) \
+ $(use_enable ipv6) \
+ $(use_enable threads) \
+ $(use_with lua) \
+ $(use_with kerberos krb5) \
+ $(use_with smi libsmi) \
+ $(use_with zlib) \
+ $(use_with geoip) \
+ $(use_with portaudio) \
+ $(use_with python) \
+ $(use_with caps libcap) \
+ $(use_with pcap) \
+ $(use_with pcap dumpcap-group wireshark) \
+ $(use pcap && use_enable caps setcap-install) \
+ $(use pcap && use_enable !caps setuid-install) \
+ --sysconfdir="${EPREFIX}"/etc/wireshark \
+ --disable-extra-gcc-checks \
+ ${myconf}
+}
+
+src_compile() {
+ emake || die
+ use doc && cd docbook && { emake || die; }
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+ 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 || die
+ 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*}
+
+ insinto /usr/include/wiretap
+ doins wiretap/wtap.h || die
+
+ if use gtk; then
+ 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
+ domenu wireshark.desktop || die
+ fi
+ use pcap && chmod o-x "${ED}"/usr/bin/dumpcap #357237
+}
+
+pkg_postinst() {
+ if use caps && use pcap; then
+ fcaps 0:wireshark 550 cap_dac_read_search,cap_net_raw,cap_net_admin "${EROOT}"/usr/bin/dumpcap
+ fi
+ echo
+ ewarn "NOTE: To run wireshark as normal user you have to add yourself to"
+ ewarn "the wireshark group. This security measure ensures that only trusted"
+ ewarn "users are allowed to sniff your traffic."
+ echo
+}
diff --git a/net-analyzer/wireshark/wireshark-1.8.1-r1.ebuild b/net-analyzer/wireshark/wireshark-1.8.1-r1.ebuild
new file mode 100644
index 000000000000..7e633598bb88
--- /dev/null
+++ b/net-analyzer/wireshark/wireshark-1.8.1-r1.ebuild
@@ -0,0 +1,212 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/wireshark/wireshark-1.8.1-r1.ebuild,v 1.1 2012/08/02 15:21:15 jer Exp $
+
+EAPI="4"
+PYTHON_DEPEND="python? 2"
+inherit eutils flag-o-matic python toolchain-funcs user
+
+[[ -n ${PV#*_rc} && ${PV#*_rc} != ${PV} ]] && MY_P=${PN}-${PV/_} || MY_P=${P}
+DESCRIPTION="A network protocol analyzer formerly known as ethereal"
+HOMEPAGE="http://www.wireshark.org/"
+SRC_URI="http://www.wireshark.org/download/src/all-versions/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
+IUSE="adns ares doc doc-pdf gtk ipv6 lua gcrypt geoip kerberos
+profile +pcap portaudio python +caps selinux smi ssl zlib"
+
+RDEPEND=">=dev-libs/glib-2.14:2
+ zlib? ( sys-libs/zlib
+ !=sys-libs/zlib-1.2.4 )
+ smi? ( net-libs/libsmi )
+ gtk? ( >=x11-libs/gtk+-2.4.0:2
+ x11-libs/pango
+ dev-libs/atk
+ x11-misc/xdg-utils )
+ ssl? ( <net-libs/gnutls-3 )
+ gcrypt? ( dev-libs/libgcrypt )
+ pcap? ( net-libs/libpcap )
+ caps? ( sys-libs/libcap )
+ kerberos? ( virtual/krb5 )
+ portaudio? ( media-libs/portaudio )
+ ares? ( >=net-dns/c-ares-1.5 )
+ !ares? ( adns? ( net-libs/adns ) )
+ geoip? ( dev-libs/geoip )
+ lua? ( >=dev-lang/lua-5.1 )
+ selinux? ( sec-policy/selinux-wireshark )"
+
+DEPEND="${RDEPEND}
+ doc? ( dev-libs/libxslt
+ dev-libs/libxml2
+ app-doc/doxygen
+ doc-pdf? ( dev-java/fop ) )
+ virtual/pkgconfig
+ dev-lang/perl
+ sys-devel/bison
+ sys-apps/sed
+ sys-devel/flex
+ !!<net-analyzer/wireshark-1.8.0"
+
+S=${WORKDIR}/${MY_P}
+
+# borrowed from GSoC2010_Gentoo_Capabilities by constanze and flameyeys
+# @FUNCTION: fcaps
+# @USAGE: fcaps {uid:gid} {file-mode} {cap1[,cap2,...]} {file}
+# @RETURN: 0 if all okay; non-zero if failure and fallback
+# @DESCRIPTION:
+# fcaps sets the specified capabilities in the effective and permitted set of
+# the given file. In case of failure fcaps sets the given file-mode.
+fcaps() {
+ local uid_gid=$1
+ local perms=$2
+ local capset=$3
+ local path=$4
+ local res
+
+ chmod $perms $path && \
+ chown $uid_gid $path
+ res=$?
+
+ use caps || return $res
+
+ #set the capability
+ setcap "$capset=ep" "$path" &> /dev/null
+ #check if the capabilitiy got set correctly
+ setcap -v "$capset=ep" "$path" &> /dev/null
+ res=$?
+
+ if [ $res -ne 0 ]; then
+ ewarn "Failed to set capabilities. Probable reason is missed kernel support."
+ ewarn "Kernel must have <FS>_FS_SECURITY enabled where <FS> is the filesystem"
+ ewarn "to store ${path} (e.g. EXT3_FS_SECURITY). For kernels version before"
+ ewarn "2.6.33_rc1 SECURITY_FILE_CAPABILITIES must be enabled as well."
+ ewarn
+ ewarn "Falling back to suid now..."
+ chmod u+s ${path}
+ fi
+ return $res
+}
+
+pkg_setup() {
+ if ! use gtk; then
+ ewarn "USE=-gtk disables gtk-based gui called wireshark."
+ ewarn "Only command line utils will be built available"
+ fi
+ if use python; then
+ python_set_active_version 2
+ python_pkg_setup
+ fi
+ # Add group for users allowed to sniff.
+ enewgroup wireshark
+}
+
+src_configure() {
+ local myconf
+
+ if [[ $(gcc-major-version) -lt 3 ||
+ ( $(gcc-major-version) -eq 3 &&
+ $(gcc-minor-version) -le 4 ) ]] ; then
+ die "Unsupported compiler version, please upgrade."
+ fi
+
+ if use ares && use adns; then
+ elog "You asked for both, ares and adns, but we can use only one of them."
+ elog "c-ares supersedes adns resolver thus using c-ares (ares USE flag)."
+ myconf="$(use_with ares c-ares) --without-adns"
+ else
+ myconf="$(use_with adns) $(use_with ares c-ares)"
+ fi
+
+ # profile and pie are incompatible #215806, #292991
+ if use profile; then
+ ewarn "You've enabled the 'profile' USE flag, building PIE binaries is disabled."
+ ewarn "Also ignore \"unrecognized option '-nopie'\" gcc warning #358101."
+ append-flags $(test-flags-CC -nopie)
+ fi
+
+ # 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
+
+ # 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, setuid-install requires dumpcap
+ econf $(use_enable gtk wireshark) \
+ $(use_enable profile profile-build) \
+ $(use_with ssl gnutls) \
+ $(use_with gcrypt) \
+ $(use_enable ipv6) \
+ $(use_with lua) \
+ $(use_with kerberos krb5) \
+ $(use_with smi libsmi) \
+ $(use_with zlib) \
+ $(use_with geoip) \
+ $(use_with portaudio) \
+ $(use_with python) \
+ $(use_with caps libcap) \
+ $(use_with pcap) \
+ $(use_with pcap dumpcap-group wireshark) \
+ $(use pcap && use_enable caps setcap-install) \
+ $(use pcap && use_enable !caps setuid-install) \
+ --sysconfdir="${EPREFIX}"/etc/wireshark \
+ --disable-extra-gcc-checks \
+ ${myconf}
+}
+
+src_compile() {
+ default
+ use doc && emake -C docbook
+}
+
+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*}
+
+ insinto /usr/include/wiretap
+ doins wiretap/wtap.h
+
+ if use gtk; then
+ 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
+ domenu wireshark.desktop
+ fi
+ use pcap && chmod o-x "${ED}"/usr/bin/dumpcap #357237
+}
+
+pkg_postinst() {
+ if use caps && use pcap; then
+ fcaps 0:wireshark 550 cap_dac_read_search,cap_net_raw,cap_net_admin "${EROOT}"/usr/bin/dumpcap
+ fi
+ echo
+ ewarn "NOTE: To run wireshark as normal user you have to add yourself to"
+ ewarn "the wireshark group. This security measure ensures that only trusted"
+ ewarn "users are allowed to sniff your traffic."
+ echo
+}
diff --git a/net-analyzer/wireshark/wireshark-1.8.1.ebuild b/net-analyzer/wireshark/wireshark-1.8.1.ebuild
index 7ce31f64dc56..b46f6cb8066d 100644
--- a/net-analyzer/wireshark/wireshark-1.8.1.ebuild
+++ b/net-analyzer/wireshark/wireshark-1.8.1.ebuild
@@ -1,10 +1,10 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-analyzer/wireshark/wireshark-1.8.1.ebuild,v 1.7 2012/07/30 05:24:24 jdhore Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/wireshark/wireshark-1.8.1.ebuild,v 1.8 2012/08/02 15:21:15 jer Exp $
EAPI="4"
PYTHON_DEPEND="python? 2"
-inherit autotools eutils flag-o-matic python toolchain-funcs user
+inherit eutils flag-o-matic python toolchain-funcs user
[[ -n ${PV#*_rc} && ${PV#*_rc} != ${PV} ]] && MY_P=${PN}-${PV/_} || MY_P=${P}
DESCRIPTION="A network protocol analyzer formerly known as ethereal"