Gentoo Archives: gentoo-commits

From: "Richard Farina (zerochaos)" <zerochaos@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-wireless/wpa_supplicant: wpa_supplicant-2.4-r1.ebuild ChangeLog wpa_supplicant-2.4.ebuild
Date: Tue, 28 Apr 2015 14:41:00
Message-Id: 20150427182641.BB1A3989@oystercatcher.gentoo.org
1 zerochaos 15/04/27 18:26:39
2
3 Modified: ChangeLog
4 Added: wpa_supplicant-2.4-r1.ebuild
5 Removed: wpa_supplicant-2.4.ebuild
6 Log:
7 add patch for bug #547492 while not loading arch teams working on bug #524928
8
9 (Portage version: 2.2.18/cvs/Linux x86_64, RepoMan options: --force, signed Manifest commit with key DD11F94A)
10
11 Revision Changes Path
12 1.235 net-wireless/wpa_supplicant/ChangeLog
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-wireless/wpa_supplicant/ChangeLog?rev=1.235&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-wireless/wpa_supplicant/ChangeLog?rev=1.235&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-wireless/wpa_supplicant/ChangeLog?r1=1.234&r2=1.235
17
18 Index: ChangeLog
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/net-wireless/wpa_supplicant/ChangeLog,v
21 retrieving revision 1.234
22 retrieving revision 1.235
23 diff -u -r1.234 -r1.235
24 --- ChangeLog 26 Apr 2015 16:51:23 -0000 1.234
25 +++ ChangeLog 27 Apr 2015 18:26:39 -0000 1.235
26 @@ -1,6 +1,13 @@
27 # ChangeLog for net-wireless/wpa_supplicant
28 # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
29 -# $Header: /var/cvsroot/gentoo-x86/net-wireless/wpa_supplicant/ChangeLog,v 1.234 2015/04/26 16:51:23 pacho Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/net-wireless/wpa_supplicant/ChangeLog,v 1.235 2015/04/27 18:26:39 zerochaos Exp $
31 +
32 +*wpa_supplicant-2.4-r1 (27 Apr 2015)
33 +
34 + 27 Apr 2015; Rick Farina <zerochaos@g.o>
35 + +files/wpa_supplicant-2.4-cve-2015-1863.patch, +wpa_supplicant-2.4-r1.ebuild,
36 + -wpa_supplicant-2.4.ebuild:
37 + add patch for bug #547492 while not loading arch teams working on bug #524928
38
39 26 Apr 2015; Pacho Ramos <pacho@g.o> wpa_supplicant-2.4.ebuild:
40 ppc stable wrt bug #524928
41
42
43
44 1.1 net-wireless/wpa_supplicant/wpa_supplicant-2.4-r1.ebuild
45
46 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-wireless/wpa_supplicant/wpa_supplicant-2.4-r1.ebuild?rev=1.1&view=markup
47 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-wireless/wpa_supplicant/wpa_supplicant-2.4-r1.ebuild?rev=1.1&content-type=text/plain
48
49 Index: wpa_supplicant-2.4-r1.ebuild
50 ===================================================================
51 # Copyright 1999-2015 Gentoo Foundation
52 # Distributed under the terms of the GNU General Public License v2
53 # $Header: /var/cvsroot/gentoo-x86/net-wireless/wpa_supplicant/wpa_supplicant-2.4-r1.ebuild,v 1.1 2015/04/27 18:26:39 zerochaos Exp $
54
55 EAPI=5
56
57 inherit eutils toolchain-funcs qt4-r2 systemd multilib
58
59 DESCRIPTION="IEEE 802.1X/WPA supplicant for secure wireless transfers"
60 HOMEPAGE="http://hostap.epitest.fi/wpa_supplicant/"
61 SRC_URI="http://hostap.epitest.fi/releases/${P}.tar.gz"
62 LICENSE="|| ( GPL-2 BSD )"
63
64 SLOT="0"
65 KEYWORDS="~alpha amd64 ~arm ~arm64 ~ia64 ~mips ppc ppc64 ~sparc x86 ~x86-fbsd"
66 IUSE="ap dbus gnutls eap-sim fasteap +hs2-0 p2p ps3 qt4 readline selinux smartcard ssl tdls uncommon-eap-types wimax wps kernel_linux kernel_FreeBSD"
67 REQUIRED_USE="fasteap? ( !gnutls !ssl ) smartcard? ( ssl )"
68
69 CDEPEND="dbus? ( sys-apps/dbus )
70 kernel_linux? (
71 eap-sim? ( sys-apps/pcsc-lite )
72 dev-libs/libnl:3
73 net-wireless/crda
74 )
75 !kernel_linux? ( net-libs/libpcap )
76 qt4? (
77 dev-qt/qtcore:4
78 dev-qt/qtgui:4
79 dev-qt/qtsvg:4
80 )
81 readline? (
82 sys-libs/ncurses
83 sys-libs/readline:0
84 )
85 ssl? ( dev-libs/openssl:0 )
86 !ssl? ( gnutls? ( net-libs/gnutls ) )
87 !ssl? ( !gnutls? ( dev-libs/libtommath ) )
88 "
89 DEPEND="${CDEPEND}
90 virtual/pkgconfig
91 "
92 RDEPEND="${CDEPEND}
93 selinux? ( sec-policy/selinux-networkmanager )
94 "
95
96 S="${WORKDIR}/${P}/${PN}"
97
98 Kconfig_style_config() {
99 #param 1 is CONFIG_* item
100 #param 2 is what to set it = to, defaulting in y
101 CONFIG_PARAM="${CONFIG_HEADER:-CONFIG_}$1"
102 setting="${2:-y}"
103
104 if [ ! $setting = n ]; then
105 #first remove any leading "# " if $2 is not n
106 sed -i "/^# *$CONFIG_PARAM=/s/^# *//" .config || echo "Kconfig_style_config error uncommenting $CONFIG_PARAM"
107 #set item = $setting (defaulting to y)
108 sed -i "/^$CONFIG_PARAM/s/=.*/=$setting/" .config || echo "Kconfig_style_config error setting $CONFIG_PARAM=$setting"
109 else
110 #ensure item commented out
111 sed -i "/^$CONFIG_PARAM/s/$CONFIG_PARAM/# $CONFIG_PARAM/" .config || echo "Kconfig_style_config error commenting $CONFIG_PARAM"
112 fi
113 }
114
115 pkg_setup() {
116 if use gnutls && use ssl ; then
117 elog "You have both 'gnutls' and 'ssl' USE flags enabled: defaulting to USE=\"ssl\""
118 fi
119 }
120
121 src_prepare() {
122 # net/bpf.h needed for net-libs/libpcap on Gentoo/FreeBSD
123 sed -i \
124 -e "s:\(#include <pcap\.h>\):#include <net/bpf.h>\n\1:" \
125 ../src/l2_packet/l2_packet_freebsd.c || die
126
127 # People seem to take the example configuration file too literally (bug #102361)
128 sed -i \
129 -e "s:^\(opensc_engine_path\):#\1:" \
130 -e "s:^\(pkcs11_engine_path\):#\1:" \
131 -e "s:^\(pkcs11_module_path\):#\1:" \
132 wpa_supplicant.conf || die
133
134 # Change configuration to match Gentoo locations (bug #143750)
135 sed -i \
136 -e "s:/usr/lib/opensc:/usr/$(get_libdir):" \
137 -e "s:/usr/lib/pkcs11:/usr/$(get_libdir):" \
138 wpa_supplicant.conf || die
139
140 if use dbus; then
141 epatch "${FILESDIR}/${P}-dbus-path-fix.patch"
142 fi
143
144 # systemd entries to D-Bus service files (bug #372877)
145 echo 'SystemdService=wpa_supplicant.service' \
146 | tee -a dbus/*.service >/dev/null || die
147
148 cd "${WORKDIR}/${P}"
149
150 if use wimax; then
151 # generate-libeap-peer.patch comes before
152 # fix-undefined-reference-to-random_get_bytes.patch
153 epatch "${FILESDIR}/${P}-generate-libeap-peer.patch"
154 epatch "${FILESDIR}/${P}-fix-undefined-reference-to-random_get_bytes.patch"
155
156 # multilib-strict fix (bug #373685)
157 sed -e "s/\/usr\/lib/\/usr\/$(get_libdir)/" -i src/eap_peer/Makefile
158 fi
159
160 # bug (320097)
161 epatch "${FILESDIR}/${P}-do-not-call-dbus-functions-with-NULL-path.patch"
162
163 # TODO - NEED TESTING TO SEE IF STILL NEEDED, NOT COMPATIBLE WITH 1.0 OUT OF THE BOX,
164 # SO WOULD BE NICE TO JUST DROP IT, IF IT IS NOT NEEDED.
165 # bug (374089)
166 #epatch "${FILESDIR}/${P}-dbus-WPAIE-fix.patch"
167
168 epatch "${FILESDIR}"/wpa_supplicant-2.4-cve-2015-1863.patch
169 }
170
171 src_configure() {
172 # Toolchain setup
173 tc-export CC
174
175 cp defconfig .config
176
177 # Basic setup
178 Kconfig_style_config CTRL_IFACE
179 Kconfig_style_config BACKEND file
180 Kconfig_style_config IBSS_RSN
181 Kconfig_style_config IEEE80211W
182 Kconfig_style_config IEEE80211R
183
184 # Basic authentication methods
185 # NOTE: we don't set GPSK or SAKE as they conflict
186 # with the below options
187 Kconfig_style_config EAP_GTC
188 Kconfig_style_config EAP_MD5
189 Kconfig_style_config EAP_OTP
190 Kconfig_style_config EAP_PAX
191 Kconfig_style_config EAP_PSK
192 Kconfig_style_config EAP_TLV
193 Kconfig_style_config EAP_EXE
194 Kconfig_style_config IEEE8021X_EAPOL
195 Kconfig_style_config PKCS12
196 Kconfig_style_config PEERKEY
197 Kconfig_style_config EAP_LEAP
198 Kconfig_style_config EAP_MSCHAPV2
199 Kconfig_style_config EAP_PEAP
200 Kconfig_style_config EAP_TLS
201 Kconfig_style_config EAP_TTLS
202
203 # Enabling background scanning.
204 Kconfig_style_config BGSCAN_SIMPLE
205 Kconfig_style_config BGSCAN_LEARN
206
207 if use dbus ; then
208 Kconfig_style_config CTRL_IFACE_DBUS
209 Kconfig_style_config CTRL_IFACE_DBUS_NEW
210 Kconfig_style_config CTRL_IFACE_DBUS_INTRO
211 fi
212
213 # Enable support for writing debug info to a log file.
214 Kconfig_style_config DEBUG_FILE
215
216 if use hs2-0 ; then
217 Kconfig_style_config INTERWORKING
218 Kconfig_style_config HS20
219 fi
220
221 if use uncommon-eap-types; then
222 Kconfig_style_config EAP_GPSK
223 Kconfig_style_config EAP_SAKE
224 Kconfig_style_config EAP_GPSK_SHA256
225 Kconfig_style_config EAP_IKEV2
226 Kconfig_style_config EAP_EKE
227 fi
228
229 if use eap-sim ; then
230 # Smart card authentication
231 Kconfig_style_config EAP_SIM
232 Kconfig_style_config EAP_AKA
233 Kconfig_style_config EAP_AKA_PRIME
234 Kconfig_style_config PCSC
235 fi
236
237 if use fasteap ; then
238 Kconfig_style_config EAP_FAST
239 fi
240
241 if use readline ; then
242 # readline/history support for wpa_cli
243 Kconfig_style_config READLINE
244 else
245 #internal line edit mode for wpa_cli
246 Kconfig_style_config WPA_CLI_EDIT
247 fi
248
249 # SSL authentication methods
250 if use ssl ; then
251 Kconfig_style_config TLS openssl
252 elif use gnutls ; then
253 Kconfig_style_config TLS gnutls
254 Kconfig_style_config GNUTLS_EXTRA
255 else
256 Kconfig_style_config TLS internal
257 fi
258
259 if use smartcard ; then
260 Kconfig_style_config SMARTCARD
261 fi
262
263 if use tdls ; then
264 Kconfig_style_config TDLS
265 fi
266
267 if use kernel_linux ; then
268 # Linux specific drivers
269 Kconfig_style_config DRIVER_ATMEL
270 Kconfig_style_config DRIVER_HOSTAP
271 Kconfig_style_config DRIVER_IPW
272 Kconfig_style_config DRIVER_NL80211
273 Kconfig_style_config DRIVER_RALINK
274 Kconfig_style_config DRIVER_WEXT
275 Kconfig_style_config DRIVER_WIRED
276
277 if use ps3 ; then
278 Kconfig_style_config DRIVER_PS3
279 fi
280
281 elif use kernel_FreeBSD ; then
282 # FreeBSD specific driver
283 Kconfig_style_config DRIVER_BSD
284 fi
285
286 # Wi-Fi Protected Setup (WPS)
287 if use wps ; then
288 Kconfig_style_config WPS
289 Kconfig_style_config WPS2
290 # USB Flash Drive
291 Kconfig_style_config WPS_UFD
292 # External Registrar
293 Kconfig_style_config WPS_ER
294 # Universal Plug'n'Play
295 Kconfig_style_config WPS_UPNP
296 # Near Field Communication
297 Kconfig_style_config WPS_NFC
298 fi
299
300 # Wi-Fi Direct (WiDi)
301 if use p2p ; then
302 Kconfig_style_config P2P
303 Kconfig_style_config WIFI_DISPLAY
304 fi
305
306 # Access Point Mode
307 if use ap ; then
308 Kconfig_style_config AP
309 fi
310
311 # Enable mitigation against certain attacks against TKIP
312 Kconfig_style_config DELAYED_MIC_ERROR_REPORT
313
314 # If we are using libnl 2.0 and above, enable support for it
315 # Bug 382159
316 # Removed for now, since the 3.2 version is broken, and we don't
317 # support it.
318 if has_version ">=dev-libs/libnl-3.2"; then
319 Kconfig_style_config LIBNL32
320 fi
321
322 if use qt4 ; then
323 pushd "${S}"/wpa_gui-qt4 > /dev/null
324 eqmake4 wpa_gui.pro
325 popd > /dev/null
326 fi
327 }
328
329 src_compile() {
330 einfo "Building wpa_supplicant"
331 emake V=1 BINDIR=/usr/sbin
332
333 if use wimax; then
334 emake -C ../src/eap_peer clean
335 emake -C ../src/eap_peer
336 fi
337
338 if use qt4 ; then
339 pushd "${S}"/wpa_gui-qt4 > /dev/null
340 einfo "Building wpa_gui"
341 emake
342 popd > /dev/null
343 fi
344 }
345
346 src_install() {
347 dosbin wpa_supplicant
348 dobin wpa_cli wpa_passphrase
349
350 # baselayout-1 compat
351 if has_version "<sys-apps/baselayout-2.0.0"; then
352 dodir /sbin
353 dosym /usr/sbin/wpa_supplicant /sbin/wpa_supplicant
354 dodir /bin
355 dosym /usr/bin/wpa_cli /bin/wpa_cli
356 fi
357
358 if has_version ">=sys-apps/openrc-0.5.0"; then
359 newinitd "${FILESDIR}/${PN}-init.d" wpa_supplicant
360 newconfd "${FILESDIR}/${PN}-conf.d" wpa_supplicant
361 fi
362
363 exeinto /etc/wpa_supplicant/
364 newexe "${FILESDIR}/wpa_cli.sh" wpa_cli.sh
365
366 dodoc ChangeLog {eap_testing,todo}.txt README{,-WPS} \
367 wpa_supplicant.conf
368
369 newdoc .config build-config
370
371 doman doc/docbook/*.{5,8}
372
373 if use qt4 ; then
374 into /usr
375 dobin wpa_gui-qt4/wpa_gui
376 doicon wpa_gui-qt4/icons/wpa_gui.svg
377 make_desktop_entry wpa_gui "WPA Supplicant Administration GUI" "wpa_gui" "Qt;Network;"
378 fi
379
380 use wimax && emake DESTDIR="${D}" -C ../src/eap_peer install
381
382 if use dbus ; then
383 pushd "${S}"/dbus > /dev/null
384 insinto /etc/dbus-1/system.d
385 newins dbus-wpa_supplicant.conf wpa_supplicant.conf
386 insinto /usr/share/dbus-1/system-services
387 doins fi.epitest.hostap.WPASupplicant.service fi.w1.wpa_supplicant1.service
388 popd > /dev/null
389
390 # This unit relies on dbus support, bug 538600.
391 systemd_dounit systemd/wpa_supplicant.service
392 fi
393
394 systemd_dounit "systemd/wpa_supplicant@.service"
395 systemd_dounit "systemd/wpa_supplicant-nl80211@.service"
396 systemd_dounit "systemd/wpa_supplicant-wired@.service"
397 }
398
399 pkg_postinst() {
400 elog "If this is a clean installation of wpa_supplicant, you"
401 elog "have to create a configuration file named"
402 elog "/etc/wpa_supplicant/wpa_supplicant.conf"
403 elog
404 elog "An example configuration file is available for reference in"
405 elog "/usr/share/doc/${PF}/"
406
407 if [[ -e ${ROOT}etc/wpa_supplicant.conf ]] ; then
408 echo
409 ewarn "WARNING: your old configuration file ${ROOT}etc/wpa_supplicant.conf"
410 ewarn "needs to be moved to ${ROOT}etc/wpa_supplicant/wpa_supplicant.conf"
411 fi
412
413 # Mea culpa, feel free to remove that after some time --mgorny.
414 local fn
415 for fn in wpa_supplicant{,@wlan0}.service; do
416 if [[ -e "${ROOT}"/etc/systemd/system/network.target.wants/${fn} ]]
417 then
418 ebegin "Moving ${fn} to multi-user.target"
419 mv "${ROOT}"/etc/systemd/system/network.target.wants/${fn} \
420 "${ROOT}"/etc/systemd/system/multi-user.target.wants/
421 eend ${?} \
422 "Please try to re-enable ${fn}"
423 fi
424 done
425 }