diff options
author | Jeroen Roovers <jer@gentoo.org> | 2012-08-31 15:26:42 +0000 |
---|---|---|
committer | Jeroen Roovers <jer@gentoo.org> | 2012-08-31 15:26:42 +0000 |
commit | 6771b48a0a055874018666d3dd4b286f44a40e1b (patch) | |
tree | 02163a74ee5ec3fe799929b7c47fab17d8010413 /net-analyzer | |
parent | Version bump. (diff) | |
download | historical-6771b48a0a055874018666d3dd4b286f44a40e1b.tar.gz historical-6771b48a0a055874018666d3dd4b286f44a40e1b.tar.bz2 historical-6771b48a0a055874018666d3dd4b286f44a40e1b.zip |
Add general USE=adns and distinct USE=ares/libadns.
Package-Manager: portage-2.2.0_alpha123/cvs/Linux x86_64
Diffstat (limited to 'net-analyzer')
-rw-r--r-- | net-analyzer/wireshark/ChangeLog | 9 | ||||
-rw-r--r-- | net-analyzer/wireshark/Manifest | 16 | ||||
-rw-r--r-- | net-analyzer/wireshark/metadata.xml | 3 | ||||
-rw-r--r-- | net-analyzer/wireshark/wireshark-1.6.10-r1.ebuild | 224 | ||||
-rw-r--r-- | net-analyzer/wireshark/wireshark-1.8.2-r1.ebuild | 222 |
5 files changed, 465 insertions, 9 deletions
diff --git a/net-analyzer/wireshark/ChangeLog b/net-analyzer/wireshark/ChangeLog index 58deca7aad49..d4cc31b3ca2c 100644 --- a/net-analyzer/wireshark/ChangeLog +++ b/net-analyzer/wireshark/ChangeLog @@ -1,6 +1,13 @@ # 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.381 2012/08/26 15:55:50 armin76 Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/wireshark/ChangeLog,v 1.382 2012/08/31 15:26:42 jer Exp $ + +*wireshark-1.8.2-r1 (31 Aug 2012) +*wireshark-1.6.10-r1 (31 Aug 2012) + + 31 Aug 2012; Jeroen Roovers <jer@gentoo.org> +wireshark-1.6.10-r1.ebuild, + +wireshark-1.8.2-r1.ebuild, metadata.xml: + Add general USE=adns and distinct USE=ares/libadns. 26 Aug 2012; Raúl Porcel <armin76@gentoo.org> wireshark-1.6.10.ebuild, wireshark-1.8.2.ebuild: diff --git a/net-analyzer/wireshark/Manifest b/net-analyzer/wireshark/Manifest index 5af834067b48..3e3431caf5b5 100644 --- a/net-analyzer/wireshark/Manifest +++ b/net-analyzer/wireshark/Manifest @@ -1,5 +1,5 @@ -----BEGIN PGP SIGNED MESSAGE----- -Hash: SHA1 +Hash: SHA256 AUX wireshark-1.6.6-gtk-pcap.patch 841 SHA256 862c301f450fcb775e3bd907e5a6ca667b5a11b819768b66a7c848c2c3c90d8a SHA512 0ed1bce8b57942de72ee0a8d78ef7cc345ffea512248fa65acd4e8386a5aa61dde14663090578c78f3eee88c7966e8d40aa6d3dce13146c2adf5ed8ded019253 WHIRLPOOL a45a3d04c9823eb149174fbbaaeb5437e525d77da962aa627509941da3119e87d4eef26cb06b1d3534356c4fd1d4bf31bc102dbf8b3f69994a19dba8d730d05f AUX wireshark-1.8.1-ldflags.patch 312 SHA256 b4cf259892774b4a72ab90b7ea28fbf3c923993f8f68831627d79a45637f5948 SHA512 a6cae46b7bf1f82977f8c905f109efeb72b1bf7bf9413639dd0c783147070be04efac7ec5ac92c9eda682500c5596cfcb2ade424d7bd85278c7842f5aff2ad98 WHIRLPOOL 0aa07f0d26318d203ea2bfb0369eb4fe57f80958e24f20f8579e218d8c3967effb64461112cf30cd15322cc6ed76c75dac0091781ed4526c091f4cddb40daf29 @@ -8,19 +8,21 @@ DIST wireshark-1.6.8.tar.bz2 21967111 SHA256 d4fbaffa4fd32543ed1d03b3097bf89a7d4 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 DIST wireshark-1.8.2.tar.bz2 24121798 SHA256 3f0e688d889345033e0a7e4f36aea78248e5c7b32d0dfc19eac044188aac11cc SHA512 219ec8249072773719162851515eb9c29a01693c9ba4d57976afad1e58d30cac9aefb482d3c6113386c39cfab775919ad68a888e94de8d62af0e8b8da7c3991b WHIRLPOOL 08bbe59e096de90a99766aa49c6d419351b1e178f5eb2e9160e00900c695dd46515448571ebbf19172679db0637f82359757c302cd87ea176936eb32c3625ba1 +EBUILD wireshark-1.6.10-r1.ebuild 6335 SHA256 7a5ee7558d4d9bf46fa4c062ff72bdadee3de0a9e7edb2b712a4d79db0f5d07a SHA512 efe68f685389904edfb3c2e6cf93f9722485a834bfcb714ec123d53d67f6d8fb85b3af1282bf6182b9b9bf48d85c6aa58f44d1335d961080799048768e2d50f1 WHIRLPOOL 5eed747a7bdcdef07b18af074c6876e1b557b34dde12236b018af5670c397350814c2b75ce67d8ca49a8427d1f16433200c471ed66ea0f7530ff3f734574795d EBUILD wireshark-1.6.10.ebuild 6555 SHA256 d403012e43b2f40cc2c5fb1a7cea94fdfb852a5723e25d2c903d698ce31d3980 SHA512 f7963b030ed853db666d44e72d5a74a0a0b458c9276e759513e29521a3fd96408d4c08f704d518068925a4eba1c91095f302161e3a68860c48b43accbbd41709 WHIRLPOOL 9a59004c31d610f4691eba3f0f743577fc9ad5de51f7c03ff70ca15ff714256f9db7bc4fe4ccefa7e416d6c69be29856c9ae08896639b135afa89dc7c1917d28 EBUILD wireshark-1.6.8.ebuild 6453 SHA256 45983c22afd371ca12b7cfaaa7b8657bb2c661ecc78c7d639cd8f7067e73670d SHA512 ab98125603ada0828444414b8807760e4f5bf009547fe58110ba6cf3ff981df18bd34e7d17605ac11fdbd592a8ef9e0b5a1985775dbea11ea750b3aaedb9b6fe WHIRLPOOL 500f699b5f8d84c85cb2422745a95e2a47cdf7915cb030ea5d688a1cd2a772c9060b8058ee577eecfde2a9bfb4e2dcbe1c380fd113621cd9240e1db82d964110 EBUILD wireshark-1.6.9-r1.ebuild 6515 SHA256 e44ee1e12c9625ff3da815de86270d5597ef4ebefb4144a65270e295615c3d64 SHA512 24f392bd68a6806374962a82229874f5cdb036513c7cd5f8f33f688e5c6467d641bf0a19ce1bff3c43538f77515f2e06f118adb12f788ff81ce26ee78a597e28 WHIRLPOOL 0199f45adfd49b39675168787b2279d57ddbe47fd2a573ef7919c9db254007f73ced740b3a4e47437214ff74fc8b299931947f6b4ce2b4ba9fd9d1b8787e9546 EBUILD wireshark-1.6.9.ebuild 6489 SHA256 a89315d2783cc3bc8a29221e7a66288a5ace54307709fe65c210f1c595c38c05 SHA512 129ee279f5d4611b92a229750b1b5ec0dc0974ff648a3928d212fddcb6192135b2494fb3ffba198fc9e8c95b56dc6b5dd10aec3baf628ce0db538dfe84453245 WHIRLPOOL 9aebcd18ff3aeca6bced86eaac6fc2beae9d1d668c2a4f8aeb102284078463e03702a6582917432d169dc0da403ce69f0cd734d000c3f4426cc2cb0236339608 EBUILD wireshark-1.8.1-r1.ebuild 6366 SHA256 ae4899a2fa57a86014be3e18ae42802c489398ff7d6e02092ad21a6de468ba70 SHA512 beceb5d3f4af1d17448efe81277353977d86628e0949e9b3d5bdf8b54766b24b22bc8458b6269c29c35d987fc28673ff8e85ca70b59dfb8f323100959637bc1b WHIRLPOOL 9671cbf890f8b9545ef643aecc89567b72c1589f35f2897fcb448da4c8c1e238b00ee1d402f9a1bb7deb2da9becb0e5931ee9a1119fbab5bf31a395ac71a6cdb EBUILD wireshark-1.8.1.ebuild 6307 SHA256 a162d0dfcea9595d7a92671a02751b3805210492ad536ea53327361bb79a7d0f SHA512 1431ddfd83182ff231f1f52e58eedb19ca087b64891cd559b2258041e02264c774f39a5a8e974f2a79c80ab2ed74b4a9c07a9721f1ec8ebf2a85c9b171e881b5 WHIRLPOOL 1a1a26fbd474282115a10c7f0bab09c0635e6ddb8d699681fd263115c0a2475e535ade5475931e6a4d9fe395f84b0f840cfc9f293f79916b244f891f4320ede4 +EBUILD wireshark-1.8.2-r1.ebuild 6275 SHA256 c1d3071f62b26495be2d49bee0d1083d41e67e8af029d6c51a5745cd28a2dda6 SHA512 ecacd5371bc092bdf833491fc3fd62c80c5e2484b04ad633e91d427b1abb4df954928a0dc6f9184e719e20c2b63d89ef8bfa961ab656bc94c70d0b58863f380f WHIRLPOOL 7298825b1c3cacef5d289a12a9bab6ccfed6391798e2a2e3703c1fdeab765326ae45ab0882d0e893ab732dbc42484645917175d64ddb74cb1cb680034f140a87 EBUILD wireshark-1.8.2.ebuild 6412 SHA256 a401ed515922508b6f4b09bcbb25f2473c2b3dc612a629c994b77769e9f580c8 SHA512 7c5fc50ae831f99ebf827e4ca440f1fceb52cf0f414306615e01ddc11cc7996c693e8af1ec843764e0ffeaa200031c803463e8b5a96c609b1e8033e3374394c6 WHIRLPOOL 3968d7a5d3ce316a2c4d7610df50c3df4b2e12cb170a76577f584dd892772dd62d5fc4562ffeef00d07cdee8c0878a3c784c15c25efa206a45c1de1641627c0b -MISC ChangeLog 55285 SHA256 3f0e19bf82ea84d52068da48d19d989c89bb99bc237c96f333927c0f7f17f739 SHA512 a2f6f293df9a68d9705ddfe56987aca76de48999a701e479b6373e02688f004ff102f6c6ee9119e7a19e960f3162722f998a3b158c1194eea3422511dfb8bd93 WHIRLPOOL 5931303bcfaa923648bbda22308a53027e3b03459f4efad5d6d6063f12667a56c435803d9b26bdaf8eb6ebcebdde6c9daa051b6041808c9291ddf9e61498681f -MISC metadata.xml 2400 SHA256 76f9bbd8fe91ac408781d92cd721b859e0c28fb9b645d48b7455d98320df8f30 SHA512 53cead1f63742ea915183e0d9d44776651f365a973884cf52525b181613a0ca4c2905e73597c228b637b633fa5e05a0331f6f91ca3e9c86991178dec3045412f WHIRLPOOL 98c5773fe59eb96e4f34ef7fc3e0ced2af1f28fd69be635c8afc6a95becc80c8f1a099d49486f9931dd7b7aa5d46672b97dfdb4dd3d0352ed23f8a94bd02b0ec +MISC ChangeLog 55526 SHA256 60d5e20b81c0b3c392791274e299ee68212bc0c0645399c130276a2f52116f09 SHA512 45e1a8ee862959fadfe37b448b3824a6f8ae8d18ed026c6d0983e8330d5959f3abcb3af163a85eebd809e6b7e8c7311da158434f87118a5327fd316cf9520b4d WHIRLPOOL b172fce7973adb227a5d5b4d89be9b62bb3895395aae70ac45f51b1d5abfa0a6431e51e5cbc6cecb42c79ea3939710168a593a72a24c6e90e12c6fa82c8f1564 +MISC metadata.xml 2493 SHA256 edbf1d64745d0888a6702700e7feb35d7caf31932bf54a7d0b95d239a0f111d0 SHA512 482a6edba3870e8e76459cde9805408ac94b3f4e725c48a2934633cbdbe899c84de0ddaaeb45acba5cc3d72ec1bd0ccff2e9a1a22f81c9c32fb9e127b7e16a7b WHIRLPOOL dac8ad7b30e94703d1d5e0e24abdc02a612f18611b6cc621e523bd637ad4ca6ed54bf11000b284754c94443b5a1c5e2a2aa646e0ff5d9a56d8ae9b95d7550147 -----BEGIN PGP SIGNATURE----- -Version: GnuPG v2.0.17 (GNU/Linux) +Version: GnuPG v2.0.19 (GNU/Linux) -iEYEARECAAYFAlA6RwwACgkQuQc30/atMkD32ACgmKmT3ujYb8sdbLz5evDuxQOQ -0bAAoJP3qpUm6iWn53XE5HsC+XGCosbL -=Iyj8 +iEYEAREIAAYFAlBA17gACgkQVWmRsqeSphPImwCeJBWY9M0QAXKZvQkSaQcm5Huq +jigAn3fQ/TAFNj3UgnoaATbxxhBfbEzc +=9cap -----END PGP SIGNATURE----- diff --git a/net-analyzer/wireshark/metadata.xml b/net-analyzer/wireshark/metadata.xml index 52e2e21dda5e..b3d6c07dbbbb 100644 --- a/net-analyzer/wireshark/metadata.xml +++ b/net-analyzer/wireshark/metadata.xml @@ -34,9 +34,10 @@ plain text </longdescription> <use> -<flag name='ares'>Use GNU <pkg>net-dns/c-ares</pkg> library to resolve DNS names</flag> +<flag name='ares'>Use the GNU <pkg>net-dns/c-ares</pkg> library to resolve DNS names</flag> <flag name='doc-pdf'>Build documentation in pdf format (US and a4 paper sizes)</flag> <flag name='gcrypt'>Use GNU crypto library (<pkg>dev-libs/libgcrypt</pkg>) to decrypt ipsec traffic</flag> +<flag name='libadns'>Use the <pkg>net-lib/adns</pkg> library to resolve DNS names</flag> <flag name='pcap'>Use <pkg>net-libs/libpcap</pkg> for network packet capturing (build dumpcap, rawshark)</flag> <flag name='smi'>Use <pkg>net-libs/libsmi</pkg> to resolve numeric OIDs into human readable format</flag> </use> diff --git a/net-analyzer/wireshark/wireshark-1.6.10-r1.ebuild b/net-analyzer/wireshark/wireshark-1.6.10-r1.ebuild new file mode 100644 index 000000000000..abb6a4f996dd --- /dev/null +++ b/net-analyzer/wireshark/wireshark-1.6.10-r1.ebuild @@ -0,0 +1,224 @@ +# 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.10-r1.ebuild,v 1.1 2012/08/31 15:26:42 jer Exp $ + +EAPI=4 +PYTHON_DEPEND="python? 2" +inherit autotools 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 libadns lua gcrypt geoip kerberos profile + +pcap portaudio python +caps selinux smi ssl threads zlib +" +REQUIRED_USE=" + adns? ( ^^ ( ares libadns ) ) + adns? ( || ( ares libadns ) ) +" + +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 ) + adns? ( + ares? ( >=net-dns/c-ares-1.5 ) + libadns? ( 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 +" + +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 \ + "${FILESDIR}"/${PN}-1.8.1-ldflags.patch + sed -i -e 's|.png||g' ${PN}.desktop || die + eautoreconf +} + +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 + + # 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 pcap && use_enable !caps setuid-install) \ + $(use pcap && use_enable caps setcap-install) \ + $(use_enable gtk wireshark) \ + $(use_enable ipv6) \ + $(use_enable profile profile-build) \ + $(use_enable threads) \ + $(use_with ares c-ares) \ + $(use_with caps libcap) \ + $(use_with gcrypt) \ + $(use_with geoip) \ + $(use_with kerberos krb5) \ + $(use_with libadns adns) \ + $(use_with lua) \ + $(use_with pcap dumpcap-group wireshark) \ + $(use_with pcap) \ + $(use_with portaudio) \ + $(use_with python) \ + $(use_with smi libsmi) \ + $(use_with ssl gnutls) \ + $(use_with zlib) \ + --sysconfdir="${EPREFIX}"/etc/wireshark \ + --disable-extra-gcc-checks \ + ${myconf} +} + +src_compile() { + default + use doc && cd docbook && { emake; } +} + +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.2-r1.ebuild b/net-analyzer/wireshark/wireshark-1.8.2-r1.ebuild new file mode 100644 index 000000000000..049efcf26dad --- /dev/null +++ b/net-analyzer/wireshark/wireshark-1.8.2-r1.ebuild @@ -0,0 +1,222 @@ +# 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.2-r1.ebuild,v 1.1 2012/08/31 15:26:42 jer Exp $ + +EAPI="4" +PYTHON_DEPEND="python? 2" +inherit autotools 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 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd" +IUSE=" + adns +ares doc doc-pdf gtk ipv6 libadns lua gcrypt geoip kerberos profile + +pcap portaudio python +caps selinux smi ssl zlib +" +REQUIRED_USE=" + adns? ( ^^ ( ares libadns ) ) + adns? ( || ( ares libadns ) ) +" + +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 ) + adns? ( + ares? ( >=net-dns/c-ares-1.5 ) + libadns? ( 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 +" + +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.8.1-ldflags.patch + sed -i -e 's|.png||g' ${PN}.desktop || die + eautoreconf +} + +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 + + # 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 pcap && use_enable !caps setuid-install) \ + $(use pcap && use_enable caps setcap-install) \ + $(use_enable gtk wireshark) \ + $(use_enable ipv6) \ + $(use_enable profile profile-build) \ + $(use_with ares c-ares) \ + $(use_with caps libcap) \ + $(use_with gcrypt) \ + $(use_with geoip) \ + $(use_with kerberos krb5) \ + $(use_with libadns adns) \ + $(use_with lua) \ + $(use_with pcap dumpcap-group wireshark) \ + $(use_with pcap) \ + $(use_with portaudio) \ + $(use_with python) \ + $(use_with smi libsmi) \ + $(use_with ssl gnutls) \ + $(use_with zlib) \ + --disable-extra-gcc-checks \ + --disable-usr-local \ + --sysconfdir="${EPREFIX}"/etc/wireshark \ + ${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 +} |