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