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