Gentoo Archives: gentoo-commits

From: Rick Farina <zerochaos@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-wireless/wpa_supplicant/files/, net-wireless/wpa_supplicant/
Date: Wed, 05 Dec 2018 22:08:36
Message-Id: 1544047702.e0288112138a70a8acc3ae0196772fd7ccb677ce.zerochaos@gentoo
1 commit: e0288112138a70a8acc3ae0196772fd7ccb677ce
2 Author: Rick Farina <zerochaos <AT> gentoo <DOT> org>
3 AuthorDate: Wed Dec 5 22:08:06 2018 +0000
4 Commit: Rick Farina <zerochaos <AT> gentoo <DOT> org>
5 CommitDate: Wed Dec 5 22:08:22 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e0288112
7
8 net-wireless/wpa_supplicant: bump bug #672568
9
10 Package-Manager: Portage-2.3.52, Repoman-2.3.12
11 Signed-off-by: Rick Farina <zerochaos <AT> gentoo.org>
12
13 net-wireless/wpa_supplicant/Manifest | 1 +
14 ...pa_supplicant-2.7-fix-undefined-remove-ie.patch | 38 ++
15 .../wpa_supplicant/wpa_supplicant-2.7.ebuild | 456 +++++++++++++++++++++
16 3 files changed, 495 insertions(+)
17
18 diff --git a/net-wireless/wpa_supplicant/Manifest b/net-wireless/wpa_supplicant/Manifest
19 index b73800a9506..6c70e97a288 100644
20 --- a/net-wireless/wpa_supplicant/Manifest
21 +++ b/net-wireless/wpa_supplicant/Manifest
22 @@ -1 +1,2 @@
23 DIST wpa_supplicant-2.6.tar.gz 2753524 BLAKE2B 99c61326c402f60b384fa6c9a7381e43d4d021d7e44537a6e05552909270f30997da91b690d8a30aa690f0d1ce0aed7798bd8bb8972fcf6830c282ccc91193ac SHA512 46442cddb6ca043b8b08d143908f149954c238e0f3a57a0df73ca4fab9c1acd91b078f3f26375a1d99cd1d65625986328018c735d8705882c8f91e389cad28a6
24 +DIST wpa_supplicant-2.7.tar.gz 3093713 BLAKE2B bbf961b6e13757e9d7bb8b9de1808382a551265cd2d54de14e24bde3567aa5298b48fdcd0df75db79189a051532c54b28eab5519c32fc8fc00459365b57039aa SHA512 8b6eb5b5f30d351c73db63d73c09f24028a18166246539b4a4f89f0d226fb42751afa2ff72296df33317f615150325d285e8e7bda30e0d88abcdc9637ab731d3
25
26 diff --git a/net-wireless/wpa_supplicant/files/wpa_supplicant-2.7-fix-undefined-remove-ie.patch b/net-wireless/wpa_supplicant/files/wpa_supplicant-2.7-fix-undefined-remove-ie.patch
27 new file mode 100644
28 index 00000000000..97a8cc7f3e1
29 --- /dev/null
30 +++ b/net-wireless/wpa_supplicant/files/wpa_supplicant-2.7-fix-undefined-remove-ie.patch
31 @@ -0,0 +1,38 @@
32 +From f2973fa39d6109f0f34969e91551a98dc340d537 Mon Sep 17 00:00:00 2001
33 +From: Jouni Malinen <j@××.fi>
34 +Date: Mon, 3 Dec 2018 12:00:26 +0200
35 +Subject: FT: Fix CONFIG_IEEE80211X=y build without CONFIG_FILS=y
36 +
37 +remove_ie() was defined within an ifdef CONFIG_FILS block while it is
38 +now needed even without CONFIG_FILS=y. Remove the CONFIG_FILS condition
39 +there.
40 +
41 +Fixes 8c41734e5de1 ("FT: Fix Reassociation Request IEs during FT protocol")
42 +Signed-off-by: Jouni Malinen <j@××.fi>
43 +---
44 + wpa_supplicant/sme.c | 2 --
45 + 1 file changed, 2 deletions(-)
46 +
47 +diff --git a/wpa_supplicant/sme.c b/wpa_supplicant/sme.c
48 +index 39c8069..f77f751 100644
49 +--- a/wpa_supplicant/sme.c
50 ++++ b/wpa_supplicant/sme.c
51 +@@ -1386,7 +1386,6 @@ void sme_event_auth(struct wpa_supplicant *wpa_s, union wpa_event_data *data)
52 + }
53 +
54 +
55 +-#ifdef CONFIG_FILS
56 + #ifdef CONFIG_IEEE80211R
57 + static void remove_ie(u8 *buf, size_t *len, u8 eid)
58 + {
59 +@@ -1401,7 +1400,6 @@ static void remove_ie(u8 *buf, size_t *len, u8 eid)
60 + }
61 + }
62 + #endif /* CONFIG_IEEE80211R */
63 +-#endif /* CONFIG_FILS */
64 +
65 +
66 + void sme_associate(struct wpa_supplicant *wpa_s, enum wpas_mode mode,
67 +--
68 +cgit v0.12
69 +
70
71 diff --git a/net-wireless/wpa_supplicant/wpa_supplicant-2.7.ebuild b/net-wireless/wpa_supplicant/wpa_supplicant-2.7.ebuild
72 new file mode 100644
73 index 00000000000..12a69aa090d
74 --- /dev/null
75 +++ b/net-wireless/wpa_supplicant/wpa_supplicant-2.7.ebuild
76 @@ -0,0 +1,456 @@
77 +# Copyright 1999-2018 Gentoo Authors
78 +# Distributed under the terms of the GNU General Public License v2
79 +
80 +EAPI=6
81 +
82 +inherit eutils qmake-utils systemd toolchain-funcs readme.gentoo-r1
83 +
84 +DESCRIPTION="IEEE 802.1X/WPA supplicant for secure wireless transfers"
85 +HOMEPAGE="https://w1.fi/wpa_supplicant/"
86 +LICENSE="|| ( GPL-2 BSD )"
87 +
88 +if [ "${PV}" = "9999" ]; then
89 + inherit git-r3
90 + EGIT_REPO_URI="https://w1.fi/hostap.git"
91 + KEYWORDS=""
92 +else
93 + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
94 + SRC_URI="https://w1.fi/releases/${P}.tar.gz"
95 +fi
96 +
97 +SLOT="0"
98 +IUSE="ap bindist dbus eap-sim eapol_test fasteap gnutls +hs2-0 libressl p2p privsep ps3 qt5 readline selinux smartcard ssl suiteb tdls uncommon-eap-types wimax wps kernel_linux kernel_FreeBSD"
99 +REQUIRED_USE="smartcard? ( ssl )"
100 +
101 +CDEPEND="dbus? ( sys-apps/dbus )
102 + kernel_linux? (
103 + dev-libs/libnl:3
104 + net-wireless/crda
105 + eap-sim? ( sys-apps/pcsc-lite )
106 + )
107 + !kernel_linux? ( net-libs/libpcap )
108 + qt5? (
109 + dev-qt/qtcore:5
110 + dev-qt/qtgui:5
111 + dev-qt/qtsvg:5
112 + dev-qt/qtwidgets:5
113 + )
114 + readline? (
115 + sys-libs/ncurses:0=
116 + sys-libs/readline:0=
117 + )
118 + ssl? (
119 + gnutls? (
120 + dev-libs/libgcrypt:0=
121 + net-libs/gnutls:=
122 + )
123 + !gnutls? (
124 + !libressl? ( >=dev-libs/openssl-1.0.2k:0=[bindist=] )
125 + libressl? ( dev-libs/libressl:0= )
126 + )
127 + )
128 + !ssl? ( dev-libs/libtommath )
129 +"
130 +DEPEND="${CDEPEND}
131 + virtual/pkgconfig
132 +"
133 +RDEPEND="${CDEPEND}
134 + selinux? ( sec-policy/selinux-networkmanager )
135 +"
136 +
137 +DOC_CONTENTS="
138 + If this is a clean installation of wpa_supplicant, you
139 + have to create a configuration file named
140 + ${EROOT%/}/etc/wpa_supplicant/wpa_supplicant.conf
141 + An example configuration file is available for reference in
142 + ${EROOT%/}/usr/share/doc/${PF}/
143 +"
144 +
145 +S="${WORKDIR}/${P}/${PN}"
146 +
147 +Kconfig_style_config() {
148 + #param 1 is CONFIG_* item
149 + #param 2 is what to set it = to, defaulting in y
150 + CONFIG_PARAM="${CONFIG_HEADER:-CONFIG_}$1"
151 + setting="${2:-y}"
152 +
153 + if [ ! $setting = n ]; then
154 + #first remove any leading "# " if $2 is not n
155 + sed -i "/^# *$CONFIG_PARAM=/s/^# *//" .config || echo "Kconfig_style_config error uncommenting $CONFIG_PARAM"
156 + #set item = $setting (defaulting to y)
157 + sed -i "/^$CONFIG_PARAM/s/=.*/=$setting/" .config || echo "Kconfig_style_config error setting $CONFIG_PARAM=$setting"
158 + if [ -z "$( grep ^$CONFIG_PARAM= .config )" ] ; then
159 + echo "$CONFIG_PARAM=$setting" >>.config
160 + fi
161 + else
162 + #ensure item commented out
163 + sed -i "/^$CONFIG_PARAM/s/$CONFIG_PARAM/# $CONFIG_PARAM/" .config || echo "Kconfig_style_config error commenting $CONFIG_PARAM"
164 + fi
165 +}
166 +
167 +pkg_setup() {
168 + if use ssl ; then
169 + if use gnutls && use libressl ; then
170 + elog "You have both 'gnutls' and 'libressl' USE flags enabled: defaulting to USE=\"gnutls\""
171 + fi
172 + else
173 + elog "You have 'ssl' USE flag disabled: defaulting to internal TLS implementation"
174 + fi
175 +}
176 +
177 +src_prepare() {
178 + default
179 +
180 + # net/bpf.h needed for net-libs/libpcap on Gentoo/FreeBSD
181 + sed -i \
182 + -e "s:\(#include <pcap\.h>\):#include <net/bpf.h>\n\1:" \
183 + ../src/l2_packet/l2_packet_freebsd.c || die
184 +
185 + # People seem to take the example configuration file too literally (bug #102361)
186 + sed -i \
187 + -e "s:^\(opensc_engine_path\):#\1:" \
188 + -e "s:^\(pkcs11_engine_path\):#\1:" \
189 + -e "s:^\(pkcs11_module_path\):#\1:" \
190 + wpa_supplicant.conf || die
191 +
192 + # Change configuration to match Gentoo locations (bug #143750)
193 + sed -i \
194 + -e "s:/usr/lib/opensc:/usr/$(get_libdir):" \
195 + -e "s:/usr/lib/pkcs11:/usr/$(get_libdir):" \
196 + wpa_supplicant.conf || die
197 +
198 + # systemd entries to D-Bus service files (bug #372877)
199 + echo 'SystemdService=wpa_supplicant.service' \
200 + | tee -a dbus/*.service >/dev/null || die
201 +
202 + cd "${WORKDIR}/${P}" || die
203 +
204 + if use wimax; then
205 + # generate-libeap-peer.patch comes before
206 + # fix-undefined-reference-to-random_get_bytes.patch
207 + eapply "${FILESDIR}/${P}-generate-libeap-peer.patch"
208 +
209 + # multilib-strict fix (bug #373685)
210 + sed -e "s/\/usr\/lib/\/usr\/$(get_libdir)/" -i src/eap_peer/Makefile || die
211 + fi
212 +
213 + # bug (320097)
214 + eapply "${FILESDIR}/${PN}-2.6-do-not-call-dbus-functions-with-NULL-path.patch"
215 +
216 + # fix undefined reference to remove_ie()
217 + eapply "${FILESDIR}/${P}-fix-undefined-remove-ie.patch"
218 +
219 + # bug (640492)
220 + sed -i 's#-Werror ##' wpa_supplicant/Makefile || die
221 +}
222 +
223 +src_configure() {
224 + # Toolchain setup
225 + tc-export CC
226 +
227 + cp defconfig .config || die
228 +
229 + # Basic setup
230 + Kconfig_style_config CTRL_IFACE
231 + Kconfig_style_config MATCH_IFACE
232 + Kconfig_style_config BACKEND file
233 + Kconfig_style_config IBSS_RSN
234 + Kconfig_style_config IEEE80211W
235 + Kconfig_style_config IEEE80211R
236 +
237 + # Basic authentication methods
238 + # NOTE: we don't set GPSK or SAKE as they conflict
239 + # with the below options
240 + Kconfig_style_config EAP_GTC
241 + Kconfig_style_config EAP_MD5
242 + Kconfig_style_config EAP_OTP
243 + Kconfig_style_config EAP_PAX
244 + Kconfig_style_config EAP_PSK
245 + Kconfig_style_config EAP_TLV
246 + Kconfig_style_config EAP_EXE
247 + Kconfig_style_config IEEE8021X_EAPOL
248 + Kconfig_style_config PKCS12
249 + Kconfig_style_config PEERKEY
250 + Kconfig_style_config EAP_LEAP
251 + Kconfig_style_config EAP_MSCHAPV2
252 + Kconfig_style_config EAP_PEAP
253 + Kconfig_style_config EAP_TLS
254 + Kconfig_style_config EAP_TTLS
255 +
256 + # Enabling background scanning.
257 + Kconfig_style_config BGSCAN_SIMPLE
258 + Kconfig_style_config BGSCAN_LEARN
259 +
260 + if use dbus ; then
261 + Kconfig_style_config CTRL_IFACE_DBUS
262 + Kconfig_style_config CTRL_IFACE_DBUS_NEW
263 + Kconfig_style_config CTRL_IFACE_DBUS_INTRO
264 + fi
265 +
266 + if use eapol_test ; then
267 + Kconfig_style_config EAPOL_TEST
268 + fi
269 +
270 + # Enable support for writing debug info to a log file and syslog.
271 + Kconfig_style_config DEBUG_FILE
272 + Kconfig_style_config DEBUG_SYSLOG
273 +
274 + if use hs2-0 ; then
275 + Kconfig_style_config INTERWORKING
276 + Kconfig_style_config HS20
277 + fi
278 +
279 + if use uncommon-eap-types; then
280 + Kconfig_style_config EAP_GPSK
281 + Kconfig_style_config EAP_SAKE
282 + Kconfig_style_config EAP_GPSK_SHA256
283 + Kconfig_style_config EAP_IKEV2
284 + Kconfig_style_config EAP_EKE
285 + fi
286 +
287 + if use eap-sim ; then
288 + # Smart card authentication
289 + Kconfig_style_config EAP_SIM
290 + Kconfig_style_config EAP_AKA
291 + Kconfig_style_config EAP_AKA_PRIME
292 + Kconfig_style_config PCSC
293 + fi
294 +
295 + if use fasteap ; then
296 + Kconfig_style_config EAP_FAST
297 + fi
298 +
299 + if use readline ; then
300 + # readline/history support for wpa_cli
301 + Kconfig_style_config READLINE
302 + else
303 + #internal line edit mode for wpa_cli
304 + Kconfig_style_config WPA_CLI_EDIT
305 + fi
306 +
307 + if use suiteb; then
308 + Kconfig_style_config SUITEB
309 + fi
310 +
311 + # SSL authentication methods
312 + if use ssl ; then
313 + if use gnutls ; then
314 + Kconfig_style_config TLS gnutls
315 + Kconfig_style_config GNUTLS_EXTRA
316 + else
317 + #this fails for gnutls
318 + Kconfig_style_config SUITEB192
319 + Kconfig_style_config TLS openssl
320 + if ! use bindist; then
321 + #this fails for gnutls
322 + Kconfig_style_config EAP_PWD
323 + # SAE fails on gnutls and everything below here needs SAE
324 + # Enabling mesh networks.
325 + Kconfig_style_config MESH
326 + #WPA3
327 + Kconfig_style_config OWE
328 + Kconfig_style_config SAE
329 + #we also need to disable FILS, except that isn't enabled yet
330 + fi
331 +
332 + fi
333 + else
334 + Kconfig_style_config TLS internal
335 + fi
336 +
337 + if use smartcard ; then
338 + Kconfig_style_config SMARTCARD
339 + fi
340 +
341 + if use tdls ; then
342 + Kconfig_style_config TDLS
343 + fi
344 +
345 + if use kernel_linux ; then
346 + # Linux specific drivers
347 + Kconfig_style_config DRIVER_ATMEL
348 + Kconfig_style_config DRIVER_HOSTAP
349 + Kconfig_style_config DRIVER_IPW
350 + Kconfig_style_config DRIVER_NL80211
351 + Kconfig_style_config DRIVER_RALINK
352 + Kconfig_style_config DRIVER_WEXT
353 + Kconfig_style_config DRIVER_WIRED
354 +
355 + if use ps3 ; then
356 + Kconfig_style_config DRIVER_PS3
357 + fi
358 +
359 + elif use kernel_FreeBSD ; then
360 + # FreeBSD specific driver
361 + Kconfig_style_config DRIVER_BSD
362 + fi
363 +
364 + # Wi-Fi Protected Setup (WPS)
365 + if use wps ; then
366 + Kconfig_style_config WPS
367 + Kconfig_style_config WPS2
368 + # USB Flash Drive
369 + Kconfig_style_config WPS_UFD
370 + # External Registrar
371 + Kconfig_style_config WPS_ER
372 + # Universal Plug'n'Play
373 + Kconfig_style_config WPS_UPNP
374 + # Near Field Communication
375 + Kconfig_style_config WPS_NFC
376 + fi
377 +
378 + # Wi-Fi Direct (WiDi)
379 + if use p2p ; then
380 + Kconfig_style_config P2P
381 + Kconfig_style_config WIFI_DISPLAY
382 + fi
383 +
384 + # Access Point Mode
385 + if use ap ; then
386 + Kconfig_style_config AP
387 + fi
388 +
389 + # Enable essentials for AP/P2P
390 + if use ap || use p2p ; then
391 + # Enabling HT support (802.11n)
392 + Kconfig_style_config IEEE80211N
393 +
394 + # Enabling VHT support (802.11ac)
395 + Kconfig_style_config IEEE80211AC
396 + fi
397 +
398 + # Enable mitigation against certain attacks against TKIP
399 + Kconfig_style_config DELAYED_MIC_ERROR_REPORT
400 +
401 + if use privsep ; then
402 + Kconfig_style_config PRIVSEP
403 + fi
404 +
405 + # If we are using libnl 2.0 and above, enable support for it
406 + # Bug 382159
407 + # Removed for now, since the 3.2 version is broken, and we don't
408 + # support it.
409 + if has_version ">=dev-libs/libnl-3.2"; then
410 + Kconfig_style_config LIBNL32
411 + fi
412 +
413 + if use qt5 ; then
414 + pushd "${S}"/wpa_gui-qt4 > /dev/null || die
415 + eqmake5 wpa_gui.pro
416 + popd > /dev/null || die
417 + fi
418 +}
419 +
420 +src_compile() {
421 + einfo "Building wpa_supplicant"
422 + emake V=1 BINDIR=/usr/sbin
423 +
424 + if use wimax; then
425 + emake -C ../src/eap_peer clean
426 + emake -C ../src/eap_peer
427 + fi
428 +
429 + if use qt5; then
430 + einfo "Building wpa_gui"
431 + emake -C "${S}"/wpa_gui-qt4
432 + fi
433 +
434 + if use eapol_test ; then
435 + emake eapol_test
436 + fi
437 +}
438 +
439 +src_install() {
440 + dosbin wpa_supplicant
441 + use privsep && dosbin wpa_priv
442 + dobin wpa_cli wpa_passphrase
443 +
444 + # baselayout-1 compat
445 + if has_version "<sys-apps/baselayout-2.0.0"; then
446 + dodir /sbin
447 + dosym ../usr/sbin/wpa_supplicant /sbin/wpa_supplicant
448 + dodir /bin
449 + dosym ../usr/bin/wpa_cli /bin/wpa_cli
450 + fi
451 +
452 + if has_version ">=sys-apps/openrc-0.5.0"; then
453 + newinitd "${FILESDIR}/${PN}-init.d" wpa_supplicant
454 + newconfd "${FILESDIR}/${PN}-conf.d" wpa_supplicant
455 + fi
456 +
457 + exeinto /etc/wpa_supplicant/
458 + newexe "${FILESDIR}/wpa_cli.sh" wpa_cli.sh
459 +
460 + readme.gentoo_create_doc
461 + dodoc ChangeLog {eap_testing,todo}.txt README{,-WPS} \
462 + wpa_supplicant.conf
463 +
464 + newdoc .config build-config
465 +
466 + if [ "${PV}" != "9999" ]; then
467 + doman doc/docbook/*.{5,8}
468 + fi
469 +
470 + if use qt5 ; then
471 + into /usr
472 + dobin wpa_gui-qt4/wpa_gui
473 + doicon wpa_gui-qt4/icons/wpa_gui.svg
474 + make_desktop_entry wpa_gui "WPA Supplicant Administration GUI" "wpa_gui" "Qt;Network;"
475 + else
476 + rm "${ED}"/usr/share/man/man8/wpa_gui.8
477 + fi
478 +
479 + use wimax && emake DESTDIR="${D}" -C ../src/eap_peer install
480 +
481 + if use dbus ; then
482 + pushd "${S}"/dbus > /dev/null || die
483 + insinto /etc/dbus-1/system.d
484 + newins dbus-wpa_supplicant.conf wpa_supplicant.conf
485 + insinto /usr/share/dbus-1/system-services
486 + doins fi.epitest.hostap.WPASupplicant.service fi.w1.wpa_supplicant1.service
487 + popd > /dev/null || die
488 +
489 + # This unit relies on dbus support, bug 538600.
490 + systemd_dounit systemd/wpa_supplicant.service
491 + fi
492 +
493 + if use eapol_test ; then
494 + dobin eapol_test
495 + fi
496 +
497 + systemd_dounit "systemd/wpa_supplicant@.service"
498 + systemd_dounit "systemd/wpa_supplicant-nl80211@.service"
499 + systemd_dounit "systemd/wpa_supplicant-wired@.service"
500 +}
501 +
502 +pkg_postinst() {
503 + readme.gentoo_print_elog
504 +
505 + if [[ -e "${EROOT%/}"/etc/wpa_supplicant.conf ]] ; then
506 + echo
507 + ewarn "WARNING: your old configuration file ${EROOT%/}/etc/wpa_supplicant.conf"
508 + ewarn "needs to be moved to ${EROOT%/}/etc/wpa_supplicant/wpa_supplicant.conf"
509 + fi
510 +
511 + if use bindist || use gnutls; then
512 + if ! use libressl; then
513 + ewarn "Using bindist or gnutls use flags presently breaks WPA3 (specifically SAE and OWE)."
514 + ewarn "This is incredibly undesirable"
515 + fi
516 + fi
517 +
518 + # Mea culpa, feel free to remove that after some time --mgorny.
519 + local fn
520 + for fn in wpa_supplicant{,@wlan0}.service; do
521 + if [[ -e "${EROOT%/}"/etc/systemd/system/network.target.wants/${fn} ]]
522 + then
523 + ebegin "Moving ${fn} to multi-user.target"
524 + mv "${EROOT%/}"/etc/systemd/system/network.target.wants/${fn} \
525 + "${EROOT%/}"/etc/systemd/system/multi-user.target.wants/ || die
526 + eend ${?} \
527 + "Please try to re-enable ${fn}"
528 + fi
529 + done
530 +
531 + systemd_reenable wpa_supplicant.service
532 +}