Gentoo Archives: gentoo-commits

From: "Jeroen Roovers (jer)" <jer@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-analyzer/wireshark: metadata.xml ChangeLog wireshark-1.8.2-r1.ebuild wireshark-1.6.10-r1.ebuild
Date: Fri, 31 Aug 2012 15:26:54
Message-Id: 20120831152642.9811320DAA@flycatcher.gentoo.org
1 jer 12/08/31 15:26:42
2
3 Modified: metadata.xml ChangeLog
4 Added: wireshark-1.8.2-r1.ebuild
5 wireshark-1.6.10-r1.ebuild
6 Log:
7 Add general USE=adns and distinct USE=ares/libadns.
8
9 (Portage version: 2.2.0_alpha123/cvs/Linux x86_64)
10
11 Revision Changes Path
12 1.9 net-analyzer/wireshark/metadata.xml
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/wireshark/metadata.xml?rev=1.9&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/wireshark/metadata.xml?rev=1.9&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/wireshark/metadata.xml?r1=1.8&r2=1.9
17
18 Index: metadata.xml
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/net-analyzer/wireshark/metadata.xml,v
21 retrieving revision 1.8
22 retrieving revision 1.9
23 diff -u -r1.8 -r1.9
24 --- metadata.xml 10 Jul 2012 15:07:22 -0000 1.8
25 +++ metadata.xml 31 Aug 2012 15:26:42 -0000 1.9
26 @@ -34,9 +34,10 @@
27 plain text
28 </longdescription>
29 <use>
30 -<flag name='ares'>Use GNU <pkg>net-dns/c-ares</pkg> library to resolve DNS names</flag>
31 +<flag name='ares'>Use the GNU <pkg>net-dns/c-ares</pkg> library to resolve DNS names</flag>
32 <flag name='doc-pdf'>Build documentation in pdf format (US and a4 paper sizes)</flag>
33 <flag name='gcrypt'>Use GNU crypto library (<pkg>dev-libs/libgcrypt</pkg>) to decrypt ipsec traffic</flag>
34 +<flag name='libadns'>Use the <pkg>net-lib/adns</pkg> library to resolve DNS names</flag>
35 <flag name='pcap'>Use <pkg>net-libs/libpcap</pkg> for network packet capturing (build dumpcap, rawshark)</flag>
36 <flag name='smi'>Use <pkg>net-libs/libsmi</pkg> to resolve numeric OIDs into human readable format</flag>
37 </use>
38
39
40
41 1.382 net-analyzer/wireshark/ChangeLog
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/wireshark/ChangeLog?rev=1.382&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/wireshark/ChangeLog?rev=1.382&content-type=text/plain
45 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/wireshark/ChangeLog?r1=1.381&r2=1.382
46
47 Index: ChangeLog
48 ===================================================================
49 RCS file: /var/cvsroot/gentoo-x86/net-analyzer/wireshark/ChangeLog,v
50 retrieving revision 1.381
51 retrieving revision 1.382
52 diff -u -r1.381 -r1.382
53 --- ChangeLog 26 Aug 2012 15:55:50 -0000 1.381
54 +++ ChangeLog 31 Aug 2012 15:26:42 -0000 1.382
55 @@ -1,6 +1,13 @@
56 # ChangeLog for net-analyzer/wireshark
57 # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
58 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/wireshark/ChangeLog,v 1.381 2012/08/26 15:55:50 armin76 Exp $
59 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/wireshark/ChangeLog,v 1.382 2012/08/31 15:26:42 jer Exp $
60 +
61 +*wireshark-1.8.2-r1 (31 Aug 2012)
62 +*wireshark-1.6.10-r1 (31 Aug 2012)
63 +
64 + 31 Aug 2012; Jeroen Roovers <jer@g.o> +wireshark-1.6.10-r1.ebuild,
65 + +wireshark-1.8.2-r1.ebuild, metadata.xml:
66 + Add general USE=adns and distinct USE=ares/libadns.
67
68 26 Aug 2012; Raúl Porcel <armin76@g.o> wireshark-1.6.10.ebuild,
69 wireshark-1.8.2.ebuild:
70
71
72
73 1.1 net-analyzer/wireshark/wireshark-1.8.2-r1.ebuild
74
75 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/wireshark/wireshark-1.8.2-r1.ebuild?rev=1.1&view=markup
76 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/wireshark/wireshark-1.8.2-r1.ebuild?rev=1.1&content-type=text/plain
77
78 Index: wireshark-1.8.2-r1.ebuild
79 ===================================================================
80 # Copyright 1999-2012 Gentoo Foundation
81 # Distributed under the terms of the GNU General Public License v2
82 # $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 $
83
84 EAPI="4"
85 PYTHON_DEPEND="python? 2"
86 inherit autotools eutils flag-o-matic python toolchain-funcs user
87
88 [[ -n ${PV#*_rc} && ${PV#*_rc} != ${PV} ]] && MY_P=${PN}-${PV/_} || MY_P=${P}
89 DESCRIPTION="A network protocol analyzer formerly known as ethereal"
90 HOMEPAGE="http://www.wireshark.org/"
91 SRC_URI="http://www.wireshark.org/download/src/all-versions/${MY_P}.tar.bz2"
92
93 LICENSE="GPL-2"
94 SLOT="0"
95 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
96 IUSE="
97 adns +ares doc doc-pdf gtk ipv6 libadns lua gcrypt geoip kerberos profile
98 +pcap portaudio python +caps selinux smi ssl zlib
99 "
100 REQUIRED_USE="
101 adns? ( ^^ ( ares libadns ) )
102 adns? ( || ( ares libadns ) )
103 "
104
105 RDEPEND=">=dev-libs/glib-2.14:2
106 zlib? ( sys-libs/zlib
107 !=sys-libs/zlib-1.2.4 )
108 smi? ( net-libs/libsmi )
109 gtk? ( >=x11-libs/gtk+-2.4.0:2
110 x11-libs/pango
111 dev-libs/atk
112 x11-misc/xdg-utils )
113 ssl? ( <net-libs/gnutls-3 )
114 gcrypt? ( dev-libs/libgcrypt )
115 pcap? ( net-libs/libpcap )
116 caps? ( sys-libs/libcap )
117 kerberos? ( virtual/krb5 )
118 portaudio? ( media-libs/portaudio )
119 adns? (
120 ares? ( >=net-dns/c-ares-1.5 )
121 libadns? ( net-libs/adns )
122 )
123 geoip? ( dev-libs/geoip )
124 lua? ( >=dev-lang/lua-5.1 )
125 selinux? ( sec-policy/selinux-wireshark )"
126
127 DEPEND="${RDEPEND}
128 doc? ( dev-libs/libxslt
129 dev-libs/libxml2
130 app-doc/doxygen
131 doc-pdf? ( dev-java/fop ) )
132 virtual/pkgconfig
133 dev-lang/perl
134 sys-devel/bison
135 sys-apps/sed
136 sys-devel/flex
137 "
138
139 S=${WORKDIR}/${MY_P}
140
141 # borrowed from GSoC2010_Gentoo_Capabilities by constanze and flameyeys
142 # @FUNCTION: fcaps
143 # @USAGE: fcaps {uid:gid} {file-mode} {cap1[,cap2,...]} {file}
144 # @RETURN: 0 if all okay; non-zero if failure and fallback
145 # @DESCRIPTION:
146 # fcaps sets the specified capabilities in the effective and permitted set of
147 # the given file. In case of failure fcaps sets the given file-mode.
148 fcaps() {
149 local uid_gid=$1
150 local perms=$2
151 local capset=$3
152 local path=$4
153 local res
154
155 chmod $perms $path && \
156 chown $uid_gid $path
157 res=$?
158
159 use caps || return $res
160
161 #set the capability
162 setcap "$capset=ep" "$path" &> /dev/null
163 #check if the capabilitiy got set correctly
164 setcap -v "$capset=ep" "$path" &> /dev/null
165 res=$?
166
167 if [ $res -ne 0 ]; then
168 ewarn "Failed to set capabilities. Probable reason is missed kernel support."
169 ewarn "Kernel must have <FS>_FS_SECURITY enabled where <FS> is the filesystem"
170 ewarn "to store ${path} (e.g. EXT3_FS_SECURITY). For kernels version before"
171 ewarn "2.6.33_rc1 SECURITY_FILE_CAPABILITIES must be enabled as well."
172 ewarn
173 ewarn "Falling back to suid now..."
174 chmod u+s ${path}
175 fi
176 return $res
177 }
178
179 pkg_setup() {
180 if ! use gtk; then
181 ewarn "USE=-gtk disables gtk-based gui called wireshark."
182 ewarn "Only command line utils will be built available"
183 fi
184 if use python; then
185 python_set_active_version 2
186 python_pkg_setup
187 fi
188 # Add group for users allowed to sniff.
189 enewgroup wireshark
190 }
191
192 src_prepare() {
193 epatch "${FILESDIR}"/${PN}-1.8.1-ldflags.patch
194 sed -i -e 's|.png||g' ${PN}.desktop || die
195 eautoreconf
196 }
197
198 src_configure() {
199 local myconf
200
201 if [[ $(gcc-major-version) -lt 3 ||
202 ( $(gcc-major-version) -eq 3 &&
203 $(gcc-minor-version) -le 4 ) ]] ; then
204 die "Unsupported compiler version, please upgrade."
205 fi
206
207 # profile and pie are incompatible #215806, #292991
208 if use profile; then
209 ewarn "You've enabled the 'profile' USE flag, building PIE binaries is disabled."
210 ewarn "Also ignore \"unrecognized option '-nopie'\" gcc warning #358101."
211 append-flags $(test-flags-CC -nopie)
212 fi
213
214 # Workaround bug #213705. If krb5-config --libs has -lcrypto then pass
215 # --with-ssl to ./configure. (Mimics code from acinclude.m4).
216 if use kerberos; then
217 case `krb5-config --libs` in
218 *-lcrypto*)
219 ewarn "Kerberos was built with ssl support: linkage with openssl is enabled."
220 ewarn "Note there are annoying license incompatibilities between the OpenSSL"
221 ewarn "license and the GPL, so do your check before distributing such package."
222 myconf+=" --with-ssl"
223 ;;
224 esac
225 fi
226
227 # Hack around inability to disable doxygen/fop doc generation
228 use doc || export ac_cv_prog_HAVE_DOXYGEN=false
229 use doc-pdf || export ac_cv_prog_HAVE_FOP=false
230
231 # dumpcap requires libcap, setuid-install requires dumpcap
232 econf \
233 $(use pcap && use_enable !caps setuid-install) \
234 $(use pcap && use_enable caps setcap-install) \
235 $(use_enable gtk wireshark) \
236 $(use_enable ipv6) \
237 $(use_enable profile profile-build) \
238 $(use_with ares c-ares) \
239 $(use_with caps libcap) \
240 $(use_with gcrypt) \
241 $(use_with geoip) \
242 $(use_with kerberos krb5) \
243 $(use_with libadns adns) \
244 $(use_with lua) \
245 $(use_with pcap dumpcap-group wireshark) \
246 $(use_with pcap) \
247 $(use_with portaudio) \
248 $(use_with python) \
249 $(use_with smi libsmi) \
250 $(use_with ssl gnutls) \
251 $(use_with zlib) \
252 --disable-extra-gcc-checks \
253 --disable-usr-local \
254 --sysconfdir="${EPREFIX}"/etc/wireshark \
255 ${myconf}
256 }
257
258 src_compile() {
259 default
260 use doc && emake -C docbook
261 }
262
263 src_install() {
264 default
265 if use doc; then
266 dohtml -r docbook/{release-notes.html,ws{d,u}g_html{,_chunked}}
267 if use doc-pdf; then
268 insinto /usr/share/doc/${PF}/pdf/
269 doins docbook/{{developer,user}-guide,release-notes}-{a4,us}.pdf
270 fi
271 fi
272
273 # FAQ is not required as is installed from help/faq.txt
274 dodoc AUTHORS ChangeLog NEWS README{,.bsd,.linux,.macos,.vmware} \
275 doc/{randpkt.txt,README*}
276
277 insinto /usr/include/wiretap
278 doins wiretap/wtap.h
279
280 if use gtk; then
281 for c in hi lo; do
282 for d in 16 32 48; do
283 insinto /usr/share/icons/${c}color/${d}x${d}/apps
284 newins image/${c}${d}-app-wireshark.png wireshark.png
285 done
286 done
287 domenu wireshark.desktop
288 fi
289 use pcap && chmod o-x "${ED}"/usr/bin/dumpcap #357237
290 }
291
292 pkg_postinst() {
293 if use caps && use pcap; then
294 fcaps 0:wireshark 550 cap_dac_read_search,cap_net_raw,cap_net_admin "${EROOT}"/usr/bin/dumpcap
295 fi
296 echo
297 ewarn "NOTE: To run wireshark as normal user you have to add yourself to"
298 ewarn "the wireshark group. This security measure ensures that only trusted"
299 ewarn "users are allowed to sniff your traffic."
300 echo
301 }
302
303
304
305 1.1 net-analyzer/wireshark/wireshark-1.6.10-r1.ebuild
306
307 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/wireshark/wireshark-1.6.10-r1.ebuild?rev=1.1&view=markup
308 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/wireshark/wireshark-1.6.10-r1.ebuild?rev=1.1&content-type=text/plain
309
310 Index: wireshark-1.6.10-r1.ebuild
311 ===================================================================
312 # Copyright 1999-2012 Gentoo Foundation
313 # Distributed under the terms of the GNU General Public License v2
314 # $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 $
315
316 EAPI=4
317 PYTHON_DEPEND="python? 2"
318 inherit autotools eutils flag-o-matic python toolchain-funcs user
319
320 [[ -n ${PV#*_rc} && ${PV#*_rc} != ${PV} ]] && MY_P=${PN}-${PV/_} || MY_P=${P}
321 DESCRIPTION="A network protocol analyzer formerly known as ethereal"
322 HOMEPAGE="http://www.wireshark.org/"
323 SRC_URI="http://www.wireshark.org/download/src/all-versions/${MY_P}.tar.bz2"
324
325 LICENSE="GPL-2"
326 SLOT="0"
327 KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
328 IUSE="
329 adns ares doc doc-pdf gtk ipv6 libadns lua gcrypt geoip kerberos profile
330 +pcap portaudio python +caps selinux smi ssl threads zlib
331 "
332 REQUIRED_USE="
333 adns? ( ^^ ( ares libadns ) )
334 adns? ( || ( ares libadns ) )
335 "
336
337 RDEPEND=">=dev-libs/glib-2.14:2
338 zlib? ( sys-libs/zlib
339 !=sys-libs/zlib-1.2.4 )
340 smi? ( net-libs/libsmi )
341 gtk? ( >=x11-libs/gtk+-2.4.0:2
342 x11-libs/pango
343 dev-libs/atk
344 x11-misc/xdg-utils )
345 ssl? ( <net-libs/gnutls-3 )
346 gcrypt? ( dev-libs/libgcrypt )
347 pcap? ( net-libs/libpcap )
348 caps? ( sys-libs/libcap )
349 kerberos? ( virtual/krb5 )
350 portaudio? ( media-libs/portaudio )
351 adns? (
352 ares? ( >=net-dns/c-ares-1.5 )
353 libadns? ( net-libs/adns )
354 )
355 geoip? ( dev-libs/geoip )
356 lua? ( >=dev-lang/lua-5.1 )
357 selinux? ( sec-policy/selinux-wireshark )"
358
359 DEPEND="${RDEPEND}
360 doc? ( dev-libs/libxslt
361 dev-libs/libxml2
362 app-doc/doxygen
363 doc-pdf? ( dev-java/fop ) )
364 virtual/pkgconfig
365 dev-lang/perl
366 sys-devel/bison
367 sys-apps/sed
368 sys-devel/flex
369 "
370
371 S=${WORKDIR}/${MY_P}
372
373 # borrowed from GSoC2010_Gentoo_Capabilities by constanze and flameyeys
374 # @FUNCTION: fcaps
375 # @USAGE: fcaps {uid:gid} {file-mode} {cap1[,cap2,...]} {file}
376 # @RETURN: 0 if all okay; non-zero if failure and fallback
377 # @DESCRIPTION:
378 # fcaps sets the specified capabilities in the effective and permitted set of
379 # the given file. In case of failure fcaps sets the given file-mode.
380 fcaps() {
381 local uid_gid=$1
382 local perms=$2
383 local capset=$3
384 local path=$4
385 local res
386
387 chmod $perms $path && \
388 chown $uid_gid $path
389 res=$?
390
391 use caps || return $res
392
393 #set the capability
394 setcap "$capset=ep" "$path" &> /dev/null
395 #check if the capabilitiy got set correctly
396 setcap -v "$capset=ep" "$path" &> /dev/null
397 res=$?
398
399 if [ $res -ne 0 ]; then
400 ewarn "Failed to set capabilities. Probable reason is missed kernel support."
401 ewarn "Kernel must have <FS>_FS_SECURITY enabled where <FS> is the filesystem"
402 ewarn "to store ${path} (e.g. EXT3_FS_SECURITY). For kernels version before"
403 ewarn "2.6.33_rc1 SECURITY_FILE_CAPABILITIES must be enabled as well."
404 ewarn
405 ewarn "Falling back to suid now..."
406 chmod u+s ${path}
407 fi
408 return $res
409 }
410
411 pkg_setup() {
412 if ! use gtk; then
413 ewarn "USE=-gtk disables gtk-based gui called wireshark."
414 ewarn "Only command line utils will be built available"
415 fi
416 if use python; then
417 python_set_active_version 2
418 python_pkg_setup
419 fi
420 # Add group for users allowed to sniff.
421 enewgroup wireshark
422 }
423
424 src_prepare() {
425 epatch \
426 "${FILESDIR}"/${PN}-1.6.6-gtk-pcap.patch \
427 "${FILESDIR}"/${PN}-1.8.1-ldflags.patch
428 sed -i -e 's|.png||g' ${PN}.desktop || die
429 eautoreconf
430 }
431
432 src_configure() {
433 local myconf
434
435 if [[ $(gcc-major-version) -lt 3 ||
436 ( $(gcc-major-version) -eq 3 &&
437 $(gcc-minor-version) -le 4 ) ]] ; then
438 die "Unsupported compiler version, please upgrade."
439 fi
440
441 # profile and pie are incompatible #215806, #292991
442 if use profile; then
443 ewarn "You've enabled the 'profile' USE flag, building PIE binaries is disabled."
444 ewarn "Also ignore \"unrecognized option '-nopie'\" gcc warning #358101."
445 append-flags $(test-flags-CC -nopie)
446 fi
447
448 # Workaround bug #213705. If krb5-config --libs has -lcrypto then pass
449 # --with-ssl to ./configure. (Mimics code from acinclude.m4).
450 if use kerberos; then
451 case `krb5-config --libs` in
452 *-lcrypto*)
453 ewarn "Kerberos was built with ssl support: linkage with openssl is enabled."
454 ewarn "Note there are annoying license incompatibilities between the OpenSSL"
455 ewarn "license and the GPL, so do your check before distributing such package."
456 myconf+=" --with-ssl"
457 ;;
458 esac
459 fi
460
461 # Hack around inability to disable doxygen/fop doc generation
462 use doc || export ac_cv_prog_HAVE_DOXYGEN=false
463 use doc-pdf || export ac_cv_prog_HAVE_FOP=false
464
465 # dumpcap requires libcap, setuid-install requires dumpcap
466 econf \
467 $(use pcap && use_enable !caps setuid-install) \
468 $(use pcap && use_enable caps setcap-install) \
469 $(use_enable gtk wireshark) \
470 $(use_enable ipv6) \
471 $(use_enable profile profile-build) \
472 $(use_enable threads) \
473 $(use_with ares c-ares) \
474 $(use_with caps libcap) \
475 $(use_with gcrypt) \
476 $(use_with geoip) \
477 $(use_with kerberos krb5) \
478 $(use_with libadns adns) \
479 $(use_with lua) \
480 $(use_with pcap dumpcap-group wireshark) \
481 $(use_with pcap) \
482 $(use_with portaudio) \
483 $(use_with python) \
484 $(use_with smi libsmi) \
485 $(use_with ssl gnutls) \
486 $(use_with zlib) \
487 --sysconfdir="${EPREFIX}"/etc/wireshark \
488 --disable-extra-gcc-checks \
489 ${myconf}
490 }
491
492 src_compile() {
493 default
494 use doc && cd docbook && { emake; }
495 }
496
497 src_install() {
498 default
499 if use doc; then
500 dohtml -r docbook/{release-notes.html,ws{d,u}g_html{,_chunked}}
501 if use doc-pdf; then
502 insinto /usr/share/doc/${PF}/pdf/
503 doins docbook/{{developer,user}-guide,release-notes}-{a4,us}.pdf
504 fi
505 fi
506
507 # FAQ is not required as is installed from help/faq.txt
508 dodoc AUTHORS ChangeLog NEWS README{,.bsd,.linux,.macos,.vmware} \
509 doc/{randpkt.txt,README*}
510
511 insinto /usr/include/wiretap
512 doins wiretap/wtap.h
513
514 if use gtk; then
515 for c in hi lo; do
516 for d in 16 32 48; do
517 insinto /usr/share/icons/${c}color/${d}x${d}/apps
518 newins image/${c}${d}-app-wireshark.png wireshark.png
519 done
520 done
521 domenu wireshark.desktop
522 fi
523 use pcap && chmod o-x "${ED}"/usr/bin/dumpcap #357237
524 }
525
526 pkg_postinst() {
527 if use caps && use pcap; then
528 fcaps 0:wireshark 550 cap_dac_read_search,cap_net_raw,cap_net_admin "${EROOT}"/usr/bin/dumpcap
529 fi
530 echo
531 ewarn "NOTE: To run wireshark as normal user you have to add yourself to"
532 ewarn "the wireshark group. This security measure ensures that only trusted"
533 ewarn "users are allowed to sniff your traffic."
534 echo
535 }