Gentoo Archives: gentoo-commits

From: "Peter Volkov (pva)" <pva@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-analyzer/wireshark: ChangeLog wireshark-1.4.2.ebuild wireshark-1.4.0_rc2.ebuild
Date: Tue, 30 Nov 2010 08:51:22
Message-Id: 20101130085113.39F7320054@flycatcher.gentoo.org
1 pva 10/11/30 08:51:13
2
3 Modified: ChangeLog
4 Added: wireshark-1.4.2.ebuild
5 Removed: wireshark-1.4.0_rc2.ebuild
6 Log:
7 Version bump, #346529 wrt Mike Auty.
8
9 (Portage version: 2.1.9.24/cvs/Linux x86_64)
10
11 Revision Changes Path
12 1.260 net-analyzer/wireshark/ChangeLog
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/wireshark/ChangeLog?rev=1.260&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/wireshark/ChangeLog?rev=1.260&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/wireshark/ChangeLog?r1=1.259&r2=1.260
17
18 Index: ChangeLog
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/net-analyzer/wireshark/ChangeLog,v
21 retrieving revision 1.259
22 retrieving revision 1.260
23 diff -u -r1.259 -r1.260
24 --- ChangeLog 27 Nov 2010 11:22:04 -0000 1.259
25 +++ ChangeLog 30 Nov 2010 08:51:13 -0000 1.260
26 @@ -1,6 +1,12 @@
27 # ChangeLog for net-analyzer/wireshark
28 # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
29 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/wireshark/ChangeLog,v 1.259 2010/11/27 11:22:04 armin76 Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/wireshark/ChangeLog,v 1.260 2010/11/30 08:51:13 pva Exp $
31 +
32 +*wireshark-1.4.2 (30 Nov 2010)
33 +
34 + 30 Nov 2010; Peter Volkov <pva@g.o> -wireshark-1.4.0_rc2.ebuild,
35 + +wireshark-1.4.2.ebuild:
36 + Version bump, #346529 wrt Mike Auty.
37
38 27 Nov 2010; Raúl Porcel <armin76@g.o> wireshark-1.2.13.ebuild:
39 alpha/ia64/sparc stable wrt #346191
40
41
42
43 1.1 net-analyzer/wireshark/wireshark-1.4.2.ebuild
44
45 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/wireshark/wireshark-1.4.2.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/wireshark/wireshark-1.4.2.ebuild?rev=1.1&content-type=text/plain
47
48 Index: wireshark-1.4.2.ebuild
49 ===================================================================
50 # Copyright 1999-2010 Gentoo Foundation
51 # Distributed under the terms of the GNU General Public License v2
52 # $Header: /var/cvsroot/gentoo-x86/net-analyzer/wireshark/wireshark-1.4.2.ebuild,v 1.1 2010/11/30 08:51:13 pva Exp $
53
54 EAPI=2
55 PYTHON_DEPEND="python? 2"
56 inherit libtool flag-o-matic eutils toolchain-funcs python
57
58 [[ -n ${PV#*_rc} && ${PV#*_rc} != ${PV} ]] && MY_P=${PN}-${PV/_} || MY_P=${P}
59 DESCRIPTION="A network protocol analyzer formerly known as ethereal"
60 HOMEPAGE="http://www.wireshark.org/"
61 SRC_URI="http://www.wireshark.org/download/src/all-versions/${MY_P}.tar.bz2"
62
63 LICENSE="GPL-2"
64 SLOT="0"
65 KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~x86-fbsd"
66 IUSE="adns ares doc doc-pdf gtk ipv6 lua gcrypt geoip kerberos
67 profile +pcap pcre portaudio python +caps selinux smi ssl threads zlib"
68
69 RDEPEND=">=dev-libs/glib-2.14.0:2
70 zlib? ( sys-libs/zlib
71 !=sys-libs/zlib-1.2.4 )
72 smi? ( net-libs/libsmi )
73 x11-misc/xdg-utils
74 gtk? ( >=x11-libs/gtk+-2.4.0:2
75 x11-libs/pango
76 dev-libs/atk )
77 ssl? ( net-libs/gnutls )
78 gcrypt? ( dev-libs/libgcrypt )
79 pcap? ( net-libs/libpcap )
80 pcre? ( dev-libs/libpcre )
81 caps? ( sys-libs/libcap )
82 kerberos? ( virtual/krb5 )
83 portaudio? ( media-libs/portaudio )
84 ares? ( >=net-dns/c-ares-1.5 )
85 !ares? ( adns? ( net-libs/adns ) )
86 geoip? ( dev-libs/geoip )
87 lua? ( >=dev-lang/lua-5.1 )
88 selinux? ( sec-policy/selinux-wireshark )"
89
90 DEPEND="${RDEPEND}
91 doc? ( dev-libs/libxslt
92 dev-libs/libxml2
93 www-client/elinks
94 app-doc/doxygen
95 doc-pdf? ( dev-java/fop ) )
96 >=dev-util/pkgconfig-0.15.0
97 dev-lang/perl
98 sys-devel/bison
99 sys-apps/sed
100 sys-devel/flex"
101
102 S=${WORKDIR}/${MY_P}
103
104 # borrowed from GSoC2010_Gentoo_Capabilities by constanze and flameyeys
105 # @FUNCTION: fcaps
106 # @USAGE: fcaps {uid:gid} {file-mode} {cap1[,cap2,...]} {file}
107 # @RETURN: 0 if all okay; non-zero if failure and fallback
108 # @DESCRIPTION:
109 # fcaps sets the specified capabilities in the effective and permitted set of
110 # the given file. In case of failure fcaps sets the given file-mode.
111 fcaps() {
112 local uid_gid=$1
113 local perms=$2
114 local capset=$3
115 local path=$4
116 local res
117
118 chmod $perms $path && \
119 chown $uid_gid $path
120 res=$?
121
122 use caps || return $res
123
124 #set the capability
125 setcap "$capset=ep" "$path" &> /dev/null
126 #check if the capabilitiy got set correctly
127 setcap -v "$capset=ep" "$path" &> /dev/null
128 res=$?
129
130 if [ $res -ne 0 ]; then
131 ewarn "Failed to set capabilities. Probable reason is missed kernel support."
132 ewarn "Kernel must have SECURITY_FILE_CAPABILITIES, and <FS>_FS_SECURITY"
133 ewarn "enabled (e.g. EXT3_FS_SECURITY) where <FS> is the filesystem to store"
134 ewarn "${path}"
135 ewarn
136 ewarn "Falling back to suid now..."
137 chmod u+s ${path}
138 fi
139 return $res
140 }
141
142 pkg_setup() {
143 if ! use gtk; then
144 ewarn "USE=-gtk disables gtk-based gui called wireshark."
145 ewarn "Only command line utils will be built available"
146 fi
147 if use python; then
148 python_set_active_version 2
149 python_pkg_setup
150 fi
151 # Add group for users allowed to sniff.
152 enewgroup wireshark
153 }
154
155 src_configure() {
156 local myconf
157
158 if [[ $(gcc-major-version) -lt 3 ||
159 ( $(gcc-major-version) -eq 3 &&
160 $(gcc-minor-version) -le 4 ) ]] ; then
161 die "Unsupported compiler version, please upgrade."
162 fi
163
164 if use ares && use adns; then
165 elog "You asked for both, ares and adns, but we can use only one of them."
166 elog "c-ares supersedes adns resolver thus using c-ares (ares USE flag)."
167 myconf="$(use_with ares c-ares) --without-adns"
168 else
169 myconf="$(use_with adns) $(use_with ares c-ares)"
170 fi
171
172 # profile and pie are incompatible #215806, #292991
173 if use profile; then
174 ewarn "You've enabled the 'profile' USE flag, building PIE binaries is disabled."
175 append-flags $(test-flags-CC -nopie)
176 fi
177
178 # Workaround bug #213705. If krb5-config --libs has -lcrypto then pass
179 # --with-ssl to ./configure. (Mimics code from acinclude.m4).
180 if use kerberos; then
181 case `krb5-config --libs` in
182 *-lcrypto*)
183 ewarn "Kerberos was built with ssl support: linkage with openssl is enabled."
184 ewarn "Note there are annoying license incompatibilities between the OpenSSL"
185 ewarn "license and the GPL, so do your check before distributing such package."
186 myconf+=" --with-ssl"
187 ;;
188 esac
189 fi
190
191 # Hack around inability to disable doxygen/fop doc generation
192 use doc || export ac_cv_prog_HAVE_DOXYGEN=false
193 use doc-pdf || export ac_cv_prog_HAVE_FOP=false
194
195 # dumpcap requires libcap, setuid-install requires dumpcap
196 econf $(use_enable gtk wireshark) \
197 $(use_enable profile profile-build) \
198 $(use_with ssl gnutls) \
199 $(use_with gcrypt) \
200 $(use_enable ipv6) \
201 $(use_enable threads) \
202 $(use_with lua) \
203 $(use_with kerberos krb5) \
204 $(use_with smi libsmi) \
205 $(use_with pcap) \
206 $(use_with zlib) \
207 $(use_with pcre) \
208 $(use_with geoip) \
209 $(use_with portaudio) \
210 $(use_with python) \
211 $(use_with caps libcap) \
212 $(use_enable caps setcap-install) \
213 $(use caps || use_enable pcap setuid-install) \
214 --sysconfdir=/etc/wireshark \
215 --with-dumpcap-group=wireshark \
216 --disable-extra-gcc-checks \
217 ${myconf}
218 }
219
220 src_compile() {
221 emake || die
222 use doc && cd docbook && { emake || die; }
223 }
224
225 src_install() {
226 emake DESTDIR="${D}" install || die "emake install failed"
227 if use doc; then
228 dohtml -r docbook/{release-notes.html,ws{d,u}g_html{,_chunked}}
229 # for dir in ws{d,u}g_html{,_chunked}; do
230 # dohtml -p ${dir} -r docbook/${dir}/ || die
231 # done
232 if use doc-pdf; then
233 insinto /usr/share/doc/${PF}/pdf/
234 doins docbook/{{developer,user}-guide,release-notes}-{a4,us}.pdf || die
235 fi
236 fi
237
238 # FAQ is not required as is installed from help/faq.txt
239 dodoc AUTHORS ChangeLog NEWS README{,.bsd,.linux,.macos,.vmware} \
240 doc/{randpkt.txt,README*}
241
242 insinto /usr/include/wiretap
243 doins wiretap/wtap.h || die
244
245 if use gtk; then
246 for c in hi lo; do
247 for d in 16 32 48; do
248 insinto /usr/share/icons/${c}color/${d}x${d}/apps
249 newins image/${c}${d}-app-wireshark.png wireshark.png
250 done
251 done
252 insinto /usr/share/applications
253 doins wireshark.desktop || die
254 fi
255 }
256
257 pkg_postinst() {
258 if use caps && use pcap; then
259 fcaps 0:wireshark 550 cap_net_raw,cap_net_admin "${ROOT}"/usr/bin/dumpcap
260 fi
261 echo
262 ewarn "NOTE: To run wireshark as normal user you have to add yourself into"
263 ewarn "wireshark group. This security measure ensures that only trusted"
264 ewarn "users allowed to sniff your traffic."
265 echo
266 }