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