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