1 |
commit: be093c9481e7a392226edbdc95eef3cec84880d6 |
2 |
Author: Aaron Bauman <bman <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Feb 2 07:28:57 2017 +0000 |
4 |
Commit: Aaron Bauman <bman <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Feb 2 07:32:16 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=be093c94 |
7 |
|
8 |
net-wireless/wpa_supplicant: remove vulnerable wrt bug #596042 |
9 |
|
10 |
Package-Manager: portage-2.3.3 |
11 |
|
12 |
net-wireless/wpa_supplicant/Manifest | 1 - |
13 |
.../wpa_supplicant/wpa_supplicant-2.5-r1.ebuild | 398 -------------------- |
14 |
.../wpa_supplicant/wpa_supplicant-2.5-r2.ebuild | 408 --------------------- |
15 |
3 files changed, 807 deletions(-) |
16 |
|
17 |
diff --git a/net-wireless/wpa_supplicant/Manifest b/net-wireless/wpa_supplicant/Manifest |
18 |
index 41e9b86..40067ea 100644 |
19 |
--- a/net-wireless/wpa_supplicant/Manifest |
20 |
+++ b/net-wireless/wpa_supplicant/Manifest |
21 |
@@ -1,2 +1 @@ |
22 |
-DIST wpa_supplicant-2.5.tar.gz 2607336 SHA256 cce55bae483b364eae55c35ba567c279be442ed8bab5b80a3c7fb0d057b9b316 SHA512 e3ca36ed10b4dae8f663e98ad230c8c059c952316c21a6b0638ecb1b40a5ef1b9083138ab45207cb764a17e870b4bd0625dd6efdb65856cb4dca13ccc0559e81 WHIRLPOOL 7f35ba06fc4022fe21f05a54a5b108bf2111dcb22e795e1566a514400db8348e79cc80b605dab5b586ab8f3966833ade7153e63c118794a0f06c4afd7a37781d |
23 |
DIST wpa_supplicant-2.6.tar.gz 2753524 SHA256 b4936d34c4e6cdd44954beba74296d964bc2c9668ecaa5255e499636fe2b1450 SHA512 46442cddb6ca043b8b08d143908f149954c238e0f3a57a0df73ca4fab9c1acd91b078f3f26375a1d99cd1d65625986328018c735d8705882c8f91e389cad28a6 WHIRLPOOL 63f91b9f72fee65df5412e90f5a4b38f327f47b44724164aa27a6933a68c68672a129d7c01e658c7fed1f7018fe9e4b743f3c6cef2f69fd75c3f5b9a1cb67c1b |
24 |
|
25 |
diff --git a/net-wireless/wpa_supplicant/wpa_supplicant-2.5-r1.ebuild b/net-wireless/wpa_supplicant/wpa_supplicant-2.5-r1.ebuild |
26 |
deleted file mode 100644 |
27 |
index ef48923..00000000 |
28 |
--- a/net-wireless/wpa_supplicant/wpa_supplicant-2.5-r1.ebuild |
29 |
+++ /dev/null |
30 |
@@ -1,398 +0,0 @@ |
31 |
-# Copyright 1999-2016 Gentoo Foundation |
32 |
-# Distributed under the terms of the GNU General Public License v2 |
33 |
-# $Id$ |
34 |
- |
35 |
-EAPI=5 |
36 |
- |
37 |
-inherit eutils toolchain-funcs qt4-r2 qmake-utils systemd multilib |
38 |
- |
39 |
-DESCRIPTION="IEEE 802.1X/WPA supplicant for secure wireless transfers" |
40 |
-HOMEPAGE="http://hostap.epitest.fi/wpa_supplicant/" |
41 |
-SRC_URI="http://hostap.epitest.fi/releases/${P}.tar.gz" |
42 |
-LICENSE="|| ( GPL-2 BSD )" |
43 |
- |
44 |
-SLOT="0" |
45 |
-KEYWORDS="~alpha amd64 arm ~arm64 ~ia64 ~mips ppc ppc64 ~sparc x86 ~x86-fbsd" |
46 |
-IUSE="ap dbus gnutls eap-sim fasteap +hs2-0 libressl p2p ps3 qt4 qt5 readline selinux smartcard ssl tdls uncommon-eap-types wimax wps kernel_linux kernel_FreeBSD" |
47 |
-REQUIRED_USE="fasteap? ( !gnutls !ssl ) smartcard? ( ssl ) ?? ( qt4 qt5 )" |
48 |
- |
49 |
-CDEPEND="dbus? ( sys-apps/dbus ) |
50 |
- kernel_linux? ( |
51 |
- eap-sim? ( sys-apps/pcsc-lite ) |
52 |
- dev-libs/libnl:3 |
53 |
- net-wireless/crda |
54 |
- ) |
55 |
- !kernel_linux? ( net-libs/libpcap ) |
56 |
- qt4? ( |
57 |
- dev-qt/qtcore:4 |
58 |
- dev-qt/qtgui:4 |
59 |
- dev-qt/qtsvg:4 |
60 |
- ) |
61 |
- qt5? ( |
62 |
- dev-qt/qtcore:5 |
63 |
- dev-qt/qtgui:5 |
64 |
- dev-qt/qtwidgets:5 |
65 |
- dev-qt/qtsvg:5 |
66 |
- ) |
67 |
- readline? ( |
68 |
- sys-libs/ncurses:0= |
69 |
- sys-libs/readline:0= |
70 |
- ) |
71 |
- ssl? ( |
72 |
- !libressl? ( dev-libs/openssl:0= ) |
73 |
- libressl? ( dev-libs/libressl ) |
74 |
- ) |
75 |
- !ssl? ( |
76 |
- gnutls? ( |
77 |
- net-libs/gnutls |
78 |
- dev-libs/libgcrypt:* |
79 |
- ) |
80 |
- !gnutls? ( dev-libs/libtommath ) |
81 |
- ) |
82 |
-" |
83 |
-DEPEND="${CDEPEND} |
84 |
- virtual/pkgconfig |
85 |
-" |
86 |
-RDEPEND="${CDEPEND} |
87 |
- selinux? ( sec-policy/selinux-networkmanager ) |
88 |
-" |
89 |
- |
90 |
-S="${WORKDIR}/${P}/${PN}" |
91 |
- |
92 |
-Kconfig_style_config() { |
93 |
- #param 1 is CONFIG_* item |
94 |
- #param 2 is what to set it = to, defaulting in y |
95 |
- CONFIG_PARAM="${CONFIG_HEADER:-CONFIG_}$1" |
96 |
- setting="${2:-y}" |
97 |
- |
98 |
- if [ ! $setting = n ]; then |
99 |
- #first remove any leading "# " if $2 is not n |
100 |
- sed -i "/^# *$CONFIG_PARAM=/s/^# *//" .config || echo "Kconfig_style_config error uncommenting $CONFIG_PARAM" |
101 |
- #set item = $setting (defaulting to y) |
102 |
- sed -i "/^$CONFIG_PARAM/s/=.*/=$setting/" .config || echo "Kconfig_style_config error setting $CONFIG_PARAM=$setting" |
103 |
- else |
104 |
- #ensure item commented out |
105 |
- sed -i "/^$CONFIG_PARAM/s/$CONFIG_PARAM/# $CONFIG_PARAM/" .config || echo "Kconfig_style_config error commenting $CONFIG_PARAM" |
106 |
- fi |
107 |
-} |
108 |
- |
109 |
-pkg_setup() { |
110 |
- if use gnutls && use ssl ; then |
111 |
- elog "You have both 'gnutls' and 'ssl' USE flags enabled: defaulting to USE=\"ssl\"" |
112 |
- fi |
113 |
-} |
114 |
- |
115 |
-src_prepare() { |
116 |
- # net/bpf.h needed for net-libs/libpcap on Gentoo/FreeBSD |
117 |
- sed -i \ |
118 |
- -e "s:\(#include <pcap\.h>\):#include <net/bpf.h>\n\1:" \ |
119 |
- ../src/l2_packet/l2_packet_freebsd.c || die |
120 |
- |
121 |
- # People seem to take the example configuration file too literally (bug #102361) |
122 |
- sed -i \ |
123 |
- -e "s:^\(opensc_engine_path\):#\1:" \ |
124 |
- -e "s:^\(pkcs11_engine_path\):#\1:" \ |
125 |
- -e "s:^\(pkcs11_module_path\):#\1:" \ |
126 |
- wpa_supplicant.conf || die |
127 |
- |
128 |
- # Change configuration to match Gentoo locations (bug #143750) |
129 |
- sed -i \ |
130 |
- -e "s:/usr/lib/opensc:/usr/$(get_libdir):" \ |
131 |
- -e "s:/usr/lib/pkcs11:/usr/$(get_libdir):" \ |
132 |
- wpa_supplicant.conf || die |
133 |
- |
134 |
- #if use dbus; then |
135 |
- # epatch "${FILESDIR}/${P}-dbus-path-fix.patch" |
136 |
- #fi |
137 |
- |
138 |
- # systemd entries to D-Bus service files (bug #372877) |
139 |
- echo 'SystemdService=wpa_supplicant.service' \ |
140 |
- | tee -a dbus/*.service >/dev/null || die |
141 |
- |
142 |
- cd "${WORKDIR}/${P}" |
143 |
- |
144 |
- if use wimax; then |
145 |
- # generate-libeap-peer.patch comes before |
146 |
- # fix-undefined-reference-to-random_get_bytes.patch |
147 |
- epatch "${FILESDIR}/${P}-generate-libeap-peer.patch" |
148 |
- |
149 |
- # multilib-strict fix (bug #373685) |
150 |
- sed -e "s/\/usr\/lib/\/usr\/$(get_libdir)/" -i src/eap_peer/Makefile |
151 |
- fi |
152 |
- |
153 |
- # bug (320097) |
154 |
- epatch "${FILESDIR}/${P}-do-not-call-dbus-functions-with-NULL-path.patch" |
155 |
- |
156 |
- # TODO - NEED TESTING TO SEE IF STILL NEEDED, NOT COMPATIBLE WITH 1.0 OUT OF THE BOX, |
157 |
- # SO WOULD BE NICE TO JUST DROP IT, IF IT IS NOT NEEDED. |
158 |
- # bug (374089) |
159 |
- #epatch "${FILESDIR}/${P}-dbus-WPAIE-fix.patch" |
160 |
- |
161 |
- # bug (565270) |
162 |
- epatch "${FILESDIR}/${P}-libressl.patch" |
163 |
-} |
164 |
- |
165 |
-src_configure() { |
166 |
- # Toolchain setup |
167 |
- tc-export CC |
168 |
- |
169 |
- cp defconfig .config |
170 |
- |
171 |
- # Basic setup |
172 |
- Kconfig_style_config CTRL_IFACE |
173 |
- Kconfig_style_config BACKEND file |
174 |
- Kconfig_style_config IBSS_RSN |
175 |
- Kconfig_style_config IEEE80211W |
176 |
- Kconfig_style_config IEEE80211R |
177 |
- |
178 |
- # Basic authentication methods |
179 |
- # NOTE: we don't set GPSK or SAKE as they conflict |
180 |
- # with the below options |
181 |
- Kconfig_style_config EAP_GTC |
182 |
- Kconfig_style_config EAP_MD5 |
183 |
- Kconfig_style_config EAP_OTP |
184 |
- Kconfig_style_config EAP_PAX |
185 |
- Kconfig_style_config EAP_PSK |
186 |
- Kconfig_style_config EAP_TLV |
187 |
- Kconfig_style_config EAP_EXE |
188 |
- Kconfig_style_config IEEE8021X_EAPOL |
189 |
- Kconfig_style_config PKCS12 |
190 |
- Kconfig_style_config PEERKEY |
191 |
- Kconfig_style_config EAP_LEAP |
192 |
- Kconfig_style_config EAP_MSCHAPV2 |
193 |
- Kconfig_style_config EAP_PEAP |
194 |
- Kconfig_style_config EAP_TLS |
195 |
- Kconfig_style_config EAP_TTLS |
196 |
- |
197 |
- # Enabling background scanning. |
198 |
- Kconfig_style_config BGSCAN_SIMPLE |
199 |
- Kconfig_style_config BGSCAN_LEARN |
200 |
- |
201 |
- # Enabling mesh networks. |
202 |
- Kconfig_style_config MESH |
203 |
- |
204 |
- if use dbus ; then |
205 |
- Kconfig_style_config CTRL_IFACE_DBUS |
206 |
- Kconfig_style_config CTRL_IFACE_DBUS_NEW |
207 |
- Kconfig_style_config CTRL_IFACE_DBUS_INTRO |
208 |
- fi |
209 |
- |
210 |
- # Enable support for writing debug info to a log file and syslog. |
211 |
- Kconfig_style_config DEBUG_FILE |
212 |
- Kconfig_style_config DEBUG_SYSLOG |
213 |
- |
214 |
- if use hs2-0 ; then |
215 |
- Kconfig_style_config INTERWORKING |
216 |
- Kconfig_style_config HS20 |
217 |
- fi |
218 |
- |
219 |
- if use uncommon-eap-types; then |
220 |
- Kconfig_style_config EAP_GPSK |
221 |
- Kconfig_style_config EAP_SAKE |
222 |
- Kconfig_style_config EAP_GPSK_SHA256 |
223 |
- Kconfig_style_config EAP_IKEV2 |
224 |
- Kconfig_style_config EAP_EKE |
225 |
- fi |
226 |
- |
227 |
- if use eap-sim ; then |
228 |
- # Smart card authentication |
229 |
- Kconfig_style_config EAP_SIM |
230 |
- Kconfig_style_config EAP_AKA |
231 |
- Kconfig_style_config EAP_AKA_PRIME |
232 |
- Kconfig_style_config PCSC |
233 |
- fi |
234 |
- |
235 |
- if use fasteap ; then |
236 |
- Kconfig_style_config EAP_FAST |
237 |
- fi |
238 |
- |
239 |
- if use readline ; then |
240 |
- # readline/history support for wpa_cli |
241 |
- Kconfig_style_config READLINE |
242 |
- else |
243 |
- #internal line edit mode for wpa_cli |
244 |
- Kconfig_style_config WPA_CLI_EDIT |
245 |
- fi |
246 |
- |
247 |
- # SSL authentication methods |
248 |
- if use ssl ; then |
249 |
- Kconfig_style_config TLS openssl |
250 |
- elif use gnutls ; then |
251 |
- Kconfig_style_config TLS gnutls |
252 |
- Kconfig_style_config GNUTLS_EXTRA |
253 |
- else |
254 |
- Kconfig_style_config TLS internal |
255 |
- fi |
256 |
- |
257 |
- if use smartcard ; then |
258 |
- Kconfig_style_config SMARTCARD |
259 |
- fi |
260 |
- |
261 |
- if use tdls ; then |
262 |
- Kconfig_style_config TDLS |
263 |
- fi |
264 |
- |
265 |
- if use kernel_linux ; then |
266 |
- # Linux specific drivers |
267 |
- Kconfig_style_config DRIVER_ATMEL |
268 |
- Kconfig_style_config DRIVER_HOSTAP |
269 |
- Kconfig_style_config DRIVER_IPW |
270 |
- Kconfig_style_config DRIVER_NL80211 |
271 |
- Kconfig_style_config DRIVER_RALINK |
272 |
- Kconfig_style_config DRIVER_WEXT |
273 |
- Kconfig_style_config DRIVER_WIRED |
274 |
- |
275 |
- if use ps3 ; then |
276 |
- Kconfig_style_config DRIVER_PS3 |
277 |
- fi |
278 |
- |
279 |
- elif use kernel_FreeBSD ; then |
280 |
- # FreeBSD specific driver |
281 |
- Kconfig_style_config DRIVER_BSD |
282 |
- fi |
283 |
- |
284 |
- # Wi-Fi Protected Setup (WPS) |
285 |
- if use wps ; then |
286 |
- Kconfig_style_config WPS |
287 |
- Kconfig_style_config WPS2 |
288 |
- # USB Flash Drive |
289 |
- Kconfig_style_config WPS_UFD |
290 |
- # External Registrar |
291 |
- Kconfig_style_config WPS_ER |
292 |
- # Universal Plug'n'Play |
293 |
- Kconfig_style_config WPS_UPNP |
294 |
- # Near Field Communication |
295 |
- Kconfig_style_config WPS_NFC |
296 |
- fi |
297 |
- |
298 |
- # Wi-Fi Direct (WiDi) |
299 |
- if use p2p ; then |
300 |
- Kconfig_style_config P2P |
301 |
- Kconfig_style_config WIFI_DISPLAY |
302 |
- fi |
303 |
- |
304 |
- # Access Point Mode |
305 |
- if use ap ; then |
306 |
- Kconfig_style_config AP |
307 |
- fi |
308 |
- |
309 |
- # Enable mitigation against certain attacks against TKIP |
310 |
- Kconfig_style_config DELAYED_MIC_ERROR_REPORT |
311 |
- |
312 |
- # If we are using libnl 2.0 and above, enable support for it |
313 |
- # Bug 382159 |
314 |
- # Removed for now, since the 3.2 version is broken, and we don't |
315 |
- # support it. |
316 |
- if has_version ">=dev-libs/libnl-3.2"; then |
317 |
- Kconfig_style_config LIBNL32 |
318 |
- fi |
319 |
- |
320 |
- if use qt4 ; then |
321 |
- pushd "${S}"/wpa_gui-qt4 > /dev/null |
322 |
- eqmake4 wpa_gui.pro |
323 |
- popd > /dev/null |
324 |
- fi |
325 |
- if use qt5 ; then |
326 |
- pushd "${S}"/wpa_gui-qt4 > /dev/null |
327 |
- eqmake5 wpa_gui.pro |
328 |
- popd > /dev/null |
329 |
- fi |
330 |
-} |
331 |
- |
332 |
-src_compile() { |
333 |
- einfo "Building wpa_supplicant" |
334 |
- emake V=1 BINDIR=/usr/sbin |
335 |
- |
336 |
- if use wimax; then |
337 |
- emake -C ../src/eap_peer clean |
338 |
- emake -C ../src/eap_peer |
339 |
- fi |
340 |
- |
341 |
- if use qt4 || use qt5; then |
342 |
- pushd "${S}"/wpa_gui-qt4 > /dev/null |
343 |
- einfo "Building wpa_gui" |
344 |
- emake |
345 |
- popd > /dev/null |
346 |
- fi |
347 |
-} |
348 |
- |
349 |
-src_install() { |
350 |
- dosbin wpa_supplicant |
351 |
- dobin wpa_cli wpa_passphrase |
352 |
- |
353 |
- # baselayout-1 compat |
354 |
- if has_version "<sys-apps/baselayout-2.0.0"; then |
355 |
- dodir /sbin |
356 |
- dosym /usr/sbin/wpa_supplicant /sbin/wpa_supplicant |
357 |
- dodir /bin |
358 |
- dosym /usr/bin/wpa_cli /bin/wpa_cli |
359 |
- fi |
360 |
- |
361 |
- if has_version ">=sys-apps/openrc-0.5.0"; then |
362 |
- newinitd "${FILESDIR}/${PN}-init.d" wpa_supplicant |
363 |
- newconfd "${FILESDIR}/${PN}-conf.d" wpa_supplicant |
364 |
- fi |
365 |
- |
366 |
- exeinto /etc/wpa_supplicant/ |
367 |
- newexe "${FILESDIR}/wpa_cli.sh" wpa_cli.sh |
368 |
- |
369 |
- dodoc ChangeLog {eap_testing,todo}.txt README{,-WPS} \ |
370 |
- wpa_supplicant.conf |
371 |
- |
372 |
- newdoc .config build-config |
373 |
- |
374 |
- doman doc/docbook/*.{5,8} |
375 |
- |
376 |
- if use qt4 || use qt5 ; then |
377 |
- into /usr |
378 |
- dobin wpa_gui-qt4/wpa_gui |
379 |
- doicon wpa_gui-qt4/icons/wpa_gui.svg |
380 |
- make_desktop_entry wpa_gui "WPA Supplicant Administration GUI" "wpa_gui" "Qt;Network;" |
381 |
- fi |
382 |
- |
383 |
- use wimax && emake DESTDIR="${D}" -C ../src/eap_peer install |
384 |
- |
385 |
- if use dbus ; then |
386 |
- pushd "${S}"/dbus > /dev/null |
387 |
- insinto /etc/dbus-1/system.d |
388 |
- newins dbus-wpa_supplicant.conf wpa_supplicant.conf |
389 |
- insinto /usr/share/dbus-1/system-services |
390 |
- doins fi.epitest.hostap.WPASupplicant.service fi.w1.wpa_supplicant1.service |
391 |
- popd > /dev/null |
392 |
- |
393 |
- # This unit relies on dbus support, bug 538600. |
394 |
- systemd_dounit systemd/wpa_supplicant.service |
395 |
- fi |
396 |
- |
397 |
- systemd_dounit "systemd/wpa_supplicant@.service" |
398 |
- systemd_dounit "systemd/wpa_supplicant-nl80211@.service" |
399 |
- systemd_dounit "systemd/wpa_supplicant-wired@.service" |
400 |
-} |
401 |
- |
402 |
-pkg_postinst() { |
403 |
- elog "If this is a clean installation of wpa_supplicant, you" |
404 |
- elog "have to create a configuration file named" |
405 |
- elog "/etc/wpa_supplicant/wpa_supplicant.conf" |
406 |
- elog |
407 |
- elog "An example configuration file is available for reference in" |
408 |
- elog "/usr/share/doc/${PF}/" |
409 |
- |
410 |
- if [[ -e ${ROOT}etc/wpa_supplicant.conf ]] ; then |
411 |
- echo |
412 |
- ewarn "WARNING: your old configuration file ${ROOT}etc/wpa_supplicant.conf" |
413 |
- ewarn "needs to be moved to ${ROOT}etc/wpa_supplicant/wpa_supplicant.conf" |
414 |
- fi |
415 |
- |
416 |
- # Mea culpa, feel free to remove that after some time --mgorny. |
417 |
- local fn |
418 |
- for fn in wpa_supplicant{,@wlan0}.service; do |
419 |
- if [[ -e "${ROOT}"/etc/systemd/system/network.target.wants/${fn} ]] |
420 |
- then |
421 |
- ebegin "Moving ${fn} to multi-user.target" |
422 |
- mv "${ROOT}"/etc/systemd/system/network.target.wants/${fn} \ |
423 |
- "${ROOT}"/etc/systemd/system/multi-user.target.wants/ |
424 |
- eend ${?} \ |
425 |
- "Please try to re-enable ${fn}" |
426 |
- fi |
427 |
- done |
428 |
-} |
429 |
|
430 |
diff --git a/net-wireless/wpa_supplicant/wpa_supplicant-2.5-r2.ebuild b/net-wireless/wpa_supplicant/wpa_supplicant-2.5-r2.ebuild |
431 |
deleted file mode 100644 |
432 |
index 586e74e..00000000 |
433 |
--- a/net-wireless/wpa_supplicant/wpa_supplicant-2.5-r2.ebuild |
434 |
+++ /dev/null |
435 |
@@ -1,408 +0,0 @@ |
436 |
-# Copyright 1999-2016 Gentoo Foundation |
437 |
-# Distributed under the terms of the GNU General Public License v2 |
438 |
-# $Id$ |
439 |
- |
440 |
-EAPI=5 |
441 |
- |
442 |
-inherit eutils toolchain-funcs qt4-r2 qmake-utils systemd multilib |
443 |
- |
444 |
-DESCRIPTION="IEEE 802.1X/WPA supplicant for secure wireless transfers" |
445 |
-HOMEPAGE="http://hostap.epitest.fi/wpa_supplicant/" |
446 |
-SRC_URI="http://hostap.epitest.fi/releases/${P}.tar.gz" |
447 |
-LICENSE="|| ( GPL-2 BSD )" |
448 |
- |
449 |
-SLOT="0" |
450 |
-KEYWORDS="~alpha amd64 arm ~arm64 ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd" |
451 |
-IUSE="ap dbus gnutls eap-sim fasteap +hs2-0 libressl p2p ps3 qt4 qt5 readline selinux smartcard ssl tdls uncommon-eap-types wimax wps kernel_linux kernel_FreeBSD" |
452 |
-REQUIRED_USE="fasteap? ( !gnutls !ssl ) smartcard? ( ssl ) ?? ( qt4 qt5 )" |
453 |
- |
454 |
-CDEPEND="dbus? ( sys-apps/dbus ) |
455 |
- kernel_linux? ( |
456 |
- eap-sim? ( sys-apps/pcsc-lite ) |
457 |
- dev-libs/libnl:3 |
458 |
- net-wireless/crda |
459 |
- ) |
460 |
- !kernel_linux? ( net-libs/libpcap ) |
461 |
- qt4? ( |
462 |
- dev-qt/qtcore:4 |
463 |
- dev-qt/qtgui:4 |
464 |
- dev-qt/qtsvg:4 |
465 |
- ) |
466 |
- qt5? ( |
467 |
- dev-qt/qtcore:5 |
468 |
- dev-qt/qtgui:5 |
469 |
- dev-qt/qtwidgets:5 |
470 |
- dev-qt/qtsvg:5 |
471 |
- ) |
472 |
- readline? ( |
473 |
- sys-libs/ncurses:0= |
474 |
- sys-libs/readline:0= |
475 |
- ) |
476 |
- ssl? ( |
477 |
- !libressl? ( dev-libs/openssl:0= ) |
478 |
- libressl? ( dev-libs/libressl ) |
479 |
- ) |
480 |
- !ssl? ( |
481 |
- gnutls? ( |
482 |
- net-libs/gnutls |
483 |
- dev-libs/libgcrypt:* |
484 |
- ) |
485 |
- !gnutls? ( dev-libs/libtommath ) |
486 |
- ) |
487 |
-" |
488 |
-DEPEND="${CDEPEND} |
489 |
- virtual/pkgconfig |
490 |
-" |
491 |
-RDEPEND="${CDEPEND} |
492 |
- selinux? ( sec-policy/selinux-networkmanager ) |
493 |
-" |
494 |
- |
495 |
-S="${WORKDIR}/${P}/${PN}" |
496 |
- |
497 |
-Kconfig_style_config() { |
498 |
- #param 1 is CONFIG_* item |
499 |
- #param 2 is what to set it = to, defaulting in y |
500 |
- CONFIG_PARAM="${CONFIG_HEADER:-CONFIG_}$1" |
501 |
- setting="${2:-y}" |
502 |
- |
503 |
- if [ ! $setting = n ]; then |
504 |
- #first remove any leading "# " if $2 is not n |
505 |
- sed -i "/^# *$CONFIG_PARAM=/s/^# *//" .config || echo "Kconfig_style_config error uncommenting $CONFIG_PARAM" |
506 |
- #set item = $setting (defaulting to y) |
507 |
- sed -i "/^$CONFIG_PARAM/s/=.*/=$setting/" .config || echo "Kconfig_style_config error setting $CONFIG_PARAM=$setting" |
508 |
- else |
509 |
- #ensure item commented out |
510 |
- sed -i "/^$CONFIG_PARAM/s/$CONFIG_PARAM/# $CONFIG_PARAM/" .config || echo "Kconfig_style_config error commenting $CONFIG_PARAM" |
511 |
- fi |
512 |
-} |
513 |
- |
514 |
-pkg_setup() { |
515 |
- if use gnutls && use ssl ; then |
516 |
- elog "You have both 'gnutls' and 'ssl' USE flags enabled: defaulting to USE=\"ssl\"" |
517 |
- fi |
518 |
-} |
519 |
- |
520 |
-src_prepare() { |
521 |
- # net/bpf.h needed for net-libs/libpcap on Gentoo/FreeBSD |
522 |
- sed -i \ |
523 |
- -e "s:\(#include <pcap\.h>\):#include <net/bpf.h>\n\1:" \ |
524 |
- ../src/l2_packet/l2_packet_freebsd.c || die |
525 |
- |
526 |
- # People seem to take the example configuration file too literally (bug #102361) |
527 |
- sed -i \ |
528 |
- -e "s:^\(opensc_engine_path\):#\1:" \ |
529 |
- -e "s:^\(pkcs11_engine_path\):#\1:" \ |
530 |
- -e "s:^\(pkcs11_module_path\):#\1:" \ |
531 |
- wpa_supplicant.conf || die |
532 |
- |
533 |
- # Change configuration to match Gentoo locations (bug #143750) |
534 |
- sed -i \ |
535 |
- -e "s:/usr/lib/opensc:/usr/$(get_libdir):" \ |
536 |
- -e "s:/usr/lib/pkcs11:/usr/$(get_libdir):" \ |
537 |
- wpa_supplicant.conf || die |
538 |
- |
539 |
- #if use dbus; then |
540 |
- # epatch "${FILESDIR}/${P}-dbus-path-fix.patch" |
541 |
- #fi |
542 |
- |
543 |
- # systemd entries to D-Bus service files (bug #372877) |
544 |
- echo 'SystemdService=wpa_supplicant.service' \ |
545 |
- | tee -a dbus/*.service >/dev/null || die |
546 |
- |
547 |
- cd "${WORKDIR}/${P}" |
548 |
- |
549 |
- if use wimax; then |
550 |
- # generate-libeap-peer.patch comes before |
551 |
- # fix-undefined-reference-to-random_get_bytes.patch |
552 |
- epatch "${FILESDIR}/${P}-generate-libeap-peer.patch" |
553 |
- |
554 |
- # multilib-strict fix (bug #373685) |
555 |
- sed -e "s/\/usr\/lib/\/usr\/$(get_libdir)/" -i src/eap_peer/Makefile |
556 |
- fi |
557 |
- |
558 |
- # bug (320097) |
559 |
- epatch "${FILESDIR}/${P}-do-not-call-dbus-functions-with-NULL-path.patch" |
560 |
- |
561 |
- # TODO - NEED TESTING TO SEE IF STILL NEEDED, NOT COMPATIBLE WITH 1.0 OUT OF THE BOX, |
562 |
- # SO WOULD BE NICE TO JUST DROP IT, IF IT IS NOT NEEDED. |
563 |
- # bug (374089) |
564 |
- #epatch "${FILESDIR}/${P}-dbus-WPAIE-fix.patch" |
565 |
- |
566 |
- # bug (565270) |
567 |
- epatch "${FILESDIR}/${P}-libressl.patch" |
568 |
- |
569 |
- # Security patches |
570 |
- epatch "${FILESDIR}/2015-7/0001-EAP-pwd-peer-Fix-last-fragment-length-validation.patch" |
571 |
- epatch "${FILESDIR}/2015-7/0001-EAP-pwd-server-Fix-last-fragment-length-validation.patch" |
572 |
- epatch "${FILESDIR}/2015-8/0001-EAP-pwd-peer-Fix-error-path-for-unexpected-Confirm-m.patch" |
573 |
- epatch "${FILESDIR}/2016-1/0001-WPS-Reject-a-Credential-with-invalid-passphrase.patch" |
574 |
- epatch "${FILESDIR}/2016-1/0002-Reject-psk-parameter-set-with-invalid-passphrase-cha.patch" |
575 |
- epatch "${FILESDIR}/2016-1/0003-Remove-newlines-from-wpa_supplicant-config-network-o.patch" |
576 |
- epatch "${FILESDIR}/2016-1/0004-Reject-SET_CRED-commands-with-newline-characters-in-.patch" |
577 |
- epatch "${FILESDIR}/2016-1/0005-Reject-SET-commands-with-newline-characters-in-the-s.patch" |
578 |
-} |
579 |
- |
580 |
-src_configure() { |
581 |
- # Toolchain setup |
582 |
- tc-export CC |
583 |
- |
584 |
- cp defconfig .config |
585 |
- |
586 |
- # Basic setup |
587 |
- Kconfig_style_config CTRL_IFACE |
588 |
- Kconfig_style_config BACKEND file |
589 |
- Kconfig_style_config IBSS_RSN |
590 |
- Kconfig_style_config IEEE80211W |
591 |
- Kconfig_style_config IEEE80211R |
592 |
- |
593 |
- # Basic authentication methods |
594 |
- # NOTE: we don't set GPSK or SAKE as they conflict |
595 |
- # with the below options |
596 |
- Kconfig_style_config EAP_GTC |
597 |
- Kconfig_style_config EAP_MD5 |
598 |
- Kconfig_style_config EAP_OTP |
599 |
- Kconfig_style_config EAP_PAX |
600 |
- Kconfig_style_config EAP_PSK |
601 |
- Kconfig_style_config EAP_TLV |
602 |
- Kconfig_style_config EAP_EXE |
603 |
- Kconfig_style_config IEEE8021X_EAPOL |
604 |
- Kconfig_style_config PKCS12 |
605 |
- Kconfig_style_config PEERKEY |
606 |
- Kconfig_style_config EAP_LEAP |
607 |
- Kconfig_style_config EAP_MSCHAPV2 |
608 |
- Kconfig_style_config EAP_PEAP |
609 |
- Kconfig_style_config EAP_TLS |
610 |
- Kconfig_style_config EAP_TTLS |
611 |
- |
612 |
- # Enabling background scanning. |
613 |
- Kconfig_style_config BGSCAN_SIMPLE |
614 |
- Kconfig_style_config BGSCAN_LEARN |
615 |
- |
616 |
- # Enabling mesh networks. |
617 |
- Kconfig_style_config MESH |
618 |
- |
619 |
- if use dbus ; then |
620 |
- Kconfig_style_config CTRL_IFACE_DBUS |
621 |
- Kconfig_style_config CTRL_IFACE_DBUS_NEW |
622 |
- Kconfig_style_config CTRL_IFACE_DBUS_INTRO |
623 |
- fi |
624 |
- |
625 |
- # Enable support for writing debug info to a log file and syslog. |
626 |
- Kconfig_style_config DEBUG_FILE |
627 |
- Kconfig_style_config DEBUG_SYSLOG |
628 |
- |
629 |
- if use hs2-0 ; then |
630 |
- Kconfig_style_config INTERWORKING |
631 |
- Kconfig_style_config HS20 |
632 |
- fi |
633 |
- |
634 |
- if use uncommon-eap-types; then |
635 |
- Kconfig_style_config EAP_GPSK |
636 |
- Kconfig_style_config EAP_SAKE |
637 |
- Kconfig_style_config EAP_GPSK_SHA256 |
638 |
- Kconfig_style_config EAP_IKEV2 |
639 |
- Kconfig_style_config EAP_EKE |
640 |
- fi |
641 |
- |
642 |
- if use eap-sim ; then |
643 |
- # Smart card authentication |
644 |
- Kconfig_style_config EAP_SIM |
645 |
- Kconfig_style_config EAP_AKA |
646 |
- Kconfig_style_config EAP_AKA_PRIME |
647 |
- Kconfig_style_config PCSC |
648 |
- fi |
649 |
- |
650 |
- if use fasteap ; then |
651 |
- Kconfig_style_config EAP_FAST |
652 |
- fi |
653 |
- |
654 |
- if use readline ; then |
655 |
- # readline/history support for wpa_cli |
656 |
- Kconfig_style_config READLINE |
657 |
- else |
658 |
- #internal line edit mode for wpa_cli |
659 |
- Kconfig_style_config WPA_CLI_EDIT |
660 |
- fi |
661 |
- |
662 |
- # SSL authentication methods |
663 |
- if use ssl ; then |
664 |
- Kconfig_style_config TLS openssl |
665 |
- elif use gnutls ; then |
666 |
- Kconfig_style_config TLS gnutls |
667 |
- Kconfig_style_config GNUTLS_EXTRA |
668 |
- else |
669 |
- Kconfig_style_config TLS internal |
670 |
- fi |
671 |
- |
672 |
- if use smartcard ; then |
673 |
- Kconfig_style_config SMARTCARD |
674 |
- fi |
675 |
- |
676 |
- if use tdls ; then |
677 |
- Kconfig_style_config TDLS |
678 |
- fi |
679 |
- |
680 |
- if use kernel_linux ; then |
681 |
- # Linux specific drivers |
682 |
- Kconfig_style_config DRIVER_ATMEL |
683 |
- Kconfig_style_config DRIVER_HOSTAP |
684 |
- Kconfig_style_config DRIVER_IPW |
685 |
- Kconfig_style_config DRIVER_NL80211 |
686 |
- Kconfig_style_config DRIVER_RALINK |
687 |
- Kconfig_style_config DRIVER_WEXT |
688 |
- Kconfig_style_config DRIVER_WIRED |
689 |
- |
690 |
- if use ps3 ; then |
691 |
- Kconfig_style_config DRIVER_PS3 |
692 |
- fi |
693 |
- |
694 |
- elif use kernel_FreeBSD ; then |
695 |
- # FreeBSD specific driver |
696 |
- Kconfig_style_config DRIVER_BSD |
697 |
- fi |
698 |
- |
699 |
- # Wi-Fi Protected Setup (WPS) |
700 |
- if use wps ; then |
701 |
- Kconfig_style_config WPS |
702 |
- Kconfig_style_config WPS2 |
703 |
- # USB Flash Drive |
704 |
- Kconfig_style_config WPS_UFD |
705 |
- # External Registrar |
706 |
- Kconfig_style_config WPS_ER |
707 |
- # Universal Plug'n'Play |
708 |
- Kconfig_style_config WPS_UPNP |
709 |
- # Near Field Communication |
710 |
- Kconfig_style_config WPS_NFC |
711 |
- fi |
712 |
- |
713 |
- # Wi-Fi Direct (WiDi) |
714 |
- if use p2p ; then |
715 |
- Kconfig_style_config P2P |
716 |
- Kconfig_style_config WIFI_DISPLAY |
717 |
- fi |
718 |
- |
719 |
- # Access Point Mode |
720 |
- if use ap ; then |
721 |
- Kconfig_style_config AP |
722 |
- fi |
723 |
- |
724 |
- # Enable mitigation against certain attacks against TKIP |
725 |
- Kconfig_style_config DELAYED_MIC_ERROR_REPORT |
726 |
- |
727 |
- # If we are using libnl 2.0 and above, enable support for it |
728 |
- # Bug 382159 |
729 |
- # Removed for now, since the 3.2 version is broken, and we don't |
730 |
- # support it. |
731 |
- if has_version ">=dev-libs/libnl-3.2"; then |
732 |
- Kconfig_style_config LIBNL32 |
733 |
- fi |
734 |
- |
735 |
- if use qt4 ; then |
736 |
- pushd "${S}"/wpa_gui-qt4 > /dev/null |
737 |
- eqmake4 wpa_gui.pro |
738 |
- popd > /dev/null |
739 |
- fi |
740 |
- if use qt5 ; then |
741 |
- pushd "${S}"/wpa_gui-qt4 > /dev/null |
742 |
- eqmake5 wpa_gui.pro |
743 |
- popd > /dev/null |
744 |
- fi |
745 |
-} |
746 |
- |
747 |
-src_compile() { |
748 |
- einfo "Building wpa_supplicant" |
749 |
- emake V=1 BINDIR=/usr/sbin |
750 |
- |
751 |
- if use wimax; then |
752 |
- emake -C ../src/eap_peer clean |
753 |
- emake -C ../src/eap_peer |
754 |
- fi |
755 |
- |
756 |
- if use qt4 || use qt5; then |
757 |
- pushd "${S}"/wpa_gui-qt4 > /dev/null |
758 |
- einfo "Building wpa_gui" |
759 |
- emake |
760 |
- popd > /dev/null |
761 |
- fi |
762 |
-} |
763 |
- |
764 |
-src_install() { |
765 |
- dosbin wpa_supplicant |
766 |
- dobin wpa_cli wpa_passphrase |
767 |
- |
768 |
- # baselayout-1 compat |
769 |
- if has_version "<sys-apps/baselayout-2.0.0"; then |
770 |
- dodir /sbin |
771 |
- dosym /usr/sbin/wpa_supplicant /sbin/wpa_supplicant |
772 |
- dodir /bin |
773 |
- dosym /usr/bin/wpa_cli /bin/wpa_cli |
774 |
- fi |
775 |
- |
776 |
- if has_version ">=sys-apps/openrc-0.5.0"; then |
777 |
- newinitd "${FILESDIR}/${PN}-init.d" wpa_supplicant |
778 |
- newconfd "${FILESDIR}/${PN}-conf.d" wpa_supplicant |
779 |
- fi |
780 |
- |
781 |
- exeinto /etc/wpa_supplicant/ |
782 |
- newexe "${FILESDIR}/wpa_cli.sh" wpa_cli.sh |
783 |
- |
784 |
- dodoc ChangeLog {eap_testing,todo}.txt README{,-WPS} \ |
785 |
- wpa_supplicant.conf |
786 |
- |
787 |
- newdoc .config build-config |
788 |
- |
789 |
- doman doc/docbook/*.{5,8} |
790 |
- |
791 |
- if use qt4 || use qt5 ; then |
792 |
- into /usr |
793 |
- dobin wpa_gui-qt4/wpa_gui |
794 |
- doicon wpa_gui-qt4/icons/wpa_gui.svg |
795 |
- make_desktop_entry wpa_gui "WPA Supplicant Administration GUI" "wpa_gui" "Qt;Network;" |
796 |
- fi |
797 |
- |
798 |
- use wimax && emake DESTDIR="${D}" -C ../src/eap_peer install |
799 |
- |
800 |
- if use dbus ; then |
801 |
- pushd "${S}"/dbus > /dev/null |
802 |
- insinto /etc/dbus-1/system.d |
803 |
- newins dbus-wpa_supplicant.conf wpa_supplicant.conf |
804 |
- insinto /usr/share/dbus-1/system-services |
805 |
- doins fi.epitest.hostap.WPASupplicant.service fi.w1.wpa_supplicant1.service |
806 |
- popd > /dev/null |
807 |
- |
808 |
- # This unit relies on dbus support, bug 538600. |
809 |
- systemd_dounit systemd/wpa_supplicant.service |
810 |
- fi |
811 |
- |
812 |
- systemd_dounit "systemd/wpa_supplicant@.service" |
813 |
- systemd_dounit "systemd/wpa_supplicant-nl80211@.service" |
814 |
- systemd_dounit "systemd/wpa_supplicant-wired@.service" |
815 |
-} |
816 |
- |
817 |
-pkg_postinst() { |
818 |
- elog "If this is a clean installation of wpa_supplicant, you" |
819 |
- elog "have to create a configuration file named" |
820 |
- elog "/etc/wpa_supplicant/wpa_supplicant.conf" |
821 |
- elog |
822 |
- elog "An example configuration file is available for reference in" |
823 |
- elog "/usr/share/doc/${PF}/" |
824 |
- |
825 |
- if [[ -e ${ROOT}etc/wpa_supplicant.conf ]] ; then |
826 |
- echo |
827 |
- ewarn "WARNING: your old configuration file ${ROOT}etc/wpa_supplicant.conf" |
828 |
- ewarn "needs to be moved to ${ROOT}etc/wpa_supplicant/wpa_supplicant.conf" |
829 |
- fi |
830 |
- |
831 |
- # Mea culpa, feel free to remove that after some time --mgorny. |
832 |
- local fn |
833 |
- for fn in wpa_supplicant{,@wlan0}.service; do |
834 |
- if [[ -e "${ROOT}"/etc/systemd/system/network.target.wants/${fn} ]] |
835 |
- then |
836 |
- ebegin "Moving ${fn} to multi-user.target" |
837 |
- mv "${ROOT}"/etc/systemd/system/network.target.wants/${fn} \ |
838 |
- "${ROOT}"/etc/systemd/system/multi-user.target.wants/ |
839 |
- eend ${?} \ |
840 |
- "Please try to re-enable ${fn}" |
841 |
- fi |
842 |
- done |
843 |
-} |